RELIABLE AI SYSTEMS

Designing reliable AI systems.

A worked support-triage example: constrain the task, test the boundary, and keep uncertain cases recoverable.

A useful AI workflow needs more than a convincing answer. It needs a clear job, a limit on what the model can do, and a way to recover when the answer is wrong. This example shows those decisions for a small support-triage assistant. It uses synthetic tickets and a runnable contract test, with no customer data or model calls.

1. Give the model a bounded job

Imagine a support inbox with three queues: billing, technical and general. The model proposes one category and quotes a short piece of the ticket that supports it. A staff member sees the original message, the proposed category and the quoted evidence together, then chooses the actual queue.

The model has no send, refund, delete or account-management tools. The application obtains ticket identity and access permissions from the authenticated request, not from model-generated fields. Keeping permissions outside the model follows OWASP’s guidance on excessive agency. [1]

Success is a useful, reviewable draft. A malformed response, unavailable model or rejected proposal leaves the ticket in the ordinary support queue. The customer should not have to repeat the request because an optional classification step failed.

2. Check structure before showing a draft

The proposed response has exactly two fields: category and evidence. The category must be one of the three allowed values. Evidence must be a non-empty string of at most 240 characters and occur literally in the original ticket. Unknown fields, such as a requested action, are rejected.

Example ticket: “The app crashes when I export a report.” Proposed category: technical Quoted evidence: “app crashes” Application result: review draft; no ticket is moved.

Render both the message and evidence as text, with output encoding appropriate to the UI. Do not interpret model text as HTML, a command or a query. These are application checks; OWASP treats insufficient output validation and encoding as a distinct risk. [2]

A matching quote is only a grounding check. It does not show that the selected category is correct, that the quote is relevant, or that the message is harmless.

3. Keep an evaluation record

We ran 12 synthetic fixtures against the example’s deterministic validator. Four produced review drafts; eight returned to manual handling. All 12 matched their expected application states. No model was queried, so these results measure the boundary code, not model accuracy or resistance to prompt injection.

Evaluation record · 8 October 2026 Allowed billing, technical and general examples → 3 review drafts Unknown category, malformed shape, missing or empty evidence → 4 manual cases Invented quote, extra action field, oversized evidence, no authorization → 4 manual cases Grounded but misleading category → 1 review draft requiring correction

The last fixture is deliberate: “My invoice is paid, but the app crashes.” A billing proposal quoting “invoice is paid” passes the structural checks. A reviewer should still correct it to technical. Passing the validator is not permission to automate the decision.

For a model evaluation, build a separate, permissioned set of representative tickets with human-reviewed labels. Include short messages, ambiguous requests, language variation, sensitive content and adversarial instructions. Keep a held-out set, compare changes against the same baseline, and examine errors by category instead of relying on one average score.

4. Make the failure path useful

Suppose a ticket tells the assistant to ignore its task and send account details elsewhere. The architecture gives the classifier no sending capability. If a response adds an action field, this validator rejects it. If it returns an allowed but misleading category, human review remains necessary. None of these checks establishes universal injection resistance.

When the classifier times out, keep the original ticket, show staff that no suggestion is available, and let normal triage continue. Bound retries and avoid creating duplicate work. A later attempt should reference the same ticket and clearly replace or supersede the earlier suggestion.

Do not log full ticket bodies by default. Define which identifiers, model/prompt versions, validation outcomes and review decisions are needed, who can access them and when they expire. Investigate failures with the minimum information needed for that purpose.

5. Measure the workflow after release

Before a pilot, name the person who can stop suggestions and restore ordinary triage. Record the model, prompt, validator and evaluation-set versions together. Make the fallback usable before increasing traffic. NIST’s AI RMF treats risk work as an ongoing activity across the system lifecycle. [3]

Track corrected suggestions, manual fallback rate, staff handling time and service latency separately. A lower correction rate is not automatically a better experience if the system avoids most requests or adds review work. Choose targets from the actual queue, capacity and consequences; this example does not supply a universal threshold.

After a change, rerun the contract fixtures and model evaluation, inspect changed failure cases, and start with a bounded pilot. Keep an explicit rollback decision: who acts, what is disabled and how staff continue. The practical deliverable is a workflow people can understand, inspect and recover.

Sources

[1] OWASP · Excessive agency (opens a new tab)[2] OWASP · Output handling (opens a new tab)[3] NIST · AI RMF Core (opens a new tab)Download the 12-case contract test

Run with Node.js. It writes evaluation-results.json beside the file. Synthetic examples only; no model or network calls.

Download the evaluation record
AI & AutomationDigital Modernization
Contact AdaTech

Menu

Appearance

Find a page

Appearance

Choose a light or dark appearance, or follow your device.

Appearance

Your privacy choices