Table of Contents

Property MinRelevanceScore

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

MinRelevanceScore

Gets or sets the minimum relevance score for retrieved passages.

public float MinRelevanceScore { get; set; }

Property Value

float

A value from 0.0 (accept all) to 1.0 (exact matches only). Default is 0.5.

Examples

using var chat = new PdfChat(chatModel, embeddingModel);

// Require higher relevance to reduce noise in results
chat.MinRelevanceScore = 0.7f;

Remarks

Passages scoring below this threshold are excluded from the context. Higher values return fewer but more precisely matched results, though not in equal measure: this is an absolute cosine floor, so how strict any given value is depends on the embedding model, and raising it discards correct passages considerably faster than it removes wrong ones. See MinRelevanceScore.

Share