Similarity search over embeddings - the retrieval backbone of RAG and semantic search (Pinecone, Weaviate, Qdrant). This walkthrough covers the mental model and the configuration you will actually touch.
Vector databases store high-dimensional embeddings and retrieve the nearest neighbours to a query vector, powering retrieval-augmented generation (RAG), semantic search and recommendations. Popular options include Pinecone, Weaviate and Qdrant.
The configuration that matters
Create a collection and upsert embeddings.
from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams, PointStruct
c = QdrantClient('localhost', port=6333)
c.recreate_collection('docs', vectors_config=VectorParams(size=1536, distance=Distance.COSINE))
c.upsert('docs', [PointStruct(id=1, vector=emb, payload={'source': 'runbook'})])Principles to hold onto
- Keep the same embedding model for index and query
- Combine vector search with metadata filters (hybrid search)
- Version your embeddings and plan re-indexing
Everyday commands
hits = c.search('docs', query_vector=q_emb, limit=4,
query_filter={'must': [{'key': 'source', 'match': {'value': 'runbook'}}]})
for h in hits: print(h.score, h.payload)Want senior help putting Vector Databases to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.