Skip to main content

ROUGE

Available

llm.rouge

Measures how much of the reference answer's content the response covers, using longest-common-subsequence overlap.

Contract​

FieldValue
version1.0.0
metric_typepointwise
scorer_contractper_row
directionhigher_is_better
entrypointaip_metrics_llm.answered.rouge
target_kindNone

Required columns​

  • input_id
  • prompt
  • expected_output
  • sut_response

Accepted schemas​

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

Methodology​

  1. Deterministic - no LLM. Uses the Hugging Face evaluate 'rouge' metric.
  2. Compare the response against the reference answer.
  3. Compute the ROUGE-L longest-common-subsequence F-measure.
  4. Report the 0-1 ROUGE-L score.

Score semantics​

Scores range 0-1 (ROUGE-L). A high score means the response reproduces much of the reference's content; a low score means little overlap. Higher is better.

Worked example​

Reference 'The quick brown fox' with response 'The quick fox' shares the subsequence 'The quick fox' -> ROUGE-L ~ 0.8.

Configuration schema​

{
"properties": {
"concurrency_limit": {
"default": 10,
"title": "Concurrency Limit",
"type": "integer",
"x-aip-param-role": "operational"
},
"huggingface_config_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Huggingface Config Name"
},
"huggingface_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Huggingface Path"
},
"inverted": {
"default": false,
"title": "Inverted",
"type": "boolean",
"x-aip-param-role": "scoring_metadata"
},
"max": {
"default": 1.0,
"title": "Max",
"type": "number",
"x-aip-param-role": "scoring_metadata"
},
"metric_name": {
"default": "rouge",
"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"
},
"primary_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "rougeL",
"title": "Primary Key"
},
"system_type": {
"default": "llm",
"enum": [
"llm",
"vlm",
"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": null,
"processing_kind": "cpu",
"stream_batch_size": null,
"timeout_seconds": 60
}

Complete manifest​

accepts:
- name: gdi_text_v1
task_types:
- multi_turn_llm
- multi_turn_rag
- single_turn_llm
- single_turn_rag
config_schema:
properties:
concurrency_limit:
default: 10
title: Concurrency Limit
type: integer
x-aip-param-role: operational
huggingface_config_name:
anyOf:
- type: string
- type: 'null'
default: null
title: Huggingface Config Name
huggingface_path:
anyOf:
- type: string
- type: 'null'
default: null
title: Huggingface Path
inverted:
default: false
title: Inverted
type: boolean
x-aip-param-role: scoring_metadata
max:
default: 1.0
title: Max
type: number
x-aip-param-role: scoring_metadata
metric_name:
default: rouge
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
primary_key:
anyOf:
- type: string
- type: 'null'
default: rougeL
title: Primary Key
system_type:
default: llm
enum:
- llm
- vlm
- 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 much of the reference answer's content does the response cover?
direction: higher_is_better
display_name: ROUGE
entrypoint: aip_metrics_llm.answered.rouge
execution:
emits_metric_family: false
function_name: null
max_concurrency: null
processing_kind: cpu
stream_batch_size: null
timeout_seconds: 60
kind: metric
manifest_version: '1'
max_prompt_slots: 0
metric_metadata:
methodology:
- Deterministic - no LLM. Uses the Hugging Face evaluate 'rouge' metric.
- Compare the response against the reference answer.
- Compute the ROUGE-L longest-common-subsequence F-measure.
- Report the 0-1 ROUGE-L score.
score_semantics: Scores range 0-1 (ROUGE-L). A high score means the response reproduces
much of the reference's content; a low score means little overlap. Higher is better.
summary: Measures how much of the reference answer's content the response covers,
using longest-common-subsequence overlap.
worked_example: Reference 'The quick brown fox' with response 'The quick fox' shares
the subsequence 'The quick fox' -> ROUGE-L ~ 0.8.
metric_type: pointwise
name: llm.rouge
partition_types: []
required_columns:
- input_id
- prompt
- expected_output
- sut_response
required_kinds: []
scorer_contract: per_row
target_kind: null
unsupported_trace_shapes: []
version: 1.0.0