Overview
The Update Chunking Configuration endpoint allows you to modify the configuration of chunking nodes within your flows. Chunking nodes are responsible for splitting documents into smaller pieces and generating embeddings, making this endpoint crucial for optimizing your RAG pipeline performance.- Method: 
PATCH - URL: 
https://{flow_name}.flows.graphorlm.com/chunking/{node_id} - Authentication: Required (API Token)
 
Authentication
All requests must include a valid API token in the Authorization header:Learn how to generate API tokens in the API Tokens guide.
Request Format
Headers
| Header | Value | Required | 
|---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes | 
Content-Type | application/json | Yes | 
URL Parameters
| Parameter | Type | Required | Description | 
|---|---|---|---|
flow_name | string | Yes | The name of the flow containing the chunking node | 
node_id | string | Yes | The unique identifier of the chunking node to update | 
Request Body
The request body should be a JSON object with the following structure:| Field | Type | Required | Description | 
|---|---|---|---|
config | object | Yes | The new configuration for the chunking node | 
config.embeddingModel | string | No | Embedding model to use (e.g., “text-embedding-3-small”, “colqwen”) | 
config.chunkingSplitter | string | Yes | Type of splitter: “character”, “token”, “semantic”, “title”, or “element” | 
config.chunkSize | integer | No | Size of each chunk in characters or tokens | 
config.chunkOverlap | integer | No | Number of characters/tokens that overlap between chunks (default: 0) | 
config.chunkSeparator | string | No | Text separator used for splitting (default: “\n\n”) | 
config.splitLevel | integer | No | Split level for hierarchical splitters (default: 0) | 
config.elementsToRemove | array | No | List of document elements to remove during processing | 
Example Request
Response Format
Success Response (200 OK)
The response contains confirmation of the successful update:Response Fields
| Field | Type | Description | 
|---|---|---|
success | boolean | Whether the update operation was successful | 
message | string | Descriptive message about the operation result | 
node_id | string | The ID of the updated chunking node | 
Code Examples
JavaScript/Node.js
Python
cURL
PHP
Error Responses
Common Error Codes
| Status Code | Description | Example Response | 
|---|---|---|
| 400 | Bad Request - Invalid configuration parameters | {"detail": "Chunk size must be greater than zero for character splitter"} | 
| 401 | Unauthorized - Invalid or missing API token | {"detail": "Invalid authentication credentials"} | 
| 404 | Not Found - Flow or chunking node not found | {"detail": "Chunking node with id 'invalid-node' not found in flow 'my-flow'"} | 
| 500 | Internal Server Error - Server error | {"detail": "Failed to update chunking node"} | 
Error Response Format
Example Error Responses
Invalid Chunk Size
Invalid Splitter Type
Chunking Node Not Found
Flow Not Found
Invalid Configuration
Update Behavior
Node Status Changes
When you update a chunking node:- Configuration Updated: The node’s chunking parameters are replaced with the new configuration
 - Status Reset: The node is marked as 
"updated": falseto indicate it needs reprocessing - Successor Nodes: All downstream nodes in the flow are also marked as needing updates
 - Flow State: The flow maintains its deployed status but requires redeployment to apply changes
 
Configuration Validation
The endpoint validates that:- Chunk size is appropriate for the selected splitter type
 - Chunk overlap is less than chunk size
 - Splitter type is one of: “character”, “token”, “semantic”, “title”, “element”
 - Split level is non-negative when specified
 - Embedding model is supported
 
Integration Examples
Chunking Configuration Manager
Performance Testing Tool
Best Practices
Configuration Optimization
- Chunk Size Selection: Choose 500-2000 characters for most use cases; larger chunks for context-heavy tasks
 - Overlap Strategy: Use 10-20% overlap to maintain context; higher overlap for critical applications
 - Embedding Model Choice: Balance quality vs. speed; use larger models for better accuracy
 - Splitter Selection: Use “semantic” for better content preservation, “character” for speed
 
Performance Tuning
- Document Type Matching: Tailor configurations to your specific document types
 - Resource Monitoring: Monitor processing time and adjust parameters accordingly
 - Batch Processing: Consider processing implications when setting chunk sizes
 - Memory Usage: Larger chunks and overlaps increase memory requirements
 
Configuration Management
- Version Control: Track configuration changes for rollback capabilities
 - A/B Testing: Test different configurations to find optimal settings
 - Monitoring: Regularly check processing performance and adjust as needed
 - Documentation: Document configuration choices and their rationale
 
Troubleshooting
Invalid Chunk Size Error
Invalid Chunk Size Error
Solution: Ensure chunk size is appropriate for the splitter type:
- Character and token splitters require chunk size > 0
 - Semantic splitters can work with larger chunks (800-2000)
 - Element splitters may not require specific chunk sizes
 - Consider your content type when setting sizes
 
Chunk Overlap Issues
Chunk Overlap Issues
Solution: Validate overlap settings:
- Overlap must be less than chunk size
 - Recommended overlap is 10-20% of chunk size
 - Higher overlap increases processing time and storage
 - Set to 0 for element-based splitting
 
Chunking Node Not Found
Chunking Node Not Found
Solution: Verify the node ID and flow:
- Use the List Chunking Nodes endpoint to get valid node IDs
 - Ensure the node exists in the specified flow
 - Check that the node type is actually “chunking”
 - Verify you’re using the correct flow name
 
Unsupported Embedding Model
Unsupported Embedding Model
Solution: Use supported embedding models:
- Check available models: text-embedding-3-small, text-embedding-3-large, colqwen
 - Verify model names are spelled correctly
 - Consider model capabilities vs. performance trade-offs
 - Test with different models for your use case
 
Configuration Not Applied
Configuration Not Applied
Solution: After updating configuration:
- The node is marked as 
"updated": falseand needs reprocessing - Deploy the flow again to apply configuration changes
 - Check the node status using the List Chunking Nodes endpoint
 - Allow time for reprocessing to complete
 

