Chonkie chunking and types
Use this sub-skill when the task is about selecting or configuring Chonkie chunkers, interpreting Chunk/Sentence/recursive/markdown data objects, or running deterministic local chunking checks.
Route here
- Fixed-size chunks by token count:
TokenChunker.
- General-purpose local document chunking:
RecursiveChunker.
- Sentence-boundary chunking:
SentenceChunker.
- Byte-throughput chunking:
FastChunker.
- Markdown/HTML table chunks:
TableChunker.
- Source-code chunks:
CodeChunker when the code extra and tree-sitter grammars are available.
- Interpreting chunk fields, tokenizer behavior,
RecursiveRules, MarkdownDocument, MarkdownTable, MarkdownCode, and code rule dataclasses.
Route elsewhere
- Pipeline orchestration, chefs, refineries, fetchers, and CHOMP ordering:
../pipelines-and-processing/.
- Embedding/model/provider setup for
SemanticChunker, LateChunker, NeuralChunker, or SlumberChunker: ../embeddings-and-generative/.
- CLI commands, HTTP API schemas/routes, local serving, and cloud wrappers:
../interfaces-and-deployment/.
- JSON/datasets/vector-database export or handshakes:
../integrations-and-storage/.
Required operating references
- Start with
references/chunker-api-reference.md for constructor signatures, selection rules, deterministic versus optional chunkers, and common examples.
- Use
references/tokenizers-and-types.md when chunk offsets, token counts, metadata, recursive rules, or markdown/code/table object contracts matter.
- Use
references/troubleshooting.md for import, optional dependency, model-download, grammar-cache, chunk-size, and boundary problems.
- For a safe local diagnostic, run
scripts/chunking_smoke.py --help first, then run the smoke with deterministic defaults.
Safe defaults
Prefer this deterministic baseline before any model/provider chunker:
from chonkie import RecursiveChunker
chunker = RecursiveChunker(tokenizer="character", chunk_size=512, min_characters_per_chunk=24)
chunks = chunker.chunk(text)
If strict maximum token count matters more than natural boundaries, switch to TokenChunker. If topic-coherent or model-trained boundaries are requested, route dependency and model decisions to ../embeddings-and-generative/ and keep a deterministic fallback ready.
1---2name: chunking-and-types3description: "Use Chonkie local chunkers, tokenizers, and data contracts for4 deterministic text, table, code, and optional model-dependent chunking."5disable-model-invocation: true6metadata:7 source: https://skillmd.com/skills/vectorspacelab/chunking-and-types8 disco-role: operating9license: MIT10---1112# Chonkie chunking and types1314Use this sub-skill when the task is about selecting or configuring Chonkie chunkers, interpreting `Chunk`/`Sentence`/recursive/markdown data objects, or running deterministic local chunking checks.1516## Route here1718- Fixed-size chunks by token count: `TokenChunker`.19- General-purpose local document chunking: `RecursiveChunker`.20- Sentence-boundary chunking: `SentenceChunker`.21- Byte-throughput chunking: `FastChunker`.22- Markdown/HTML table chunks: `TableChunker`.23- Source-code chunks: `CodeChunker` when the `code` extra and tree-sitter grammars are available.24- Interpreting chunk fields, tokenizer behavior, `RecursiveRules`, `MarkdownDocument`, `MarkdownTable`, `MarkdownCode`, and code rule dataclasses.2526## Route elsewhere2728- Pipeline orchestration, chefs, refineries, fetchers, and CHOMP ordering: `../pipelines-and-processing/`.29- Embedding/model/provider setup for `SemanticChunker`, `LateChunker`, `NeuralChunker`, or `SlumberChunker`: `../embeddings-and-generative/`.30- CLI commands, HTTP API schemas/routes, local serving, and cloud wrappers: `../interfaces-and-deployment/`.31- JSON/datasets/vector-database export or handshakes: `../integrations-and-storage/`.3233## Required operating references34351. Start with `references/chunker-api-reference.md` for constructor signatures, selection rules, deterministic versus optional chunkers, and common examples.362. Use `references/tokenizers-and-types.md` when chunk offsets, token counts, metadata, recursive rules, or markdown/code/table object contracts matter.373. Use `references/troubleshooting.md` for import, optional dependency, model-download, grammar-cache, chunk-size, and boundary problems.384. For a safe local diagnostic, run `scripts/chunking_smoke.py --help` first, then run the smoke with deterministic defaults.3940## Safe defaults4142Prefer this deterministic baseline before any model/provider chunker:4344```python45from chonkie import RecursiveChunker4647chunker = RecursiveChunker(tokenizer="character", chunk_size=512, min_characters_per_chunk=24)48chunks = chunker.chunk(text)49```5051If strict maximum token count matters more than natural boundaries, switch to `TokenChunker`. If topic-coherent or model-trained boundaries are requested, route dependency and model decisions to `../embeddings-and-generative/` and keep a deterministic fallback ready.