llmsmith.task.retrieval.vector.options package

Submodules

llmsmith.task.retrieval.vector.options.chromadb module

class llmsmith.task.retrieval.vector.options.chromadb.ChromaDBQueryOptions

Bases: TypedDict

A dictionary of options to pass while querying a Chroma DB collection. The option names are same as the ones used in query method of ChromaDB Collection client. Refer below links for more info.

n_results: int
where: List[Where]]]]
where_document: List[WhereDocument]]]]

llmsmith.task.retrieval.vector.options.pgvector module

class llmsmith.task.retrieval.vector.options.pgvector.PgVectorQueryOptions

Bases: TypedDict

A dictionary of options to pass while querying a PgVector backed table.

Parameters:
  • limit – number of documents to fetch

  • where (str) – filters to be applied in the query. Use Sqlalchemy where clauses

  • distance_function (str) – distance function to use. Can be ‘l2’ or ‘cosine’. Defaults to ‘cosine’

distance_function: Literal['l2', 'cosine']
limit: int
where: ColumnElement[bool]

llmsmith.task.retrieval.vector.options.pinecone module

class llmsmith.task.retrieval.vector.options.pinecone.PineconeQueryOptions

Bases: TypedDict

A dictionary of options to pass while querying a Pinecone index. The option names are same as the ones used in query method of Pinecone Index client. Refer below links for more info.

filter: Dict[str, str | float | int | bool | List | dict] | None
include_values: bool | None
namespace: str | None
sparse_vector: SparseValues | Dict[str, List[float] | List[int]] | None
top_k: int | None

llmsmith.task.retrieval.vector.options.qdrant module

class llmsmith.task.retrieval.vector.options.qdrant.QdrantQueryOptions

Bases: TypedDict

A dictionary of options to pass while querying a qdrant collection. The option names are same as the ones used in search method of AsyncQdrantClient. Refer below links for more info.

consistency: int | ReadConsistencyType | None
limit: int | None
offset: int | None
query_filter: Filter | Filter | None
score_threshold: float | None
search_params: SearchParams | SearchParams | None
shard_key_selector: str | int | List[str | int] | None
timeout: int | None
with_vectors: bool | Sequence[str] | None

Module contents