Table of Contents

Property MinRelevanceScore

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

MinRelevanceScore

Gets or sets the minimum relevance score for retrieved partitions.

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 RagChat(ragEngine, chatModel);

// Only include highly relevant partitions
chat.MinRelevanceScore = 0.7f;

Remarks

Partitions 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 partitions considerably faster than it removes wrong ones. See MinRelevanceScore.

Share