Skip to main content

Context Recall

Available

rag.context_recall

Measures how fully the retrieved material covers the evidence needed to support the reference answer.

Contract​

FieldValue
version1.0.0
metric_typepointwise
scorer_contractper_row
directionhigher_is_better
entrypointaip_metrics_rag.answered.context_recall
target_kindNone

Required columns​

  • input_id
  • prompt
  • expected_output
  • sut_response
  • retrieved_context

Accepted schemas​

[
{
"name": "gdi_text_v1",
"task_types": [
"multi_turn_rag",
"single_turn_rag"
]
}
]

Methodology​

  1. An LLM judge (Ragas context_recall) receives the question, the reference answer, and the retrieved contexts.
  2. Ragas breaks the reference answer into individual claims.
  3. The judge decides, per claim, whether it is attributable to the retrieved contexts.
  4. The score is the fraction of attributable claims, normalised to 0-1.

Score semantics​

Scores range 0-1, the fraction of reference-answer claims that are attributable to the retrieved context. A high score means the retrieval brought back the evidence the answer relies on; a low score means ground-truth information is missing. Higher is better.

Worked example​

A reference answer with 4 claims where the retrieved context supports 3 of them scores 3/4 = 0.75.

Configuration schema​

{
"properties": {
"concurrency_limit": {
"default": 10,
"title": "Concurrency Limit",
"type": "integer",
"x-aip-param-role": "operational"
},
"inverted": {
"default": false,
"title": "Inverted",
"type": "boolean",
"x-aip-param-role": "scoring_metadata"
},
"lang": {
"default": "en",
"enum": [
"en",
"de",
"fr"
],
"title": "Lang",
"type": "string"
},
"max": {
"default": 1.0,
"title": "Max",
"type": "number",
"x-aip-param-role": "scoring_metadata"
},
"metric_name": {
"default": "context_recall",
"title": "Metric Name",
"type": "string",
"x-aip-param-role": "scoring_metadata"
},
"min": {
"default": 0.0,
"title": "Min",
"type": "number",
"x-aip-param-role": "scoring_metadata"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "gpt-4o",
"title": "Model"
},
"system_type": {
"const": "rag",
"default": "rag",
"title": "System Type",
"type": "string",
"x-aip-param-role": "judge_wiring"
},
"weight": {
"default": 1.0,
"title": "Weight",
"type": "number",
"x-aip-param-role": "scoring_metadata"
}
},
"title": "InitializationConfig",
"type": "object"
}

Execution​

{
"emits_metric_family": false,
"function_name": null,
"max_concurrency": 8,
"processing_kind": "network",
"stream_batch_size": 5000,
"timeout_seconds": 21600
}

Complete manifest​

accepts:
- name: gdi_text_v1
task_types:
- multi_turn_rag
- single_turn_rag
config_schema:
properties:
concurrency_limit:
default: 10
title: Concurrency Limit
type: integer
x-aip-param-role: operational
inverted:
default: false
title: Inverted
type: boolean
x-aip-param-role: scoring_metadata
lang:
default: en
enum:
- en
- de
- fr
title: Lang
type: string
max:
default: 1.0
title: Max
type: number
x-aip-param-role: scoring_metadata
metric_name:
default: context_recall
title: Metric Name
type: string
x-aip-param-role: scoring_metadata
min:
default: 0.0
title: Min
type: number
x-aip-param-role: scoring_metadata
model:
anyOf:
- type: string
- type: 'null'
default: gpt-4o
title: Model
system_type:
const: rag
default: rag
title: System Type
type: string
x-aip-param-role: judge_wiring
weight:
default: 1.0
title: Weight
type: number
x-aip-param-role: scoring_metadata
title: InitializationConfig
type: object
dependencies: []
description: How fully does the retrieved material cover the evidence needed for the
answer?
direction: higher_is_better
display_name: Context Recall
entrypoint: aip_metrics_rag.answered.context_recall
execution:
emits_metric_family: false
function_name: null
max_concurrency: 8
processing_kind: network
stream_batch_size: 5000
timeout_seconds: 21600
kind: metric
manifest_version: '1'
max_prompt_slots: 0
metric_metadata:
methodology:
- An LLM judge (Ragas context_recall) receives the question, the reference answer,
and the retrieved contexts.
- Ragas breaks the reference answer into individual claims.
- The judge decides, per claim, whether it is attributable to the retrieved contexts.
- The score is the fraction of attributable claims, normalised to 0-1.
score_semantics: Scores range 0-1, the fraction of reference-answer claims that
are attributable to the retrieved context. A high score means the retrieval brought
back the evidence the answer relies on; a low score means ground-truth information
is missing. Higher is better.
summary: Measures how fully the retrieved material covers the evidence needed to
support the reference answer.
worked_example: A reference answer with 4 claims where the retrieved context supports
3 of them scores 3/4 = 0.75.
metric_type: pointwise
name: rag.context_recall
partition_types: []
required_columns:
- input_id
- prompt
- expected_output
- sut_response
- retrieved_context
required_kinds: []
scorer_contract: per_row
target_kind: null
unsupported_trace_shapes: []
version: 1.0.0