SemanticSimilarityChunker Class
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.
Splits a IngestionDocument into chunks based on semantic similarity between its elements based on cosine distance of their embeddings.
public ref class SemanticSimilarityChunker sealed : Microsoft::Extensions::DataIngestion::IngestionChunker<System::String ^>
public sealed class SemanticSimilarityChunker : Microsoft.Extensions.DataIngestion.IngestionChunker<string>
type SemanticSimilarityChunker = class
inherit IngestionChunker<string>
Public NotInheritable Class SemanticSimilarityChunker
Inherits IngestionChunker(Of String)
- Inheritance
Constructors
| Name | Description |
|---|---|
| SemanticSimilarityChunker(IEmbeddingGenerator<String,Embedding<Single>>, IngestionChunkerOptions, Nullable<Single>) |
Initializes a new instance of the SemanticSimilarityChunker class. |
Methods
| Name | Description |
|---|---|
| ProcessAsync(IngestionDocument, CancellationToken) |
Splits a document into chunks asynchronously. |