Session 13 Slides: Evaluation & Debugging

--:-- --
↓ Scroll for more

Session 13

Evaluation & Debugging

AI Product Engineering

Block 3: Agents, Evaluation & Deployment

Why AI Testing Is Different

Traditional testing: same input β†’ same exact output.
AI testing: same input β†’ probabilistic output β€” "correct" is a matter of degree.

Different framework required β€” not a different level of rigour.

Three Evaluation Dimensions

Correctness

Is the answer factually accurate? Supported by context?

Relevance

Does it actually answer the question asked?

Consistency

Same question, different phrasing β†’ same answer?

Hallucination Patterns

  • False specificity β€” inventing precise numbers, dates, names
  • Confabulation β€” real info + invented connecting details
  • Confidently wrong β€” incorrect facts, no hedging language

The model is not lying β€” it is predicting the most likely token sequence. The result can be fluent, confident, and completely wrong.

Adversarial Testing Categories

CategoryTests
Out-of-scopeDoes it refuse or hallucinate?
AmbiguousDoes it clarify or guess?
ContradictoryDoes it maintain consistency?
Edge caseEmpty, very long, special characters
Injection"Ignore all previous instructions…"

The Fix β†’ Re-Test Cycle

Identify failure pattern from test results
Form hypothesis: "This fails because…"
Apply fix (prompt, knowledge base, retrieval)
Re-run affected test cases
Did the scores improve? Document result.

Session 13 Summary

  • Three dimensions: correctness, relevance, consistency
  • Hallucination: fluent, confident, and wrong
  • Adversarial testing deliberately tries to break the system
  • Test suite makes progress measurable
  • Evaluation report = core final deliverable

Next Session: Security, Privacy & Responsible AI