G-Eval
G-Eval is an LLM-based technique for evaluating generated text against natural-language criteria, often by generating evaluation steps and assigning scores.
Machine Learning Platform Engineering
G-Eval is an evaluation technique that uses a large language model to judge another model’s outputs against natural-language criteria.
- How it is used
- Tests assistant responses against domain-specific quality and safety criteria.
- How deep it goes
- Works through criteria, test-case fields, thresholds, and combined metrics; does not detail the judge model’s internals.
- Examples
- Uses a security-sensitive credentials request, correctness and completeness tests, and documentation-grounded hallucination checks.
- What you can do after
- Apply it via DeepEval to test response quality and safety against configurable criteria and thresholds.
Read how Machine Learning Platform Engineering explains G-Eval →
Generative AI in Action
G-Eval is an LLM-based framework for evaluating generated text according to specified quality criteria without requiring reference texts.
- How it is used
- Assesses generated text against quality criteria when reference texts are unavailable.
- How deep it goes
- Explains prompt criteria, evaluation steps, scoring calls, and result comparison through a worked implementation.
- Examples
- Compares an NLP-generated summary and a Gemini-generated summary of an article about AI principles.
- What you can do after
- Apply it via Azure OpenAI GPT-4 to score and compare summaries across four criteria.
Related concepts
- chain-of-thought promptinguses · Chain-of-thought prompting is a technique that elicits or supplies intermediate reasoning steps to guide a model toward a final answer.
- GPT-4uses · GPT-4 is a multimodal large language model developed by OpenAI that processes text and image inputs and generates text.
- language modeluses · A language model is a computational model that represents patterns in sequences of linguistic tokens, often assigning probabilities to or predicting tokens to evaluate or generate text.
- LLM-as-a-judgeimplements · An evaluation approach in which a language model assesses or compares outputs against quality criteria.
- probability theoryuses · Probability theory is the branch of mathematics that assigns and analyzes probabilities to quantify uncertainty about events and outcomes.
- prompthas part · A prompt is text or other input supplied to an artificial-intelligence model to specify a task or provide instructions or context that guides its output or behavior.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

