Parameter | Default | Description |
---|---|---|
host | localhost | Database server address |
port | 8888 | Database connection port |
user | gaussdb | Database username |
password | - | Complex password string |
database | postgres | Default database name |
min_connections | 1 | Connection pool minimum size |
max_connections | 5 | Connection pool maximum size |
table_name | langchain_docs | Name of the table for storing vector data and metadata |
index_type | IndexType.HNSW | Vector index algorithm type. Options: HNSW or IVFFLAT\nDefault is HNSW. |
vector_type | VectorType.vector | Type of vector representation to use. Default is Vector. |
distance_strategy | DistanceStrategy.COSINE | Vector similarity metric to use for retrieval. Options: euclidean (L2 distance), cosine (angular distance, ideal for text embeddings), manhattan (L1 distance for sparse data), negative_inner_product (dot product for normalized vectors).\n Default is cosine. |
embedding_dimension | 1536 | Dimensionality of the vector embeddings. |
Vector Type | Dimensions | Index Types | Supported Distance Strategies |
---|---|---|---|
vector | ≤2000 | HNSW/IVFFLAT | COSINE/EUCLIDEAN/MANHATTAN/INNER_PROD |
m
: 16-100 (balance between recall and memory)ef_construction
: 64-1000 (must be > 2*m)bit
and sparsevec
vector types currently in developmentvector
type