G-Eval: NLG Evaluation using Gpt-4 with Better Human Alignment

Yang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, Chenguang Zhu

Introduction

The rapid advancement of Large Language Models (LLMs) has created a significant gap between our ability to generate high-quality text and our ability to evaluate it. Traditional evaluation metrics, such as ROUGE and BLEU, rely on n-gram overlap between a model's output and a human-written reference. While effective for tasks with narrow "correct" answers like machine translation, these metrics often fail to capture the nuances of coherence, creativity, and factual consistency in open-ended tasks like summarization or dialogue generation. Furthermore, the requirement for expensive, human-authored "gold standard" references limits the scalability of evaluation.

G-Eval addresses these challenges by leveraging GPT-4 as a reference-free evaluator. By combining Chain-of-Thought (CoT) prompting with a novel probability-weighting technique, G-Eval achieves a state-of-the-art alignment with human judgment, providing a more reliable and granular metric for Natural Language Generation (NLG).

The G-Eval Framework

G-Eval operates through a three-stage "form-filling" paradigm designed to mimic the structured reasoning of a human judge.

1. Prompting with Definitions

The process begins by providing the model with a task description and a set of evaluation criteria. For instance, if evaluating a summary, the prompt defines "Coherence" as the collective quality of all sentences and their logical flow. This ensures the model evaluates the text based on specific, predefined dimensions rather than a generic sense of quality.

2. Auto-Chain-of-Thought (CoT)

To improve the reliability of the evaluation, G-Eval utilizes an "Auto-CoT" step. Instead of jumping directly to a score, the model is prompted to generate a series of intermediate evaluation steps. For a summarization task, these steps might include identifying key points in the source document and verifying their presence in the summary. This structured reasoning acts as a bridge between the abstract definition of a criterion and the final numerical grade.

3. Probability-Weighted Scoring

A common issue with using LLMs for grading is their tendency to output discrete integer scores (e.g., a "3" or a "4"). This leads to a lack of granularity and frequent ties between different outputs. G-Eval overcomes this by requesting the log probabilities (logprobs) of the output tokens for each possible score in a defined range (e.g., 1–5). The final score is then calculated as the expected value:

Score = Σ (score_i × probability_i)

This transformation results in a continuous, fine-grained metric that more accurately reflects the model's internal confidence.

Experimental Setup

The authors meta-evaluated G-Eval across three diverse benchmarks to test its versatility:

  • SummEval: Focused on text summarization, evaluating fluency, coherence, consistency, and relevance.
  • Topical-Chat: A dialogue generation benchmark measuring naturalness, coherence, engagingness, and groundedness.
  • QAGS: A dataset specifically designed to detect factual hallucinations in summarization.

Results and Insights

G-Eval-4 (powered by GPT-4) demonstrated superior performance across all benchmarks, setting new records for human alignment.

Superior Human Alignment

On the SummEval benchmark, G-Eval achieved a Spearman correlation of 0.514, significantly outperforming the previous state-of-the-art neural evaluator, UniEval (0.474). In contrast, traditional metrics like ROUGE-L showed a poor correlation of only 0.128, highlighting the inadequacy of word-matching for complex evaluation.

The Impact of Model Scale

The research revealed a substantial performance gap between GPT-3.5 and GPT-4. While GPT-3.5 struggled with tasks requiring deep reasoning, such as detecting factual consistency, GPT-4 excelled. On the QAGS-Xsum dataset, G-Eval-4 reached a correlation of 0.537, compared to 0.406 for GPT-3.5. This suggests that high-quality evaluation is an emergent property of larger, more capable models.

The "Pro-AI" Bias

An intriguing and potentially concerning finding is the presence of a "pro-AI bias." G-Eval consistently assigned higher scores to LLM-generated summaries than to human-written ones, even in cases where human judges preferred the human versions. This suggests that LLMs may share a latent stylistic preference, which could lead to self-reinforcing feedback loops if these models are used to train future generations of AI.

Limitations and Future Work

Despite its performance, G-Eval faces several practical hurdles:

  • Cost and Latency: Unlike traditional metrics, G-Eval requires API calls to high-end models, making it both expensive and slower to compute.
  • Closed-Source Dependency: The probability-weighting method relies on access to token-level logprobs. If model providers restrict access to these probabilities, the granularity of G-Eval may be compromised.
  • Bias Mitigation: The preference for AI-generated text remains an open challenge that requires further research to ensure objective evaluation.

Conclusion

G-Eval represents a significant step forward in the quest for automated, human-aligned evaluation of NLG. By moving beyond n-gram overlap and utilizing the reasoning capabilities of GPT-4, it provides a robust framework for assessing the quality of increasingly sophisticated AI outputs. As the field moves toward more complex and creative applications, tools like G-Eval will be essential for guiding model development and ensuring factual reliability.

Summary updated

BibTeX
@inproceedings{liu2023g,
  author = {Yang Liu and Dan Iter and Yichong Xu and Shuohang Wang and Ruochen Xu and Chenguang Zhu},
  title = {{G-Eval: NLG Evaluation using Gpt-4 with Better Human Alignment}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.153},
}
Figure