Lesson 5

How to Check AI Answers

Build a verification habit for AI output: source checks, tests, examples, edge cases, and reproducible evidence.

Checking AI answers means turning a fluent response into evidence you can trust. For developers, the best verification usually comes from official docs, runnable tests, small examples, edge cases, and reproducible commands.

Use the right verification method

Different outputs need different checks:

  • Code: run tests, type checks, linters, and manual review.
  • API advice: compare with official documentation.
  • Security claims: verify against trusted references and project policy.
  • Data transformations: test sample input and output.
  • Explanations: ask for examples and compare with known behavior.

The goal is not to distrust everything. The goal is to know what kind of evidence is enough.

Watch for hallucination signs

Be careful when an answer includes package names, API methods, legal claims, prices, dates, or benchmark numbers without sources. These details can look precise while still being wrong.

Ask the AI to separate facts from assumptions. Then verify the important facts outside the answer.

Use edge cases

A simple example can prove the happy path. Edge cases reveal whether the idea survives real use. For code, test empty input, invalid input, large input, time zones, encoding, permissions, and failure states.

Verification ladder

Use stronger checks as risk increases:

  1. Low risk: compare against your existing knowledge and a small example.
  2. Medium risk: verify with official docs, tests, or a reproducible command.
  3. High risk: require review by an owner, security check, legal review, or production-like testing.

Do not spend the same effort on every answer. Spend more effort where a wrong answer would be expensive.

Make verification part of the prompt

Ask for a verification section:

After the proposed solution, include: risks, assumptions, edge cases, and commands or tests I should run.

This does not make the answer correct, but it gives you a checklist.

Keep a small verification log

For important AI-assisted work, record three lines in the pull request, task note, or commit message:

  • What AI helped with.
  • What evidence you checked.
  • What risk remains.

That short note makes the work easier to review later.

Key takeaways

  • Verification should match the risk of the task.
  • Precise-looking AI output can still be invented or outdated.
  • Tests, docs, examples, and edge cases are better than confidence.
  • A short verification log turns AI assistance into auditable engineering work.

Next lesson

Next, learn how privacy, copyright, and safe use affect AI work.

Back to course overview