RecursiveChunkingConfiguration Configuration
RecursiveChunkingConfiguration Configuration documentation for .NET SDK
Recursive hierarchical chunking strategy with configurable separators and overlap
Properties
| Name | Type | Description | Notes |
|---|---|---|---|
| ChunkSize | int | Maximum size of a chunk (should be ≤ context window) | |
| ChunkOverlap | int | Sliding overlap between chunks | |
| Separators | List<string> | Hierarchical separator list (order = preference) | [optional] |
| KeepStrategy | SeparatorKeepStrategy | How to handle separators after splitting. KEEP_NONE is deprecated and behaves as KEEP_END. | |
| SeparatorIsRegex | bool? | Whether separators are regex patterns | [optional] |
| LengthMeasurement | LengthMeasurement | How to measure chunk length |
Usage Example
using Pairsystems.Goodmem.Client.Model;
var config = new RecursiveChunkingConfiguration(
chunkSize: 512, chunkOverlap: 64,
keepStrategy: SeparatorKeepStrategy.KEEPEND,
lengthMeasurement: LengthMeasurement.CHARACTERCOUNT);
config.Separators = new `List<string>` { "\n\n", "\n", ". " };