Method GetCalibratedMinRelevanceScoreAsync
GetCalibratedMinRelevanceScoreAsync(float, CancellationToken)
Converts a scale-independent relevance value into the absolute cosine floor that expresses it on this engine's embedding model.
public Task<float> GetCalibratedMinRelevanceScoreAsync(float relevance = 0.2, CancellationToken cancellationToken = default)
Parameters
relevancefloatRelevance on a scale where 0 is the model's similarity between unrelated texts and 1 is identity. Defaults to MinCalibratedRelevance.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
Examples
float floor = await ragEngine.GetCalibratedMinRelevanceScoreAsync();
var matches = await ragEngine.FindMatchingPartitionsAsync("semantic search", topK: 5, minScore: floor);
Remarks
Embedding spaces are anisotropic, so unrelated texts already score well above zero and by a model-specific amount. A fixed cosine floor is therefore a different filter on every model, strict enough on one to discard most of what it should return while barely filtering another. Use this to express a relevance requirement that holds its meaning across models. The model's baseline is measured once and cached, costing a handful of short embeddings on first use.