Features
Split text into chunks of a specified size while preserving semantic integrity, facilitating subsequent batch processing and analysis.
Use Cases
- Process extremely long text by splitting it into segments that agents can handle.
- Perform text preprocessing to provide standardized input for subsequent content analysis, summarization, or evaluation tasks.
- Optimize the text processing workflow to ensure that each processing unit has a controllable size and complete semantics.
Core Capabilities
- Semantic Integrity First: When splitting, try to avoid truncating sentences or paragraphs, and prioritize splitting at natural boundaries (such as periods or line breaks) to ensure the semantic integrity of each chunk.
- Preserve Original Formatting: During the splitting process, strive to preserve the original formatting and structure of the text, such as Markdown, HTML tags, etc.
- Precise Control of Chunk Size: Split strictly according to the specified size limit to ensure that each text chunk does not exceed the preset maximum length.
- Multiple Splitting Strategies: Support multiple splitting strategies based on character count, token count, paragraph count, or specific delimiters.
Input Requirements
- Text Content: The original text to be split.
- Chunk Size Limit: The maximum length of each text chunk (recommended to provide character count or token count).
- Splitting Strategy(Optional): Specify the preferred splitting strategy, such as splitting by sentence, by paragraph, by specific delimiter, etc.
Output Format
【文本分割报告】
- 原始文本长度: [整数] 字/Token
- 目标块大小: [整数] 字/Token
- 实际分割块数: [整数] 块
### 分割结果
- 块1 (长度: [整数] 字/Token): "[内容预览...]"
- 块2 (长度: [整数] 字/Token): "[内容预览...]"
- 块3 (长度: [整数] 字/Token): "[内容预览...]"
...
Constraints
- The splitting result must strictly comply with the specified chunk size limit.
- Ensure that semantic integrity of the text is preserved to the greatest extent possible during splitting.
- The output format must be structured, clearly showing the content and length of each text chunk.
- Avoid introducing any additional information or explanation in the output; provide only the splitting result.
Examples
See {baseDir}/references/examples.md directory for more detailed examples:
examples.md- Includes splitting examples with different lengths, different splitting strategies, and complex text structures.
Detailed Documentation
See {baseDir}/references/examples.md for detailed guidance and cases about the text splitting tool.
Version History
| Version | Date | Changes |
|---|---|---|
| 2.1.0 | 2026-01-11 | Optimized the description field to make it more concise and compliant with imperative language conventions; changed the model to opus; optimized the descriptions of features, core capabilities, input requirements, and output format to make them more compliant with imperative language conventions; added use cases, constraints, examples, and detailed documentation sections. |
| 2.0.0 | 2026-01-11 | Refactored according to official specifications |
| 1.0.0 | 2026-01-10 | Initial version |