Setting Up Qdrant
Introduction
Qdrant is a powerful vector database that works especially well for larger RAG projects and production environments. It offers REST and gRPC APIs, filtering capabilities, and runs smoothly in Docker. If you’re outgrowing Chroma, Qdrant makes a solid next step.
How Qdrant Works
Qdrant stores text, images, or other data as vectors. When you search, it calculates similarity between your query vector and stored vectors. The result is a ranked list of the most relevant entries, which you can pass to a language model. Filters let you narrow searches to specific categories, date ranges, or other metadata.
Tools, Concepts, and Techniques
- Qdrant Server - The vector database itself. Runs locally in Docker or as a cloud service.
- Qdrant Python Client - Official Python library for local and remote instances.
- Qdrant REST API - HTTP interface for creating collections and searching points.
- FastEmbed - Lightweight embedding library that integrates well with Qdrant.
- Collection - A container for vectors with matching dimensions and similar semantics.
- Payload - Metadata attached to a vector, such as source or category.
Practical Example: Starting Qdrant in Docker
docker run -p 6333:6333 -p 6334:6334 -v qdrant_storage:/qdrant/storage qdrant/qdrant
After startup, access the dashboard at http://localhost:6333/dashboard. You can create collections, upload vectors, and test searches there.
Python Example
from qdrant_client import QdrantClient
client = QdrantClient(url="http://localhost:6333")
client.create_collection(
collection_name="artikel",
vectors_config={"size": 768, "distance": "Cosine"}
)
client.upsert(
collection_name="artikel",
points=[
{
"id": 1,
"vector": [0.1, 0.2, ...], # Your embedding
"payload": {"quelle": "blog", "titel": "Was ist lokale KI?"}
}
]
)
results = client.search(
collection_name="artikel",
query_vector=[0.1, 0.2, ...],
limit=3
)
print(results)
In production, generate vectors using an embedding model like intfloat/multilingual-e5-large or BAAI/bge-m3. Qdrant stores and searches these vectors.
Common Pitfalls and Decision Guidance
- Mismatched vector dimensions: Your collection must know the embedding model’s dimension. If you switch models, the collection needs the same size.
- Forgetting payload filters: Without filters, searches run across all documents. Payload filters let you narrow results, such as
quelle == "blog". - Storage location: By default, Qdrant stores data in a Docker volume. Know your storage path for backups.
- When to choose Qdrant over Chroma? Qdrant pays off once you need to scale, filter, or handle multiple concurrent clients.
Further Reading and Links
- Qdrant is REST-based and easy to automate.
- Collections require a fixed vector size.
- Payload filters make searches much more precise.
- Learn more about Chroma in the Chroma article, and more about embeddings in Embedding Models.
FAQ - Common Qdrant Questions
Do I need Docker for Qdrant?
No, there are also standalone binaries. Docker is the simplest and most common approach for local testing.
Is Qdrant free?
Yes, the open-source version is free. A paid cloud option exists, but it’s not necessary for local projects.
How many documents can Qdrant handle locally?
It depends on RAM and storage. Qdrant works well with hundreds of thousands up to millions of entries.
Can I connect Qdrant with Ollama?
Yes. Ollama provides the language model, Qdrant provides the vector database. Your Python script connects both.
What’s the difference between Qdrant and Chroma?
Chroma is simpler and ideal for prototypes. Qdrant is more robust, scalable, and offers better filtering options.
Does Qdrant support hybrid search?
Yes. You can combine vector search with payload filters and sparse vectors to include traditional keyword-based search.
Which embedding dimension should I choose?
It depends on your embedding model. multilingual-e5-large produces 1024 dimensions, and bge-m3 typically does as well.
Can I run Qdrant on a NAS?
Yes, with Docker. Make sure you have enough RAM and fast storage, otherwise searches will slow down.
Where do I find Qdrant documentation?
At qdrant.tech/documentation and the API reference at api.qdrant.tech.
How do I secure Qdrant?
Local instances without network exposure are usually sufficient in secure networks. If you need remote access, set up an API token or a reverse proxy with authentication.


