ContextRecallMetric<T>

Models & Types ยท AiDotNet.RetrievalAugmentedGeneration.Evaluation

Evaluates context recall (RAGAS): what fraction of the ground-truth answer is supported by the retrieved contexts.

Inheritance: RAGMetricBase<T> โ†’ ContextRecallMetric<T>

How It Works

Context recall measures retrieval completeness. The ground-truth answer is broken into individual claims (sentences); each claim is checked for whether it can be attributed to the retrieved contexts. The score is attributable-claims / total-claims. A low score means the retriever missed information that the correct answer depends on.

Attribution of each claim is decided by the text generator (a yes/no judge) when one is supplied, otherwise by cosine similarity against an embedding model, otherwise by an offline lexical word-coverage threshold.

Constructors

Constructor Summary
ContextRecallMetric(ITextGenerator generator, IEmbeddingModel<T> embeddingModel, double attributionThreshold) Initializes a new instance of the ContextRecallMetric class.

Properties

Property Summary
string Description { get; } Gets the description of what this metric measures.
string Name { get; } Gets the name of this metric.