SemanticSimilarityChunker Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the SemanticSimilarityChunker class.
public SemanticSimilarityChunker(Microsoft.Extensions.AI.IEmbeddingGenerator<string,Microsoft.Extensions.AI.Embedding<float>> embeddingGenerator, Microsoft.Extensions.DataIngestion.IngestionChunkerOptions options, float? thresholdPercentile = default);
new Microsoft.Extensions.DataIngestion.Chunkers.SemanticSimilarityChunker : Microsoft.Extensions.AI.IEmbeddingGenerator<string, Microsoft.Extensions.AI.Embedding<single>> * Microsoft.Extensions.DataIngestion.IngestionChunkerOptions * Nullable<single> -> Microsoft.Extensions.DataIngestion.Chunkers.SemanticSimilarityChunker
Public Sub New (embeddingGenerator As IEmbeddingGenerator(Of String, Embedding(Of Single)), options As IngestionChunkerOptions, Optional thresholdPercentile As Nullable(Of Single) = Nothing)
Parameters
- embeddingGenerator
- IEmbeddingGenerator<String,Embedding<Single>>
Embedding generator.
- options
- IngestionChunkerOptions
The options for the chunker.
Threshold percentile to consider the chunks to be sufficiently similar. 95th percentile will be used if not specified.