By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
A support lead asked for an assistant that answers customer tickets. The brief was one sentence. The team shipped in a week, and the demo went well.
Six weeks later, the assistant sent refund demands to the billing queue. It quoted a policy the company retired in March. When a manager asked whether it was working, nobody could answer with a number.
The model was not the problem. The requirement was never written down. With no acceptance criteria, the demo became the test.
Write four lines before you write a prompt. Each line closes a door that should stay closed.
| Line | Question it answers | Support assistant example |
|---|---|---|
| Input | What arrives, from where, and in what shape? | Ticket subject and body as text; no attachments in the first release |
| Output | What must the system produce, and who consumes it? | One of four queues, a confidence score, and a reason under 160 characters |
| Boundary | What must it never do? | No refunds, no account deletion, no policy answer outside the current handbook |
| Owner | Who is accountable when it is wrong? | Support operations; escalations go to the duty agent queue |
The boundary line is the one teams skip. A model with no stated boundary will do whatever the user asks, because that is what a helpful assistant does.
A criterion has three parts: a measurement, a threshold and a dataset. Without the dataset it is an opinion.
Non-functional requirements also need numbers, and they pick the API mechanics. A chat assistant needs an answer in seconds, so it streams. A nightly re-classification of the backlog needs no streaming at all, so it batches. A shared handbook that rides in every request is a cache prefix. A decision that is often uncertain needs a handoff path, not a longer prompt.
One more line belongs in the design note: what is out of scope for the first release. A written exclusion is cheaper than an argument in week six.
A design note is a versioned artifact. Give it a version and a date, and commit it beside the code. Update it in the same pull request as the behaviour it describes.
| Artifact | Versioned by | How it retires |
|---|---|---|
| Design note | A version number and a date | Marked superseded, never deleted |
| System prompt | A prompt id and version in the repo | Old version kept for rollback |
| Model | A dated snapshot id | Upgrade after an evaluation on your own set |
| Output schema | A schema_version field | Additive changes inside a version |
Deprecation is a plan you write before you need it. When a model snapshot is scheduled to retire, you have three jobs. Evaluate the replacement on your own dataset. Keep the old pin for one release, and tell the people who read the output. A vendor deadline is not a migration plan.
QUEUES = ("billing", "technical", "account", "other")
CONTRACT = {
"keys": ("queue", "confidence", "reason"),
"queues": QUEUES,
"min_confidence": 0.60,
"max_reason_chars": 160,
}
def check(reply):
problems = []
for key in CONTRACT["keys"]:
if key not in reply:
problems.append("missing " + key)
if reply.get("queue") not in CONTRACT["queues"]:
problems.append(f"queue {reply.get('queue')!r} not in contract")
confidence = reply.get("confidence")
if not isinstance(confidence, (int, float)) or not 0 <= confidence <= 1:
problems.append("confidence must be a number from 0 to 1")
elif confidence < CONTRACT["min_confidence"]:
problems.append("low confidence: route to a human")
if len(str(reply.get("reason", ""))) > CONTRACT["max_reason_chars"]:
problems.append("reason over the length limit")
return problems
REPLIES = [
{"queue": "billing", "confidence": 0.82, "reason": "Duplicate charge on invoice 4471."},
{"queue": "refunds", "confidence": 0.91, "reason": "Customer asks for a refund."},
{"queue": "technical", "confidence": 0.41, "reason": "Cannot reset password."},
]
for reply in REPLIES:
problems = check(reply)
print(reply["queue"], "|", "pass" if not problems else "; ".join(problems))Use the ticket assistant, or the system you actually own.
Key takeaways
A requirement is four checkable promises: input, output, boundary and owner.
A criterion needs a measurement, a threshold and a frozen dataset, or it is an opinion.
Non-functional requirements pick the mechanics: streaming, batch, caching or a handoff.
Version the design note, the prompt, the model pin and the schema, and plan their retirement.
If the threshold moves after the first run, the test has become a demo.
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.