The Real Test of an AI Feature Is How It Fails
Michał Andrzejewski - Content Director
2026-11-26

The Real Test of an AI Feature Is How It Fails

A language model can produce an impressive answer within a few minutes of connecting it to an API. That does not mean the resulting feature is ready for production.

A production system must handle incomplete input, unavailable providers, changing model behaviour, sensitive data and requests that were never included in the original demo. The difficult part is therefore not generating a first response. It is defining what the system is allowed to do, measuring when it fails and limiting the consequences of those failures.

The central argument of this article is simple: an AI feature is production-ready not when it gives impressive answers, but when its failures are known, detectable and bounded.

The prototype is not the product

A prototype answers one important question: can a particular idea work at all? It is useful for exploring an interaction, testing a model or demonstrating a possible direction. It is not evidence that the feature can support real users.

A prototype usually operates under favourable conditions. The input is clean, the prompt is carefully prepared, the model is available and someone is watching the result. Production removes these assumptions. Users submit incomplete information, mix languages, use unexpected terminology and ask questions outside the intended scope. Providers introduce rate limits, models change their behaviour and integrations fail.

This difference matters because a language model does not fail like a conventional function. A conventional function may return an error for invalid input. A language model may return a fluent, plausible answer that is simply wrong. A successful HTTP response is therefore not the same as a successful AI operation.

The first production question should not be “How good is the model?” It should be “What is the system allowed to claim, and what happens when it cannot support an answer?”

Define the task before choosing the model

The model is only one part of an AI feature. Before selecting a provider or comparing benchmark scores, the task needs a precise definition.

A useful definition describes:

Consider a document assistant. “Answer questions about company documents” is too broad to evaluate. A more precise specification might require the system to answer only from an approved document collection, cite the relevant passages, state when the information is missing and never expose documents belonging to another organisation.

This definition changes the engineering work. It determines whether the feature needs retrieval, structured output, a human approval step or no generative model at all. It also creates a boundary for evaluation. Without that boundary, teams tend to judge responses by intuition and isolated examples.

The model should be selected after the task is understood, not used to define what the product is supposed to do.

Use the least complex architecture that meets the requirement

AI systems can be assembled from several patterns. A feature may use a single model call, structured output, retrieval-augmented generation, a multi-step workflow or an agent with access to tools. These patterns are not interchangeable levels of quality. They introduce different failure modes and operational costs.

A single model call may be sufficient for classification, extraction or rewriting. Structured output can make the result easier to validate without adding a retrieval layer. RAG is appropriate when responses must be grounded in a changing document collection. A workflow can coordinate predictable steps. An agent is useful when the system has to choose between tools or determine a sequence of actions at runtime.

More autonomy is not automatically more capability. It can also mean:

A reliable design starts with the simplest pattern that satisfies the task. Complexity should be added in response to a measured limitation, not because a more elaborate architecture appears more advanced.

Reliability is a system property

A model cannot guarantee that every generated answer is correct. Reliability must therefore be created around the model through the rest of the system.

The output should be validated before it is used. For structured data, this may mean checking a schema, required fields, allowed values and business rules. For text, it may mean checking whether citations are present, whether the answer contains unsupported claims or whether a confidence threshold has been met.

The system also needs an explicit response for uncertainty. “I do not have enough information to answer” is often safer than a plausible completion. That response is only useful, however, if the product gives the user a meaningful next step: provide more context, request human review or use a conventional fallback.

Operational controls are equally important. Timeouts prevent a slow provider from holding a request indefinitely. Retry policies need limits, otherwise a provider outage can multiply cost and load. Rate limits protect both the service and its budget. Fallbacks can use a smaller model, a cached result or a non-generative path, depending on the task.

These controls do not make the model infallible. They make its behaviour more predictable when it is not.

Retrieval quality limits generation quality

When an AI feature answers questions about private or changing information, retrieval is often more important than prompt wording. The model cannot reliably use information that the retrieval layer failed to provide.

A retrieval pipeline normally includes document preparation, chunking, indexing and search. Each stage can introduce errors. A chunk may remove the context needed to interpret a paragraph. A semantic search may miss an exact product code. A keyword search may find a matching word without understanding the surrounding meaning.

Hybrid retrieval combines semantic and lexical search. Reranking can then prioritise the most relevant results before they are placed in the model context. The exact design depends on the data, query patterns and latency budget. No retrieval method should be assumed to work well simply because a vector database is present.

Retrieval also needs access control. Filtering documents after retrieval is too late if restricted content has already entered the model context. Permissions should be applied as part of the retrieval process, and the system should be tested with users who have different access levels.

The quality of generated answers is bounded by the quality, relevance and authorisation of the context supplied to the model.

Evaluation is more useful than intuition

A few impressive examples are not an evaluation suite. They show that the feature can work, not how often it works or where it breaks.

An evaluation set should represent the real task. It should include common requests, ambiguous inputs, incomplete information, adversarial phrasing and cases where the correct answer is to refuse. For a retrieval-based feature, it should test both retrieval and generation. A correct answer based on an unauthorised document is still a failure.

Evaluation does not need to produce one universal score. Different applications need different measurements, such as:

Human review can be combined with automated checks, but the criteria need to be written down. LLM-based judges can help scale review, but they are not a substitute for representative examples and periodic human verification.

The evaluation set should run again when a prompt, model, retrieval strategy or document-processing pipeline changes. Otherwise, an improvement in one example can silently introduce a regression elsewhere.

Security and privacy are part of the feature

An AI feature expands the number of places where data can be exposed or misused. The model provider, prompt construction, retrieval index, logs, tools and user interface all become part of the security boundary.

Prompt injection is one example. A document or user message may contain instructions that attempt to override the intended behaviour of the system. The application cannot rely on the model to distinguish trusted instructions from untrusted content in every situation.

Practical safeguards include:

Cost is also a security concern. An unrestricted loop, oversized context or repeated retries can create a denial-of-wallet problem even when no data is disclosed. Token and request budgets should be enforced by the application rather than left to the model’s judgement.

For systems processing personal or confidential information, retention, provider agreements, data location and deletion procedures need to be considered before production use. These are product requirements, not paperwork added after implementation.

Observability continues after deployment

An AI feature can pass its initial tests and still degrade in production. The traffic distribution may differ from the evaluation set. Documents may change. A provider may update a model. Users may discover new ways to interact with the system.

Operational monitoring should cover at least:

Logging the full contents of every prompt is not automatically the right answer. It can create privacy and retention risks. Redaction, sampling and controlled access may be more appropriate than indiscriminate storage.

A useful monitoring system connects technical signals with product outcomes. A lower response time is not an improvement if answer quality has fallen. A cheaper model is not a saving if users need to repeat requests or correct the results.

Production readiness means bounded uncertainty

There is no universal threshold at which an AI feature becomes reliable. Different tasks tolerate different error rates and different types of failure. A drafting assistant and an automated financial decision should not be evaluated by the same standard.

There is, however, a clear minimum requirement: the team must know what the feature is meant to do, how it is evaluated, how it can fail and what the system does when it fails. The answers should be visible in the architecture, tests, operational limits and monitoring—not only in the prompt.

A production-ready AI feature is therefore not the one with the most sophisticated model or the most autonomous workflow. It is the one whose uncertainty has been made observable and whose failures have been given a safe boundary.

The most important question is not whether the system can produce a remarkable answer. It is whether the surrounding product can remain trustworthy when the answer is wrong.

Sources

Articles