Skip to content
Duoduo Mediaevidence to decision

Package 05 · Section 5.2

Chunking Metadata and Index Design

Choose knowledge units that preserve meaning while supporting efficient retrieval and citations.

Track
B · Knowledge and retrieval engineering
Level
Practitioner
Version
v1.0
Status
Open · initial release
Explanation depthDepth

Learning objectives

  • Compare fixed, recursive, semantic, structural and parent-child chunking.
  • Design metadata for filtering, authority, time, access and applicability.
  • Relate index design to query classes and citation granularity.

In brief

Chunking decides what unit of text can be retrieved and cited. Bad boundaries split conditions from exceptions or merge unrelated rules. Index design decides which filters and retrieval methods are possible.

Core concepts

05.1Chunk boundaries

Fixed-size chunks are simple but ignore structure. Structural chunking follows headings, clauses or list items. Semantic chunking splits where topic similarity drops.

The right chunk is the smallest unit that can stand alone as evidence for a claim. Rules and their exceptions should usually stay together.

05.2Overlap and parent-child retrieval

Overlap reduces boundary loss but increases duplicates. Parent-child designs index small child chunks for precise matching and return the larger parent section for context.

Record the chunking strategy and parameters as part of the index version.

05.3Index schema

An index stores text, embeddings and filterable metadata. Decide in advance which fields are filters (region, role, effective date), which are boosts (document type) and which are display-only.

Separate indexes or namespaces are appropriate when access domains must never mix.

Worked example

Fixing a split exception clause

Situation: Query: "Can contractors expense home-office equipment?" The answer says yes. The policy says yes, except contractors.

  1. 1Inspect chunks: the rule is in chunk 14, the exception "This does not apply to contractors" is the first line of chunk 15.
  2. 2Chunk 15 ranks 9th and falls below the top-5 cutoff.
  3. 3Switch to clause-based chunking that keeps numbered sub-clauses with their parent.
  4. 4Re-run the query set: exception recall rises from 0.62 to 0.94.

Outcome: The exception now appears in the same chunk as the rule, and the answer correctly says no for contractors.

Decision rules

  • Keep a rule and its exceptions in one retrievable unit.
  • Choose chunk size from evaluation, not convention.
  • Every filterable attribute must exist as structured metadata, not only in text.
  • Version the index together with the chunking configuration.

Common pitfalls

  • Copying a chunk size from a tutorial without testing it on your corpus.
  • Large overlaps that let one passage dominate the top results.
  • Storing dates as text so they cannot be filtered.

Key vocabulary

Chunk
The unit of content that is indexed, retrieved and cited.
Parent-child retrieval
Matching on small chunks while returning their larger containing section.
Metadata filter
A hard constraint applied to candidates before or during ranking.
Namespace
A partition of an index used to isolate content domains.

Tutorial outline

  1. 05.1Chunk boundaries, overlap, context dilution and lost-in-the-middle risk.
  2. 05.2Dense and sparse indexes; vector distance; approximate nearest neighbor tradeoffs.
  3. 05.3Index versioning, tombstones and re-embedding.

Required artifacts

Chunk inventory, index configuration, comparison report and design decision.

Evaluation evidence

Recall at k, citation span quality, index size, ingestion cost and reviewer usefulness.