Product Pricing Security & data Research Publications Blog About Careers Alpha Talk to us Download alpha
Research Retrieval · 27 July 2026 · 9 min read

Chunking strategies for heterogeneous web documents

Our earlier retrieval work found that 71% of failures were chunk-boundary failures rather than representation failures. This is what happened when we spent a quarter attacking that number instead of buying a larger embedding model.

ReportDBR-2026-07
Versionv1.0
AreaOn-device retrieval

Published 27 July 2026

Abstract

DBR-2026-01 attributed 71% of retrieval failures in the on-device index to chunking rather than representation. We evaluated six chunking strategies over the same 41,000 document corpus, holding the embedding model fixed. Structure-aware chunking with caption binding and a 15% overlap window raised recall@10 from 0.74 to 0.83 at identical index size — a larger gain than moving from a 384 to a 1024-dimension embedding, which costs nine times the storage. The residual failures shift character entirely: after structure-aware chunking, boundary errors fall to 19% of failures and vocabulary mismatch becomes the largest category.

0.74 → 0.83recall@10 at identical index size, embedding held fixed
71% → 19%share of failures attributable to chunk boundaries
storage a comparable gain would have cost via a larger embedding

The most useful thing we did last quarter was read our own failures. In DBR-2026-01 we hand-inspected 200 retrieval misses and found that most of them were not the model failing to understand the query. They were the relevant sentence sitting on the wrong side of a boundary we drew ourselves.

That is a much cheaper problem than a representation problem. Better embeddings cost storage, memory, and indexing time, all of which are scarce on a laptop. Better chunking costs some parsing logic and runs once per document. So we held the embedding model fixed at 384 dimensions with product quantisation and changed only how documents are split.

Six strategies

0%25%50%75%100%Structure + captions + overlap83%Structure + captions82.1%Structure-aware80.5%Sentence-aligned77.5%Fixed 512 + overlap76%Fixed 512 (baseline)74%
Recall@10 by chunking strategy, embedding model held constant at 384 dimensions with product quantisation. The dashed line marks what a 1024-dimension embedding achieves with the baseline chunker at nine times the storage.

The headline is that structure-aware chunking with caption binding and overlap reaches 0.83, which is above what the 1024-dimension embedding manages with naive chunking (0.81) and costs a ninth of the storage. We did not expect the crossover. When we started this work our internal assumption was that chunking was worth two or three points and the rest would have to come from a bigger model.

Caption binding does most of the work

Decomposing the gain is more informative than the total. Overlap alone is worth about two points and is nearly free. Sentence alignment is worth another point and a half. Structure awareness adds three. Caption binding — refusing to separate a table, figure, or code block from the text that explains it — is worth two and a half points on its own, which is remarkable for a rule that fires on a minority of documents.

StrategyRecall@10ChunksIndex sizeIndexing cost
Fixed 512 (baseline)0.74118k0.90 GB1.00×
Fixed 512 + overlap0.76136k1.03 GB1.15×
Sentence-aligned0.775121k0.92 GB1.06×
Structure-aware0.805109k0.84 GB1.21×
Structure + captions0.821112k0.86 GB1.24×
Structure + captions + overlap0.83129k0.98 GB1.38×
Embedding fixed at 384-d with product quantisation throughout. Indexing cost is relative wall-clock time to index one document, including parsing.

Structure-aware chunking produces fewer chunks than the baseline, because heading-bounded sections are often shorter than 512 tokens and the chunker stops rather than packing across a boundary. That is why index size falls slightly even as recall rises. Adding overlap puts the size back, and we think the trade is worth it, but a deployment tight on storage could reasonably stop at structure plus captions.

The cheapest gain in a retrieval system is usually the one you can get without touching the model. We keep relearning this.

The failures change character

0501001502001422818Baseline chunker26513425Structure-awareChunk boundaryVocabulary gapRepresentationIndex ceiling
Failure attribution before and after. The absolute number of failures falls by roughly a third, and the composition of what remains is different in kind.

After structure-aware chunking, boundary failures fall from 71% to 19% of a smaller total. What replaces them is vocabulary mismatch: the user asks about “the thing that broke the deploy” and the document says “pipeline failure in stage 3”. That is a representation problem, and it is the point at which a larger embedding model, or query expansion, starts to be the right investment. We are not there yet on storage grounds, but the analysis now points somewhere different than it did six months ago.

What structure-aware chunking costs

010020030040018 msHTML w/ headings34 msHTML flat12 msMarkdown61 msPDF tagged340 msPDF untagged
Parsing time per document by content type. HTML with clear heading structure is nearly free; PDFs without a tagged structure tree are where the cost lives.

Indexing cost rises 38%, from about 240 ms to about 330 ms per document. Almost all of that is PDF parsing: an HTML page with real headings is cheap to segment, while an untagged PDF requires layout analysis to recover a structure the file never recorded. We cap the layout pass at 400 ms and fall back to sentence alignment when it exceeds that, which affects roughly 6% of PDFs in our corpus and costs about half a point of recall on those documents.

Method

Corpusdart-history-corpus v1.0 · 41,000 documents · unchanged from DBR-2026-01
QueriesThe same 1,200 labelled queries, so results are directly comparable
EmbeddingHeld fixed · 384-d, product quantisation, HNSW + inverted index
Failure analysis200 misses per condition, hand-labelled by two annotators, α = 0.84
HardwareM3 Pro 18 GB, browser under load, as in DBR-2026-01

Limitations

This study inherits every weakness of DBR-2026-01, most importantly that the corpus is synthetic and the queries were written by people who had seen it. It adds one of its own: caption binding and structure awareness are rules we wrote after inspecting failures in this corpus, so there is a real risk we have fitted the chunker to the evaluation set. We held out 200 documents and 120 queries that no one on the team inspected during development, and recall on that held-out slice was 0.81 rather than 0.83 — lower, which suggests some overfitting, but not enough to change the conclusion. We report both numbers.

The chunker is part of the open evaluation harness and can be run against your own documents locally. If you have a corpus where structure-aware chunking does not help, that is a result we want: research@dartbrowser.com.

Chunking is under-studied relative to its effect. Most retrieval literature holds the splitter fixed and varies the encoder, and the standard benchmarks [6] supply pre-chunked passages, which removes the variable entirely. The closest prior work is in the long-document QA literature, where passage segmentation is known to matter, but that setting assumes homogeneous documents. Personal browsing history is the opposite: an HTML article, a tagged PDF, and a Markdown README need different treatment, and the chunker cannot know in advance which it is holding.

Artefacts

Everything below is published or available on request. A number nobody can reproduce is an advertisement, not a result.

harnessdart-chunkerSix strategies, pluggable · MIT
dataHeld-out evaluation slice200 documents, 120 queries, untouched during development
dataFailure labels400 hand-labelled misses, before and after · CC BY 4.0

References

  1. Karpukhin, V., Oğuz, B., Min, S., et al. (2020). Dense Passage Retrieval for Open-Domain Question Answering. EMNLP.
  2. Robertson, S., & Zaragoza, H. (2009). The Probabilistic Relevance Framework: BM25 and Beyond. Foundations and Trends in IR.
  3. Malkov, Y. A., & Yashunin, D. A. (2018). Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs. IEEE TPAMI.
  4. Jégou, H., Douze, M., & Schmid, C. (2011). Product Quantization for Nearest Neighbor Search. IEEE TPAMI, 33(1).
  5. Bhardwaj, M. (2026). Retrieval quality against index size for on-device browsing history. Dart Browser Research, DBR-2026-01.
  6. Thakur, N., Reimers, N., Rücklé, A., Srivastava, A., & Gurevych, I. (2021). BEIR: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models. NeurIPS Datasets & Benchmarks.
Cite this work

Bhardwaj, M. (2026). Chunking strategies for heterogeneous web documents. Dart Browser Research, DBR-2026-07.

Mohit Bhardwaj

Member of Technical Staff · Dart Browser

Mohit works on the inference and retrieval layer of the Dart Agent, where he is responsible for on-device model integration, the semantic index, and the benchmark harness the team uses to decide what ships. He writes up the measurements that changed our minds.