Contextual Enrichment and Parent-Child Retrieval
A chunk may need a title, product name, or section heading to be understandable. Contextual enrichment adds source-derived metadata or a short prefix; keep generated enrichment distinct from original text and version it. Parent-child retrieval indexes small chunks but can return a larger parent section for generation.
Expansion improves context but may reintroduce irrelevant text and consume more tokens. Selectively include neighbors or parent content, and preserve exact source offsets for citations.
Implementation example
Search -> matching child chunk -> load parent/neighbor context
-> trim to relevant evidence -> generate with citations💡 Enrichment is a retrieval aid, not a replacement for source evidence.
Key Takeaways
- Inspect the relevant pipeline stage instead of guessing.
- Preserve source provenance, versions, and access scope.
- Measure quality on representative queries.
Knowledge Check
Why distinguish enrichment from source text?