Azure AI search vector database adapter for cognee
Reason this release was yanked:
bad versioning
Project description
Azure AI Search Adapter for Cognee
This adapter provides integration between Cognee and Azure AI Search (formerly Azure Cognitive Search) for vector storage and retrieval operations.
Features
- Full vector search capabilities using Azure AI Search
- Hybrid search (combining text and vector search)
- HNSW algorithm for efficient similarity search
- Async/await support for all operations
- Batch operations for improved performance
Installation
pip install -r requirements.txt
Configuration
The adapter requires the following credentials:
endpoint: Your Azure AI Search service endpoint (e.g.,https://your-service.search.windows.net)api_key: Your Azure AI Search API keyembedding_engine: An instance of EmbeddingEngine for text vectorization
Usage
from cognee.infrastructure.databases.vector.embeddings.EmbeddingEngine import EmbeddingEngine
from packages.vector.azureaisearch import AzureAISearchAdapter
# Initialize the adapter
embedding_engine = EmbeddingEngine(...) # Your embedding engine
adapter = AzureAISearchAdapter(
endpoint="https://your-service.search.windows.net",
api_key="your-api-key",
embedding_engine=embedding_engine
)
# Create a collection (index)
await adapter.create_collection("my_collection")
# Add data points
await adapter.create_data_points("my_collection", data_points)
# Search
results = await adapter.search(
collection_name="my_collection",
query_text="search query",
limit=10
)
# Batch search
results = await adapter.batch_search(
collection_name="my_collection",
query_texts=["query1", "query2"],
limit=10
)
Key Differences from Other Vector Databases
- Collections as Indexes: In Azure AI Search, what other vector databases call "collections" are called "indexes"
- Document Structure: Documents in Azure AI Search have a specific schema with defined fields
- Batch Operations: Azure AI Search doesn't have native batch search, so batch operations are parallelized
- Scoring: Azure AI Search returns
@search.scorewhich is normalized differently than other vector databases
Vector Search Configuration
The adapter uses HNSW (Hierarchical Navigable Small World) algorithm with the following default parameters:
m: 4 (number of bi-directional links)efConstruction: 400 (size of the dynamic list)efSearch: 500 (size of the dynamic list for search)metric: cosine (similarity metric)
These parameters can be adjusted in the create_collection method if needed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cognee_community_vector_adapter_azure-1.0.0.tar.gz.
File metadata
- Download URL: cognee_community_vector_adapter_azure-1.0.0.tar.gz
- Upload date:
- Size: 373.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.3 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42245f1916e38ce21f5aa83e341f9a170817e4a95a3b2f4e17d2c8209747cc80
|
|
| MD5 |
db8469e77366e8dc5736147d888ba0c0
|
|
| BLAKE2b-256 |
6dc108cb111dc734d8ec92651916eaf1ba31184a78320ea3eedf64683c160a9d
|
File details
Details for the file cognee_community_vector_adapter_azure-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cognee_community_vector_adapter_azure-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.3 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d21bb23738c46ba4d0ba8ef8c5ecc13a246cabc4362cb6659f7cfc2bead8af5
|
|
| MD5 |
223fc74abad5ae445592b1de2f74dae3
|
|
| BLAKE2b-256 |
692bb5c5ef8b129ec6644957fe5f6d6b32a94d0de7fa3b2a447bdacf376843a0
|