# Chunk Boundary Failure

Misses, fragments, or misinterprets evidence because relevant information was split across retrieval chunks or separated from needed context.

Unlike Partial Retrieval, this identifies chunking as the mechanism. Unlike Context Dilution, the issue happens before or during retrieval packaging rather than after too much context reaches the model.

## Metadata
- ID: `chunk-boundary-failure`
- Status: published
- Taxonomy-Version: 0.0.1
- Last-Modified: 2026-06-13T09:00:00-04:00
- Category: Retrieval (`retrieval`)
- HTML: https://failmodes.com/failure-modes/chunk-boundary-failure
- JSON: https://failmodes.com/failure-modes/chunk-boundary-failure.json
- Markdown: https://failmodes.com/failure-modes/chunk-boundary-failure.md

## Search Phrases
- answer cut off between chunks
- split the document badly
- missed info across chunks
- chunking broke the context

## Why It Happens
1. Most pipelines split documents by token count, not meaning. Fixed-size splitting is cheap and predictable, but it cuts through sentences, tables, arguments, and definitions wherever the length limit happens to fall.
2. Chunks are embedded and ranked in isolation. A passage whose meaning depends on a heading, an earlier definition, or an antecedent two paragraphs back embeds poorly and retrieves poorly, because the embedding never saw the context that made it relevant (Anthropic, 2024, "Introducing Contextual Retrieval").
3. Documents carry meaning through structure — section nesting, table headers, footnotes, cross-references — and common text extraction flattens that structure before splitting, so the chunker cannot respect boundaries it can no longer see.
4. Pronouns and elided references stop resolving once text is cut. A retrieved chunk saying "this approach fails in production" is useless or misleading when the approach was named in the previous chunk.

## Examples

### Orphaned antecedent
- Kind: fail
- Summary: The retrieved chunk's "this configuration" was named in the previous chunk, which didn't retrieve. The model resolves the dangling reference to the wrong thing.

```text
User: Is connection pooling safe to enable in production?
[… retrieved chunk begins: "However, this configuration fails under production load and should be avoided." The configuration being warned against — an unrelated cache setting — was named in the preceding, unretrieved chunk …]
Assistant: No — the docs explicitly warn that connection pooling fails under production load.
```

### Table split from its header
- Kind: fail
- Summary: A fixed-size split lands mid-table, so the retrieved rows arrive without the header row that gives the numbers meaning, and the model maps values to the wrong columns.

```text
User: What's the rate limit on the Enterprise tier?
[… chunk contains table rows "Pro | 1,000 | 60" and "Enterprise | 10,000 | 600", but the header row landed in the previous chunk …]
Assistant: The Enterprise tier is limited to 600 requests per minute.
[… 600 is the burst allowance column; the rate limit is 10,000 …]
```

### Mid-sentence fragment answered anyway
- Kind: warn
- Summary: The chunk begins mid-sentence and the model builds its answer on the fragment without flagging that the evidence is visibly truncated.

```text
User: When can customers get a refund?
[… retrieved chunk begins mid-sentence: "…except in these cases, refunds are processed within 14 days." …]
Assistant: Refunds are processed within 14 days.
```

### Fragment recognized, context refetched
- Kind: ok
- Summary: The model notices the evidence is cut off where it matters and pulls the surrounding context before answering.

```text
User: When can customers get a refund?
Assistant: The passage I retrieved starts mid-sentence — it references exception cases defined just before the cut. Let me fetch the surrounding section.
Tool: fetch adjacent chunks — exceptions are digital goods and custom orders
Assistant: Refunds are processed within 14 days, except for digital goods and custom orders, which are non-refundable.
```

## Detection Approaches
- **Corpus chunk auditing**: Scan the index itself for boundary damage — chunks that begin mid-sentence, table rows separated from their header, dangling pronouns and "this configuration" references whose antecedent fell in the previous chunk. The failure is visible in the corpus before any query is run.
- **LLM-as-judge evaluation**: Run a judge over the retrieved set asking whether each chunk is self-contained enough to support the claims built on it — flagging answers grounded in visibly truncated evidence, like a refund rule quoted from a fragment that starts at "…except in these cases."
- **Golden-set evals**: Maintain questions whose evidence is known to straddle split points — values inside long tables, definitions referenced sections later, exception lists that cross pages — and rerun them whenever chunk size, overlap, or the splitting strategy changes.

## Mitigation Approaches
- **Structure-aware chunking**: Split on the document's own boundaries — sections, paragraphs, sentence ends — and keep atomic units intact, so tables travel with their header rows and exception lists stay attached to the rules they qualify, instead of cutting wherever the token limit falls.
- **Contextual chunk enrichment**: Prepend each chunk with the context that makes it self-contained — document title, section path, the antecedent of its references — before embedding (Anthropic, 2024, "Introducing Contextual Retrieval"). "This configuration fails under load" only retrieves and reads correctly when the chunk says which configuration.
- **Adjacent-chunk expansion**: At read time, fetch the neighbors of any retrieved chunk that is visibly truncated — starts mid-sentence, opens with a dangling reference, contains headerless table rows — so the model answers from the restored passage rather than the fragment.

## Related Modes
- **Partial Retrieval** (`partial-retrieval`)
  HTML: https://failmodes.com/failure-modes/partial-retrieval
  JSON: https://failmodes.com/failure-modes/partial-retrieval.json
- **Retrieval Miss** (`retrieval-miss`)
  HTML: https://failmodes.com/failure-modes/retrieval-miss
  JSON: https://failmodes.com/failure-modes/retrieval-miss.json
- **Context Dilution** (`context-dilution`)
  HTML: https://failmodes.com/failure-modes/context-dilution
  JSON: https://failmodes.com/failure-modes/context-dilution.json