# 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`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seldon.ai/llm-module/resources/reference/retrieval.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
