Most AI features go through a moment where the demo lands perfectly. Someone types a well-formed question, the answer comes back articulate and correct, the room agrees it is basically done, and the conversation moves to timelines.
Then it ships and the numbers are quietly bad. Nothing throws an error, and the model did not get worse between the demo and the release. Adoption just fails to happen, and nobody can point at the reason.
I spent days seven through twelve of a sixty-day series inside that gap, and reading them back together, the pattern is uncomfortable: almost every property that made the demo impressive was a constraint the team had not added yet.
Free text demos better than a schema. A blank chat box demos better than a form with four fields. Answering from training memory demos better than refusing because nothing in your sources supports the claim. On several axes the demo is the opposite of the product, and each of those constraints has to go back in.
Fluency is the only thing you get for free
Every other failure mode in software announces itself with an exception, a timeout, a red test or a 500 in the logs. A confident wrong answer renders beautifully, in the same tone as a correct one, because fluency and accuracy come out of the same mechanism and only one of them is optimised for at generation time.
Strange outputs get caught. The expensive ones are a real policy with one wrong number, or a perfectly good answer to a question nobody asked.
And they do not arrive as bug reports. They get absorbed, either by a user who acts on them or by one who notices, says nothing and goes back to doing the job manually, so trust drains long before anyone opens a ticket.
So the constraint to add is a decision about which claims must carry evidence before a human sees them, and a designed path for what the system says when it does not know. Left undesigned, the default behaviour of a model handed an unanswerable question is to answer it anyway.
Give machine-consumed output a schema
The moment a model's output feeds another system rather than a person, free text stops being a feature and becomes a parsing problem you maintain forever.
Treat structure as a set of checks you can run before anything irreversible happens. A decision field limited to a closed set means an unexpected value gets caught rather than executed. A field for missing information gives the model a legitimate way to say the evidence was thin instead of inventing something. A field for evidence identifiers makes a claim traceable, and asking for a field pulls harder towards grounding than any instruction in the prompt.
Two things get skipped once the output looks right in testing. The first is order. Teams write the prompt, inspect the output, then build a schema around whatever the model emitted, so the contract ends up shaped by the model rather than by what downstream code needs. The second is the failure branch. Validation is half a contract; the other half is what happens when it fails. Retry with the error attached (capped, so one bad response cannot become a latency spike), fall back to a narrower call, route to a human, fail cleanly. Any of those beats the default, which is partially valid output flowing into code that assumed otherwise.
The demo only ever visits one state
Users never experience your benchmark scores. They experience the wait, the blank box before they know what to type, what happens when it breaks, and whether they can tell a grounded answer from a guess.
A model can be excellent on the benchmarks and terrible at every one of those.
Every one is a state the demo never visits, because the demo is one pass down the happy path run by someone who knows the system. Eight seconds of nothing feels broken. A user facing an empty box does not know what the feature can do, so they ask something trivial and conclude it is trivial. A wrong answer with no route to retry or escalate is a dead end, and people abandon it.
That changes what to measure. Answer quality is a component metric, whether the user finished the job is the product metric, and the two diverge constantly: a correct answer that took ninety seconds, or that nobody could verify, completed nothing. Once a team tracks completion, the priority list reorders itself, and the model is rarely at the top.
Pick the interface by how much autonomy the task needs
Almost every prototype begins with a chat box, because it is the fastest thing to build and the most impressive thing to show. It is a choice that optimises the demo and then gets mistaken for an architecture.
Chatbot, workflow and agent are three answers to the question of how much this system is allowed to do on its own. Two mismatches recur. A chatbot bolted onto a job that needed a workflow makes a user who knows exactly what they want describe it in prose, guesses at the parameters and produces something adjacent, where a four-field form would have been faster and auditable. An agent given autonomy the task never needed takes steps that were fixed and knowable and decides them at runtime, so they vary, cost more and resist tracing.
This is urgent because of an asymmetry. Starting narrow and widening is easy, while starting wide and narrowing is a product regression, because users have learned they can ask anything, and every unhandled request now reads as failure rather than out of scope.
Compare the patterns on what you will live with after launch, such as cost per interaction, latency, debuggability and who owns it when it misbehaves. Then write one sentence saying what the system may do unsupervised. If that sentence is hard to write, the choice has not been made.
Retrieval is a decision about authority
RAG usually gets described as letting the model look things up. That is accurate but not very useful, because it names the mechanism and skips the decision, which is what your system is allowed to answer from.
Left alone, a model answers from training, everything it absorbed, frozen at a cutoff, with no way to know which parts apply to you. Ask about your refund policy and it will confidently produce a refund policy, a plausible average of every one on the public internet. Retrieval cuts down the guessing about things the model never knew, without making it reason any better. That is a narrower claim than the marketing makes, and a much more useful one.
In exchange, answer quality stops being mostly a model property and becomes mostly a retrieval property. A weak model with excellent evidence gives you something decent. A strong model with the wrong three paragraphs gives you an articulate, entirely wrong answer that looks more trustworthy than the first, because fluency scales with model quality while correctness scales with what you fed it. In a retrieval system, an escalation filed as hallucination often dissects into the model faithfully summarising the wrong pages.
Nobody demos the ingestion pipeline
Everyone wants to tune the retriever and nobody wants to clean the documents, but the order of operations is unforgiving: retrieval quality cannot exceed ingestion quality, and no embedding model or reranker un-breaks content that entered the index broken.
What makes this the most expensive item on the list is that ingestion problems do not fail at ingestion time. The job runs, the count goes up, the dashboard is green. They surface weeks later at query time, disguised as a retrieval miss, a hallucination complaint or an unauthorised disclosure. The team debugs the retriever and rewrites prompts, while the actual defect is that page four of a PDF became a column of single characters in March.
So the ingestion gate has to inspect what passes through it. Validate extraction by checking its output rather than its exit code. Strip boilerplate, because navigation menus and cookie banners embed just as happily as your content. Capture metadata at entry, because you cannot filter at query time on a field you never stored. And write an exclusion policy, since deciding what stays out is half the job and gets none of the attention.
The cheapest diagnostic available is to open your index and read twenty random entries. Read the stored text rather than the config. If a human would wince at what is in there, the model is already answering from it.
Which constraint to add first
Let the failure you are seeing set the order. If users act on confident wrong answers, start with evidence rules and a designed path for "not sure". If downstream code breaks on model output, start with the schema and its failure branch. If people try the feature once and do not return, design the failure states and start measuring completion. If cost and latency climb while the steps stay the same, revisit the pattern choice. If answers are fluent but built on the wrong passages, trace one question end to end, then read twenty entries from the index before touching the retriever.
Every one of these makes the demo a little worse, with more refusals, a form where the chat box was, and an honest "nothing solid was found". Agree that trade with whoever judged the demo before you start, so the first review does not read the constraints as a regression.
Where the detail lives
Each of these is a short standalone post in the journal, with the failure modes and the tests you can run this week:
- Confidence is not evidence
- Structured output turns model text into something software can trust
- A capable model is not a product yet
- Chatbot, workflow or agent: choose by how much autonomy the task can bear
- RAG is an evidence design problem
- Retrieval quality is decided before anyone searches
They form the second chapter, From LLM Demo to AI Product, of 60 Days of Production AI Systems, a series on building AI that survives real users. To take it from the top, the series page lays out all sixty posts in ten chapters.
Terms in this piece
About this deep dive
- Format
- Deep dive
- Level
- Practitioner
- Read
- 6 min read
- Published
- Aug 8, 2026
- Disciplines
Long-form engineering, further than a blog post goes.
More on these topics
Decision note · · 2 min read
We chose Azure AI Search for retrieval because ingestion and filtering stay simple
Why our retrieval runs on Azure AI Search: our Databricks ingestion pipelines feed it directly, filtering is simple, and several semantic configurations share one index.
Checklist · · 12 checks
RAG production-readiness checklist
Twelve checks to pass before a retrieval system answers a real user. Tick them locally; progress stays in your browser.
Failure story · · 1 min read
The retrieval cache that served stale policies
A well-meaning cache in front of retrieval kept answering from last quarter's HR policy for eleven days.
Discussion