A/CAlienCodeStart a project

Incident response for systems that are confidently wrong

A probabilistic system rarely throws an error. It returns a plausible answer that is wrong, with a 200 status code. Defining an AI incident, detecting one, and rolling back a prompt like a deploy.

  • incidents
  • reliability

Your incident process was built for systems that fail loudly. A database goes down, error rates spike, an alert fires, someone gets paged. AI systems mostly fail quietly. They keep answering, quickly and fluently, and some of the answers are wrong.

Every dashboard is green while the assistant tells customers the wrong cancellation fee, or the summarizer drops the indemnity clause from every contract over forty pages, or the agent starts approving refunds it should escalate. Uptime is 100%. Latency is fine. The damage accumulates until a customer, an auditor or a journalist notices.

Most companies that ship AI features have not adapted their incident process for this. They have on-call for the infrastructure and no one on call for the answers. That gap is a governance problem, a liability problem and, eventually, a reputational one.

What counts as an AI incident

Start with a definition, written down and agreed with legal and the product owner before anything goes wrong. A workable one:

The phrase “whether or not the system is available” is the important part. It makes quality a production concern rather than a research concern. The threshold matters too: every probabilistic system is wrong sometimes, and you need to separate the normal error rate from an incident. That is only possible if you know the normal rate, which is one more reason to measure it continuously.

Six classes cover most of what goes wrong:

  • Factual errors: wrong prices, policies, figures or citations stated with confidence.
  • Policy breaches: advice the company must not give, tone or content that violates brand or regulatory rules.
  • Data exposure: answers that reveal information the user was not entitled to see.
  • Harmful actions: an agent that executes a payment, deletion or message it should not have.
  • Quality regressions: a gradual or sudden drop after a model, prompt or data change.
  • Cost runaways: loops, retries or abuse that multiply spend overnight.

Detection: signals that fire before the customer complains

Because there is no error code, detection has to come from the content and the consequences. No single signal is enough; together they give you a fighting chance.

Incident classLeading signalFirst action
Factual errorsContinuous evals on a sample of live traffic; rise in reopen or re-contact ratePin previous version; route topic to humans
Policy breachesOutput classifiers; spike in user reports or thumbs-downTighten output filter; disable affected flow
Data exposureRetrieval logs showing cross-tenant or out-of-scope documentsDisable retrieval source; preserve logs for legal
Harmful actionsTool-call rate or value outside normal range; failed downstream reconciliationsSwitch agent to read-only; require approval
Quality regressionsShift in output length, refusal rate or tool-use rate after a changeRoll back the change; rerun regression suite
Cost runawaysCost per task or calls per task above budgetRate-limit; cap steps; block abusive clients
Fig. 1 — AI incident classes, leading signals and first responsesstarting runbook

The strongest single investment is the first row: a small, fixed sample of live traffic scored continuously against your evaluation criteria, with the result on the same dashboard as latency and error rate.11A few hundred scored responses a day is usually enough to detect a meaningful shift, and costs very little compared with the system being watched. It turns “are the answers still good?” from an opinion into a time series you can alert on.

Kill switches and the degradation ladder

“Turn it off” is a valid response, but it should not be the only one. Design a ladder of degraded modes in advance, so the on-call person can choose the smallest step that stops the harm:

  1. Narrow: route an affected topic, customer segment or language to humans while everything else keeps running.
  2. Restrict: switch agents to read-only, so they can draft and recommend but not execute.
  3. Revert: pin the previous model, prompt and index version.
  4. Replace: fall back to the deterministic workflow or the pre-AI process.
  5. Remove: disable the feature entirely, with a message that does not leave users stranded.

Each step needs a switch that one person can flip in minutes without a deploy, and each needs to be tested on a calm day. A kill switch that has never been flipped is a hypothesis.

A kill switch that has never been flipped is a hypothesis, not a control.

Rolling back a prompt like a deploy

You can only revert what you can identify. In many AI systems the behavior is determined by five things that change independently: the model version, the system prompt, the tool definitions, the retrieval index and the configuration (temperature, limits, routing rules). Too often, prompts live in a database row edited through an admin screen, the index is rebuilt nightly without a version, and the provider updates the model behind an alias.

Treat all five as release artifacts. Version them, deploy them through the same pipeline as code, and record the combination as a release ID on every response. Then “roll back” means what it means for any other service: redeploy the last known good release. Without it, an incident becomes an archaeology project while the damage continues.

Blast radius: who got the wrong answer?

Stopping the harm is half the job. The other half is finding everyone affected, because a customer who received a wrong fee or a wrong eligibility decision may be owed a correction, and in some sectors a notification.

That requires logs that tie each response to a user, a release ID and a time, retained long enough to answer the question weeks later, and access-controlled because they contain the same sensitive data as the conversations themselves. Decide the retention period with legal in advance; deciding it during an incident is too late.

After the incident

Run the same blameless postmortem you would for an outage, with two additions specific to AI systems:

  • Every incident becomes a test. The inputs that triggered it go into the evaluation suite, so the same failure blocks the next release instead of reaching customers again.
  • Every incident updates the threshold. If the signal fired late, lower the alert threshold or add a signal. If it fired on noise, recalibrate it, or on-call will learn to ignore it.

Finally, name the owner. Someone accountable for the system’s outputs, not just its uptime, must be on the escalation path, with the authority to narrow or disable the feature without waiting for a meeting. If that person does not exist today, that is the first finding of your next postmortem, so it is cheaper to fix it now.

You have AI features in front of customers or employees and your on-call covers the infrastructure but not the answers, or you could not say today which model and prompt produced a given response last month.

In a Strategy & Architecture Audit we review your detection, versioning and rollback paths, and leave you with a runbook and a degradation ladder tailored to your system.

Start a project

Danilo Panaro Engineer and CEO

Danilo Panaro is an engineer and the CEO of AlienCode. He writes about building AI and software systems that hold up in production, and about the business decisions behind them.

jr3.it

All posts
Measuring AI productivity without fooling yourselfGovernance as a pipeline, not a committee