Retrieval

VectorDBSettings:

Retrieval base settings.

provider_id: VectorDBEnum

Description: VectorDB provider id. Available options: "qdrant" | "pgvector".

config: Union[QdrantSettings, PGVectorSettings]

Description: VectorDB provider settings.\

prompt_utils: Optional[PromptUtilsSettings]

Description: Prompt utils settings. Default: None

extract_utils: Optional[ExtractUtilsSettings]

Description: Extract utils settings. Default: None

ExtractUtilsSettings

ExtractUtils setting. Used to extract keys from the response of the vector database. For example, some jinja prompt my expect the context for the vector-db to have specific keys which my not be the same as the keys in the response of the vector database. Thus, this setting can be used to extract and remap keys.

keys: Optional[List[str]]

Description: List of keys names to extract. Default: None

keys_mapping: Optional[Dict[str, str]]

Description: Mapping of extracted keys. Default: None

Distances

Available distances are: "l1" | "l2" | "inner_product" | "cosine". Note that "inner_product" is in fact the negative inner product.

PGVectorSettings

model_type: Literal["vector-db"] = "ector-db"

Description: The model type. Default: "vector-db"

host: str

Description: Hostname of the PostgreSQL server. Default: "localhost"

port: int

Description: Port of the PostgreSQL server. Defualt: 5432

database: str

Description: Name of the PostgreSQL database.

user: str

Description: Username to authenticate with.

password: str

Description: Password to authenticate with.

table: str

Description: Name of the table to query. Default: "embedding_table"

embedding_column: str

Description: Name of the column containing embeddings. Default: "embedding"

search_parameters: Optional[dict]

Description: Additional parameters for the vector database. Default: None

QdrantSettings:

model_type: Literal["vector-db"]*

Description: The model type. Default: "vector-db"

collection_name: str

Description: Qdrant collection name

init_kwargs: Optional[dict]

Description: Initialization kwargs for QdrantClient Default: None

search_parameters: Optional[dict]

Description: Additional parameters for the vector database. Default: None

Last updated

Was this helpful?