The Boring Parts of Shipping AI Features
by Allan Hillman, AI Engineer & Solution Architect
The demo is always easy. You wire up a model, give it a good prompt, and it does something that looks like magic in a screen recording. Then you try to put it in front of real users, and the interesting work starts. It is almost never the model. It is the plumbing that decides what the model is allowed to touch, what happens when it is wrong, and who signs off before anything reaches a person.
Type the contract, not the prose
Free-form text is where AI features go to rot. If the model returns a paragraph and you parse that paragraph into your system, you have built a bug factory: every edge case in formatting becomes a runtime failure. So I move the contract up front. The model returns a small, typed structure, a set of named fields and typed blocks, and the code maps that structure into the system with no guessing. When the model drifts, and it will, the failure is a clean validation error at the boundary instead of a silently mangled record three layers in. The prompt asks for the shape. The schema enforces it.
Put a human on the irreversible step
The pattern I reach for most is generate-then-gate. Let the agent do the tedious eighty percent, and make the last step, the one that is hard to undo, require a person. On my own site an agent can draft a post straight into the CMS, but it lands as an unpublished draft. Nothing reaches a reader until I have read it. The safe behavior is also the default behavior, because the code never calls publish. There is no flag to skip the human, because skipping the human is the entire risk.
Guard the rules you can check in code
Some rules live only in a prompt, and prompts drift. So the rules that can be checked mechanically get checked in code. Before a draft becomes a draft, it is validated: required fields present, identifiers well-formed, and a hard check for the one stylistic tell I never want to ship. A rule enforced in code cannot be argued out of by a persuasive generation. The prompt sets intent; the validator sets the floor.
Fail loud, everywhere
The through-line across all of it is the same discipline I use for any production system: validate at the boundary, fail loud when something does not conform, and never let a plausible-but-wrong output pass silently. An AI feature that ships a confident mistake is the most expensive kind of bug, because nobody gets paged. The whole job is making sure that when the model is wrong, the system notices before the user does.
The model is the easy part. The guardrails are the product.
None of this is glamorous. It is a typed contract, a review gate, a validator, and a bias toward catching mistakes where a human will see them. That is what it takes to lean on AI in production and still sleep at night.