LLM-as-a-judge
An evaluation approach in which a language model assesses or compares outputs against quality criteria.
AI Agents in Action, Second Edition
LLM-as-judge is an evaluation technique in which a language model assesses another model's output against specified criteria.
- How it is used
- Evaluates agent outputs with rubric-based scores or critiques before delivery or as feedback for further action.
- How deep it goes
- Develops rubric design and typed evaluation into bounded critic loops, with guidance on validation and failure handling.
- Examples
- Uses retrieval-answer benchmarks and an image-style critic to demonstrate typed feedback and rubric scoring.
- What you can do after
- Apply it via the Agents SDK to score outputs, return typed feedback, and guide bounded revisions.
Read how AI Agents in Action, Second Edition explains LLM-as-a-judge →
Building Reliable AI Systems
An evaluation technique in which a large language model assesses the quality of another model's output.
- How it is used
- Uses model judgments to assess quality, relevance, faithfulness, and hallucinations in generated outputs.
- How deep it goes
- Explains evaluation inputs, criteria, structured judgments, biases, and practical checks, with a Python implementation.
- Examples
- Uses roaming-fee responses and a structured hallucination judgment with severity, explanation, and unsupported claims.
- What you can do after
- Apply it via the OpenAI API and Pydantic to compare generated text with a reference and return a structured judgment.
Read how Building Reliable AI Systems explains LLM-as-a-judge →
The Art of AI Product Development
LLM-as-a-Judge is an evaluation technique in which a large language model assesses generated outputs against specified criteria.
- How it is used
- Scales end-to-end RAG evaluation and checks whether fine-tuned models follow instructions.
- How deep it goes
- Defines groundedness and relevance criteria, then applies model scoring alongside manual audits and user feedback.
- Examples
- Tests a SaaS-trends report for grounding and relevance and scores instruction adherence on a held-out 20% test set.
- What you can do after
- Evaluate generated answers for source grounding and query relevance, or score how well a fine-tuned model follows instructions.
Read how The Art of AI Product Development explains LLM-as-a-judge →
Machine Learning Platform Engineering
LLM-as-judge is an evaluation technique in which one large language model assesses the outputs of another model.
- How it is used
- Evaluates model responses against application-specific quality criteria that conventional text-similarity metrics cannot assess.
- How deep it goes
- Defines G-Eval criteria, evaluation parameters, and score thresholds through production-oriented tests.
- Examples
- Tests security-boundary deflection and combines correctness, relevance, and completeness metrics.
- What you can do after
- Evaluate responses with DeepEval using custom G-Eval criteria and score thresholds.
Read how Machine Learning Platform Engineering explains LLM-as-a-judge →
Reinforcement Learning from Human Feedback
LLM-as-a-judge is an evaluation technique in which a language model assesses the quality or preference of model outputs according to provided criteria.
- How it is used
- Uses prompted language models to label preferences and scale response evaluation more cheaply than human judgment.
- How deep it goes
- Defines pairwise prompting and variance control, then discusses bias and alternatives without prescribing a full calibration procedure.
- Examples
- Uses an MT-Bench pairwise prompt and names MT-Bench, AlpacaEval, Arena-Hard, and WildBench.
- What you can do after
- Apply prompting with judging instructions, a user prompt, and two completions to collect a preference or evaluation.
Read how Reinforcement Learning from Human Feedback explains LLM-as-a-judge →
Build an AI Agent (From Scratch)
LLM-as-a-judge is an evaluation method in which a language model scores or classifies another system's outputs according to an evaluation rubric.
- How it is used
- Scales evaluation of agent responses by grading them against a rubric as prompts, models, and data change.
- How deep it goes
- Distinguishes single-output grading from pairwise comparison and gives prompt examples, without specifying judge-model implementation.
- Examples
- Uses a research-summary PASS/FAIL prompt and a renewable-energy A/B/Tie comparison.
- What you can do after
- Evaluate agent responses with rubric-based scores or pairwise choices, then aggregate comparisons into win rates.
Read how Build an AI Agent (From Scratch) explains LLM-as-a-judge →
Introduction to Generative AI, Second Edition
An LLM judge is a language model configured to assess or classify the outputs of another model according to specified criteria.
- How it is used
- Automates human judgments of model outputs to support systematic evaluation of prompt iterations.
- How deep it goes
- Works through expert-label validation and precision and recall, while noting that accuracy can mislead with imbalanced labels.
- Examples
- Uses real estate listing descriptions and judges whether their tone is appropriately enthusiastic and positive.
- What you can do after
- Evaluate whether a judge’s labels resemble expert labels by checking agreement, precision, and recall.
Read how Introduction to Generative AI, Second Edition explains LLM-as-a-judge →
AI Agents and Applications
- How it is used
- Supports testing LLM application outputs against evaluation criteria.
- How deep it goes
- Names evaluation criteria but does not detail evaluator implementation.
- Examples
- Uses relevance, correctness, and sensitivity as criteria for evaluating LLM completions.
- What you can do after
- Apply via LangSmith built-in evaluators to test completions for relevance, correctness, and sensitivity.
Read how AI Agents and Applications explains LLM-as-a-judge →
Building LLM Applications with DSPy
A language model assigned to assess the quality of responses produced by another language model.
- How it is used
- Scores model predictions inside metric functions during optimization and evaluation, rather than production inference.
- How deep it goes
- Implements a DSPy Predict judge that returns a quality score and can be prompt-optimized with demos and instructions.
- Examples
- Compares generated summaries with ground-truth summaries and illustrates judge-call costs across candidate prompts.
- What you can do after
- Evaluate summarizer predictions with a judge-based metric and optimize the judge’s demos and instructions.
Read how Building LLM Applications with DSPy explains LLM-as-a-judge →
Related concepts
- 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.
- evaluation datasetuses · An evaluation dataset is a collection of examples or test cases used to assess a model or system against specified outcomes or criteria.
- large language modeluses · A large language model is a machine-learning model trained on extensive text data to process and generate language.
- accuracymeasures · Accuracy is the degree to which a result agrees with a specified truth, reference, or criterion, often measured as the proportion of evaluated predictions that are correct.
- coherencemeasures · Coherence is the degree to which the parts of an output are logically connected, consistent, and intelligible as a whole.
- metric functionused by · A metric function is a function that evaluates a language-model prediction against an example and optionally a call trace to produce an assessment score.
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.








