Summarization
Summarization is a single-turn metric to determine if your summarizer is generating facutally correct summaries.
Overview
The summarization metric is a single-turn metric that uses LLM-as-a-judge to evaluate an LLM's ability to summarize text. It generates close-ended questions from the original text and checks if the summary can answer them accurately.
Here's a good read on how our summarization metric was developed.
Required Parameters
These are the parameters you must supply in your test case to run evaluations for summarization metric:
inputstringRequired
The text sent to your summarization agent to summarize.
actual_outputstringRequired
The summary generated by your summarization agent for the given input.
Metric Parameters
These are the parameters you can configure for summarization metric when adding it to a metric collection:
assessment_questionslist of strings
A list of strings specifying the assessment questions. For example, Is the coverage score based on a percentage of 'yes' answers?.
truths_extraction_limitnumber
An integer specifying the maximum number of truths to extract from the actual output.
How Is It Calculated?
The summarization metric breaks the score into alignment_score and coverage_score.
The final score is the minumum of:
alignment_scorewhich determines whether the summary contains hallucinated or contradictory information to the original text.coverage_scorewhich determines whether the summary contains the necessary information from the original text.
Usage
To run the summarization metric on Confident AI, add it to a single-turn metric collection. This will allow you to use summarization metric for:
- Single-turn E2E testing
- Single-turn component-level testing
- Online and offline evals for traces and spans
Last updated on