@cdklabs/generative-ai-cdk-constructs • Docs
@cdklabs/generative-ai-cdk-constructs / bedrock / ChunkingStrategy
abstract
ChunkingStrategy
abstract
configuration:ChunkingConfigurationProperty
The CloudFormation property representation of this configuration
readonly
static
DEFAULT:ChunkingStrategy
Fixed Sized Chunking with the default chunk size of 300 tokens and 20% overlap.
readonly
static
FIXED_SIZE:ChunkingStrategy
Fixed Sized Chunking with the default chunk size of 300 tokens and 20% overlap.
You can adjust these values based on your specific requirements using the
ChunkingStrategy.fixedSize(params)
method.
readonly
static
HIERARCHICAL_COHERE:ChunkingStrategy
Hierarchical Chunking with the default for Cohere Models.
readonly
static
HIERARCHICAL_TITAN:ChunkingStrategy
Hierarchical Chunking with the default for Titan Models.
readonly
static
NONE:ChunkingStrategy
Amazon Bedrock treats each file as one chunk. Suitable for documents that are already pre-processed or text split.
readonly
static
SEMANTIC:ChunkingStrategy
Semantic Chunking with the default of bufferSize: 0,
breakpointPercentileThreshold: 95, and maxTokens: 300.
You can adjust these values based on your specific requirements using the
ChunkingStrategy.semantic(params)
method.
static
fixedSize(props
):ChunkingStrategy
Method for customizing a fixed sized chunking strategy.
• props: FixedSizeChunkingConfigurationProperty
static
hierarchical(props
):ChunkingStrategy
Method for customizing a hierarchical chunking strategy. For custom chunking, the maximum token chunk size depends on the model.
• props: HierarchicalChunkingProps
static
semantic(props
):ChunkingStrategy
Method for customizing a semantic chunking strategy. For custom chunking, the maximum token chunk size depends on the model.
• props: SemanticChunkingConfigurationProperty