# Which Chunk Size Is Best for RAG? Run the Experiment on Your Own Document

> There is no best chunk size for every document. Compare five chunking methods and different sizes on your own file with the same judge, and read the result in MLflow.

Page: https://datautility.in/blog/rag-chunk-size-best-chunking-strategy-experiment
This is the Markdown copy of the page. The tool itself runs in the browser: your files are processed on your own device and are not uploaded.

Published 2026-11-28 · Analyze & protect · rag chunk size, best chunking strategy for rag, chunk size and overlap, recursive character text splitter, rag chunking experiment, chunking strategies rag, rag evaluation chunk size

Short answer: there is no single best chunk size. Small chunks retrieve precisely but can split an answer across pieces; large chunks keep more context but add noise. The way to find the right size for your documents is to run the same test questions and the same judge at two or three sizes and compare the runs. That is a ten-minute experiment in the free Evals Lab.

Open the tool: [Evals Lab](https://datautility.in/evalslab)

## The trade-off

Guides on RAG evaluation describe the same trade-off: small chunks give precise retrieval but may split relevant information over several pieces, while large chunks keep context but add text the question does not need. Examples in the [Weights & Biases tutorial](https://wandb.ai/ai-team-articles/llm-evaluation/reports/RAG-evaluation-tutorial-Metrics-LLM-as-a-Judge-and-W-B-Weave--VmlldzoxNTQ1ODYzOQ), the [Arize cookbook](https://arize.com/docs/ax/cookbooks/evaluate/evaluating-rag) and a [RAGAS and MLflow guide](https://safjan.com/ragas-mlflow-rag-evaluation-tutorial/) all run one experiment per chunk size and pick the best from the scores. Their winners differ, because the right size depends on your documents. So test it.

## The five chunking methods in Evals Lab

| Method | How it cuts | Good for |
|---|---|---|
| Recursive (recommended) | LangChain's splitter: paragraphs, then lines, then sentences, then words, only going smaller when a piece is still too big | Most text |
| Markdown | Like recursive, but splits on headings first | .md files, docs |
| Paragraph | Packs whole paragraphs until the size is reached | Well-formed prose |
| Sentence | Packs whole sentences until the size is reached | Short, factual text |
| Fixed size | Cuts every N characters, even in the middle of a word | A baseline to beat |

Size and overlap are in **characters**, not tokens. The default is about 500 characters with 50 overlap, and size can be 100 to 8,000. Overlap repeats the end of one chunk at the start of the next, so a sentence at a boundary is not lost. A short heading on its own is merged into the next chunk, because a heading matches a question but holds no answer.

## The experiment, step by step

1. **Upload one document** and chunk it with the recursive method at 500 characters.

2. **Write your own test questions** (step 3, Add test case). Fifteen to twenty questions from the document are enough. See the warning below.

3. **Run one judge** (for example Correctness) with the same settings: scale, pass level, k and number of cases.

4. **Change only the chunk size**, to 250 and then 1000, and chunk again. Run the same judge.

5. **Compare the runs** in the Results tab, and in MLflow at `localhost:5050`, where the runs share one chart.

6. **Then change one more thing**, such as the method (fixed size against recursive) or k, and repeat.

## Warning: chunking again removes generated questions

When you chunk a document again, the lab deletes the questions it generated from the old chunks, because those chunks no longer exist. Questions you add yourself are kept. So for a fair comparison, use your own questions, or generate once and copy the good ones before you change the size.

## What to look for in the results

- **A higher score at a smaller size** usually means the answer sits in one or two sentences and big chunks were burying it.

- **A higher score at a larger size** usually means answers need surrounding context that small chunks cut off.

- **A big difference between Correctness and Faithfulness** points at retrieval: the answer is right but not supported by the chunks you fetched.

- **No difference at all** means your test set is too small or too easy. Add harder questions.

## Keep the test fair

Change one setting at a time, keep the judge prompt and the model the same, and run each setting once or twice. The lab's retrieval is keyword search (BM25), so results tell you how chunking behaves with keyword retrieval; embedding retrieval can rank chunks differently. Use the lab to learn the method, then repeat it on your real stack.

## How to use the Evals Lab: step by step

1. Upload a document and chunk it at one size
2. Add 15 to 20 of your own test questions
3. Run the same judge, then change only the chunk size
4. Compare the runs in Results and MLflow

## When to use the Evals Lab

- Choosing a chunk size before indexing a document set
- Comparing recursive, Markdown and fixed-size chunking
- Learning what overlap does
- Explaining a chunking decision in an interview or design review

## Frequently asked questions

### What is the best chunk size for RAG?
It depends on your documents and questions. Small chunks retrieve precisely but can split an answer; large chunks keep context but add noise. Compare two or three sizes with the same test questions and judge.

### Is chunk size in tokens or characters in Evals Lab?
Characters. The default is about 500 characters with 50 overlap, and the size can be 100 to 8,000.

### What does chunk overlap do?
It repeats the end of one chunk at the start of the next, so a sentence at the boundary is not cut off from its context.

### Which chunking method should I start with?
Recursive. It splits on paragraphs, then lines, then sentences, then words, so sentences usually stay whole. Use Markdown for .md files and fixed size as a baseline.

Tip: Include a few questions whose answer spans two neighbouring paragraphs. They are the ones that small chunks get wrong.

## Also try

- [How to evaluate a RAG app with an LLM as a judge](https://datautility.in/blog/how-to-evaluate-rag-app-llm-as-a-judge-free-lab)
- [Can you trust an LLM judge?](https://datautility.in/blog/can-you-trust-llm-as-a-judge-check-your-judge)

## More guides

- [Data Profiler: Check Data Quality Before You Use It](https://datautility.in/blog/data-profiler-check-data-quality)
- [Compare Two CSV or Excel Files: Find Added, Removed and Changed Rows](https://datautility.in/blog/compare-two-csv-files-find-differences)
- [Data Masking: Hide Emails, Phones and Names Before Sharing](https://datautility.in/blog/data-masking-hide-emails-phones-pii)
