Lesson 3 of 4 Evaluating and Improving Multi-Agent Solutions

Building Reliable LLM Judges and Useful Synthetic Data

This lesson explains how to build reliable LLM-as-a-judge evaluators and useful synthetic test data, the techniques that large-scale evaluation of open-ended agent behaviour relies on, and their pitfalls.

Learning outcomes

After completing this lesson, you will be able to:

  • Build an LLM-as-a-judge evaluator with a rubric.
  • Mitigate judge biases such as position and verbosity bias.
  • Generate synthetic data that fills gaps in real data.

Building an LLM-as-a-judge evaluator

An LLM-as-a-judge evaluator prompts a capable model with the input, the output, any reference or context, and a rubric, and asks for a score with a short reason in a structured format. Foundry's AI-assisted evaluators (groundedness, task adherence and others) are judges of this kind, and custom judges can be built for domain criteria such as "recommends only products in stock". Good judges use specific, observable criteria, a small scale (pass or fail, or 1-5 with anchors), examples of each score and a low temperature or low reasoning variability.

Select all that apply

Designing a reliable judge

Exam skills 3.2.3

Pick the design choices that make an LLM judge more reliable.

Log in to try this activity Interactive activities are free with an account.

Judge biases and mitigations

Judges have known biases, which the following table lists with mitigations.

BiasEffectMitigation
Position biasPrefers the first (or second) answer in comparisonsRandomize or swap order and average
Verbosity biasPrefers longer answersRubric rewards correctness and concision explicitly
Self-preferencePrefers outputs from its own model familyUse a different model family as judge
LeniencyApproves vague or partially wrong answersSpecific criteria, reference answers, calibration

Every judge is calibrated against human ratings before use, as described in the human review topic, and recalibrated when the judge model changes.

Match the pairs

Biases and fixes

Exam skills 3.2.3

Match each judge bias with its mitigation.

Log in to try this activity Interactive activities are free with an account.

Synthetic data generation

Synthetic data is test data generated by models or programs. It fills gaps in real data: rare intents, edge cases, other languages, long conversations and adversarial inputs. Foundry provides a simulator in the Azure AI Evaluation SDK that generates queries and multi-turn conversations from source text or tasks, and an adversarial simulator for safety testing; the AI Red Teaming Agent generates attacks.

Synthetic data has limits. It reflects the generating model's assumptions, can be too clean or too uniform and can leak the expected answer into the question. Good practice is to seed generation with real examples and personas, review samples by hand, deduplicate, label the data as synthetic, and always keep a set of real production samples in the evaluation dataset.

True or false

Synthetic test data

Exam skills 3.2.3

Check the uses and limits of synthetic data.

Log in to try this activity Interactive activities are free with an account.
Worked example

An over-generous judge

A custom judge scores 94% of a support agent's answers as correct, but human reviewers rate only 78% as correct. Reviewers note that many approved answers are long and confident but cite the wrong policy version.

The judge shows leniency and verbosity bias. The rubric should require that the cited policy version matches the provided context, give examples of failing answers, and use pass or fail rather than a vague scale; the judge is then recalibrated against the human ratings. Using the judge's 94% as a release gate before that would hide real failures.

Check yourself

Name two biases of LLM judges.

Show answer

For example position bias, verbosity bias and self-preference, which are reduced with specific rubrics and anchored scales.

Exam Tips

Remember for the exam

  • Judges need specific rubrics, anchored scales and calibration against humans.
  • Mitigate position, verbosity and self-preference bias.
  • Synthetic data fills coverage gaps; keep real samples and review generated data.