Lost exact terms
Symptom Questions with specific names or codes pulled in loosely related text.
Cause Dense embeddings blur exact tokens.
Fix Hybrid search: BM25 alongside vectors on Qdrant.
Work / Case study 03
Question answering over 25,000+ pages that people actually used, because retrieval was measured, not guessed.
01 — The problem
The client had 1,000+ documents, 25,000+ pages, and people asking questions about them all day. The basic recipe (chunk, embed, take the top few) breaks in predictable ways once real users show up:
And underneath all three: "it feels better" isn't a metric. Without evaluation, every change is a guess.
02 — The approach
Most of a RAG system's quality is decided before the LLM sees anything. So the pipeline is built like a search engine: narrow, retrieve two ways, rerank properly, and only then hand the best few chunks to the model. Watch one question travel:
Redis answers repeated questions without running the pipeline at all.
Metadata filters shrink the search space before ranking, so retrieval is faster and more precise.
BM25 catches exact terms, dense vectors on Qdrant catch paraphrases. Results are merged.
A cross-encoder reads each question–chunk pair together and reorders the candidates.
Only the top chunks reach the LLM, so its context is small and relevant.
Ingestion splits 25,000+ pages along document structure, so each chunk is one coherent idea.
03 — Decisions in numbers
04 — How it was measured
It was the evaluation framework: a set of real questions, each mapped to the chunks that actually answer it. Every retrieval change was scored on two numbers before it shipped.
05 — What broke, and the fix
Symptom Questions with specific names or codes pulled in loosely related text.
Cause Dense embeddings blur exact tokens.
Fix Hybrid search: BM25 alongside vectors on Qdrant.
Symptom The answer was retrieved but sat too low for the model to use.
Cause Embedding similarity is a rough ranker.
Fix Cross-encoder reranking over the merged candidates.
Symptom 5.2 seconds per question.
Cause Every query ran the full pipeline over the whole corpus.
Fix Redis caching, metadata filters and query optimization. 2.8 seconds.
06 — Honest gaps & what's next
Building on your own documents?