Skip to content
v2.278.0

SemanticChunkingConfigurationProperty Struct ​

Settings for semantic document chunking for a data source.

Semantic chunking splits a document into smaller documents based on groups of similar content derived from the text with natural language processing.

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 semanticChunkingConfigurationProperty: wisdom.CfnKnowledgeBase.SemanticChunkingConfigurationProperty = {
  breakpointPercentileThreshold: 123,
  bufferSize: 123,
  maxTokens: 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

semantic_chunking_configuration_property = wisdom.CfnKnowledgeBase.SemanticChunkingConfigurationProperty(
    breakpoint_percentile_threshold=123,
    buffer_size=123,
    max_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.*;

SemanticChunkingConfigurationProperty semanticChunkingConfigurationProperty = SemanticChunkingConfigurationProperty.builder()
        .breakpointPercentileThreshold(123)
        .bufferSize(123)
        .maxTokens(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 semanticChunkingConfigurationProperty = new SemanticChunkingConfigurationProperty {
    BreakpointPercentileThreshold = 123,
    BufferSize = 123,
    MaxTokens = 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"

semanticChunkingConfigurationProperty := &SemanticChunkingConfigurationProperty{
	BreakpointPercentileThreshold: jsii.Number(123),
	BufferSize: jsii.Number(123),
	MaxTokens: jsii.Number(123),
}

Properties ​

breakpointPercentileThresholdnumberbreakpoint_percentile_thresholdint | floatbreakpointPercentileThresholdNumberBreakpointPercentileThresholddoubleBreakpointPercentileThreshold*float64 required #
The dissimilarity threshold for splitting chunks.
bufferSizenumberbuffer_sizeint | floatbufferSizeNumberBufferSizedoubleBufferSize*float64 required #
The buffer size.
maxTokensnumbermax_tokensint | floatmaxTokensNumberMaxTokensdoubleMaxTokens*float64 required #
The maximum number of tokens that a chunk can contain.