AWS AI Practitioner AIF-C01 · Applications of Foundation Models · medium
You are evaluating an LLM that generates abstractive text summaries of news articles against human-written reference summaries. While ROUGE measures exact n-gram word overlap, which evaluation metric uses contextual embeddings from a pretrained language model to measure semantic similarity even when the LLM uses valid synonyms instead of the exact words in the reference summary?
Published · Last updated · checked before publication — how we verify questions
Options
Answer: C. BERTScore measuring semantic similarity via embeddings
BERTScore is the correct answer because it compares a generated summary with a reference summary in embedding space rather than by surface wording. Each token is represented by a contextual embedding from a pretrained transformer such as BERT. Tokens in the candidate are matched to the most similar tokens in the reference using cosine similarity, and the matches are aggregated into precision, recall and F1. Because a valid synonym or paraphrase has a similar embedding to the original word, it still earns credit. That matters for abstractive summarization, where the model rewrites content instead of copying phrases. The common trap is choosing ROUGE or BLEU because they are the familiar text-generation metrics. They count exact n-gram overlap, so they under-score correct paraphrases. The other trap is picking a metric that sounds quantitative but belongs to a different task type, such as regression error or classification statistics, which cannot score free-form text.
Why the other options are wrong
- A. Root Mean Squared Error (RMSE) for continuous regression targets — RMSE is the square root of the average squared difference between predicted and actual numeric values, used to evaluate regression models. It has no way to compare two passages of text, so it cannot measure semantic similarity between summaries.
- B. ROUGE-1 lexical unigram recall counting exact word matches — ROUGE-1 measures unigram overlap, usually reported as recall, by counting exact word matches against the reference. It is the lexical metric the question contrasts with, and it penalizes valid synonyms instead of recognizing them as equivalent.
- D. Confusion Matrix Specificity (True Negative Rate) for binary labels — Specificity, or true negative rate, is the proportion of actual negatives a binary classifier correctly identifies, and it is read from a confusion matrix. It applies to labeled classification outcomes, not to open-ended generated text, and it says nothing about semantic similarity.
More Applications of Foundation Models questions
- When configuring Amazon Bedrock Knowledge Bases for a RAG pipeline over 50,000 technical manuals (each 80 pages long)…
- An enterprise wants a generative AI assistant on Amazon Bedrock that can not only answer policy questions from a…
- A media company wants a foundation model to adopt a very specific brand voice, JSON output schema, and domain-specific…
- A mobile-app company uses a massive 405-billion-parameter teacher LLM on Amazon Bedrock that achieves 95% accuracy on…
- An attacker types the following input into a public customer-support LLM chat box: 'Ignore all previous system…
- A healthcare company wants an LLM on Amazon Bedrock to answer employee questions using internal HR policy PDFs that…
- An analyst prompts an LLM to solve a multi-step supply-chain math word problem. When asked for the final number…
All Applications of Foundation Models questions and the topic overview →
AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.