Class CfnDataSource.ChunkingConfigurationProperty
Details about how to chunk the documents in the data source.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Bedrock
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnDataSource.ChunkingConfigurationProperty : CfnDataSource.IChunkingConfigurationProperty
Syntax (vb)
Public Class CfnDataSource.ChunkingConfigurationProperty Implements CfnDataSource.IChunkingConfigurationProperty
Remarks
A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
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.AWS.Bedrock;
var chunkingConfigurationProperty = new ChunkingConfigurationProperty {
ChunkingStrategy = "chunkingStrategy",
// the properties below are optional
FixedSizeChunkingConfiguration = new FixedSizeChunkingConfigurationProperty {
MaxTokens = 123,
OverlapPercentage = 123
},
HierarchicalChunkingConfiguration = new HierarchicalChunkingConfigurationProperty {
LevelConfigurations = new [] { new HierarchicalChunkingLevelConfigurationProperty {
MaxTokens = 123
} },
OverlapTokens = 123
},
SemanticChunkingConfiguration = new SemanticChunkingConfigurationProperty {
BreakpointPercentileThreshold = 123,
BufferSize = 123,
MaxTokens = 123
}
};
Synopsis
Constructors
| ChunkingConfigurationProperty() | Details about how to chunk the documents in the data source. |
Properties
| ChunkingStrategy | Knowledge base can split your source data into chunks. |
| FixedSizeChunkingConfiguration | Configurations for when you choose fixed-size chunking. |
| HierarchicalChunkingConfiguration | Settings for hierarchical document chunking for a data source. |
| SemanticChunkingConfiguration | Settings for semantic document chunking for a data source. |
Constructors
ChunkingConfigurationProperty()
Details about how to chunk the documents in the data source.
public ChunkingConfigurationProperty()
Remarks
A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
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.AWS.Bedrock;
var chunkingConfigurationProperty = new ChunkingConfigurationProperty {
ChunkingStrategy = "chunkingStrategy",
// the properties below are optional
FixedSizeChunkingConfiguration = new FixedSizeChunkingConfigurationProperty {
MaxTokens = 123,
OverlapPercentage = 123
},
HierarchicalChunkingConfiguration = new HierarchicalChunkingConfigurationProperty {
LevelConfigurations = new [] { new HierarchicalChunkingLevelConfigurationProperty {
MaxTokens = 123
} },
OverlapTokens = 123
},
SemanticChunkingConfiguration = new SemanticChunkingConfigurationProperty {
BreakpointPercentileThreshold = 123,
BufferSize = 123,
MaxTokens = 123
}
};
Properties
ChunkingStrategy
Knowledge base can split your source data into chunks.
public string ChunkingStrategy { get; set; }
Property Value
Remarks
A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for NONE , then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.
FixedSizeChunkingConfiguration
Configurations for when you choose fixed-size chunking.
public object? FixedSizeChunkingConfiguration { get; set; }
Property Value
Remarks
If you set the chunkingStrategy as NONE , exclude this field.
Type union: either IResolvable or CfnDataSource.IFixedSizeChunkingConfigurationProperty
HierarchicalChunkingConfiguration
Settings for hierarchical document chunking for a data source.
public object? HierarchicalChunkingConfiguration { get; set; }
Property Value
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.
Type union: either IResolvable or CfnDataSource.IHierarchicalChunkingConfigurationProperty
SemanticChunkingConfiguration
Settings for semantic document chunking for a data source.
public object? SemanticChunkingConfiguration { get; set; }
Property Value
Remarks
Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.
Type union: either IResolvable or CfnDataSource.ISemanticChunkingConfigurationProperty