query_qdrant

query_qdrant(
    query_texts: list[str],
    n_results: int = 10,
    client: QdrantClient = None,
    collection_name: str = 'all-my-documents',
    search_string: str = '',
    embedding_model: str = 'BAAI/bge-small-en-v1.5',
    qdrant_client_options: dict[str, Any] | None = {}
) -> list[list['QueryResponse']]

Perform a similarity search with filters on a Qdrant collection

Parameters:
NameDescription
query_textsthe query texts.

Type: list[str]
n_resultsthe number of results to return.

Default is 10.

Type: int

Default: 10
clientthe QdrantClient instance.

A default in-memory client will be instantiated if None.

Type: QdrantClient

Default: None
collection_namethe name of the collection.

Default is “all-my-documents”.

Type: str

Default: ‘all-my-documents’
search_stringthe search string.

Default is "".

Type: str

Default:
embedding_modelthe embedding model to use.

Default is “all-MiniLM-L6-v2”.

Will be ignored if embedding_function is not None.

Type: str

Default: ‘BAAI/bge-small-en-v1.5’
qdrant_client_options(Optional, dict): the options for instantiating the qdrant client.

Reference: https://github.com/qdrant/qdrant-client/blob/master/qdrant_client/qdrant_client.py#L36-L58.

Type: dict[str, typing.Any] | None

Default: {}
Returns:
TypeDescription
list[list[‘QueryResponse’]]list[list[QueryResponse]]: the query result. The format is: class QueryResponse(BaseModel, extra=“forbid”): # type: ignore id: Union[str, int] embedding: Optional[List[float]] metadata: Dict[str, Any] document: str score: float