Table of Contents

Property RetrievedPartitions

Namespace
LMKit.Retrieval
Assembly
LM-Kit.NET.dll

RetrievedPartitions

Gets the partitions retrieved from the knowledge base that were used as context for generating the response.

public IReadOnlyList<PartitionSimilarity> RetrievedPartitions { get; }

Property Value

IReadOnlyList<PartitionSimilarity>

A read-only list of PartitionSimilarity instances, or an empty list if no partitions were retrieved.

Examples

RagQueryResult result = chat.Submit("Explain vector search.");

foreach (PartitionSimilarity partition in result.RetrievedPartitions)
{
    Console.WriteLine($"Source: {partition.DataSourceIdentifier}");
    Console.WriteLine($"Score:  {partition.Similarity:F3}");
    Console.WriteLine($"Text:   {partition.Payload}");
    Console.WriteLine();
}
Share