> For the complete documentation index, see [llms.txt](https://docs.seldon.ai/llm-module/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.seldon.ai/llm-module/resources/reference/retrieval.md).

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