HierarchicalChunkingConfigurationProperty Struct
Settings for hierarchical document chunking for a data source.
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.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wisdom as wisdom } from 'aws-cdk-lib';
const hierarchicalChunkingConfigurationProperty: wisdom.CfnKnowledgeBase.HierarchicalChunkingConfigurationProperty = {
levelConfigurations: [{
maxTokens: 123,
}],
overlapTokens: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_wisdom as wisdom
hierarchical_chunking_configuration_property = wisdom.CfnKnowledgeBase.HierarchicalChunkingConfigurationProperty(
level_configurations=[wisdom.CfnKnowledgeBase.HierarchicalChunkingLevelConfigurationProperty(
max_tokens=123
)],
overlap_tokens=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wisdom.*;
HierarchicalChunkingConfigurationProperty hierarchicalChunkingConfigurationProperty = HierarchicalChunkingConfigurationProperty.builder()
.levelConfigurations(List.of(HierarchicalChunkingLevelConfigurationProperty.builder()
.maxTokens(123)
.build()))
.overlapTokens(123)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Wisdom;
var hierarchicalChunkingConfigurationProperty = new HierarchicalChunkingConfigurationProperty {
LevelConfigurations = new [] { new HierarchicalChunkingLevelConfigurationProperty {
MaxTokens = 123
} },
OverlapTokens = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
hierarchicalChunkingConfigurationProperty := &HierarchicalChunkingConfigurationProperty{
LevelConfigurations: []interface{}{
&HierarchicalChunkingLevelConfigurationProperty{
MaxTokens: jsii.Number(123),
},
},
OverlapTokens: jsii.Number(123),
}
Properties
levelConfigurationsIResolvable | IResolvable | CfnKnowledgeBase.level_configurationstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HierarchicalChunkingLevelConfigurationProperty]]]levelConfigurationsIResolvableLevelConfigurationsIResolvableLevelConfigurationsinterface{} required #Token settings for each layer.
overlapTokensnumberoverlap_tokensint | floatoverlapTokensNumberOverlapTokensdoubleOverlapTokens*float64 required #The number of tokens to repeat across chunks in the same layer.