chunktuner¶
Give it your documents. It tries multiple chunking strategies, measures which setup supports retrieval best, and recommends a configuration for your corpus and use case.
What it does¶
Chunking choices directly affect RAG quality. chunktuner benchmarks strategies (fixed windows, recursive splits, semantic splits, PDF structure, code AST, and more), scores them with retrieval metrics (token recall, MRR, NDCG) and optional generation metrics (RAGAS), then surfaces a winner.
Three ways to use it¶
| Interface | Best for |
|---|---|
| Python library | Embedding pipelines, custom grids, CI |
CLI (chunk-tune) |
Interactive tuning from the terminal |
| MCP server | Claude Desktop and other MCP hosts |
Install¶
uv (tool)¶
pip¶
Library only¶
Where to go next¶
- Quickstart — install, first commands, minimal Python example
- Strategy guide — choosing a strategy
- CLI reference — every
chunk-tunecommand - Python API — library patterns
- API reference — auto-generated module docs
- MCP setup — Claude Desktop and
CHUNK_TUNER_BASE_DIR - Contributing — how to contribute (links to repo checklist)