Architecture · 4 August 2026 · 6 min read
Your AI pilot did not fail. It was never architected.
The demo worked. It always works. What broke was everything the demo was allowed to assume.
A prototype gets to choose its own conditions. It queries a clean subset of documents that somebody exported by hand. It runs as one identity with access to everything. Nobody has asked what it costs at a thousand requests an hour, because it has never seen a hundred. And no auditor has asked why it produced a particular answer, because no auditor knows it exists.
Production removes every one of those permissions at once. That is the moment most teams describe as the model underperforming. It is almost never the model.
The four walls a pilot hits
1. The permissions model
Retrieval systems are, functionally, a new query interface over your entire document estate. If the index does not carry the same access-control decisions as the source systems, the assistant will cheerfully quote a salary band to the wrong person. Retrofitting row- and document-level authorisation into an index built without it is not a patch; it is usually a rebuild, because the embedding and chunking strategy has to change too.
2. Data residency and lineage
The prototype called a hosted API from a laptop. The production system has to answer where each byte was processed, under which contract, and for how long it was retained. For an Indian company selling into the EU, that question arrives twice: once under GDPR for personal data and again under the DPDP Act at home. It is answerable. It is not answerable late, and it is expensive to answer after the architecture is fixed.
3. Unit economics at real volume
Token cost is the visible line and rarely the decisive one. The decisive ones are re-embedding cost every time the corpus changes, retrieval infrastructure that has to stay warm, the evaluation runs that tell you whether a prompt change made things worse, and the human review queue for the fraction of answers nobody will ship unchecked. A feature that is comfortably profitable at pilot volume can invert at production volume, and the inversion point is calculable in advance.
4. Explainability under challenge
Somebody will eventually dispute an output that mattered. If the system cannot reconstruct which sources it used, which version of the prompt was live, and which model answered, the only available response is an apology. Provenance is a design decision made at the beginning or a forensic project undertaken at the worst possible time.
Why this is an architecture problem specifically
Every one of those four walls is a cross-cutting constraint. None of them can be owned by the team building the feature, because each one spans identity, data platform, procurement, legal and finance. That is the definition of architectural work: the decisions that are expensive to reverse and that no single delivery team is positioned to make.
The cost of finding out in week two that the data is not ready is a two-week assessment. The cost of finding out in month six is the six months.
This is also why the sequencing matters more than the tooling. Gartner's August 2025 forecast — that forty per cent of enterprise applications will carry task-specific AI agents by the end of 2026, up from under five per cent — describes a lot of organisations about to make these four decisions simultaneously and under time pressure. The ones who write the constraints down first will spend less.
What to do instead, concretely
- Write down the access-control model for the corpus before choosing a vector store. If two documents in the set have different audiences, that fact determines the architecture.
- Model cost at three volumes: today, the twelve-month plan, and the plan being wrong by 5×. If the third case is fatal, you have found a design constraint rather than a budget problem.
- Decide what evidence an answer must carry before the first answer is generated. Sources, prompt version, model version, timestamp. It costs almost nothing at the start.
- Name the governance obligations that apply — EU AI Act risk class, DPDP consent basis, sector rules — and map each to a control someone owns.
- Only then pick the models and the frameworks. That choice is the reversible one, and it is the one everybody makes first.
None of this is a reason to move slowly. It is roughly two to three weeks of work, it is cheaper than one wasted engineering month, and it frequently concludes that the right build is smaller than the one that was planned.