Evaluation is the systematic assessment of generated outputs against criteria chosen for an application. A customer-support response, for example, needs more than fluent wording: it must address the request accurately, remain coherent, and meet user expectations. Because no single score captures every quality or risk, combine quantitative measures with qualitative review. section 9.3.2 section 12.1
Build an evaluation around the decision it must support:
- Define the use case and criteria before testing. Use representative tasks and clear, fair prompts; record the criteria, methods, and results. section 9.3.2 section 12.1
- Choose measures that fit the output. For summaries or translations, BLEU and ROUGE compare text with a human reference; BERTScore assesses semantic similarity. Add manual review and user feedback where scores miss context. section 12.2 section 9.3.2
- Compare against a baseline. For fine-tuning, test the candidate on held-out data and compare it with the base model against task-specific qualitative and quantitative measures. section 9.2 section 9.2.1
- Repeat after changes and in production. Log real-world performance, use feedback to refine the model and evaluation, and check whether mitigations introduce regressions. section 9.3.2 section 13.3.2
Table 12.1 Traditional evaluation metrics
|
Metric
|
Focus
|
Method
|
Limitations
|
|---|---|---|---|
|
BLEU
|
It primarily measures precision, the percentage of words in the machine- generated text that appear in the reference text.
|
It compares n-grams (word sequences) of the candidate translation with the reference translation and counts the matches.
|
It can miss the mark on semantic meaning because it doesn’t account for synonyms or the context of words. It also doesn’t handle word reordering well.
|
|
ROUGE
|
It is more recall oriented, focusing on the percentage of words from the reference text that appear in the generated text.
|
It has several variants, such as ROUGE-N, which compares n-grams, and ROUGE-L, which looks at the longest common subsequence.
|
Like BLEU, ROUGE can overlook semantic similarities and paraphrasing because it’s based on exact word matches.
|
|
BERTScore
|
It evaluates semantic similarity rather than relying on exact word matches.
|
It uses contextual embeddings from models such as BERT to represent the text and calculates the cosine similarity between these embeddings.
|
It can capture paraphrasing and semantic meaning better than BLEU and ROUGE because it considers each word’s context.
|
Use the metric comparison to select a measure deliberately: word-overlap scores can miss paraphrases, while semantic similarity addresses a different aspect of quality. section 12.2
Compare two summaries
Suppose an NLP-generated summary is the reference and an LLM produces another summary of the same article. Compute BLEU, ROUGE, and BERTScore with Hugging Face Evaluate, then inspect what the scores mean. In the worked comparison, BLEU is about 0.047 while BERTScore F1 is about 0.862: limited wording overlap can coexist with substantial semantic similarity. Neither result alone settles whether the summary meets the application’s needs. section 12.2.4
An LLM can also act as an evaluator when given the source document, candidate summary, explicit criteria, and scoring steps. In a summary comparison, separate scores for coherence, consistency, fluency, and relevance make the judgment more actionable than a single overall rating. Human evaluators remain valuable for nuances and bias that automated measures overlook; give them rubrics and assess agreement, while budgeting for the time and cost of review. section 12.3.2 section 12.5
Treat safety as part of the evaluation plan. For prioritized harms, create diverse inputs, inspect and document outputs, define what counts as harmful, then measure frequency and severity. Start manually to validate the assessment before automating it. Tools such as Azure AI Studio can run evaluations over test datasets; DeepEval supports dataset tests, custom metrics, and production monitoring. Select tools and testing depth according to the application’s risks, not merely the easiest available score. section 13.3.2 section 12.3.7 section 12.3.8














