High-performance vector database designed for AI applications, providing both REST and gRPC APIs for vector search and storage.
Build search systems that understand context and meaning rather than just keywords.
Create personalized recommendations based on user preferences and behavior patterns.
Retrieval-Augmented Generation for enhancing LLM responses with relevant context.
Find similar images based on visual features using image embeddings.
Identify outliers in your data by finding vectors that are dissimilar to the norm.
# Example configuration
web_ui_enabled: true # Enable web dashboard
api_key: "" # Optional API key for authentication
read_only_api_key: "" # Optional read-only API key
read_only: false # Enable read-only mode
log_level: "INFO" # Logging level
max_request_size_mb: 32 # Maximum request size in MB
| Option | Description | Default | Required |
|---|---|---|---|
web_ui_enabled |
Enable the web dashboard interface | true |
No |
api_key |
API key for full access (leave empty for no auth) | "" |
No |
read_only_api_key |
API key for read-only access | "" |
No |
read_only |
Enable read-only mode (prevents modifications) | false |
No |
log_level |
Logging verbosity (TRACE/DEBUG/INFO/WARN/ERROR) | INFO |
No |
max_request_size_mb |
Maximum request size in megabytes (1-1024) | 32 |
No |
After starting the add-on, you can access:
http://homeassistant.local:6333homeassistant.local:6334http://homeassistant.local:6333/dashboardCollections are the primary way to organize vectors in Qdrant:
curl -X PUT 'http://homeassistant.local:6333/collections/my_collection' \
-H 'Content-Type: application/json' \
-H 'api-key: your-api-key' \
-d '{
"vectors": {
"size": 384,
"distance": "Cosine"
}
}'
Distance metrics available:
Cosine - Cosine similarity (recommended for normalized vectors)Euclid - Euclidean distanceDot - Dot product (for non-normalized vectors)Add vectors with associated metadata:
curl -X PUT 'http://homeassistant.local:6333/collections/my_collection/points' \
-H 'Content-Type: application/json' \
-H 'api-key: your-api-key' \
-d '{
"points": [
{
"id": 1,
"vector": [0.1, 0.2, 0.3, ...],
"payload": {
"text": "Example document",
"category": "tutorial",
"timestamp": 1700000000
}
}
]
}'
Find the most similar vectors:
curl -X POST 'http://homeassistant.local:6333/collections/my_collection/points/search' \
-H 'Content-Type: application/json' \
-H 'api-key: your-api-key' \
-d '{
"vector": [0.1, 0.2, 0.3, ...],
"limit": 5,
"filter": {
"must": [
{
"key": "category",
"match": {
"value": "tutorial"
}
}
]
}
}'
View all collections in your database:
curl -X GET 'http://homeassistant.local:6333/collections' \
-H 'api-key: your-api-key'
Monitor collection statistics:
sensor:
- platform: rest
name: "Qdrant Collection Count"
resource: http://localhost:6333/collections
method: GET
headers:
api-key: "your-api-key"
value_template: ""
scan_interval: 300
Create a service to search vectors:
rest_command:
search_qdrant:
url: "http://localhost:6333/collections//points/search"
method: POST
headers:
Content-Type: "application/json"
api-key: "your-api-key"
payload: '{"vector": , "limit": }'
from qdrant_client import QdrantClient
from qdrant_client.http.models import Distance, VectorParams, PointStruct
# Connect to Qdrant
client = QdrantClient(
host="homeassistant.local",
port=6333,
api_key="your-api-key"
)
# Create collection
client.create_collection(
collection_name="test_collection",
vectors_config=VectorParams(size=384, distance=Distance.COSINE),
)
# Insert points
points = [
PointStruct(
id=1,
vector=[0.1] * 384,
payload={"text": "Hello world"}
)
]
client.upsert(collection_name="test_collection", points=points)
# Search
search_result = client.search(
collection_name="test_collection",
query_vector=[0.1] * 384,
limit=5
)
max_request_size_mb setting appropriately/config/qdrant/storagecurl -X POST 'http://homeassistant.local:6333/collections/my_collection/snapshots' \
-H 'api-key: your-api-key'
web_ui_enabled is set to trueReduce memory usage with scalar quantization:
{
"vectors": {
"size": 384,
"distance": "Cosine"
},
"quantization_config": {
"scalar": {
"type": "int8",
"quantile": 0.99,
"always_ram": true
}
}
}
Create indexes for faster filtering:
curl -X PUT 'http://homeassistant.local:6333/collections/my_collection/index' \
-H 'Content-Type: application/json' \
-H 'api-key: your-api-key' \
-d '{
"field_name": "category",
"field_schema": "keyword"
}'
| β Back to Add-ons | View on GitHub |