zChunk provides a two-tier hyperparameter tuning system:
basic parameter
- chunk_size
- Typical: 256-2048 characters
- Optimization suggestion: fiction text could use larger chunks than technical documentation - overlap_ratio
- Typical: 10%-30%
- Optimization tips: legal texts suggest higher overlap (251 TP3T+), press releases can be reduced to 151 TP3T
Advanced parameters
- temperature
Control the randomness of LLM chunking decisions, which can be appropriately increased when processing creative text - top_k (number of candidate tags)
Influence the accuracy of chunk boundary detection, recommended value for complex documents 50-100 - repetition_penalty
Preventing excessive paragraphing, especially critical for long paragraph documents
Optimization methods:
1. Use tuning scripts:python hyperparameter_tuning.py
2. Monitoring and evaluation indicators versus parameters
3. Finding Pareto-optimal solutions using grid searches
Note: Fully tuning a 450k character document takes approximately 30 minutes (NVIDIA V100), and it is recommended that full tuning be performed on critical documents.
This answer comes from the articlezChunk: a generic semantic chunking strategy based on Llama-70BThe































