Hybrid RAG, reranking, and parent-child retrieval
Practice this questionOverview
- Hybrid RAG uses lexical and semantic retrieval together.
- Reranking carefully orders the retrieved candidates.
- Parent-child retrieval searches smaller child chunks but supplies a larger parent section when the child is selected.
Why this matters
Search benefits from precise units, while answering often requires surrounding qualifications.
An everyday example
Find the right paragraph through an index, then read its whole section before explaining it.
A technical example
Retrieve a child containing “theft” and expand to its parent section including exclusions and required police-report conditions.
How it works
- Index parent/child relationships
- Hybrid retrieve children
- Rerank
- Load authorized parent sections
- Deduplicate
- Budget context.
Architecture and flow
Hybrid child retrieval → rerank → parent expansion → grounded answer.
The insurance assistant example
A short hit about vehicle damage should bring in the adjacent exception that changes coverage.
When to use it
Structured manuals and policies with conditions distributed around matching phrases.
When to avoid it
Avoid parent expansion when parents are huge, irrelevant, or have different access permissions.
Interview answer
“I search precise chunks and expand only to the supporting section when the answer needs surrounding context.”
Benefits, trade-offs, and production considerations
- Parent expansion raises token usage.
- Preserve child source coordinates, apply ACLs at every loaded level, and evaluate whether expansion improves correctness rather than only making answers longer.