Skip to main content
Back to Blog
AI in TestingLLM and RAG Evaluation ยท Part 4

Test RAG Chunking with Questions the Product Must Answer

A chunk-size debate means little until you know whether the facts a question needs survive intact and reach the prompt. This lab labels gold evidence as verbatim fact spans instead of chunk IDs, then compares seventeen chunking strategies on 44 questions for a fictional policy with exceptions in other sections, tables and cross-references. It measures fact survival with no retriever, complete-evidence recall at equal word budgets on BM25 and a local MiniLM embedding model, top-chunk citation support, index size and latency. Fixed chunks lost facts, 25% overlap closed most of the gap, parent-child and chapter-sized parents lost, and most gaps need more questions than 44 before anyone acts on them.

Shashank Rawlani

Engineering Leader | Builder | Problem Solver | AI Engineer

Published Nov 8, 202625 min read
View AI-ready Markdown
Dark technical illustration read left to right. A tall green-outlined document panel of grey text lines carries two bright green bars far apart, one near the top and one near the bottom. Two lanes leave it. The upper lane is four equal grey panels in a row, with one green bar straddling the gap between the second and third panel and a dashed orange vertical line cutting straight through it; a dashed orange path leaves the lane and ends at a crossed-out orange ring. The lower lane is three green-outlined panels of unequal width, each holding its green bar whole, joined by a dashed green arc that runs from the wide right-hand panel back to the left panel and ends in a ringed green node. Both lower-lane facts flow into a tall green context panel on the right that holds two green bars, and an arrow leaves it toward the right edge. Between the two lanes runs a quiet row of grey pill bars.
Quick answer: Score a chunker by whether the facts a question needs arrive whole in the context, not by average chunk length. Label gold evidence as verbatim fact spans so one label set scores every chunker, then measure fact survival with no retriever, complete-evidence recall at a fixed word budget with two retrievers, and whether the top chunk contains a required fact. In the 44-question lab below, section-aware chunks beat fixed chunks without overlap, 25% overlap closed most of the gap, and parent-child chunks lost.

A support assistant answers a refund question from a policy document. The rule, a 14-day window for new annual plans, sits in section 4.2. The exception, that the window no longer applies once the customer has exported their data, sits in section 13.1. The team halves the chunk size from 512 to 256 tokens, reruns twenty questions, and the pass rate moves two points. Nobody can say whether that is the chunker or noise, because nobody checked whether the exception sentence was whole in any chunk, or whether the rule and its exception ever reached the prompt together.

This part compares chunking strategies with the corpus, questions, gold evidence and retrievers held constant. Part 1 covers where questions come from and how splits stay honest, Part 2 trusting a grader, and Part 3 localising a wrong answer with a trace. Part 3 starts by asking whether the gold chunk is in the index at all. This part measures the case that check cannot see: the chunk exists, and the fact inside it has been cut in half.

Checked on 2026-11-03. Versions from PyPI: langchain-text-splitters 1.1.3 (released 2026-10-02), llama-index-core 0.14.25 (2026-09-21) and haystack-ai 3.4.1 (2026-10-21). Ragas 0.4.3 (2026-01-13) was read in its documentation and not run. Every number below comes from one run of the lab on Python 3.14.5 and numpy 2.4.2 on an Apple M4. The corpus is a fictional 3,598-word policy with 44 questions written for it, and no generator model or API was called. Dense retrieval is all-MiniLM-L6-v2 through a numpy reimplementation. One question is 2.3 percentage points, so the last section says which gaps to ignore.

What should gold evidence point at when the chunker is the variable?

At the evidence itself. Ragas ships an ID-based context recall that divides the reference context IDs found among the retrieved IDs by the number of reference IDs. That works while IDs are stable. A chunker change renumbers every chunk, so a label set made of chunk IDs describes one chunker and no other. Label the sentences and table rows the answer needs, verbatim, as they appear in the source document, and test them against whatever chunks a strategy produces.

Here is one record from the lab's question file. Each inner list is one required fact, and its members are acceptable wordings, because a policy sometimes states a fact in two places. A question is supported only when every inner list has a member that appears whole in the context:

{"id": "q22", "type": "exception",
 "q": "We exported all our boards last month and now want to cancel and get the annual fee back. Can we?",
 "facts": [
   ["A new annual subscription is refundable in full if the Account owner gives Notice within 14 days of the first payment."],
   ["The first is a subscription for which a Data Export was completed, as defined in Section 10.1, before Notice was given."],
   ["An export counts as completed when the download link is generated, even if it is never downloaded."]]}

The three facts live in sections 4.2, 13.1 and 10.1. Two small functions turn the file into measurements. covered returns one boolean per required fact. survival uses it with no retriever at all, which separates a chunker problem from a retrieval problem before any ranking runs:

def norm(s):
    return " ".join(s.split())

def covered(groups, texts):
    """One boolean per required fact: is any acceptable wording whole inside one context?"""
    flat = [norm(t) for t in texts]
    return [any(norm(alt) in t for alt in g for t in flat) for g in groups]

def survival(texts, questions):
    """No retriever: can the chunks hold the evidence at all?"""
    whole = colocated = 0
    for q in questions:
        whole += all(covered(q["facts"], texts))                          # every fact whole somewhere
        colocated += any(all(covered(q["facts"], [t])) for t in texts)    # all facts in one chunk
    return whole, colocated

The lab corpus is an invented subscription policy for a fictional product, Halyard Boards. It has 41 retrievable units (39 leaf sections plus two short introductions), a median of 85 words per unit and a longest of 142, five tables, 35 "Section N" cross-references, terms defined in section 1, an exceptions chapter at section 13, and an Enterprise override at 14.1. The 44 questions break down as 15 lookups, 5 that depend on a defined term, 10 where an exception sits away from its rule, 6 table rows, 2 overrides and 6 that need three or more places. Thirteen of the 44 cannot be answered from any single section. The questions use a customer's words, such as "money back" for a section that says "refund". In a real project they come from logs and tickets, labelled and split as in Part 1.

Which chunkers ran, and what do their defaults assume?

Defaults differ in unit as well as size, which is the first reason a chunk-size debate between two stacks compares nothing. Each row below was read from the source or API reference at the version named:

ComponentDefault that mattersCounted in
Haystack 3.4.1, DocumentSplittersplit_by "word", split_length 200, split_overlap 0units separated by a single space
LangChain text splitters 1.1.3, RecursiveCharacterTextSplitterchunk_size 4000, chunk_overlap 200, separators paragraph, line, space, empty stringcharacters, unless you pass a length function
LangChain text splitters 1.1.3, MarkdownHeaderTextSplitterstrip_headers Trueheadings move to metadata and leave the chunk text
LlamaIndex 0.14.25, SentenceSplitterchunk_size 1024, chunk_overlap 200tokens
LlamaIndex 0.14.25, HierarchicalNodeParserchunk_sizes 2048, 512, 128; AutoMergingRetriever merges when more than half of a parent's children are retrievedtokens
OpenAI vector stores, auto chunking800 tokens with 400 overlap; overlap may not exceed half the chunk sizetokens
Google Vertex AI RAG Enginechunk_size 1,024, chunk_overlap 256tokens

Two entries are easy to miss. LangChain's recursive splitter counts characters by default, so a chunk_size of 1000 there is not the 1000 tokens or words that other stacks mean. And the Markdown header splitter drops the heading from the text it returns, which matters to any retriever that indexes only text.

The lab built the first four rows with the libraries themselves, passing a whitespace word count where a length function or tokenizer is accepted, and added its own section-based chunkers:

from haystack import Document
from haystack.components.preprocessors import DocumentSplitter
from langchain_text_splitters import MarkdownHeaderTextSplitter, RecursiveCharacterTextSplitter
from llama_index.core.node_parser import SentenceSplitter

words = lambda s: len(s.split())
text = open("policy.md").read()

def fixed(size, overlap):
    ds = DocumentSplitter(split_by="word", split_length=size, split_overlap=overlap)
    return [d.content for d in ds.run(documents=[Document(content=text)])["documents"]]

recursive = RecursiveCharacterTextSplitter(chunk_size=200, chunk_overlap=0, length_function=words).split_text(text)
sentence = SentenceSplitter(chunk_size=100, chunk_overlap=0, tokenizer=lambda s: s.split()).split_text(text)
by_header = [d.page_content for d in MarkdownHeaderTextSplitter(
    [("#", "h1"), ("##", "h2"), ("###", "h3")]).split_text(text)]   # strip_headers=True is the default

The own-code strategies are small. One chunk per section, with the chapter and section titles on the first line so the indexed text carries those words. Then a post-retrieval step that appends any section a retrieved chunk points to with "Section N.M":

XREF = re.compile(r"Section (\d+(?:\.\d+)?)")

def heading_path_chunks(sections):
    """One chunk per section; the indexed text starts with the chapter and section titles."""
    return [(s["h2"] + " > " if s["level"] == 3 and s["h2"] else "") + s["heading"].lstrip("# ")
            + "\n" + s["body"] for s in sections]

def expand_xrefs(picked, text_by_id, max_extra=3):
    """Append sections named by 'Section N.M' in what was retrieved, nearest rank first."""
    have, extra = set(picked), []
    for sid in picked:
        for ref in XREF.findall(text_by_id[sid]):
            if ref in text_by_id and ref not in have and len(extra) < max_extra:
                have.add(ref)
                extra.append(ref)
    return list(picked) + extra

Also run were parent-child (40-word children indexed, the whole section handed to the generator), the same idea with a chapter as the parent, whole chapters as chunks, and the Markdown splitter with headers kept. Sizes are whitespace words. Haystack splits on single spaces only, so a newline between two words does not separate them and its "200-word" chunks measure 200 to 213 by whitespace count. Word counts are not token counts; the tokenizer note in the FAQ gives the conversion for the embedding model used here.

How much do boundaries break before any retriever runs?

More than the average chunk length suggests. The table counts questions, out of 44, whose evidence survives. "Facts intact" means every required fact is whole inside some chunk. "One chunk" means every required fact is inside the same chunk. The last column is for the dense retriever and is explained after the table.

StrategyChunksIndexed wordsFacts intact (of 44)All in one chunkChunks over the 256-piece embed limit
Fixed, 50 words703,59826210 of 70
Fixed, 100 words353,59833260 of 35
Fixed, 200 words183,598382816 of 18
Fixed, 400 words93,59839289 of 9
Fixed, 200 words, 50 overlap234,732443120 of 23
Fixed, 200 words, 100 overlap347,023443231 of 34
Paragraph-first recursive, 200213,59844325 of 21
Sentence-packed, 100413,59843280 of 41
Markdown headers, default413,32044310 of 41
Section chunk + heading path413,66744310 of 41
Parent-child, 40-word children112 (41 parents)3,32244310 of 112
Section children, chapter parent41 (17 parents)3,66744330 of 41

Fixed chunks without overlap lose facts in proportion to how small they are: 26, 33, 38 and 39 of 44 at 50, 100, 200 and 400 words. At 400 words the loss is smaller, but each chunk is 11% of the whole document. A 25% overlap restored all 44, at 4,732 indexed words against 3,598, which is 31.5% more text to embed, store and rank. A 50% overlap, the proportion OpenAI's auto strategy uses, also restored 44 and cost 95% more (7,023 words). The overlap bought nothing past the first quarter.

The "all in one chunk" column has a ceiling. Thirteen questions have evidence in two or more sections, so no section-sized chunk can hold them together, and the best any strategy reaches is 33. Those questions are won by retrieving two chunks, not by a cleverer boundary.

The boundary report is a few lines. It looks for a required fact that no chunk holds whole but two neighbours hold between them, and prints the cut:

def split_facts(chunks, fact):
    """Find a required fact that no chunk holds whole but two neighbours hold between them."""
    f = norm(fact)
    for i in range(len(chunks) - 1):
        a, b = norm(chunks[i]), norm(chunks[i + 1])
        if f in a + " " + b and f not in a and f not in b:
            return i, a[-60:], b[:60]
cut between chunk 9 and 10
  ends  : ...Only P1 and P2 tickets can be escalated, and each ticket can
  starts: be escalated once. Tickets about billing are handled by the ...
cut between chunk 2 and 3
  ends  : ...riod is the number of Active Seats counted at the end of the
  starts: period, at the monthly price. On annual plans, the charge is...

Output from Python 3.14.5 on the 200-word fixed chunks. The first cut separates "each ticket can" from "be escalated once", so a question about escalation limits finds half a rule. The second cuts the monthly billing formula in two, and the question about billed seats lost a required fact to that cut at 50, 100 and 200 words.

Three library behaviours showed up in the same table. The sentence splitter lost one fact, 43 of 44, by ending a chunk in the middle of a table row; a sentence boundary is the wrong boundary for a pipe table. The Markdown splitter's default removed the 278 words of headings, 3,320 indexed words against 3,598. And the right-hand column: all-MiniLM-L6-v2 truncates input at 256 word pieces, a limit stated on its model card, and this corpus runs about 1.3 word pieces per word. A full 200-word chunk is about 270 pieces, so 16 of 18 fixed chunks lose between 2 and 36 pieces from the vector's view. At 400 words a full chunk is about 540 pieces and the model sees 47% of it; only 21 of 44 questions have all their facts inside the first 256 pieces of any chunk. BM25 reads the whole chunk; the dense vector does not. Keep that in mind when the results below separate the two retrievers.

Which chunker wins once a retriever is in the loop?

The retrievers are an in-memory BM25 written for the lab (k1 1.5, b 0.75, a small stopword list and a light suffix stripper) and the dense model above, with cosine similarity over normalised vectors. The BEIR benchmark paper found BM25 held up as a baseline across 18 datasets, which makes it a sensible lexical choice. The measurement is complete@k: every required fact is whole inside the retrieved context. The loop stops at k chunks or at a word budget. A budget is the fairer comparison, because chunks of 50 and 400 words fill a prompt differently:

def pick(texts, ranked, k=None, budget=None):
    """Walk the ranking; stop at k chunks, or when the next chunk would bust the word budget."""
    picked, used = [], 0
    for i in ranked:
        w = len(texts[i].split())
        if budget is not None and used + w > budget:
            break
        picked.append(i)
        used += w
        if k is not None and len(picked) >= k:
            break
    return picked

def complete_at(texts, rank_fn, questions, **limit):
    hits = 0
    for q in questions:
        picked = pick(texts, rank_fn(q["q"]), **limit)
        hits += all(covered(q["facts"], [texts[i] for i in picked]))
    return hits

Counts are out of 44. The last column is how many questions had a required fact inside the single top-ranked chunk, a rough stand-in for whether a one-chunk citation would point at real support (BM25 / dense).

StrategyBM25, top 3BM25, 500 wordsDense, top 3Dense, 500 wordsWords in top 3 (BM25)Top chunk holds a fact
Fixed, 100 words2626232831220 / 22
Fixed, 200 words2722282462124 / 22
Fixed, 400 words291627141,22326 / 23
Fixed, 200 words, 50 overlap3025343162029 / 27
Paragraph-first recursive, 2002927343352525 / 31
Sentence-packed, 1002834313626724 / 27
Markdown headers, default3234374025826 / 33
Section chunk + heading path3336373828526 / 33
Section chunk + heading path + cross-references3737383945726 / 33
Parent-child, 40-word children2833323628326 / 28
Section children, chapter parent3427373274329 / 37
Whole chapters3529343171832 / 35

Four readings, in order of how much they should change a decision. Section chunks also lead 200-word chunks with 50 overlap, by 3 questions on both retrievers, but that gap is within noise, as the last section shows.

  1. Chunk size is a budget decision. At the top-3 cutoff the 400-word chunks look fine on BM25 (29 of 44), but they cost 1,223 words of prompt. Give every strategy the same 500 words and they fall to 16 and 14, because a prompt holds one chunk. The section chunks and the 100-word sentence-packed chunks hold the most evidence per word.
  2. Changing the retriever reorders the chunkers. At top 3, 400-word fixed chunks beat 200-word chunks with 100 overlap on BM25 (29 to 28) and lose to them by seven on dense (27 to 34). Part of that is the truncation above: the dense vector of a 400-word chunk describes about half of it. A team that swaps the embedding model and the chunker in one release cannot attribute the change to either.
  3. Section-level recall flatters the fixed chunkers. Counting a hit when any retrieved chunk touches a gold section, BM25 at top 3 scores the 200-word fixed chunks 33 of 44, against 27 for complete evidence. For the section chunks the two numbers are equal, 33 and 33. A document-level or section-level recall metric would have hidden the gap.
  4. Bigger chunks are likelier to hold some supporting fact. In the last column, 200-word chunks with 50 overlap beat the section chunks on BM25 (29 to 26), because a 206-word chunk covers more ground than an 89-word one. They also spend 620 words to get there, against 285.

Where did the fancier strategies lose?

Parent-child lost to plain section chunks. Indexing 40-word children and returning the parent section scored 28 against 33 on BM25 and 32 against 37 on dense at top 3, and stayed behind at the 500-word budget (33 against 36, 36 against 38). Sections here are small, a median of 85 words, so the parent is nearly the child, and a 40-word child carries fewer matching terms than an 89-word section; the lab did not isolate the cause. The pattern is built for long parents: LlamaIndex's hierarchical parser defaults to 2048, 512 and 128 token levels, and its AutoMergingRetriever and Haystack's both swap in the parent when more than half of its children match. This corpus has no long parents, so it says nothing about that case.

A larger parent bought little and cost a lot. Indexing sections but handing the generator the whole chapter scored 34 on BM25 against 33, at 743 words of context against 285. At the 500-word budget it fell to 27 against 36. Whole chapters as chunks behaved the same way.

A cheap stand-in for contextual chunks did nothing. Anthropic's Contextual Retrieval prepends 50 to 100 tokens of model-written context to each chunk before embedding and BM25 indexing, and reports top-20 retrieval failures falling from 5.7% to 2.9% with contextual embeddings and contextual BM25 combined. The lab did not run that. It prepended the heading path of the section where each fixed chunk starts, with no model. That scored 27 against 27 on BM25 and 29 against 28 on dense at top 3, which is unsurprising: a chunk spanning three sections gets the label of one. The published method pays for a model call per chunk, which Anthropic estimates at $1.02 per million document tokens with prompt caching, assuming 800-token chunks and 8,000-token documents.

Cross-reference expansion helped, with a price. Following "Section N.M" pointers from the retrieved chunks raised BM25 from 33 to 37 and dense from 37 to 38. In the refund example the exception section names section 4.2, so the rule arrives with the exception. The expansion added 172 words per question on average, 285 to 457, and diluted the top-three citation precision on BM25 from 0.34 to 0.25. It also depends on the document naming its own sections. This corpus has 35 such pointers because it was written that way; a document without them gets nothing.

Three approaches were not run. Late chunking embeds the whole text with a long-context model and pools per chunk afterwards, so it needs a long embedding window that the 256-piece model here lacks. RAPTOR recursively embeds, clusters and summarises chunks into a tree, and its method includes a model-based summarisation step in the indexing path. For semantic chunking, one 2024 study found its extra compute was not justified by consistent gains over fixed-size chunks on the tasks it tried; that is a reason to test it on your questions, not a result for this corpus.

Which question types justify which chunker, and what does each cost?

The pass count hides the type of question that fails. Each cell is BM25 / dense at top 3, out of the number in the header:

StrategyLookup (15)Defined term (5)Exception elsewhere (10)Table row (6)Override (2)Three or more places (6)
Fixed, 200 words14 / 140 / 15 / 53 / 52 / 23 / 1
Fixed, 200 words, 50 overlap14 / 132 / 24 / 74 / 52 / 24 / 5
Paragraph-first recursive, 20012 / 142 / 15 / 64 / 62 / 24 / 5
Section chunk + heading path14 / 151 / 27 / 74 / 62 / 25 / 5
Section chunk + heading path + cross-references14 / 152 / 28 / 86 / 62 / 25 / 5
Section children, chapter parent14 / 151 / 27 / 75 / 62 / 25 / 5
Whole chapters14 / 134 / 26 / 64 / 62 / 25 / 5

Lookups barely care: 12 to 14 of 15 on BM25 for every strategy of 100 words or more, and 13 to 15 on dense apart from the 400-word chunks. The separation comes from exceptions and requests spanning several places, where the section chunks scored 7 of 10 and 5 of 6 on BM25 against 5 and 3 for the plain 200-word chunks. The weak column is the defined term, 0 to 2 of 5 for most strategies, and it is a retrieval problem a boundary cannot fix: a question about billed seats shares little beyond the word "seat" with the sentence that defines an active seat. Only whole chapters, which glue three definitions together, reached 4 of 5 on BM25, at 718 words of context.

Turned into a choice, with the measured price of each option:

If the failing questions look likeCheck firstTryWhat it cost here
A rule or a table row cut in twoSurvival below 44 of 44 with no retrieverParagraph or section boundaries, or 25% overlapOverlap: +31.5% indexed words. Section chunks: +69 words, 1.9%
A rule here, its exception elsewhereWhether the exception names the rule's sectionFollow explicit pointers after retrieval+172 words per question; needs pointers in the source
A term defined in another sectionWhether the defining section is retrieved at allPin the glossary, expand the query, or widen the parentChapter-sized context: 718 words against 285
A table row without its headerWhether header and row sit in one chunkKeep the table inside its section chunk; do not pack by sentenceSentence packing broke one row (43 of 44)
Answers that live in one sentenceNothing; the chunker is not the problemKeep what you haveNone
A whole corpus smaller than your prompt budgetTotal words against the model's windowSkip retrieval3,598 words per question against about 285

The last row is Anthropic's own advice: a knowledge base under 200,000 tokens, about 500 pages, can go in the prompt whole, with prompt caching making that cheaper. A 3,598-word policy is far below that, so retrieval has to earn its recall loss. Section chunking also needs structure. The lab corpus has clean Markdown headings, and a PDF whose headings were flattened into body text is a different, earlier problem that these numbers do not cover.

What do latency, index size and citations cost?

Query latency did not separate the strategies. BM25 took 0.03 to 0.07 ms per query and the dense retriever 10.3 to 11.2 ms, with the single query embedding dominating the second. The index here has 9 to 112 chunks, far too few for scan time to matter, so the lab says nothing about latency at a million chunks. The costs that moved are paid at index and prompt time:

  • Embedded word pieces ranged from 2,304 (400-word fixed, mostly truncated) to 8,664 (200 words with 100 overlap), which is the number an embedding API would bill.
  • Vector storage ranged from 27 KB to 336 KB for 9 and 112 chunks of 384 float32 values.
  • Building the dense index took 0.6 to 2.2 seconds on one run; the slowest was the 100-word overlap. Timings are single-run and will vary.
  • The top-3 prompt held 156 words for 50-word chunks and 1,223 for 400-word chunks. That is the recurring cost, paid on every question.

A bigger prompt has a quality cost this lab did not measure, because no generator ran: the Lost in the Middle study found accuracy often highest for evidence at the start or end of a long input and lower in the middle.

Citation support pulls the other way. Top-3 citation precision, the share of retrieved chunks that contain a required fact, ran from 0.20 (50-word fixed chunks) to 0.47 on BM25 and was highest for the overlapping 200-word chunks (0.40 and 0.47), partly because overlap puts the same fact in two chunks. A section chunk also carries a clean citation target, its section number. Whether a generator cites the chunk that supports each claim is a separate measurement, covered in Part 5 of this series.

How do you keep the question set from flattering the chunker?

Start with how the questions were made. Take each hand-written question's first required sentence and use it verbatim as the query instead, which is roughly what a generator does when it writes a question from one chunk:

strategy               copied-sentence   hand-written (all 44)
fixed-100                 33/38             26/44
fixed-200                 35/38             27/44
fixed-200/50              38/38             30/44
recursive-200             38/38             29/44
heading-path              38/38             33/44
parent-child (40w)        38/38             28/44

Output from the lab on BM25 at top 3. On the copied set the strategies span 33 to 38 of 38 and four of the six score a perfect 38, so a chunker comparison would conclude that it barely matters. On questions in a customer's words, the same strategies spread from 26 to 33 of 44. Questions copied from a chunk reward a retriever for matching the sentence it was copied from.

The second issue is noise. With 44 questions one question is 2.3 points, so compare in pairs: count the questions only A answered and the questions only B answered, then run an exact two-sided sign test on those. At top 3 on BM25, section chunks beat 200-word fixed chunks 8 to 2 (p about 0.11), beat 200-word chunks with 50 overlap 5 to 2 (p about 0.45) and beat parent-child 6 to 1 (p about 0.13). On dense they beat 200-word fixed chunks 9 to 0 (p about 0.004) and 100-word fixed chunks 14 to 0, and beat the overlap strategy 3 to 0 (p about 0.25). Cross-reference expansion won 4 to 0 on BM25 (p about 0.13). The defensible conclusion is narrow: fixed chunks without overlap lose to section chunks on dense retrieval. Overlap against sections, and the value of cross-references, need more questions before anyone acts on them.

The third issue is who writes the questions. A model can draft candidates quickly, but a person has to confirm that each question looks like something a user would ask and that the gold facts are right, and the holdout that decides a chunker should be human-written. Hold it out as in Part 1 and change one variable per run. The retriever swap above is the reason: strategies that tie on one embedding model can separate on another.

Apply this now

  1. Pull 20 real questions from tickets or logs, and make five of them ones whose answer spans two sections. For each, copy the required sentences and table rows verbatim into inner lists of acceptable wordings.
  2. Run survival on your current chunker with no retriever. Any question below full survival is a boundary problem; read the cut with the boundary report before touching the retriever.
  3. Fix a word or token budget that matches your prompt. Report complete@budget with your production retriever, and the words used, so a larger chunk cannot win by spending more.
  4. Label the ten worst failures: fact cut, fact never retrieved, or defined term missing. Part 3's ordered checks give the labels for the middle one.
  5. Change one thing, then re-run. If a swap of chunker and embedding model happens in the same release, run the two changes separately first.

Keep the results file from before and after, with the paired counts (questions only the old strategy answered, questions only the new one did). Saving results as JSON lets the JSON Diff tool show which questions moved. Part 7 of this series applies the same discipline to whole model upgrades.

FAQ

What chunk size should I use?

The documented defaults span 200 words (Haystack), 800 tokens (OpenAI), 1,024 tokens (LlamaIndex and Google) and 4,000 characters (LangChain), so a size carried between stacks does not mean the same thing. Measure complete@budget on your own questions, in the unit your embedding model and prompt count.

Why words instead of tokens?

Whitespace words are the same on every machine and need no tokenizer. Token limits are what models enforce: this corpus ran about 1.3 word pieces per word on all-MiniLM-L6-v2, and a 200-word chunk crossed its 256-piece limit. Convert your budget to the unit the model counts before comparing it with these numbers.

Is overlap worth it?

It restored every fact in the lab at 25% overlap (44 of 44 survival from 38) and cost 31.5% more indexed words. At 50% it cost 95% more and survival did not improve. If your documents have no headings or paragraphs to cut on, 25% is a reasonable first trial. If they do, section boundaries reached 44 of 44 for 1.9% more text.

Should I use semantic chunking, late chunking or RAPTOR?

None of the three was run here, so there is no result to quote. Each has a cost the lab strategies lack: an extra embedding pass, a long-context embedding model, or a model in the indexing path. Put them through the same survival and budgeted-recall test and compare that cost with the 31.5% that 25% overlap added.

Can I run this without a generator?

Yes, and the lab did. Survival and recall at a budget need only the corpus, the questions and a retriever. They show whether the evidence reached the context, not whether the model used it; Part 3 covers that side, and Part 5 covers abstention, hallucination and citation faithfulness.

Primary references

LLM and RAG Evaluation

Get part 5: Test LLM Hallucination, Abstention and Citation Faithfulness

It is live now: read part 5. The form below subscribes you to The Automation Brief, the site newsletter.

No spam, no sending cadence promised. Unsubscribe any time.