Two ways to configure chunking
Set the three flat fields, or pass a singlechunker={...} dict — the dict wins when both are set.
- Flat fields
- chunker= dict
Strategies
recursive is the default. Set chunking_strategy= to any name below.
Passing an unknown strategy (e.g.
"wordwise") now raises a ValueError listing valid presets, instead of silently falling back to recursive."fixed" and "paragraph" remain valid names — they now map onto token and recursive respectively. Existing code that used them keeps working.Best Practices
Match chunk size to content
Match chunk size to content
Technical docs: 500–800 tokens with 50–100 overlap (semantic). FAQs: 200–400 with 20–50 overlap (fixed).
Long articles
Long articles
Use 800–1200 token chunks with 100–200 overlap and semantic splitting for narrative content.
Code and mixed media
Code and mixed media
Keep code chunks around 300–500 tokens with ~50 overlap; prefer fixed splitting for source files.
Related
Knowledge Base
Build a knowledge base
Knowledge Module
Full API reference

