Overview
AI Agents use the Knowledge Base to retrieve relevant information when responding to customer inquiries. To make information retrieval more efficient, files uploaded to the Knowledge Base are divided into smaller text segments called chunks during the indexing process.
When responding to a question, the AI Agent searches the Knowledge Base for relevant chunks rather than reading entire files. If related information is divided between multiple chunks, the AI Agent may retrieve only part of the information, resulting in an incomplete or inaccurate response.
CommBox enables AI Agent designers to configure how individual Knowledge Base files are divided into chunks, helping preserve the context and completeness of the information retrieved by the AI Agent.
This guide explains how chunking works, when to customize the chunking settings, and how to configure them when uploading files to the Knowledge Base.
Understanding File Chunking
File chunking is the process of dividing a file into smaller text segments to facilitate information retrieval.
The process is controlled by two parameters:
- Chunk Size – Determines the maximum length of each text segment.
- Chunk Overlap – Determines how much text is shared between consecutive chunks, helping preserve context when related information is divided between them.
Both parameters are measured in tokens. A token is a unit of text processed by the AI model. A token may represent a word, part of a word, or a punctuation mark. As a general reference, 100 tokens correspond to approximately 75 English words. This ratio varies depending on the language and content.
How Chunk Overlap Works
Without an overlap, related information may be separated at the point where one chunk ends and another begins. Overlapping chunks share a portion of their content, increasing the likelihood that related information is retrieved together.
For example, with a chunk size of 800 tokens and an overlap of 400 tokens:
- Chunk 1 contains tokens 1–800.
- Chunk 2 contains tokens 401–1,200.
- Chunk 3 contains tokens 801–1,600.
Each consecutive chunk shares 400 tokens with the previous chunk, helping maintain the continuity of the information.
When to Customize Chunking Settings
The default chunking settings are suitable for most Knowledge Base files. However, AI Agent designers may benefit from customizing these settings for files containing long or highly structured information.
Consider customizing the settings in the following scenarios:
- The AI Agent provides incomplete answers based on a specific Knowledge Base file.
- The file contains detailed procedures, and the AI Agent retrieves only some of the required steps.
- The file contains lengthy policies, terms and conditions, or tables with interdependent information.
- Individual answers or sections exceed approximately 600 English words.
Increasing the chunk size is not necessarily beneficial for every file. Larger chunks may contain unrelated information, reducing the precision of information retrieval. For example, files containing short, independent questions and answers may be better suited to the default settings.
Chunking Settings
Chunking settings are configured individually for each file during the upload process.
| Setting | Description | Allowed Values | Default |
|---|---|---|---|
| Chunk Size | The maximum length of each chunk. | 100–4,096 tokens | 800 tokens |
| Chunk Overlap | The amount of text shared between consecutive chunks. | Up to half the chunk size | 400 tokens |
The maximum overlap depends on the configured chunk size. For example, a chunk size of 2,000 tokens allows an overlap of up to 1,000 tokens, while a chunk size of 600 tokens allows an overlap of up to 300 tokens.
Configuring Chunking Settings
-
Navigate to the relevant Knowledge Base, click Add File and select Files.

-
Select the file to upload.
-
Expand the Advanced indexing settings section.

-
In the Chunk Size field, enter the desired number of tokens (100–4,096).
-
In the Chunk Overlap field, enter the desired number of tokens (up to half the configured chunk size).
-
Upload the file.

Once the file has been indexed, test the AI Agent's responses to questions related to the uploaded content to evaluate the effectiveness of the configured settings.
Note: If the Advanced Options section is not expanded, the file is indexed using the default chunking settings.
Choosing the Appropriate Chunking Settings
The appropriate chunk size and overlap depend on the structure, length, and nature of the information in the file.
When configuring chunking settings:
- Identify the longest section, procedure, or answer containing information that should be retrieved together.
- Estimate the number of tokens in that section. For example, a 900-word procedure in English contains approximately 1,200 tokens.
- Select a chunk size that is larger than the estimated length of the section to reduce the likelihood of splitting related information.
- Consider using an overlap of half the chunk size to maintain context between consecutive chunks.
- Upload the file and test the AI Agent's responses.
- Adjust the values if necessary and upload the file again.
Configuration Examples
The following examples illustrate possible configurations for different types of Knowledge Base content.
| Content Type | Chunk Size | Chunk Overlap |
|---|---|---|
| Short questions and answers | 800 | 400 |
| Detailed product descriptions | 1,200 | 600 |
| Multi-step procedures | 2,000 | 1,000 |
| Lengthy policies and regulations | 3,000 | 1,500 |
| Extensive, interdependent information | 4,096 | 2,048 |
All values are measured in tokens.
Note: These values are examples rather than fixed recommendations. Always evaluate the AI Agent's responses to determine the most appropriate configuration for each file.
Viewing and Changing Chunking Settings
The configured chunk size and chunk overlap are displayed in the file's record in the Knowledge Base.
Existing files indexed using the default settings display a chunk size of 800 tokens and a chunk overlap of 400 tokens.
Chunking settings cannot be modified after a file has been uploaded. To change the settings, upload the file again with the desired values.
Configuring Chunking via API
Organizations managing Knowledge Base content through the CommBox API can also specify the chunk size and chunk overlap when uploading files.
The same configuration limits and default values apply to files uploaded via API. If no custom values are specified, the default settings are used.
FAQs
Do I need to update my existing Knowledge Base files?
No. Existing files continue to operate using their original chunking settings.
Can I change the chunking settings of an existing file?
No. To change the settings, upload the file again with the desired values.
Can I configure default chunking settings for an entire brand or Knowledge Base folder?
No. Chunking settings are configured individually for each file.
Will increasing the chunk size improve the AI Agent's responses?
Not necessarily. Larger chunks can help preserve related information in lengthy or structured content. However, they may also introduce unrelated information into the retrieved content, reducing response precision.
Does a larger chunk overlap mean that the AI Agent receives the same information multiple times?
Overlapping chunks contain shared text. If multiple consecutive chunks are retrieved, some of the retrieved information may be repeated. The purpose of the overlap is to preserve context between chunks.
Does configuring a chunk size larger than a section guarantee that the entire section will appear in one chunk?
No. Chunk boundaries are determined during indexing and do not necessarily correspond to the beginning or end of a section. Increasing the chunk size and overlap reduces the likelihood of separating related information but does not eliminate it.
What happens if I upload a file without configuring the advanced options?
The file is indexed using the default chunk size of 800 tokens and chunk overlap of 400 tokens.
Do the chunking settings of one file affect other files in the Knowledge Base?
No. Each file is indexed independently using its own chunking settings.