Class CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty
Settings for hierarchical document chunking for a data source.
Inherited Members
Namespace: Amazon.CDK.CfnPropertyMixins.AWS.Bedrock
Assembly: Amazon.CDK.CfnPropertyMixins.dll
Syntax (csharp)
public class CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty : CfnDataSourcePropsMixin.IHierarchicalChunkingConfigurationProperty
Syntax (vb)
Public Class CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty Implements CfnDataSourcePropsMixin.IHierarchicalChunkingConfigurationProperty
Remarks
Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
You configure the number of tokens to overlap, or repeat across adjacent chunks. For example, if you set overlap tokens to 60, the last 60 tokens in the first chunk are also included at the beginning of the second chunk. For each layer, you must also configure the maximum number of tokens in a chunk.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.CfnPropertyMixins.AWS.Bedrock;
var hierarchicalChunkingConfigurationProperty = new HierarchicalChunkingConfigurationProperty {
LevelConfigurations = new [] { new HierarchicalChunkingLevelConfigurationProperty {
MaxTokens = 123
} },
OverlapTokens = 123
};
Synopsis
Constructors
| HierarchicalChunkingConfigurationProperty() | Settings for hierarchical document chunking for a data source. |
Properties
| LevelConfigurations | Token settings for each layer. |
| OverlapTokens | The number of tokens to repeat across chunks in the same layer. |
Constructors
HierarchicalChunkingConfigurationProperty()
Settings for hierarchical document chunking for a data source.
public HierarchicalChunkingConfigurationProperty()
Remarks
Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
You configure the number of tokens to overlap, or repeat across adjacent chunks. For example, if you set overlap tokens to 60, the last 60 tokens in the first chunk are also included at the beginning of the second chunk. For each layer, you must also configure the maximum number of tokens in a chunk.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.CfnPropertyMixins.AWS.Bedrock;
var hierarchicalChunkingConfigurationProperty = new HierarchicalChunkingConfigurationProperty {
LevelConfigurations = new [] { new HierarchicalChunkingLevelConfigurationProperty {
MaxTokens = 123
} },
OverlapTokens = 123
};
Properties
LevelConfigurations
Token settings for each layer.
public object? LevelConfigurations { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnDataSourcePropsMixin.IHierarchicalChunkingLevelConfigurationProperty)[]
OverlapTokens
The number of tokens to repeat across chunks in the same layer.
public double? OverlapTokens { get; set; }