evaluate_chunking
Benchmark chunking strategies for RAG corpora, dry-run cost estimates, and evaluate retrieval quality with generated or supplied datasets.
Instructions
Dry-run cost estimate or full evaluation (DummyEmbeddingFunction if no model).
content_type restricts strategies to those supporting it. The response includes a
warnings list (e.g. when the trivial placeholder dataset is used).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "evaluate_chunking"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| top_k | No | Kept for compatibility; does NOT affect metrics or scores. Retrieval depth is the effective k = 2000-token context budget / avg chunk tokens. | |
| dry_run | No | ||
| max_docs | No | ||
| use_case | No | rag_qa | |
| use_cache | No | Use the SQLite embedding cache for real embedding models. | |
| strategies | No | ||
| content_type | No | ||
| dataset_path | No | Optional JSON/YAML eval dataset file (must be under CHUNK_TUNER_BASE_DIR). document_id may be the file path relative to `path`, an absolute path, or the file name. Mutually exclusive with generate_dataset. | |
| embedding_model | No | ||
| retrieval_scope | No | Ranking used for score's rank metrics: 'document' (gold document's chunks only) or 'corpus' (all chunks of all documents). | document |
| generate_dataset | No | Generate eval questions with the server's LLM (CHUNKTUNER_LLM_MODEL; may be paid). No confirmation prompt: call evaluate_chunking with dry_run=true and generate_dataset=true first to see llm_dataset_tokens / llm_cost_usd. The dataset is cached and reused for identical documents. Default: a trivial placeholder dataset (see `warnings` in the response). |