FixedSizeChunking splits document text into chunks of at most chunk_size characters and keeps words intact when possible.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Split documents into character-limited chunks with configurable overlap.
FixedSizeChunking splits document text into chunks of at most chunk_size characters and keeps words intact when possible.
| Parameter | Type | Default | Description |
|---|---|---|---|
chunk_size | int | 5000 | Maximum characters per chunk. Use a positive value. |
overlap | int | 0 | Characters repeated between adjacent chunks. Use 0 <= overlap < chunk_size. |
chunk_size > 0 and 0 <= overlap < chunk_size. The constructor raises ValueError when overlap >= chunk_size, but a negative overlap can pass validation and produce invalid chunks.Was this page helpful?