Vector databases and search practice
Vector search
A vector search compares a query representation with stored representations. Cosine similarity measures their direction after accounting for length. A zero-length vector needs an explicit rule, and equal scores need a stable tie-breaker if the result must be reproducible.
In a fictional handbook index, two chunks have the same score. Order them by the required stable source identity rather than whichever dictionary entry happens to appear first. Keep the current tenant and revision filter ahead of the ranking so another customer’s similar document cannot enter the candidate set.
Database and ranking boundaries
A vector database also manages stored records and operational concerns; this notebook does not install one. The fixture vectors are deterministic teaching values, not learned embeddings. They let you test ranking code but cannot establish semantic retrieval quality.
Hybrid search combines different retrieval signals, such as text relevance and vector similarity. The official retrieval guide, checked November 14, 2026, describes hosted filtering and ranking options. This lesson does not implement that full hosted service or a production hybrid engine. Practice tenant filtering and RAG evidence next.