Quick Recommendations
Building a RAG chatbot?
Use RecursiveChunker for general-purpose document chunking, or
SemanticChunker if you need high topical coherence.
Processing source code?
Use CodeChunker — it understands AST structure and keeps
functions/classes intact.
Need maximum throughput?
Use FastChunker — SIMD-accelerated, processes 100+ GB/s at the byte
level.
Working with tabular data?
Use TableChunker — preserves headers and splits by rows.
Decision Guide
Ask yourself these questions in order:- Are you chunking source code? → Use CodeChunker
- Are you chunking tables? → Use TableChunker
- Is raw throughput your top priority? → Use FastChunker
- Do you need chunks grouped by topic?
- Have an embedding model? → Use SemanticChunker
- Don’t have one? → Use NeuralChunker
- Are simple sentence-boundary splits enough? → Use SentenceChunker
- None of the above? → Use RecursiveChunker (best default)
Comparison Table
When to Use Each
1
You just need it to work
Start with RecursiveChunker. It’s the best general-purpose option — fast, no heavy dependencies beyond a tokenizer, handles most document types well.
2
You need high-quality semantic chunks
Use SemanticChunker if you have an embedding model available. It groups sentences by meaning, so each chunk stays on-topic.
3
You're processing code
Use CodeChunker — it parses the AST so your chunks respect function/class boundaries instead of cutting mid-statement.
4
You need raw speed above all else
Use FastChunker for pipelines where throughput matters more than chunk boundary quality. It uses SIMD instructions for 100+ GB/s processing.
5
You want the absolute best quality
Use SlumberChunker with a generative model. It’s the slowest and most expensive, but produces the highest-quality chunks by using an LLM to decide boundaries.
F.A.Q.
Can I switch chunkers without changing my pipeline?
Can I switch chunkers without changing my pipeline?
Yes. All chunkers share the same interface (
chunk(), chunk_batch(), async variants). Swap one for another and everything downstream stays the same.Should I use SemanticChunker or NeuralChunker?
Should I use SemanticChunker or NeuralChunker?
SemanticChunker if you already have an embedding model in your pipeline (reuse it). NeuralChunker if you don’t — it uses a small BERT model specifically trained for topic segmentation, so it doesn’t require a separate embedding setup.
Is FastChunker good enough for RAG?
Is FastChunker good enough for RAG?
It depends on your tolerance for imperfect boundaries. FastChunker splits on byte counts, which can cut mid-word or mid-sentence. For RAG where retrieval quality matters, prefer RecursiveChunker or SemanticChunker. Use FastChunker when you need to process terabytes quickly and can tolerate rough boundaries.
What about LateChunker?
What about LateChunker?
LateChunker implements the “Late Chunking” algorithm which produces embeddings with better recall for retrieval tasks. Use it when retrieval accuracy is your top priority and you can afford the extra compute.
