By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
Traditional CI is easy: code changed, run the tests. AI testing has four different triggers, and teams usually implement only the first — which is why prompt regressions and model updates slip through.
| Trigger | Example | Suite to run | Why separately |
|---|---|---|---|
| Code change | A commit touching the answer formatter | Smoke + affected unit tests | Fast feedback for developers |
| Prompt change | System prompt edited | Full eval + red team | Every behaviour can shift |
| Model change | Provider silently upgraded the model | Full eval, nightly | No commit exists to hang a test on |
| Data / index change | Help centre re-crawled | Retrieval hit@k + faithfulness | New documents change grounding |
Run the suite that matches the files that changed. It is the cheapest optimisation in CI and it keeps feedback fast.
def suites_for(changed: list[str]) -> list[str]:
"""Map changed files to the suites they can break, in run order."""
suites = ["smoke"]
if any("prompt" in f for f in changed):
suites.append("prompt")
if any(k in f for f in changed for k in ("retriev", "rag", "embed", "index")):
suites.append("rag")
if any(k in f for f in changed for k in ("agent", "tool")):
suites.append("agent")
if any(k in f for f in changed for k in ("safety", "guardrail", "policy")):
suites.append("redteam")
return suites| When | Suite | Purpose |
|---|---|---|
| Every commit | Smoke (10–15 cases) | Block obvious breakage in under a minute |
| Every pull request | Core (50–80 cases) | Gate the merge |
| Nightly | Full + red team + drift check | Catch model updates and slow regressions |
| Pre-release | Everything + human review of failures | Final gate |
| Weekly | Dataset freshness review | Keep the oracle honest |
Key takeaways
Four triggers: code, prompt, model, data — most teams implement only code.
Map changed paths to suites so feedback stays fast.
A nightly run against a rolling baseline is how you detect silent model updates.
Match suite cadence to the decision it informs.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.