| Name | Type | Description |
|---|---|---|
cosmosdb_connection_string* | str | Cosmos DB Mongo vCore connection string |
cosmosdb_client | Optional[Any] | Default: NoneCosmos DB Mongo vCore client |
embedding* | Embedding | Embedding provider for semantic encoding and search. |
database_name* | str | |
collection_name* | str | |
num_lists | int | Default: 100 |
dimensions | int | Default: 1536 |
similarity | CosmosDBSimilarityType | Default: CosmosDBSimilarityType.COS |
kind | CosmosDBVectorSearchType | Default: CosmosDBVectorSearchType.VECTOR_IVF |
m | int | Default: 16 |
ef_construction | int | Default: 64 |
ef_search | int | Default: 40 |
max_degree | int | Default: 32 |
l_build | int | Default: 50 |
l_search | int | Default: 40 |
score_threshold | Optional[float] | Default: None |
application_name | str | Default: 'langchainpy' |
compression | Optional[CosmosDBVectorSearchCompression] | Default: None |
pq_compressed_dims | Optional[int] | Default: None |
pq_sample_size | Optional[int] | Default: None |
oversampling | Optional[float] | Default: None |
| Name | Type |
|---|---|
| cosmosdb_connection_string | str |
| database_name | str |
| collection_name | str |
| embedding | Embeddings |
| cosmosdb_client | Optional[Any] |
| num_lists | int |
| similarity | CosmosDBSimilarityType |
| kind | CosmosDBVectorSearchType |
| dimensions | int |
| m | int |
| ef_construction | int |
| max_degree | int |
| l_build | int |
| l_search | int |
| ef_search | int |
| application_name | str |
| score_threshold | Optional[float] |
| compression | Optional[CosmosDBVectorSearchCompression] |
| pq_compressed_dims | Optional[int] |
| pq_sample_size | Optional[int] |
| oversampling | Optional[float] |
Cache that uses Cosmos DB Mongo vCore vector-store backend.
Database name for the CosmosDBMongoVCoreSemanticCache
Collection name for the CosmosDBMongoVCoreSemanticCache
This integer is the number of clusters that the inverted file (IVF) index uses to group the vector data. We recommend that numLists is set to documentCount/1000 for up to 1 million documents and to sqrt(documentCount) for more than 1 million documents. Using a numLists value of 1 is akin to performing brute-force search, which has limited performance
Number of dimensions for vector similarity. The maximum number of supported dimensions is 2000
Similarity metric to use with the IVF index.
Possible options are: - CosmosDBSimilarityType.COS (cosine distance), - CosmosDBSimilarityType.L2 (Euclidean distance), and - CosmosDBSimilarityType.IP (inner product).
Type of vector index to create. Possible options are: - vector-ivf - vector-hnsw - vector-diskann
The max number of connections per layer (16 by default, minimum value is 2, maximum value is 100). Higher m is suitable for datasets with high dimensionality and/or high accuracy requirements.
the size of the dynamic candidate list for constructing the graph (64 by default, minimum value is 4, maximum value is 1000). Higher ef_construction will result in better index quality and higher accuracy, but it will also increase the time required to build the index. ef_construction has to be at least 2 * m
The size of the dynamic candidate list for search (40 by default). A higher value provides better recall at the cost of speed.
Max number of neighbors. Default value is 32, range from 20 to 2048. Only vector-diskann search supports this for now.
l value for index building. Default value is 50, range from 10 to 500. Only vector-diskann search supports this for now.
l value for index searching. Default value is 40, range from 10 to 10000. Only vector-diskann search supports this.
Maximum score used to filter the vector search documents.
Application name for the client for tracking and logging
compression type for vector indexes.
Number of dimensions after compression for product quantization. Must be less than original dimensions. Automatically calculated if omitted. Range: 1-8000.
Number of samples for PQ centroid training. Higher value means better quality but longer build time. Default: 1000. Range: 1000-100000.
The oversampling factor for compressed index. The oversampling factor (a float with a minimum of 1) specifies how many more candidate vectors to retrieve from the compressed index than k (the number of desired results).