Top 100 AI Agent Architecture Design Concepts

64 — Parent-Child Chunking

Retrieve precise child passages, then expand them into bounded parent context that preserves meaning, provenance, and access boundaries.

Concept overview

Parent-child chunking separates the unit optimized for retrieval from the unit supplied for interpretation. Small child chunks make individual facts easier to match; a larger parent section restores definitions, exceptions, or surrounding procedure steps. Stable child-to-parent relationships let the retriever find a precise passage without forcing the model to reason from a context fragment.

Parent expansion is not permission to attach an entire document. The system should select the smallest coherent parent, deduplicate siblings, and enforce a token budget. Parent and child records must share version lineage; otherwise a retrieved child can be explained using a different revision. Access control also applies to the expanded parent.

Why it matters in production

Proof of concept

A prototype compares passage-only answers with section-expanded answers on questions requiring nearby definitions or exceptions.

Production

Production stores explicit lineage, source offsets, section hierarchy, and authorization metadata for both levels.

Enterprise scale

At scale, use bounded expansion policies, update parent-child sets atomically where possible, and measure expansion usefulness against context cost.

Architecture components

Document structure parser

Recognizes sections, tables, headings, and source offsets.

Child vector index

Stores focused passages optimized for similarity retrieval.

Parent content store

Preserves coherent sections with document and version identity.

Expansion resolver

Fetches authorized parent context and deduplicates overlapping children.

Context budgeter

Chooses the useful portion of each parent within the prompt allocation.

The architecture, mapped

Precise retrieval with coherent expansion — Children identify relevant evidence; parent expansion restores only the context needed to interpret it.
flowchart LR
 D["Versioned maintenance manual"] --> P["Parent procedure sections"]
 P --> C["Child passage index"]
 Q["Technician question"] --> C
 C --> R["Matched child identifiers"]
 R --> E["Authorized parent expansion"]
 P --> E
 E --> B["Deduplicated context budget"]

Runtime flow

  1. 1

    Parse structure

    Extract meaningful document boundaries instead of relying exclusively on character counts.

  2. 2

    Create lineage

    Assign children to versioned parents and retain precise source positions.

  3. 3

    Retrieve children

    Search small passages under the request’s access and freshness constraints.

  4. 4

    Resolve parents

    Fetch matching parent revisions and reject missing or unauthorized expansions.

  5. 5

    Deduplicate and trim

    Merge sibling hits and preserve the relevant subsection plus necessary definitions.

  6. 6

    Cite the evidence

    Present source pointers that distinguish the matched passage from the broader explanatory section.

Interpreting a procedure exception

Aviation maintenance · Illustrative enterprise scenario, not a reported customer outcome.

Business situation

A maintenance assistant helps technicians locate approved inspection instructions.

The problem

A retrieved sentence gives a torque value but omits the nearby exception for a specific component revision.

Agent requirement

Return the value together with the procedure conditions and source revision.

Architecture

Manual sections form parents; individual steps and notes form indexed children.

Runtime

  • The query matches a torque-value child passage.
  • Expansion includes the enclosing procedure and its applicability note before a cited answer is drafted.

Failure scenario

If the matching parent revision is unavailable, the assistant withholds the procedure answer and links the verified manual location.

Operational impact

Measure applicability accuracy and evidence coverage against prompt size; operational benefit comes from preserving conditions, not merely retrieving more text.

Architecture tradeoffs

DecisionBenefitCost
Small childrenImprove targeted matching.May lose context before expansion.
Larger parentsRestore definitions and exceptions.Consume tokens and can introduce distractors.
Structural parsingProduces semantically coherent boundaries.Requires format-specific extraction and quality checks.

Failure scenarios & recovery

Child points to newer parent

Detect: Source versions disagree during retrieval.

Recover: Require matching lineage and rebuild the inconsistent chunk set.

Expansion crosses an access boundary

Detect: Parent includes restricted annex content.

Recover: Authorize expanded sections independently or split the parent.

Common architecture mistakes

Always fetching the whole document

Expand to the smallest useful coherent section.

Duplicating one parent for every child hit

Deduplicate parent context while preserving child evidence markers.

Ignoring tables and headings

Use document structure to retain applicable labels and units.

When to choose this pattern

Choose it when

  • Use for manuals, policies, and structured long documents.
  • Use when facts depend on nearby exceptions.
  • Use when small chunks retrieve well but answer poorly.

Avoid it when

  • Avoid expansion for already self-contained short records.
  • Do not mix parent and child source revisions.
  • Avoid parents spanning unrelated security classifications.

Architecture checklist

  • Preserve document hierarchy and offsets.
  • Version parent-child relationships.
  • Authorize expanded content.
  • Deduplicate sibling matches.
  • Cap expansion tokens per parent.
  • Evaluate exception and applicability questions.

Primary references