New blogMaking an AI Agent You Can Trust With Money

★ Why your RAG returns garbage

RAG Chunking Visualizer

Paste a document and see exactly how fixed-size, recursive, sentence and markdown-aware chunking split it, with token counts and overlap highlighted.

  • Runs in your browser
  • No signup

1,181 characters · loading tokenizer… · nothing leaves your browser

chars
chars

Recursive · 300 chars · overlap 40

6 chunks

52
avg tokens
29 / 71
min / max
15
overlap tokens
$6.20
embed 1M docs

Loading the tokenizer; token counts are estimates until it's ready.

# Refund policy for annual plans Annual plans are billed once a year, up front. This page explains when you can get money back and how long it takes. ## Eligibility You can request a full refund within 30 days of the first annual charge. After 30 days, refunds are prorated for the unused months, minus any discount you received for paying annually. Renewals follow the same rule: the 30-day window starts again on each renewal date. ## How to request a refund Open Settings, then Billing, and choose "Request refund". Pick the reason that fits best. If you are cancelling because of a bug, include the error message; it often gets fixed faster than the refund is processed. ### Processing times Card refunds usually appear within 5 to 10 business days, depending on your bank. Bank transfers can take longer. We send an email when the refund leaves our side. ## Exceptions Refunds are not available for usage-based charges such as extra API calls or storage, because those costs are incurred when you use them. Accounts closed for abuse are not eligible. ## Contact Still stuck? Email the billing team with your account ID and the last four digits of the card on file.

one chunkoverlapClick a chunk to inspect it.

Chunk inspector

Click any coloured chunk in the document to see its text, size, heading path and what it shares with its neighbours.

Chunk sizes

Tokens per chunk (estimated). A tight cluster means predictable chunks.

12913724553161169chunk size (tokens), bucket start

Embedding cost assumes text-embedding-3-small at $0.02 per 1M tokens (OpenAI, checked 8 Nov 2026), counting overlap twice.

Export config

Copy-ready code for the strategy and settings above. Comments flag where a library differs.

from langchain_text_splitters import RecursiveCharacterTextSplitter

splitter = RecursiveCharacterTextSplitter(
    chunk_size=300,
    chunk_overlap=40,
    separators=["\n\n", "\n", ". ", " ", ""],
    keep_separator="start",
)
chunks = splitter.split_text(text)

Your retrieval is only as good as your chunks.

I build RAG systems with evals, so you know when the answers get better or worse.

Fix my RAG
01

Why chunking matters

Retrieval doesn't search your documents; it searches your chunks. If a chunk cuts an answer in half, mixes two topics, or loses the heading that gives it meaning, the best embedding model in the world will still retrieve the wrong thing.

Chunking is the cheapest part of a RAG pipeline to change and one of the most common reasons for bad answers. Looking at the chunks, literally, is the fastest way to spot the problem.

02

Strategies compared

Chunking strategies compared
StrategySplits onKeeps structureBest for
Fixed (chars)Every N charactersNoBaselines, transcripts
Fixed (tokens)Every N tokensNoStrict token limits
RecursiveParagraphs → lines → sentences → wordsPartlyMost text documents
SentenceWhole sentences, packedSentencesProse, FAQs, policies
MarkdownHeadings, then recursiveSections + heading pathDocs and knowledge bases
03

Choosing a size and overlap

Smaller chunks give precise matches but lose context. Larger chunks keep context but dilute the embedding, so a single relevant sentence gets averaged with everything around it. Most teams land somewhere around a paragraph, then tune.

Overlap protects answers that cross a boundary. A small overlap, often about a sentence, is usually enough. Large overlaps mostly add duplicate results and storage. The histogram above shows whether your chunks are evenly sized; a long tail of tiny chunks usually means headings or list items are being split off on their own.

04

Evaluate, don't guess

Pick twenty to fifty real questions with known answers. For each chunking setup, retrieve the top results and record whether the chunk containing the answer came back (hit rate) and how high it ranked. Change one thing at a time: strategy, size, overlap, or what you prepend to each chunk.

Then check end-to-end answers on the same questions, because a retrieved chunk can still be the wrong context for the model. Keep the set and rerun it whenever documents or settings change.

05

Questions engineers actually ask

What chunk size should I use for RAG?
There is no universal number. A few hundred tokens with a small overlap is a common starting point, but the right size depends on your documents and questions. Build a small evaluation set and compare sizes on it.
Does my text leave the browser?
No. Splitting, tokenizing and the visualization all run in your browser. Nothing you paste is sent anywhere.
Which tokenizer does this use?
o200k_base via js-tiktoken, the tokenizer family used by OpenAI's current models. Other embedding models tokenize differently, so token counts are close rather than exact for them.
Is chunk overlap worth it?
Overlap helps when an answer straddles a boundary, at the cost of storing and embedding text twice. Measure retrieval with and without it before settling.
Should I use semantic chunking?
Semantic chunking groups sentences by embedding similarity. It can help on long, meandering documents, but it costs embedding calls at indexing time and isn't always better. Try the structural strategies here first.
06

More from the workbench

Fine print

Tools: on the house.
Engineer: by the hour.

The visualizer was free. Production RAG with evals is what I build.

I'm Himanshu, an AI and full-stack engineer. I build MVPs, AI agents and the growth plumbing around them for early-stage startups.