# Porównanie tekstu z wzorcem (BLEU, ROUGE, BERTScore)

EN: **Reference-based text generation metrics** · id `textgenmetrics` · aliases: BLEU, ROUGE, BERTScore, METEOR, reference-based metrics

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Ewaluacja i interpretowalność](https://aiatlasgraph.com/t/evaluation.md) › [Metryki i benchmarki](https://aiatlasgraph.com/t/metrics.md) › Porównanie tekstu z wzorcem (BLEU, ROUGE, BERTScore)

## Description

- PL: Automatyczna ocena wygenerowanego tekstu przez porównanie z odpowiedzią wzorcową — od liczenia wspólnych słów po podobieństwo znaczeń w embeddingach.
- EN: Automatic scoring of generated text by comparing it to a reference answer — from counting shared words to meaning similarity in embeddings.

## In one sentence

- PL: To automatyczne porównywanie wygenerowanego tekstu z przygotowaną odpowiedzią wzorcową.
- EN: This automatically compares generated text with a prepared reference answer.

## Problem it solves

- PL: Masz wiele tłumaczeń lub streszczeń do sprawdzenia, a ocenianie każdego ręcznie zajmuje dużo czasu.
- EN: You have many translations or summaries to check, and rating each one manually takes time.

## What it does

- PL: Porównuje wspólne słowa, fragmenty lub podobieństwo znaczenia; wysoki wynik nie gwarantuje prawdziwości ani pełnej przydatności tekstu.
- EN: It compares shared words, passages or meaning similarity; a high score does not guarantee truthfulness or full usefulness.

## Everyday example

- PL: Porównujesz streszczenie spotkania z notatką wzorcową, a rozbieżności sprawdzasz w nagraniu, zamiast uznawać podobieństwo słów za dowód poprawności.
- EN: You compare a meeting summary with reference notes, then check differences against the recording rather than treating similar wording as proof of correctness.

## This concerns you if you…

- PL: masz odpowiedzi wzorcowe do porównania tekstów
- PL: chcesz wstępnie oceniać wiele tłumaczeń lub streszczeń
- EN: have reference answers for comparing texts
- EN: want preliminary scores for many translations or summaries

## Keywords

BLEU · ROUGE · BERTScore · exact match · n-gram overlap

## How it works

- PL: Ocena porównuje wygenerowany tekst z referencją przez nakładanie n-gramów lub dopasowanie embeddingów tokenów. Wyniki łączy się po przykładach, uwzględniając reguły długości i normalizacji właściwe danej metryce.
- EN: Scoring compares generated text with references through n-gram overlap or token-embedding matching. Results are aggregated across examples using the metric's length and normalisation rules.

## Limits

- PL: Poprawna odpowiedź może znacznie różnić się od referencji. Podobieństwo słów lub embeddingów nie potwierdza prawdziwości, a wyniki zależą od tokenizacji i dostępnych wzorców.
- EN: A correct answer may differ greatly from its reference. Word or embedding similarity does not establish truth, and results depend on tokenisation and available references.

## Key terms

- PL: **n-gram**: Ciąg kolejnych tokenów używany do porównywania fragmentów tekstu.
- PL: **odpowiedź referencyjna**: Wzorcowy tekst, z którym metryka porównuje wygenerowaną odpowiedź.
- EN: **n-gram**: A sequence of consecutive tokens used to compare text segments.
- EN: **reference answer**: A target text against which a metric compares generated answers.

## Know first

- [Tokenizacja tekstu (BPE, WordPiece, SentencePiece) (Text tokenisation (BPE, WordPiece, SentencePiece))](https://aiatlasgraph.com/t/tokenization.md)
- [Embeddingi zdań i dokumentów (modele embeddingowe) (Sentence and document embeddings (embedding models))](https://aiatlasgraph.com/t/textembeddings.md)

## Examples

- PL: BLEU (tłumaczenie) · ROUGE (streszczenia) · BERTScore · dokładne dopasowanie
- EN: BLEU (translation) · ROUGE (summaries) · BERTScore · exact match

## Related topics

Untyped, symmetric "see also" links.

- [Ocena jakości tłumaczenia bez wzorca (quality estimation) (Machine translation quality estimation)](https://aiatlasgraph.com/t/mtqe.md)
- [Streszczanie tekstu (Text summarisation)](https://aiatlasgraph.com/t/summarization.md)
- [Tłumaczenie maszynowe (Machine translation)](https://aiatlasgraph.com/t/machinetranslation.md)

## Sources

- [BERTScore: Evaluating Text Generation with BERT](<https://arxiv.org/abs/1904.09675>) `bertscore-2019` · by Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, Yoav Artzi
- [BLEU: a Method for Automatic Evaluation of Machine Translation](<https://aclanthology.org/P02-1040/>) `papineni-bleu-2002` · by Kishore Papineni, Salim Roukos, Todd Ward, Wei-Jing Zhu
- [ROUGE: A Package for Automatic Evaluation of Summaries](<https://aclanthology.org/W04-1013/>) `lin-rouge-2004` · by Chin-Yew Lin

---

AI Atlas revision 124 (2026-10-31) · HTML: https://aiatlasgraph.com/t/textgenmetrics · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
