The Silent Ceiling on RAG Quality Is Not Your Retriever: How Adaptive Chunking Selects the Best…
The Silent Ceiling on RAG Quality Is Not Your Retriever: How Adaptive Chunking Selects the Best Splitting Strategy Per Document Without a Single Labeled Example

When a retrieval-augmented generation pipeline starts returning incomplete or wrong answers, the natural instinct is to improve the retriever. Maybe the embedding model needs upgrading. Maybe the similarity threshold needs tuning. Maybe a hybrid retrieval approach combining dense and sparse signals would help. These are all reasonable interventions, and sometimes they work.
But there is a failure mode that sits one step earlier in the pipeline and that retrieval improvements cannot fix: bad chunking. If documents are split in ways that break the natural units of meaning they contain, no retriever, no matter how sophisticated, can recover the information that was scattered across chunk boundaries during ingestion. The corpus contains the answer. The retrieval step never sees it because it was fragmented at indexing time.
This problem is worse than it sounds because different document types have fundamentally different structures, and no single chunking strategy handles all of them well. Page splits work tolerably for documents that are naturally organized by page, but they destroy the coherence of legal documents where a clause may span several pages. Recursive character splitting is a solid default for technical documentation with short, self-contained sections, but it fractures sustainability reports that contain multi-page tables and cross-referenced disclosures. Semantic splitting, which tries to identify natural topic boundaries through embedding similarity, handles narrative prose reasonably well but performs poorly on highly structured filings where section boundaries are explicit and semantic similarity between adjacent sections is deliberately low.
Adaptive Chunking, developed by Ekimetrics and published at LREC 2026, is the first library to treat chunking strategy selection as a per-document optimization problem. It runs multiple chunking strategies against every document, scores each output using five intrinsic quality metrics that require no labeled examples, and selects the best strategy for each individual file automatically.
The Core Insight: Competition Instead of Convention
The design premise of Adaptive Chunking is that the question “which chunking method should be used?” should be answered empirically for each document rather than decided once for an entire pipeline. This premise is practically powerful because it does not require building a ground-truth question-answer dataset to evaluate chunking quality. Intrinsic metrics, metrics that measure structural and semantic properties of the chunks themselves, can be computed directly from the chunking output and the source document.
For each document in the pipeline, four default chunking strategies produce candidate sets of chunks. The five intrinsic metrics score each candidate set. The strategy with the highest mean score across the metrics is selected as the chunking method for that document. The entire selection process is automatic and requires no human judgment or labeled data.
The performance gains reported across 33 documents in three domains, covering approximately 1.18 million tokens, are substantial. Retrieval Completeness improved from 58.1 with the recursive baseline to 67.7 with Adaptive Chunking, a statistically significant difference with a Wilcoxon test p-value below 0.05. Answer Correctness improved from 70.1 to 78.0. Most concretely, the number of queries that received an answer at all increased from 49 out of 99 to 65 out of 99 — a 33% improvement in the fraction of questions the system could actually resolve.
The Five Intrinsic Evaluation Metrics
The five metrics that drive strategy selection are each designed to capture a distinct structural or semantic property of the chunking output, without requiring any knowledge of what questions will eventually be asked against the document.
Size Compliance measures what fraction of chunks fall within the target token count bounds. Chunks that are too large dilute relevance when retrieved. Chunks that are too small lack sufficient context for the language model to use them effectively. A high Size Compliance score indicates that the chunking strategy is respecting the intended granularity of the index.
Intrachunk Cohesion measures the semantic similarity between individual sentences within a chunk and the chunk’s overall embedding. A cohesive chunk is one whose sentences collectively express a unified idea. Low Intrachunk Cohesion is a signal that the chunk contains unrelated content that happened to be adjacent in the document — a structural coincidence rather than a semantic unit.
Contextual Coherence, or Document Context Coherence in the paper’s terminology, measures the similarity of each chunk to its surrounding context window of adjacent chunks. Well-placed chunk boundaries should separate content that differs in topic or structure, so a chunk that is highly similar to its immediate neighbors may indicate that the boundary was placed arbitrarily rather than at a natural transition.
Block Integrity measures the proportion of structural blocks, paragraphs, tables, and lists that are kept intact within a single chunk rather than split across multiple chunks. Tables and lists are particularly vulnerable to splitting because their rows or items often lack meaning in isolation. A high Block Integrity score indicates that the chunking strategy is respecting the document’s structure.
Filtered Missing Reference Error measures the rate at which coreference chains are broken across chunk boundaries. A coreference chain connects a pronoun or abbreviated reference to the entity it refers to. When a chunk contains “it increased by 12%” without the chunk that identifies what “it” refers to, the retrieved chunk becomes uninterpretable. This metric counts those broken references and penalizes strategies that produce them.
These five metrics are implemented in the library’s metrics module and are designed to be extended. Adding a custom metric requires implementing a scoring function and registering it with the evaluation pipeline.
The Four Default Chunking Strategies
The four default strategies that compete for each document represent the practical range of approaches used in production RAG systems.
The recursive splitter with a 1100-token target uses a hierarchical splitting approach: it first attempts to split on the most meaningful separators available in the document structure, then falls back to progressively finer separators until the target size is achieved. Chunks that fall below a minimum size threshold are merged with their neighbors. This strategy tends to perform well on technical documents with clear section hierarchies.
The recursive splitter with a 600-token target applies the same algorithm with a smaller target chunk size, producing more granular chunks that may be better suited for documents where the relevant information is densely packed in short passages. The two recursive strategies allow the selection process to choose the granularity that best fits each document’s information density.
Page splitting divides the document along page boundaries and applies post-processing to enforce size constraints when pages are unusually long or short. This strategy performs well for documents where page structure reflects the author’s organizational intent, and poorly for documents where content flows freely across pages.
LLM-generated regex splitting asks a language model to analyze the document and generate document-specific regular expression patterns for splitting. The model observes the document structure and produces patterns tailored to the conventions of that specific document type, for example, detecting the numbered section headings common in legal filings or the bold title patterns common in financial disclosures. This strategy requires an OpenAI API key and produces high-quality splits for well-structured documents where the structural cues are consistent.
Additional chunking strategies can be registered by providing any callable that takes a text string and returns a list of chunk strings.
Getting Started
Installation from the repository supports selective installation of dependencies based on which components are needed:
git clone https://github.com/ekimetrics/adaptive-chunking.git
cd adaptive-chunking
pip install -e ".[dev]"
For just the core splitter and metrics without PDF parsing:
pip install -e .
With PDF and Excel parsing backends:
pip install -e ".[parsing]"
With coreference resolution support, which is required for the Filtered Missing Reference Error metric:
pip install -e ".[coref]"
Note that the coreference resolution component is licensed under CC BY-NC-SA 4.0 and is available for non-commercial use only. The core package is MIT licensed.
Some metrics require a spaCy language model:
python -m spacy download en_core_web_sm
Using Adaptive Chunking in a Pipeline
The simplest entry point processes a directory of PDFs and returns ready-to-index chunks with a single function call:
from adaptive_chunking import chunk_files
chunks = chunk_files("path/to/pdfs/", chunk_size=600, chunk_overlap=50)
for chunk in chunks:
print(chunk["doc_name"], chunk["chunk_index"], chunk["chunk_len"])
Each chunk is a dictionary containing the document name, chunk index, chunk text, page references, title context from the document hierarchy, and chunk token length. The page references and title context fields are particularly useful for attribution and for constructing citation-style answers that reference specific sections of the source document.
Working with a single file uses the same interface:
chunks = chunk_files("path/to/report.pdf")
Selecting a different PDF parsing backend is a one-argument change:
from adaptive_chunking.parsing import PyMuPDFParser
chunks = chunk_files("path/to/pdfs/", parser=PyMuPDFParser())
The three supported backends cover different trade-offs. Docling is the default and is an open-source parser with strong layout understanding. PyMuPDF is a lightweight option with fast parsing and minimal dependencies. Azure Document Intelligence is the cloud-based option, offering the highest accuracy for complex layouts and scanned documents at the cost of API calls and associated pricing.
Reproducing the Paper Results
The repository ships with 33 pre-parsed documents and pre-computed coreference mentions from the CLAIR corpus used in the paper, covering technical, legal, and sustainability reporting documents. This allows the evaluation to be reproduced without a GPU for the coreference step.
Installing the full paper reproduction dependencies:
pip install -e ".[paper]"
python -m spacy download en_core_web_sm
Running the full evaluation that reproduces Table 3 from the paper:
python -m adaptive_chunking.paper.replicate \
--data-dir data/clair/ \
--output-dir results/ \
--steps chunking metrics raw_metrics analysis table3 \
--device cuda:0
The evaluation pipeline is designed to be resumable. If a run is interrupted, rerunning the same command skips documents that have already been processed. The metrics computation step takes approximately 9 hours on local hardware without an API key, or approximately 30 minutes when a JINA API key is provided for faster embedding computation.
The LLM regex splitter and the semantic chunker can be excluded to reduce cost and hardware requirements:
python -m adaptive_chunking.paper.replicate \
--data-dir data/clair/ \
--output-dir results/ \
--steps chunking \
--skip-llm-regex \
--skip-semantic
The RAG evaluation that produces the retrieval and answer correctness results, reported in Tables 4 and 5 of the paper, is available as a separate step but requires hundreds of OpenAI API calls and a GPU for embedding computation:
python -m adaptive_chunking.paper.replicate \
--data-dir data/clair/ \
--output-dir results/ \
--steps rag \
--device cuda:0
Why Measuring Chunking Quality Without Labels Matters
The requirement for labeled evaluation data is the practical barrier that most RAG teams hit when trying to measure whether their chunking strategy is good. Building a ground-truth question-answer dataset requires domain expertise to write questions, time to cover enough of the document corpus to be representative, and ongoing maintenance as the corpus grows. Many teams skip the evaluation entirely and discover chunking problems only when users report missing or incorrect answers.
Adaptive Chunking’s intrinsic metrics remove this barrier. The metrics measure properties of the chunks themselves, their size distribution, semantic cohesion, structural integrity, and coreference completeness, none of which require knowing what questions will be asked. This means chunking quality can be measured and optimized at ingestion time, before the retrieval system is even built, and it can be measured continuously as the corpus grows or document types change.
This approach reframes RAG debugging. Rather than starting at the retriever and working backward when answers go missing, teams can start at the ingestion step and verify that the chunks produced for each document actually preserve the semantic and structural units that retrievers need to surface. The metrics provide a signal. Adaptive Chunking acts on that signal automatically.
Conclusion
Adaptive Chunking offers a principled answer to a problem that most RAG practitioners have encountered but few have had tools to diagnose: the per-document variation in what chunking strategy works best. By running multiple strategies in competition and selecting the winner using intrinsic metrics that require no labeled data, the framework improves retrieval completeness, answer correctness, and raw query coverage without touching the retrieval or generation components of the pipeline.
The 33% improvement in answered queries from 49 to 65 out of 99 is a meaningful demonstration that the chunking strategy is not a minor implementation detail but a primary determinant of what information a RAG system can actually surface. For teams working on document-heavy retrieval applications across legal, technical, or enterprise reporting domains, Adaptive Chunking provides both the measurement framework to understand where chunking quality stands and the optimization mechanism to improve it automatically.
The repository is available at: https://github.com/ekimetrics/adaptive-chunking
메타데이터
- post_id
- a0519735664b
- slug
- the-silent-ceiling-on-rag-quality-is-not-your-retriever-how-adaptive-chunking-selects-the-best-a0519735664b
- url
- https://medium.com/open-intelligence/the-silent-ceiling-on-rag-quality-is-not-your-retriever-how-adaptive-chunking-selects-the-best-a0519735664b
- canonical_url
- https://medium.com/open-intelligence/the-silent-ceiling-on-rag-quality-is-not-your-retriever-how-adaptive-chunking-selects-the-best-a0519735664b
- author_url
- https://medium.com/@eng.fadishaar
- status
- ok
- fetched_at
- 2026-06-14 11:28:49