Skip to main content

Enums

ProviderName

Enumeration for supported vector database providers. Values:
  • CHROMA = 'chroma'
  • QDRANT = 'qdrant'
  • WEAVIATE = 'weaviate'
  • PINECONE = 'pinecone'
  • MILVUS = 'milvus'
  • FAISS = 'faiss'
  • PG = "pgvector"

Mode

Enumeration for the operational mode of the provider. Values:
  • CLOUD = 'cloud'
  • LOCAL = 'local'
  • EMBEDDED = 'embedded'
  • IN_MEMORY = 'in_memory'

DistanceMetric

Enumeration for similarity calculation algorithms. Values:
  • COSINE = 'Cosine'
  • EUCLIDEAN = 'Euclidean'
  • DOT_PRODUCT = 'DotProduct'

IndexType

Enumeration for the core Approximate Nearest Neighbor (ANN) index algorithm. Values:
  • HNSW = 'HNSW'
  • IVF_FLAT = 'IVF_FLAT'
  • FLAT = 'FLAT'

WriteConsistency

Enumeration for write consistency in distributed databases. Values:
  • STRONG = 'strong'
  • EVENTUAL = 'eventual'

ConsistencyLevel

Values:
  • STRONG = "Strong"
  • BOUNDED = "Bounded"
  • SESSION = "Session"
  • EVENTUALLY = "Eventually"

Classes

CoreConfig

Handles connection, identity, and the fundamental vector schema. Corresponds to Table 1: Core Configuration & Schema. Parameters:
ParameterTypeDefaultDescription
db_pathOptional[str]NoneDatabase path for embedded mode
provider_nameProviderNameRequiredThe vector database provider to use
modeModeRequiredThe operational mode of the provider
collection_namestr"default_collection"Name of the collection
cloudOptional[str]NoneCloud provider identifier
regionOptional[str]NoneCloud region
hostOptional[str]NoneDatabase host
portOptional[int]NoneDatabase port
api_keyOptional[pydantic.SecretStr]NoneAPI key for authentication
use_tlsboolTrueWhether to use TLS encryption
vector_sizeintRequiredSize of the dense vectors
vector_size_sparseOptional[int]NoneSize of the sparse vectors
distance_metricDistanceMetricDistanceMetric.COSINEDistance metric for similarity calculation
recreate_if_existsboolFalseWhether to recreate collection if it already exists

HNSWTuningConfig

Fine-tunes the Hierarchical Navigable Small World (HNSW) index. Parameters:
ParameterTypeDefaultDescription
index_typeLiteral[IndexType.HNSW]RequiredMust be HNSW index type
mint16Number of bi-directional links created for every new element during construction
ef_constructionint200Size of the dynamic candidate list for construction

IVFTuningConfig

Fine-tunes Inverted File (IVF) based indexes. Parameters:
ParameterTypeDefaultDescription
index_typeLiteral[IndexType.IVF_FLAT]RequiredMust be IVF_FLAT index type
nlistint100Number of clusters for the index

FlatTuningConfig

Configuration for a FLAT (brute-force) index. No tuning needed. Parameters:
ParameterTypeDefaultDescription
index_typeLiteral[IndexType.FLAT]RequiredMust be FLAT index type

QuantizationConfig

Compresses vectors to reduce memory usage. Parameters:
ParameterTypeDefaultDescription
quantization_typeLiteral['Scalar', 'Product']RequiredType of quantization to apply
bitsint8Number of bits for quantization

PayloadIndexConfig

Defines a schema for a single payload index, allowing for optimized filtering on metadata fields. Parameters:
ParameterTypeDefaultDescription
field_namestrRequiredName of the field to index
field_schema_typeLiteral['text', 'keyword', 'integer', 'float', 'geo', 'boolean']RequiredSchema type of the field
paramsOptional[Dict[str, Any]]NoneAdditional parameters for the index
enable_full_text_indexOptional[bool]NoneWhether to enable full-text search on this field

IndexingConfig

Manages performance-critical aspects of index algorithm and memory usage. Corresponds to Table 2: Indexing, Storage & Performance Tuning. Parameters:
ParameterTypeDefaultDescription
index_configIndexTuningConfigHNSWTuningConfig(index_type=IndexType.HNSW)Index configuration
quantizationOptional[QuantizationConfig]NoneQuantization settings
payload_indexesOptional[List[PayloadIndexConfig]]NoneList of payload field indexes
create_dense_indexboolTrueWhether to create a dense vector index
create_sparse_indexboolFalseWhether to create a sparse vector index

SearchConfig

Defines the default parameters for all retrieval operations. Corresponds to Table 3: Search & Retrieval Operations. These can be overridden at query time. Parameters:
ParameterTypeDefaultDescription
default_top_kOptional[int]NoneDefault number of results to return
default_ef_searchOptional[int]NoneDefault ef parameter for HNSW search
default_nprobeOptional[int]NoneDefault nprobe parameter for IVF search
default_hybrid_alphaOptional[float]NoneDefault alpha parameter for hybrid search
default_fusion_methodOptional[Literal['rrf', 'weighted']]NoneDefault fusion method for hybrid search
default_similarity_thresholdOptional[float]NoneDefault similarity threshold for results
dense_search_enabledOptional[bool]NoneWhether dense search is enabled
full_text_search_enabledOptional[bool]NoneWhether full-text search is enabled
hybrid_search_enabledOptional[bool]NoneWhether hybrid search is enabled
filterOptional[Dict[str, Any]]NoneDefault filter to apply to all searches

DataManagementConfig

Governs the behavior of data ingestion and lifecycle. Corresponds to Table 4: Data Management & Ingestion. Parameters:
ParameterTypeDefaultDescription
batch_sizeint128Number of records to process in each batch
parallel_uploadsint4Number of parallel upload processes
write_consistencyWriteConsistencyWriteConsistency.EVENTUALWrite consistency level

AdvancedConfig

Contains optional, enterprise-grade operational features. Corresponds to Table 5: Advanced & Operational Features. Parameters:
ParameterTypeDefaultDescription
namespaceOptional[str]NoneNamespace for multi-tenancy
num_shardsOptional[int]NoneNumber of shards for the collection
replication_factorOptional[int]NoneReplication factor for the collection

Config

The master configuration object for a VectorDBProvider. This class is the single source of truth for a provider’s setup. It is composed of modular sub-configs, each handling a specific functional area. Upon instantiation, it performs a deep validation of all parameters and their interdependencies, ensuring a valid and complete configuration. The object is immutable after creation to guarantee configuration stability. Parameters:
ParameterTypeDefaultDescription
coreCoreConfigRequiredCore configuration for connection and basic settings
indexingIndexingConfigIndexingConfig()Indexing configuration
searchSearchConfigSearchConfig()Search configuration
data_managementDataManagementConfigDataManagementConfig()Data management configuration
advancedAdvancedConfigAdvancedConfig()Advanced configuration
I