Working with ManticoreSearch Settings in LangChain
Posted: Jan 29, 2025.
When working with ManticoreSearch vector store in LangChain, you'll need to configure how it connects and behaves using the ManticoreSearchSettings class. This guide covers everything you need to know about configuring ManticoreSearch settings.
What is ManticoreSearchSettings?
ManticoreSearchSettings is a configuration class that lets you customize how LangChain interacts with a ManticoreSearch vector store. It handles connection details, column mappings, and HNSW (Hierarchical Navigable Small World) algorithm parameters for vector similarity search.
Reference
Here are the main configuration options available in ManticoreSearchSettings:
Parameter | Description | Default |
---|---|---|
host | ManticoreSearch server hostname | 'localhost' |
port | Server port number | 9308 |
proto | Connection protocol | 'http' |
table | Table name for storing vectors | 'langchain' |
username | Authentication username | None |
password | Authentication password | None |
column_map | Dictionary mapping internal to actual column names | Default mapping* |
knn_type | Vector search algorithm type | 'hnsw' |
knn_dims | Number of vector dimensions | None |
hnsw_m | HNSW graph max number of connections | 16 |
hnsw_ef_construction | HNSW index time quality parameter | 100 |
hnsw_similarity | HNSW distance metric | 'L2' |
*Default column mapping:
How to use ManticoreSearchSettings
Basic Connection Configuration
The simplest way to configure ManticoreSearch is by specifying the connection details:
Customizing Column Names
If you want to use different column names in your ManticoreSearch table:
Configuring HNSW Parameters
For fine-tuning vector similarity search performance:
Using Authentication
If your ManticoreSearch server requires authentication:
Using with Vector Store
The settings are typically used when creating a ManticoreSearch vector store:
Remember to adjust these settings based on your specific use case and requirements. The HNSW parameters particularly can have a significant impact on search performance and accuracy.
An alternative to LangSmith
Open-source LangChain monitoring, prompt management, and magic. Get started in 2 minutes.
LangChain DocsJoin 10,000+ subscribers
Every 2 weeks, latest model releases and industry news.
An alternative to LangSmith
Open-source LangChain monitoring, prompt management, and magic. Get started in 2 minutes.