Advanced course for engineers

Hallucination detection course: find unsupported AI claims

A model can sound sure both when it knows and when it guesses. This course teaches you to split an answer into claims, check each claim against evidence, measure how factual your pipeline is, and act on the result by correcting the claim or letting the model abstain.

Open the courseSee the four steps

The loop

Four steps in a loop: find, check, measure, act

In the intro video: AI answers can sound confident while some claims have no support and some references do not exist.

Still from the intro video for the course Hallucination Detection & Factuality Engineering
Intro video, 1 min 6 s. Transcript below.
Read the transcript

Your AI answers sound confident, but some claims have no support, and some references do not exist. This course is for engineers who must ship answers they can defend. The course works as a loop. You find each claim in the output. You check it against the evidence and its citations. You measure how factual the answers are. Then you act: correct the claim, or let the model abstain. You start with causes: why models make things up, and how parametric knowledge differs from retrieved knowledge. Then you build controls: citation checks, calibration and abstention, and contradiction detection. If you need to show where each claim in an answer comes from, start with the first chapter. You finish by building a pipeline that checks answers before anyone reads them.

  1. 1

    Find each claim

    Split the output into the separate claims it makes.

  2. 2

    Check it against the evidence

    Compare each claim with the evidence and its citations.

  3. 3

    Measure how factual it is

    Put a number on how factual your answers are, so a change can be judged.

  4. 4

    Act on the result

    Correct the claim, or let the model abstain.

The course intro video with its transcript, then the four steps of the loop drawn on a ring: find the claim, check it, measure, act.

Chapters 1 and 2

Start with the causes, then with where each answer's knowledge comes from

A model can answer from what it learned in training or from evidence you hand it. The first two chapters keep the two apart.

Why models make things up

Chapter 1 covers what next-token training learns, incentives that reward guessing, and where errors enter a pipeline.

From training

Training stops at a cutoff

Parametric knowledge

What the model holds from training. The lesson on it covers the cutoff, the date after which the model has seen nothing.

They disagree

When context and memory disagree

Chapter 2 also teaches how to choose a source per question and how to measure the gain from retrieval.

From evidence

Retrieved evidence

What you place in front of the model when the question arrives. A lesson covers the quality of that evidence.

Two panes, knowledge from training on the left and retrieved evidence on the right, with a dashed seam between them for the case where they disagree.

RAG course: retrieve the evidence →Context engineering course →

Chapters 3 and 4

Cut an answer into atomic claims, then verify each claim

An answer with three claims can be right about one and wrong about two. Chapter 3 teaches atomic claims and the kinds of unsupported claims. Chapter 4 teaches checking them.

Answer (invented example)

Acme's refund window is 30 days, the rule sits in policy P-12, and the CEO confirmed it in a 2021 paper.

Claims in the answer

  1. Supported

    Acme's refund window is 30 days.

    The policy page in the evidence says so.

  2. Unsupported

    The rule sits in policy P-12.

    No source in the evidence names P-12.

  3. Fabricated reference

    The CEO confirmed it in a 2021 paper.

    The paper does not exist.

Chapter 4 checks, in the order of its lessons

  1. 1Mechanical checks

    A check that plain code can run, with no model involved.

  2. 2Entailment checks

    Does the evidence support the claim?

  3. 3Judge models

    A second model grades the claim.

  4. 4Repair loops

    A claim that fails goes back to be fixed.

An invented answer cut into three claims. One is supported, one has no support and one cites a paper that does not exist. Four checks follow, in order.

Chapter 5

Let the model abstain: move the threshold and watch coverage and accuracy

Chapter 5 teaches confidence signals, calibration and abstention. This example shows the trade in ten invented answers.

Abstention threshold

Invented example data, not a measurement of any model.

Answer only when confidence is at least
  1. 95%Confidence right
  2. 91%Confidence right
  3. 88%Confidence right
  4. 84%Confidence wrong
  5. 77%Confidence right
  6. 72%Confidence right
  7. 66%Confidence held back
  8. 58%Confidence held back
  9. 47%Confidence held back
  10. 33%Confidence held back
Coverage
60%
Accuracy of the answered
83%

Threshold 70 percent. 6 of 10 answered, 1 of them wrong. Coverage 60 percent, accuracy 83 percent.

  • Confidence signals

    What the system can read as a sign of how sure the model is.

  • Calibration

    Whether the confidence a model states matches how often it is right.

  • Coverage and accuracy

    The two numbers the example above moves.

  • Designing abstention

    Choose when the system holds an answer back and what it says instead.

  • Testing abstention

    Check that the answers held back are the ones that should be.

Ten invented answers with their confidence. Pick a threshold: answers below it are held back, and the coverage and accuracy of the rest are shown.
  • The rule in this example: the pipeline answers when its confidence is at or above the threshold and abstains below it. Coverage is the share of all ten questions that got an answer. Accuracy is the share of the answered ones that are right.
  • Raising the threshold does not raise coverage. Accuracy can move either way, because a correct answer with lower confidence is held back too.

Chapter 6

Run the cheap checks first and stack the checks that cost more

Chapter 6 puts single checks into a pipeline and asks what each stage costs in time.

Claims inFewer reach the next stage

  1. Mechanical check
  2. Entailment check
  3. Judge model
  • Kinds of contradiction

    Where two statements in one answer cannot both hold.

  • Pairwise checks

    Compare statements two at a time.

  • Multi-stage pipelines

    Chain checks so each one has a job.

  • Cheap checks first

    Put the checks that cost least at the front.

  • Latency of verification

    Checks add waiting time before the reader sees the answer.

Claims enter at the top. Each stage lets fewer through to the next, and the stages get costlier from the first to the last.

Chapters 7 and 8

Measure the pipeline, then build it and decide go or no go

Chapter 7 teaches measuring factuality. The capstone, a fact-checked answer pipeline, ends in a decision.

Chapter 7: measuring factuality

  • Metrics menu
  • Gold sets and agreement
  • Sample size and intervals
  • Comparing two pipelines
  • Regression suites and gates

Capstone: a fact-checked answer pipeline

  1. 1Spec and risk tier

    Write down what the pipeline must do and how much a wrong claim costs.

  2. 2Pipeline and budget

    Choose the checks and what they may cost.

  3. 3Actions on verdicts

    Decide what happens to a claim that fails.

  4. 4Evaluation report

    Show the numbers from chapter 7.

  5. 5Go or no-go

    Decide whether the pipeline ships.

GoNo go

Open the course: Hallucination Detection & Factuality Engineering

Left, the five lessons of the measuring chapter. Right, the five steps of the capstone, ending in a fork: go or no go.

Structured output course: valid data from models →

Questions about the course

  • What counts as a hallucination in this course?

    A claim in AI output that the evidence does not support, including references that do not exist. The third chapter is about unsupported claims and fabricated references.

  • Who is the hallucination detection course for?

    Software engineers and technical product people who build AI features, according to the course page.

  • What level is it?

    It is listed as advanced in the catalogue.

  • What will I be able to do afterward?

    The course lists six outcomes: why models make things up, parametric versus retrieved knowledge, unsupported claims and fabricated references, citation and evidence verification, uncertainty, calibration and abstention, and contradiction detection with multi-stage checking.

  • What do I build?

    The capstone is a fact-checked answer pipeline: a spec and risk tier, the pipeline and its budget, actions on verdicts, an evaluation report, and a go or no-go decision.

  • How is the course organized?

    Eight chapters with 40 lessons. The last chapter is the capstone.

  • Is there a certificate for the hallucination course?

    According to the app's legal text, if a course ends with a certificate you can download it as a PDF from your learning page. Depending on the course and on how you went through it, you get a certificate or a confirmation of participation.

  • Does the AI coach decide whether I pass?

    No. The app's legal text says your levels come from your graded work by fixed rules, and the AI coach does not decide them and cannot tell you whether you will be certified.