AI Engineer DojoAll lessons  Courses
Free lesson · The AI Evaluation Engineer · Lesson 4

Can You Trust an AI Judge?

Your team wants to stop paying people to compare chatbot answers and let GPT-4 do it instead. Your manager asks you one question: can we trust it? By the end of this lesson you'll answer that with evidence, for two different products, and you'll have made and corrected several wrong guesses along the way.

How this lesson works

You'll do the work before you read the explanation. Each step asks you to decide, predict or count something first, and the answer stays hidden until you commit. Being wrong is expected; the wrong guesses are where most of the learning happens. Plan on 60 to 90 minutes, with a pen and paper for Step 2.

The data

Everything here is real. In 2023, researchers at LMSYS asked six chatbots the same 80 questions, in eight categories: writing, roleplay, reasoning, math, coding, extraction, STEM and humanities. Then they showed pairs of answers to people, mostly experts, and asked which was better: answer A, answer B, or a tie. That produced 3,355 human votes. They also had GPT-4 judge the same pairs.

One detail matters a lot later. GPT-4 judged every pair twice, once with the answers in each order. When its two verdicts agreed, that's the verdict. When they disagreed, meaning GPT-4 picked whichever answer happened to be in a particular slot, the dataset marks it "tie (inconsistent)." In this lesson that's called a flip.

Source: Zheng et al., 2023, "Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena." Dataset: lmsys/mt_bench_human_judgments on Hugging Face, CC-BY-4.0.

Step 1

Be the judge

Before you measure a judge, be one. Below are six real pairs from the dataset. For each, read the question and both answers, then make two calls:

For the math and logic questions, work out the correct answer yourself first. Don't skim; the point is to feel how hard or easy each call is.

Step 2 opens when you’ve revealed all six pairs.

Data: MT-Bench human judgments, LMSYS (lmsys/mt_bench_human_judgments), CC-BY-4.0. Zheng, L. et al. (2023). Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. NeurIPS Datasets and Benchmarks. Model answers and votes are shown unedited.