Skip to content
ML Academy

LLMs, GenAI, RAG, agents, evaluation · insight-0563

Turn every production failure into a regression test that gates changes

Evidence type
practitioner heuristic
Difficulty
easy
Roles
Applied AI, ML engineer
Industries
aviation

Summary: situation, action, reason, boundary

  1. Situation

    A model upgrade reintroduces a bug that was fixed months ago, quoting outdated pet-travel rules.

  2. Action

    For every confirmed incident, add the case, its expected behaviour and its capability tag to a regression suite; add invariance tests (for example, changing a passenger name must not change the decision); run the suite on every change and block releases that fail.

  3. Reason

    Behavioural testing work showed held-out accuracy overestimates real-world performance and that capability-targeted tests reveal failures aggregate metrics miss.

  4. Boundary

    Any LLM feature with releases, prompt edits or model upgrades.

Symptom or risk

Fixed failures recur after prompt, model or retrieval changes because the fix was never encoded as a test.

Exceptions

Cases tied to retired policies should be retired with documentation, not deleted silently.

Trade-offs

The suite grows and must be pruned and kept fast.

Pitfalls

Letting the regression suite double as the tuning set, which turns it into a memorisation target.

Lessons and concepts

Claims and their sources