Home / Blog

· 7 min read · Gates 1, 2, 4

Why your AI prototype breaks at 100 users

An AI prototype built in Lovable, Cursor, Bolt or n8n usually works for ten testers and fails at a hundred real users. The nine failures I see most, and the order to fix them.

Most AI prototypes I get asked to look at have the same history. A founder or a small team built the first version in a few weeks, in Lovable, Cursor, Bolt, n8n or as a thin layer over the OpenAI API. It demoed well. Ten design partners liked it. Then the company opened it to a hundred real users, or signed the first customer with a procurement team, and things started to go wrong in ways nobody could reproduce on their laptop.

None of this is a criticism of the tools. They did exactly what they are good at: they got a working idea in front of people fast. The problem is that "works for ten friendly testers" and "works for a hundred strangers at the same time" are different properties, and the tools optimise for the first one.

Here are the nine failures I see most often, grouped by what breaks, and the order I would fix them in.

Why a hundred users is the threshold

Ten users is a demo. They are friendly, they use the happy path, they rarely act at the same time, and when something fails they message you instead of leaving.

A hundred users is the first time three things happen together:

  • Concurrency. Several people hit the LLM in the same minute, and you meet your provider's rate limits and your own platform's timeouts.
  • Adversarial and weird input. Someone pastes a 40-page contract, writes in Hungarian, or types "ignore your instructions" just to see what happens.
  • Data that is not yours. Real customers upload real documents, and now isolation between them is a legal question, not a technical one.

Each failure below is one of those three meeting a prototype that was never designed for it.

Failures that break under load

1. LLM calls with no timeout, retry or fallback

The prototype calls the model directly from a request handler and waits. When the provider is slow, the user waits. When it returns a 429 or a 5xx, the user sees an error, or worse, a spinner that never ends.

At ten users this happens once a week and nobody notices. At a hundred it happens every day, because rate limits are per organisation and every user now shares them.

What production looks like: every model call has a timeout, retries with exponential backoff and jitter on 429 and 5xx, and a fallback, which is either a second model or provider, or a graceful degraded answer ("I couldn't generate a summary right now, here is the source document").

2. Long work done inside the request

Generating a report, processing an uploaded PDF or running a multi-step agent inside a single HTTP request works when one person does it. Serverless platforms and edge functions have execution limits, and browsers and proxies drop long connections. Under load, requests time out halfway through, and the user clicks the button again, which doubles the cost and the load.

What production looks like: anything that can take more than a few seconds goes onto a queue, runs in a worker, and reports progress back. The user gets a job ID, not an open connection. The job is idempotent, so a second click does not start a second run.

3. Output that is trusted blindly

The prototype asks for JSON and calls JSON.parse on whatever comes back. It works 98% of the time in testing. In production, the other 2% is a lot of broken screens: truncated output when the response hits the token limit, a polite sentence before the JSON, a field with the wrong type.

What production looks like: structured outputs are validated against a schema. Invalid output is repaired (a retry with the validation error in the prompt is often enough) or rejected with a clear fallback. Raw model output is never rendered directly into the UI. Use your provider's structured output or tool-calling mode where it exists, and validate anyway.

Failures that leak data

4. Database access rules that were never written

App builders that generate a frontend on top of a hosted database, Supabase being the common one, make it easy to read and write data straight from the browser. That is safe only if row-level security policies are in place and correct. In prototypes they are often missing, disabled to "make it work", or written for a single user.

The result is that any logged-in user, sometimes any anonymous visitor with the public key, can read other customers' rows. With ten testers from your own network, nobody looks. With a hundred strangers, someone eventually will.

What production looks like: every table has row-level security enabled, policies are written per tenant, and there is a test that logs in as customer A and tries to read customer B's data. That test runs in CI.

5. Secrets in the frontend

A surprising number of prototypes call the LLM provider from the browser with the API key in the bundle, or proxy through a function that anyone can call without authentication. Anyone who opens developer tools can take the key and spend your budget.

What production looks like: all model calls go through your backend, which authenticates the user, applies per-user and per-tenant limits, and holds the keys in a secret store.

6. Retrieval that ignores who is asking

RAG prototypes usually put every document into one vector index and filter results in application code, or not at all. When the first enterprise customer asks "can another customer's data ever appear in our answers?", the honest answer is "probably not".

What production looks like: tenant ID is enforced in the retrieval query itself (a filter in the vector store or a separate index per tenant), not after it. Retrieved documents are treated as untrusted input, because a document can contain instructions too. This is what prompt injection through retrieved content means, and it is the first thing an enterprise security reviewer will ask about.

Failures you can't see

7. No traces

When a user says "it gave me a wrong answer yesterday", can you find that exact request, the prompt that was sent, the documents that were retrieved, the model and version, the tokens used and the latency? In most prototypes the answer is no. The only log is the provider's usage dashboard.

What production looks like: every request is traced end to end, with a request ID the user can see or support can look up. You do not need a large platform for this. A table with one row per LLM call is a good start.

8. Context that grows without limit

Chat prototypes usually send the entire conversation history with every message. The first message costs a fraction of a cent. The fortieth costs many times more, takes longer, and often gets worse answers because the model is reading a long transcript instead of the question. Nobody sees this with testers who send five messages. Real users keep one conversation open for a week.

What production looks like: history is trimmed or summarised after a set number of turns, long documents are chunked and retrieved instead of pasted in, and cost per request is measured, which I cover in detail in LLM cost per request: a worked breakdown.

9. Prompt changes with no way to tell if they helped

The prototype's quality depends on a prompt that has been edited thirty times. Each edit fixed one example someone complained about. Nobody knows whether it broke three others, because the only test is trying a few inputs by hand.

What production looks like: a golden set of real, labelled cases (start with 50, grow to a few hundred), an automated eval run on every prompt or model change, and a pass threshold that blocks the release. This is the single change that makes every other change safe.

What to fix first

If you have a week, not a quarter, this is the order I would work in:

  1. Data isolation and secrets (failures 4, 5, 6). These are the ones that end up in a breach notification or a lost enterprise deal. They are also usually the fastest to fix.
  2. Timeouts, retries, fallbacks and output validation (1, 3). A few hundred lines of code that remove most of the "it just stopped working" reports.
  3. Tracing (7). Without it you are debugging by guesswork, and every later fix is slower.
  4. Queues for long work (2) and context limits (8). These matter as soon as usage grows, and they cut cost at the same time.
  5. A golden eval set (9). It takes longer to build, but it is what lets you keep changing the product without fear.

How this maps to the 5 Gates

I use the 5 Gates Framework to score AI systems before launch, and these nine failures map onto it directly. Failures 1, 2, 3 and 7 are the Reliability gate. Failures 4, 5 and 6 are the Security gate. Failure 8 is the Cost gate, and failure 9 is the Evals gate. The fifth gate, Ownership, is the question of who fixes all of this in month three, when the person who built the prototype has moved on.

The rule behind the framework is simple: an AI system is only as production-ready as its weakest gate. A prototype with great prompts and no tenant isolation is not 80% ready. It is not ready.

You can score your own product with the free checklist in about an hour. If you would rather have someone go through the real code, prompts and traces with you, that is what the two-week AI Production Readiness Audit is for.

About the author

Yevhenii Datsiuk (Євгеній Дацюк) is an AI-to-Production CTO: CTO at i3 Engineering and Engineering Lead at PettersonApps. He takes AI prototypes to production for B2B SaaS companies and startups, and created the 5 Gates Framework for AI Production Readiness.

Keep reading

  • · 6 min read

    LLM cost per request: a worked breakdown

    Most teams know their monthly LLM bill and not their cost per request. A line-by-line breakdown of one RAG request, what it means per customer, and the five levers that cut it by more than half.