Glossary · RAG metric

Entity recall.

The fraction of named entities from the ground-truth answer that were actually recalled in the system’s output. Range 0 to 1, higher is better.

How it’s computed

Extract named entities (people, organisations, dates, numbers) from the ground-truth answer using an NER model. Extract the same from the system’s answer.

entity_recall = |entities(ground_truth) ∩ entities(answer)|
                / |entities(ground_truth)|

Because the extraction is deterministic, this metric is reproducible by construction — two runs on the same pair always produce the same score, which is not true for judge-based metrics.

Worked example

Ground-truth mentions [OpenAI, Anthropic, Cohere, Google Gemini]. Answer mentions [OpenAI, Anthropic]. Entity recall = 2 / 4 = 0.5. The model found the major providers but skipped two specific ones.

How Yoke Agent uses it

Entity recall is an optional metric in the RAG workbench. It is most useful for extractive Q&A tasks where the correctness of named entities is a first-class signal — legal, medical, or financial corpora.

Unlike most RAGAS metrics, entity recall is deterministic once the NER model is fixed, so it contributes lower variance to the leaderboard than judge-based scores.

Frequently asked

Why is this useful?

It is deterministic — no LLM-as-judge call. For domains where missing an entity is a real failure, entity recall gives you a cheap, stable signal that doesn’t drift as judges change.

Does the NER model matter?

Yes. spaCy’s en_core_web_trf is a reasonable default. For domain-specific entities (drug names, legal citations), you will want a tuned NER.

When would I not use this metric?

For generative Q&A where paraphrasing is expected. Entity recall penalises rewrites that preserve meaning but change surface forms.