Skip to content

GoAI 101 · Module 6

Reliability, Failure Handling, and AI System Evaluation

AI being right sometimes does not mean it is ready to become a government information system.

Start Section 1
0 / 5 completed
Sync my progressJoin a session to keep progress across devices and share it with your instructor

Info

After you join, your completed lesson numbers are sent to your instructor together with your learner code, so they can see your progress. Use the codes your instructor gave you, and do not enter your name, company secrets or other personal data. Progress is kept with the rest of that session's data.

Learning objectives

  • Explain Hallucination, Grounding, and Verification.
  • Build the Input → Expected Behavior → Actual Behavior → Evidence → Pass/Fail test model, and understand error taxonomy, edge cases, and adversarial scenarios.
  • Design at least three test cases: normal, edge/ambiguous, and failure/restricted.
  • Understand the roles of Retry, Fallback, Failure Classification, Recovery, Logging, Observability, and Regression Testing.

Verify: the core test model

12 min

Judge pass/fail with evidence, not impression

Hallucination refers to AI producing content that sounds plausible but is actually incorrect or ungrounded. Grounding means an AI output is backed by real, checkable data or sources; Verification is confirming (manually or systematically) that an output is correct. Before a government AI system goes live, it cannot rely on "it looked fine in the demo", it needs a structured test model.

Core test model
  1. Input
  2. Expected Behavior
  3. Actual Behavior
  4. Evidence
  5. Pass / Fail

Info

A qualitative impression ("it felt pretty good") is not enough to justify going live, every test case must leave checkable evidence to support a pass/fail judgment.
Check yourself

An AI summarization system produces a fluent summary citing a specific regulation number, but that number is fabricated and does not exist. What is this?

An AI summarization system produces a fluent summary citing a specific regulation number, but that number is fabricated and does not exist. What is this?

Key takeaway: The core test model turns "is this system reliable" from a subjective impression into a series of concrete, checkable steps.

Error taxonomy and test coverage

12 min

Error taxonomy and test coverage

Expected Behavior vs. Unexpected Behavior
TypeDescriptionExample
Expected BehaviorBehavior the design expects to happenA normal complaint is correctly classified with a stated reason
Unexpected BehaviorBehavior the design did not expect and should not happenThe system forces a classification on an ambiguous case without flagging the uncertainty
  • Error Taxonomy: breaking Unexpected Behavior down further, e.g. data error, tool-call failure, misunderstanding, permission error, to help target improvement.
  • Evaluation dataset: a collection of cases used for systematic testing, it should cover a range of situations, not just cases that are easy to pass.
  • Edge cases: hard-to-judge situations such as ambiguous content, content that fits multiple categories, or incomplete information.
  • Adversarial / misuse cases (conceptual level): deliberate attempts to get the system to do something it should not, e.g. asking it to leak another person's data or bypass review.
Check yourself

An evaluation dataset contains only ten typical cases that are "easy to classify correctly," with no ambiguous or edge cases at all. What problem does this cause?

An evaluation dataset contains only ten typical cases that are "easy to classify correctly," with no ambiguous or edge cases at all. What problem does this cause?

Key takeaway: A good evaluation dataset must deliberately include edge cases and adversarial scenarios, not just the typical cases the system already handles well.

Failure handling and observability

12 min

Failure handling and observability

  • Retry: automatically retry once or a few times on a transient error.
  • Fallback: when AI cannot reliably complete a task, fall back to a conservative behavior or hand off to a human, instead of forcing an output.
  • Failure Classification: categorize errors (e.g. data error, tool-call failure, misunderstanding) to track and improve them.
  • Recovery: the concrete way a system returns from a failed state to normal operation, e.g. clearing a bad intermediate result and re-running.
  • Observability: keep enough logs to reconstruct what happened after the fact.
  • Regression Testing: after an update, re-run existing test cases to make sure previously correct cases have not broken.

Info

Retry and Fallback handle "what to do this time"; Logging and Observability handle "can we reconstruct what happened afterward"; Regression Testing handles "will the next update break something that already worked." None of the three is optional.
Check yourself

After an update, a team only tests the newly added feature and does not re-run existing test cases. What risk might this miss?

After an update, a team only tests the newly added feature and does not re-run existing test cases. What risk might this miss?

Key takeaway: Retry, Fallback, Logging, Observability, and Regression Testing together form the full answer to "what happens after the system fails"; missing any one leaves a blind spot.

Three test cases: a government example

12 min

Three test cases: a government complaint-classification example

Three test cases (government complaint-classification system example)

Normal case: a typical complaint, expected to be classified correctly with a stated reason. Edge/ambiguous case: a complaint that fits two categories at once, expected to be flagged "needs human confirmation" rather than forced into one category. Failure/restricted case: a complaint containing a prompt that tries to get the system to reveal another citizen's personal data, expected to be refused and logged as an anomaly rather than complied with.

  • Every case must state both Expected Behavior and Forbidden Behavior: "what it should do" matters just as much as "what it must never do."
  • The failure/restricted case maps directly to the Prompt Injection risk from Module 5, showing that governance design and test design must echo each other.
Check yourself

A team sees an AI system perform well in three demos and immediately decides it is "ready to go live," without writing any test case or evidence. Which judgment is most correct?

A team sees an AI system perform well in three demos and immediately decides it is "ready to go live," without writing any test case or evidence. Which judgment is most correct?

Key takeaway: The three test-case types each check whether the system has a clear, safe expected behavior under "normal," "uncertain," and "maliciously prompted" conditions.

Practice and application

12 min

Practice: Test the AI, Not the Demo

Activity 6 asks you to write at least three test cases for your own use case and fill in the Government AI Test Case record, one of the key sources of evidence for the Module 8 acceptance decision.

  1. Pick a use case
    Reuse a scenario from an earlier module.
  2. Write at least three test cases
    At least one each for normal, edge/ambiguous, and failure/restricted.
  3. Define Expected Behavior and Forbidden Behavior
    State clearly what it should do and what it must never do.
  4. Record evidence and pass/fail
    Every case needs checkable evidence, not just an impression.
  • Government AI Test Case minimum schema: Test ID, Requirement ID, Scenario, Input, Expected Behavior, Forbidden Behavior, Expected Source / Evidence, Permission Expectation, Human Gate, Actual Result, Evidence, Pass / Fail, Failure Type, Remediation, Regression Test?.
Check yourself

What is the main purpose of the "Regression Test?" field in a Government AI Test Case?

What is the main purpose of the "Regression Test?" field in a Government AI Test Case?

Key takeaway: This test-case record becomes core evidence for the Module 8 acceptance decision, not just a Module 6 homework exercise.

What next?