CORE GUIDE
Dense, sparse and hybrid retrieval
Different retrieval signals catch different evidence; hybrid retrieval combines semantic similarity with exact lexical evidence.
Mental model
Semantic vectors are good at meaning, lexical search is good at exact terms, and a robust retrieval system can use both before ranking the final evidence set.
Why it matters
Vector-only retrieval often misses IDs, error codes, names and exact clauses. Keyword-only search can miss paraphrases. Hybrid retrieval improves recall by combining signals, then lets a later stage prioritize the evidence most useful for the current question.
01
Recall first, selection second
Dense retrieval finds semantically similar passages; sparse retrieval rewards overlapping terms. A hybrid stage merges candidates, and optional reranking scores them with richer query-document interaction. The result is a pipeline rather than one universal similarity number.
02
Example: find an incident by error code and meaning
A user asks about 'E_CONN_17 when the agent resumes'. Sparse search finds the exact error code, while dense search finds documentation about resume failures that uses different wording. Hybrid retrieval keeps both candidate classes available for reranking.
Common failure modes
- Treating embedding similarity as sufficient for every query.
- Merging dense and sparse scores without calibration or evaluation.
- Optimizing retrieval only by answer quality, hiding retrieval-specific failures.
Engineering heuristics
- Evaluate retrieval recall before evaluating generation.
- Keep exact identifiers and structured filters available.
- Use reranking when the candidate set is broad but final context must stay small.
Takeaways
- 01No single retrieval signal dominates every query type.
- 02Hybrid retrieval is primarily a recall strategy.
- 03Generation cannot recover evidence the retriever never surfaced.
Related concepts from the Knowledge Graph
These relationships come from the canonical graph, not a separate Guide taxonomy.