Context recall
The context-recall
assertion evaluates whether the provided context contains the information needed to answer a specific question or verify a particular fact.
Configuration​
assert:
- type: context-recall
value: 'Expected fact to find in context'
threshold: 0.8 # Score from 0 to 1
note
This assertion requires context and the LLM's output to evaluate recall. See Defining context for instructions on how to set context in your test cases.
How it works​
The context recall checker:
- Analyzes whether the provided context contains the information specified in the
value
field - Evaluates the completeness and accuracy of information retrieval
- Returns a score from 0 to 1, where 1 means the context fully contains the expected information
Further reading
- See Defining context for instructions on how to set context in your test cases.
- See model-graded metrics for more options and the RAG Evaluation Guide for complete examples.