Skip to main content

FiftyFive Tech

Email Us sales@fiftyfivetech.io
Get in Touch
FiftyFive Weekly Digest16 Nov 20265 min read

Let the model generate. Let the system decide.

Most failures of AI features in production are not failures of intelligence. They are failures of control: the model was asked to guarantee something the surrounding system should have owned. Building reliable LLM applications starts with deciding which job belongs where.

A software engineer walks down a data centre aisle lined with server racks

A language model will write a plan that reads perfectly and still breaks a rule nobody repeated to it. It will return valid JSON with the wrong number in the right field. It will answer with confidence from material it was never given.

Why the demo works and the product does not

A demo needs output that looks right once. A product needs output that is right every time a rule applies. Language models are probabilistic by design. Business rules are not: a capacity limit, a mandatory sequence, a permitted set of values, a deadline. A prompt can state those rules. It cannot enforce them.

Three failure modes recur. Format drift: the output is readable to a person but unusable by the application. Constraint violation: the content is plausible, but the plan does not fit the limits it was given. Unverified progression: the system acts on the output as though someone had checked it. OWASP names the last of these Improper Output Handling in its Top 10 for LLM applications, and its guidance is to treat the model like any other user, validating what it returns before backend functions rely on it.

Seen as a pipeline, the model occupies one stage. The rest is the system’s responsibility.
  1. Groundapproved sources
  2. Generatethe model writes
  3. Constrainoutput contract
  4. Verifychecks in code
  5. Gateapproval before acting
Three failure modes, and the decision that stops each
Failure modeWhat happensStopped by
Format driftThe output is readable to a person but unusable by the applicationDefine the output contract
Constraint violationThe content is plausible, but the plan does not fit the limits it was givenVerify in code
Unverified progressionThe system acts on the output as though someone had checked itGate before acting

Give the model a narrow job

Sound engineering starts by asking what each component can guarantee. A model can guarantee fluency and range. It cannot guarantee arithmetic, ordering or completeness. Code can. The division follows: the model writes, explains and adapts; the system counts, sequences, checks and decides. In practice that comes down to four decisions.

  1. Ground the request

    Retrieve from approved sources instead of relying on the model’s recall. Retrieval quality is an engineering discipline of its own, and FiftyFive has written up its work on embeddable vector search. Grounding is only as good as the data behind it, which is why data engineering belongs inside AI engineering.

    In practiceApproved sources · Embeddable vector search · Data engineering
  2. Define the output contract

    Schema-constrained generation asks for output that follows a defined schema rather than hoping the model follows an instruction. OpenAI’s documentation describes its Structured Outputs feature as ensuring responses adhere to the supplied JSON Schema, so a required key is not omitted and an invalid value is not invented. That removes parsing failures. It does not make the content true.

    In practiceSchema-constrained generation · Structured Outputs · JSON Schema
  3. Verify in code

    Enforce what must always hold: totals, limits, ordering, required coverage. When a check fails, the system chooses the response: reject and regenerate with the failure reason, repair deterministically, fall back, or hand the case to a person.

    In practiceReject and regenerate · Repair deterministically · Fall back · Hand to a person
  4. Gate before acting

    Thresholds and approvals sit between an output and its consequence, so a wrong answer stays a wrong answer rather than becoming a wrong action.

    In practiceThresholds · Approvals

These decisions reinforce each other. Remove one and a familiar failure appears.

Where it gets difficult

Constraints interact. A plan that must cover every item, respect a daily capacity, put priority items first and finish by a fixed date is a constraint problem, not a writing problem. Take a hypothetical onboarding programme generated against a fixed window. The model can write each day’s material well. It cannot be relied on to place every item exactly once within capacity. Letting code own the schedule and the model own the content is cheaper to run, faster to verify and easier to debug than regenerating until the arithmetic works.

Five places where it gets difficult, and the control each one needs
  1. Constraints interactcapacity, priority, fixed dateControl: code owns the schedule
  2. Valid is not correctschema passes, figure is wrongControl: reference data and expert sampling
  3. No single ground truthno one right answerControl: evaluation sets and regression tests
  4. Thresholdsa score becomes a decisionControl: a written, auditable rule
  5. Scopeapproved material onlyControl: defined boundaries, tested refusals

Valid is not the same as correct. A response can satisfy a schema and still contain a wrong figure or an unsupported claim. Content checks need evidence beyond format: reference data, rubric-based review and expert sampling.

Quality has no single ground truth. Generated content cannot be compared with one right answer, so teams need evaluation sets, rubrics and regression tests that run whenever a prompt, model or data source changes. Without them, an upgrade is a gamble.

Thresholds are product decisions. When progression depends on a score, the rule that turns a score into a decision must be written down, consistent and auditable. A model can propose a grade. It should not own the pass mark.

Scope needs enforcement as well. An assistant that answers questions about approved material needs defined boundaries, tested refusal behaviour and safety rules, not an instruction in a system prompt and the hope that it holds.

What to evaluate before you commit

For CTOs and engineering leaders, the useful question is rarely which model to use. It is how much assurance each feature needs, and what evidence proves it has been reached. The five levels below give a practical way to ask it. Use them as a review checklist:

  • Name the invariants. Which properties must always hold, and which only usually?
  • Locate enforcement. Is each one enforced by the prompt, the schema, code or a person?
  • Plan for failure. What happens when a check fails, and what does the retry or fallback cost?
  • Measure continuously. How is quality measured before release and re-measured after every change?
  • Keep it reversible. Who can inspect, approve and undo a decision?

NIST’s AI Risk Management Framework organises this ongoing work under four functions, Govern, Map, Measure and Manage, which gives engineering and risk teams a shared vocabulary.

The model is a component, not the architecture

Models will keep improving at language. That makes the surrounding system more important, not less, because the more fluent the output, the harder its errors are to see. Teams that treat the model as one well-bounded component, grounded, constrained, verified, gated and observed, can ship AI features that behave predictably when the stakes are real.

It is the logic behind how FiftyFive builds agentic and generative systems: evaluate, guard, approve, observe. If you are deciding where control belongs in an AI feature, an AI discovery call with FiftyFive’s engineers is a practical place to start.

The takeaway

The model writes, explains and adapts; the system counts, sequences, checks and decides.

  1. 01A model can guarantee fluency and range. It cannot guarantee arithmetic, ordering or completeness. Code can.
  2. 02Ground the request, define the output contract, verify in code and gate before acting.
  3. 03Treat the model as one well-bounded component: grounded, constrained, verified, gated and observed.
Tags
  • LLM applications
  • Schema-constrained generation
  • Evaluation sets
  • Agentic and generative systems