Course/What an AI Agent Is

5 min · +80 XP

Why it sometimes makes things up

Where confident mistakes come from and how to check the work.

By the end of this lesson

You will be able to check an AI agent's work instead of trusting its report.

Sometimes an AI states something false with full confidence. This is called a hallucination. It happens to every model, and it is easier to handle once you know why.

The model predicts text that sounds right. Usually what sounds right is also true, but sometimes the two differ. The model does not always know when it does not know.

!Check what matters

Check anything with consequences: facts, numbers, money, legal and medical questions, and code that touches real data. Ask where a claim comes from, and confirm it in another source.

What it looks like in an agent

In Claude Code a confident mistake often looks like a report: "Done ✓, everything works." You open the page and it is blank, or the button does nothing. The agent may have skipped a check, or its check did not cover what you care about.

Your check, every time

  1. 1Open the result yourself: the page, the file, the program.
  2. 2Try the main thing a user would do: click the button, enter a value, save, reload.
  3. 3If something is wrong, tell Claude exactly what you did and what you saw.
  4. 4Ask for proof, for example with the phrase below.
💬 Tell Claude

“Before you tell me it is done, check it yourself: run the tests or open the page, try the main action, and show me what you saw.”

Claude runs the check and shows you the output or a screenshot, not just "Done".

🎙A request that asks for proof

This is how the request can sound if you dictate it:

“Before you tell me it is done, open the page, add one expense, reload the page and tell me whether the expense is still there.”

For experienced users
✦If you are experienced

The official best practices put this first: give Claude a check it can run, such as a test suite, a build, a linter or a screenshot to compare. Claude stops when the work looks done; with a pass/fail signal it iterates until the check passes. After it reports success, /verify builds and runs the app to confirm the change.

Quick check

Claude says: "Done, the form saves data ✓". What do you do next?

Facts checked against the official Claude Code docs October 24, 2026 · source

EAEvgenii Arsentev

Author

Evgenii Arsentev

PhD · Chief Executive Officer, digital health