Homeglossary

BERTScore

BERTScore is an automatic evaluation metric that measures how semantically similar generated text is to a reference text. It uses contextual embeddings from transformer language models to recognize related wording, not just identical words. This makes it useful for evaluating translation, summarization, and other text-generation systems, although it should not be treated as a complete measure of factual accuracy or quality.

What Is BERTScore?

BERTScore is an automatic evaluation metric that measures how semantically similar generated text is to a reference text. It uses contextual embeddings from transformer language models to recognize related wording rather than requiring identical words.

In text generation, the candidate is model output, while the reference is a human-written or otherwise trusted answer. BERTScore represents words as vectors whose meaning changes with context. This helps it recognize that “purchased a car” and “bought an automobile” convey similar ideas despite sharing few exact words. The metric was introduced for evaluating generated language and is documented in the original BERTScore research paper.

Unlike word-overlap measures, BERTScore evaluates whether tokens have similar contextual meaning. It is useful when valid answers can be phrased in different ways.

What Does BERTScore Measure?

BERTScore measures semantic alignment between a generated response and a reference at the token level. A higher score generally means the candidate is more similar in meaning to the reference under the selected model and scoring configuration.

It does not directly measure whether a statement is true, safe, complete, well styled, or useful. A fluent hallucination can score well if it resembles the reference in language or topic. A correct answer may score lower if it uses different details, structure, or terminology. BERTScore measures similarity to a reference, not universal quality.

How BERTScore Works

BERTScore compares contextual token representations instead of counting shared phrases. The process is commonly performed as follows.

  1. Tokenize the candidate and reference into the smaller word units used by the selected transformer model.
  2. Pass both sequences through a pretrained transformer to create contextual embeddings, or numerical representations shaped by nearby words.
  3. Calculate cosine similarity between candidate-token and reference-token vectors. Cosine similarity estimates how closely two vectors point in the same direction.
  4. For each token, greedily select its most similar token in the other text. Tokens do not need to match exactly to receive credit.
  5. Average the best matches from candidate to reference for precision and from reference to candidate for recall.
  6. Combine precision and recall into an F1 score, which balances both views of similarity.

Implementations can use inverse document frequency, or IDF, weighting to give informative words more importance than common words. Baseline rescaling can make raw scores easier to interpret against a model-specific baseline. Record these choices because they can change results.

Precision, Recall, and F1 in BERTScore

BERTScore precision starts from the candidate. For each generated token, it asks whether the reference has a semantically close match. High precision suggests the output contains relatively little wording unsupported by the reference.

Recall starts from the reference. For each reference token, it asks whether the candidate has a close match. High recall suggests the output covers more reference content. Precision is not “how much reference content was found,” and recall is not “how accurate the candidate is.” F1 is the harmonic mean of precision and recall, so it falls when either is weak.

A Simple BERTScore Example

Imagine the reference says, “Maria bought a laptop yesterday,” while the candidate says, “Maria purchased a notebook computer yesterday.” An exact-match metric may penalize “purchased” and may not recognize that “notebook computer” means laptop. BERTScore can assign these terms close matches because their embeddings reflect similar meanings in context.

That does not make the candidate acceptable in every case. If it says “Maria did not purchase a laptop,” many words may still align semantically despite reversing the key fact. Important examples still need close inspection.

BERTScore vs. BLEU, ROUGE, and Exact Match

These metrics answer different evaluation questions. A strong evaluation plan often uses more than one.

MetricEvaluation approachStrengthWeaknessBest-fit use case
BERTScoreContextual token similarityRecognizes paraphrases and related wordingCan miss factual or logical errorsOpen-ended generation with credible references
BLEUN-gram overlap with brevity penaltyFast and established for translation benchmarksPenalizes valid rewordingMachine translation comparisons
ROUGEWord or n-gram overlap, often recall-focusedSimple coverage signalLimited semantic understandingReference-based summarization
Exact matchRequires identical normalized outputClear and strictRejects equivalent phrasingStructured answers and fixed labels

Where BERTScore Is Used

BERTScore is most useful when evaluators have credible reference answers and expect legitimate wording variation.

  • Machine translation, where different translations can preserve meaning.
  • Text summarization, where systems may express source ideas in new language.
  • Data-to-text generation, such as turning records into reports or descriptions.
  • Dialogue systems and question answering with reference responses.
  • Large language model evaluation as one signal among several.
  • Comparing AI assistant outputs, including systems discussed in AI coding assistant comparisons, when a suitable expected response exists.

Benefits of BERTScore

Its main value is a more meaning-aware comparison than literal word matching provides.

  • It tolerates synonyms, paraphrases, and some sentence-structure changes.
  • Contextual embeddings help distinguish different meanings of the same word.
  • Precision, recall, and F1 reveal different output patterns rather than only one view.
  • It applies to several text-generation tasks without task-specific rules.
  • It can support multilingual evaluation with an appropriate multilingual or language-specific model.
  • Research found that BERTScore can align well with human judgments in evaluated settings, as described in the published methodology.

Practical Limits and Common Pitfalls

BERTScore is informative, but it is not a substitute for expert judgment or task-specific checks.

  • It may reward hallucinated text that sounds similar to a reference.
  • Negation, numbers, dates, names, and other critical details may be inadequately reflected in one aggregate score.
  • A narrow reference can unfairly penalize a valid answer that adds correct information.
  • Results depend on the underlying model, selected layer, language, and domain.
  • Embedding-based scoring usually costs more compute than n-gram overlap metrics.
  • Scores from different configurations are not directly comparable.
  • Reporting only an average can hide failures, outliers, or uneven subgroup performance.

How to Use BERTScore Responsibly

Use BERTScore as a reproducible diagnostic, not as a single pass-or-fail gate.

  • Lock and document the model, layer, package version, language, IDF setting, and baseline-rescaling choice.
  • Report precision, recall, and F1, not only F1.
  • Use multiple high-quality references where possible to reduce wording bias.
  • Review unusually high and low scoring examples by hand.
  • Pair the metric with factuality, safety, format, and task-completion checks.
  • Use human review for consequential health, legal, financial, or customer-facing outputs.
  • Maintain shared definitions through resources such as an AI terminology glossary so reports remain clear to non-specialists.

Choosing a BERTScore Model and Interpreting Results

The pretrained model is part of the metric, not a minor implementation detail. A model trained mainly on general English may represent specialist medical text, code, or another language differently from a domain-appropriate model. The selected transformer layer also affects what similarity the score emphasizes.

BERTScore values are best used to compare systems on the same dataset under the same fixed configuration. A score is not a universal percentage of quality, and results from different model setups should not be casually compared. The maintained reference implementation documentation is useful for checking supported settings and reproducibility details.

The Bottom Line

BERTScore is a strong choice for evaluating whether generated text preserves the meaning of a trusted reference despite different wording. It is especially valuable for translation, summarization, and open-ended responses where exact overlap is too strict.

Use another metric when exact formatting or specific factual fields matter, and use human review when truth, safety, or real-world usefulness is at stake. Semantic similarity is valuable evidence, but it is not factual correctness or successful task completion.

Start Building
on Emergent today
Start Building