Architecture

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.

Most AI pilots that stall on the way to production were not let down by the model. They were built under conditions production does not allow: clean hand-picked data, a single all-access login, no real volume and nobody asking for evidence. The remedy is to settle four things before the build: permissions, data residency, cost at volume and provenance.

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.

What the pilot assumed and what production requires

QuestionWhat the pilot assumedWhat production requires
Who can see whatOne identity with access to everythingEach answer limited to what the person asking is allowed to see
Where data is processedA hosted API called from a laptopA known location, contract and retention period for every step
What it costsA handful of requests, paid from a team budgetA cost per completed task that holds at planned volume and beyond
Why it gave that answerNobody askedA record of sources, prompt version and model for any output

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.

This is a recognised security weakness. OWASP's entry on vector and embedding weaknesses describes how a shared index can return one group's content in answer to another group's question, and recommends permission-aware stores with strict partitioning of the data inside them.

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 can arrive twice. Chapter V of the GDPR sets conditions on transferring personal data out of the Union, including onward transfers. At home, India's Digital Personal Data Protection Act, 2023 lets the central government restrict transfers to countries it notifies (section 16) and requires personal data to be erased once consent is withdrawn or its purpose is served, unless another law requires it to be kept (section 8).

The Act comes into force on dates the government notifies, so check which provisions are live when you plan, and take advice on how either law applies to you. The point for the architecture is narrower: these questions are answerable early. They are expensive to answer after the design 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.

Cost is also one of the reasons projects are stopped. In June 2025 Gartner predicted that over 40% of agentic AI projects would be cancelled by the end of 2027, and named escalating costs, unclear business value and inadequate risk controls as the causes.

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.

For some systems this is written into law. Article 12 of the EU AI Act requires high-risk AI systems to allow the automatic recording of events over their lifetime. Whether a system is high-risk depends on its use, which our note on the Act for Indian suppliers covers.

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. In August 2025 Gartner forecast that 40% of enterprise applications would include task-specific AI agents by the end of 2026, up from less than 5% at the time. That describes a lot of organisations making these four decisions at once and under time pressure. The ones who write the constraints down first will spend less.

Signs a pilot is about to hit a wall

  • It runs under one service account, and nobody has decided what it should refuse to show to whom.
  • Its documents were exported by hand, and there is no process for what happens when they change.
  • Nobody can state the cost of one completed task, only the bill so far.
  • The logs do not record which prompt version and model produced an answer.
  • There is no fixed set of test cases, so nobody can say whether last week's change made it better or worse. How to test an AI agent before it goes live describes one.

What to do instead, concretely

  1. 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.
  2. 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.
  3. 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.
  4. Name the governance obligations that apply (EU AI Act risk class, DPDP consent basis, sector rules) and map each to a control someone owns.
  5. 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. We would expect it to take roughly two to three weeks, which is cheaper than one wasted engineering month, and it can conclude that the right build is smaller than the one that was planned. What is actually inside an AI readiness assessment sets out the full scope.

Common questions

Should we throw the pilot away?

Not all of it. The prompts, the examples of real requests and the record of what users asked for are worth keeping, and they make good test cases. The index and the access plumbing are the parts most likely to need rebuilding, because permissions change how documents are split and stored.

Do the four walls apply if we buy a product?

Yes. Ask the vendor the same four questions: whose permissions the answers respect, where data is processed and kept, what it costs at your volume, and what record exists for each output.

How do we start?

Write one page per wall, with what is known and what is not. The unknowns are the list of things to settle before money is spent on a build. If you want a second pair of eyes on those pages, get in touch.

The assessment is the same thinking, applied to your systems.

Two to three weeks, a scope agreed in writing before it starts, and a document you can act on whether or not you hire us for the build.