SaveMyToken logoSaveMyToken.Coding Plan
All knowledge base guides

MANUALS & POLICIES / FIELD GUIDE

Long-Manual RAG Must Preserve the Conditions That Change an Answer

Compare section boundaries and parent-child retrieval without losing conditions or exceptions.

6 min read · By West Mao and Alex George · Documentation reviewed 2026-10-05 · Build in your own stack · Updated

TL;DR

Find a failing question and mark all the source text required to answer it, including headings, conditions and exceptions. Compare that evidence with the chunks actually retrieved. Test structure-aware boundaries or bounded parent context against your baseline on the same questions. Larger chunks can preserve meaning but also add distractions, so judge the final supported answer as well as retrieval.

STEP 01

Find where the answer gets separated

Mark one failing question and its full supporting passage, including headings, conditions, and exceptions. Compare the source with the chunk preview.

  1. Remove repeated headers and footers only when they are not needed for meaning.
  2. Prepare clear section boundaries. Check that a forced length split does not separate a rule from its exception.
  3. Record whether your splitter uses characters or tokens. The answer model's context budget is a separate measurement.

STEP 02

Compare a parent-child baseline

A smaller child passage can match the query while its parent supplies surrounding context. Build a separate test index to compare modes on the same questions.

  1. Try Paragraph parents aligned with coherent sections. The setup assistant provides trial lengths to start the comparison.
  2. Inspect the text actually returned by retrieval. A few large parents can still produce a large prompt.
  3. For questions spanning sections, check that evidence from every required section reaches the answer model. Increasing parent length alone may not solve this.

STEP 03

Test a rule and its exception

Example test design: use a general procedure and a condition that changes one step. Review the answer against both passages.

  1. Keep one narrow fact question alongside the broad question to detect irrelevant context introduced by larger chunks.
  2. Compare complete answers and actual input tokens with the same model and prompt.
  3. Keep some sections out of your tuning questions and validate the chosen settings on those sections too.
Give your changes a fair test.

Use the same questions, inspect the evidence, and record what changed.

Open comparison worksheet