Method FromRetrievalResults
FromRetrievalResults(IEnumerable<PartitionSimilarity>)
Builds user-facing source references from retrieval results: one reference per document page, ordered by descending score. Several chunks of the same page collapse into the page's best-scoring chunk, whose excerpt and score the reference carries, so a citation list never repeats a page. Context-window neighbors are skipped: they provide surrounding text for the model, not evidence, and carry no score of their own. Results without page metadata stay one reference per chunk.
public static List<DocumentReference> FromRetrievalResults(IEnumerable<PartitionSimilarity> results)
Parameters
resultsIEnumerable<PartitionSimilarity>Retrieval results as returned by the retrieval engine, in any order; citations are ordered by score.
Returns
- List<DocumentReference>
The deduplicated, relevance-ordered references.