midReportedcurated
Explain parent-child (small-to-big) retrieval. What problem does it solve and what does it cost you?
30-second answer
- Index small child chunks so the query matches precisely, but hand the model the parent section so it gets the surrounding definitions, units and caveats.
- It decouples match granularity from read granularity, which is the cleanest fix for the small-chunk versus large-chunk trade-off.
- The costs are more index entries and embedding spend, a second lookup, and parent payloads that can blow the context budget.
- Cap tokens per parent, dedupe by parent ID when several children share one, and order expanded parents by their best child score.
- What it does not fix is a broken hierarchy: after a re-parse, parent IDs change and children point at stale sections that no longer exist.
Likely follow-ups
Open a question to rehearse the answer.
Do you rerank child chunks or deduped parents, and what does each do to latency?
- Rerank children when the distinction lives inside a short span, because the cross-encoder sees the precise unit that matched.
- Rerank deduped parents when several children collapse into one section, which keeps the candidate list short and the stage cheap.
- Either choice is a precision-versus-latency decision, so compare both on the same labelled set rather than picking a default.
A child sits under two overlapping parents, how do you decide which parent the model sees?
- Assign each child to exactly one parent at parse time, with the structural boundary winning over any semantic guess.
- If overlap is deliberate, store a primary parent pointer plus alternates and return the primary by default.
- Record the chosen parent in provenance, so a citation renders the text the model actually saw.
How do you cap parent payloads when several retrieved children share one large section?
- Set a hard token ceiling per parent at parse time and split any section that exceeds it into a parent with sub-parents.
- Dedupe by parent ID before assembly, so ten matched children of one section cost one section of context.
- Log the expanded token count against the prompt budget and fall back to the child text when a parent would overflow.
Red flags
- calls it bigger chunks
- ignores context cost
Concepts this tests
Tags
Source: sheldonwangrjt.github.io
More in RAG & retrieval pipelines
- Explain HNSW. What do M, ef_construction and ef_search each control, and which can you change in production?
- How would you tune HNSW for 10 million vectors when the product needs p95 retrieval under 100 ms?
- IVF, HNSW, product quantisation — pick an index for 500M vectors under a hard memory budget and defend it.