DeepFellow DOCS

Search a vector store for relevant chunks based on a query and file attributes filter.

Search a vector store for relevant text chunks based on a query and optional file attributes filter.

Generate embeddings for the search query using VectorStoreEmbeddingService, find the most similar chunks in the specified vector store, and rank them by relevance score. Additionally, apply filters to narrow results before returning them as part of a paginated response.

Needs user bearer token in authorization header.

POST
/v1/vector_stores/{vector_store_id}/search
Authorization[Bearer <token>]

In: header

Path Parameters

vector_store_id[Vector Store Id]

The ID of the vector store to delete.

Match^[0-9a-fA-F]{24}$

Header Parameters

OpenAI-Organization?[Openai-Organization]

Organization Id from OpenAi compatible endpoint. Required to organization access or project access (with OpenAI-Project header) when logged as User or Admin User.

OpenAI-Project?[Openai-Project]

Project Id from OpenAi compatible endpoint. Required to project access for organization api key or User / Admin User access with OpenAI-Organization

query[Query]

A query string or array of strings for a search

filters?[Filters]

A filter to apply based on file attributes

max_num_results?[Max Num Results]

The maximum number of results to return. This number should be between 1 and 50 inclusive

ranking_options?[RankingOptions | null]

Ranking options for search

rewrite_query?[Rewrite Query]

Whether to rewrite the natural language query for vector search

Response Body

curl -X POST "https://deepfellow-server-host/v1/vector_stores/5eb7cf5a86d9755df3a6c593/search" \  -H "OpenAI-Organization: string" \  -H "OpenAI-Project: string" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
{
  "object": "vector_store.search_results.page",
  "search_query": "string",
  "data": [
    {
      "file_id": "5eb7cf5a86d9755df3a6c593",
      "filename": "string",
      "score": 0,
      "attributes": {},
      "content": [
        {
          "text": "string",
          "type": "text",
          "offset": 0,
          "metadata": {}
        }
      ]
    }
  ],
  "has_more": true,
  "next_page": "string"
}
{
  "error": {
    "message": "string",
    "type": "string",
    "param": "string",
    "code": "string"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.