ChunkTuner
chunktuner
Automatischer Chunking-Tuner und MCP-Server für RAG-Pipelines.
Geben Sie Ihre Dokumente ein. Das Tool testet verschiedene Chunking-Strategien, misst, mit welcher eine KI Fragen am präzisesten beantworten kann, und nennt Ihnen den Gewinner.
Was es bewirkt
Beim Aufbau einer RAG-Pipeline beeinflusst die Art und Weise, wie Sie Dokumente in Chunks unterteilen, direkt die Qualität des Abrufs. chunktuner automatisiert den Prozess der Suche nach der optimalen Chunking-Strategie für Ihr spezifisches Korpus, Ihr Embedding-Modell und Ihren Anwendungsfall.
Es vergleicht Strategien wie feste Token-Fenster, rekursive Zeichen-Unterteilung, semantische Unterteilung, strukturelles PDF-Chunking und AST-basiertes Code-Chunking – und bewertet jede einzelne anhand echter Abrufmetriken (Token-Recall, MRR, NDCG) sowie optionaler Generierungsmetriken (RAGAS-Treue, Antwortrelevanz).
Related MCP server: golden-dataset-mcp
Schnittstellen
Python-Bibliothek — programmatische Integration in Ihre Pipeline
CLI (
chunk-tune) — manuelles Tuning über das TerminalMCP-Server — direkte Nutzung über Claude Desktop oder jeden MCP-Host
Schnellstart
# Install
uv tool install chunktuner
# Initialize workspace
chunk-tune init --provider openai
# See cost estimate before running anything
chunk-tune estimate ./my_docs --use-case rag_qa
# Get a recommendation
chunk-tune recommend ./my_docs --use-case rag_qaPython-API:
from pathlib import Path
from chunktuner import FileIngestor, LiteLLMEmbeddingFunction, AutoTuner
from chunktuner import default_registry, Evaluator, ScoreCalculator
docs = FileIngestor().ingest_dir(Path("./my_docs"))
embedding_fn = LiteLLMEmbeddingFunction("text-embedding-3-small")
tuner = AutoTuner(
strategies=default_registry,
evaluator=Evaluator(embedding_fn),
scorer=ScoreCalculator(use_case="rag_qa"),
)
result = tuner.recommend(docs, use_case="rag_qa")
print(result.best.config)Unterstützte Strategien
Strategie | Am besten geeignet für |
| Basislinie; einheitliche Token-Fenster |
| Allgemeine Texte und Dokumentationen |
| Themenorientierte Artikel |
| Strukturierte Markdown-Dokumente |
| PDFs mit Layout-Bereichen und Tabellen |
| PDF/DOCX mit gemischtem Layout und Text |
| Lange Dokumente mit dichten Querverweisen |
| Hochwertige narrative Dokumente |
| Code-Repositories (Python, JavaScript) |
| Code-Basislinie (gleitendes Fenster) |
MCP-Server (Claude Desktop)
Python FastMCP (chunk-tune-mcp, stdio). Kein Node.js-Build erforderlich. Siehe docs/mcp_setup.md.
Fügen Sie dies zu Ihrer .mcp.json hinzu:
{
"mcpServers": {
"chunktuner": {
"command": "uvx",
"args": ["--from", "chunktuner[mcp]", "chunk-tune-mcp"],
"env": {
"CHUNK_TUNER_BASE_DIR": "/path/to/your/corpus"
}
}
}
}Verfügbare Tools: list_strategies, preview_chunks, evaluate_chunking, recommend_config.
CLI-Referenz
chunk-tune init Bootstrap workspace config
chunk-tune analyze Quick structural scan (no API cost)
chunk-tune estimate Dry-run cost/token estimate
chunk-tune evaluate Full evaluation across strategies
chunk-tune recommend Evaluation + best config recommendation
chunk-tune compare Side-by-side comparison of specific strategies
chunk-tune preview Inspect how a strategy splits a document
chunk-tune cache Manage embedding and chunk cacheInstallationsoptionen
uv add chunktuner # library
uv tool install chunktuner # global CLI
uvx chunktuner # ephemeral, no install
# With optional extras
uv add "chunktuner[docling]" # PDF/DOCX support
uv add "chunktuner[ragas]" # generation metrics
uv add "chunktuner[semantic]" # semantic chunking
uv add "chunktuner[code]" # AST code chunking
uv add "chunktuner[all]" # everythingMitwirken
Siehe CONTRIBUTING.md.
👨🏻💻 Autor
Full-Stack-Entwickler mit Erfahrung in der Erstellung von E2E-KI-Anwendungen.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes queryable GPU inference benchmark data (quantization, throughput, VRAM, concurrent users) as tools for LLM clients.MIT
- AlicenseAqualityBmaintenanceEnables version-controlled golden dataset management and semantic evaluation for RAG/LLM pipelines using TF-IDF cosine similarity, without requiring an LLM API key.9MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to search and retrieve information from large technical documentation (OpenAPI specs, markdown) via intelligent chunking and semantic search.MIT
- AlicenseNot gradedqualityCmaintenanceEvaluates RAG outputs on faithfulness, answer relevancy, and context precision using an LLM-as-a-Judge backend. Exposes tools for running evaluations, scoring individual samples, and checking thresholds, enabling CI gating and on-demand assessment via MCP.MIT
Related MCP Connectors
Multi-LLM entity enrichment: schemas, single/batch enrichment, fusion, model benchmarks.
Bounded tools for rendering, extraction, RAG, enrichment, local discovery and review analysis.
Machine-readable utilities and datasets for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shantanu-deshmukh/chunktuner'
If you have feedback or need assistance with the MCP directory API, please join our Discord server