sagelearnai

What LLMs Can and Can't Be Trusted With

Most failed AI projects didn't fail on infrastructure. They failed because someone trusted a model with a job it does unreliably, or used a model where twenty lines of code would have been better. The architect's first job is to place the model correctly in the process.

Learning objectives

  • List what current LLMs do well and where they fail, in terms that drive design decisions.
  • Decide, step by step through a business process, whether a step needs code, classic ML, an LLM, or an LLM plus a human.
  • Map each LLM weakness to the architectural control that contains it.
  • Explain non-determinism and its consequences for testing and auditing.

What LLMs are good at

  • Reading and writing language at scale: summarising, extracting fields from messy text, classifying intent, drafting replies, translating.
  • Handling variety that rules can't: a thousand ways of saying "my order didn't arrive".
  • Following instructions and formats, including producing JSON that matches a schema (with structured-output modes).
  • Choosing tools: deciding which function to call with which arguments, if the tools are well described.
  • Reasoning over provided context: answering from documents you supply, comparing clauses, spotting inconsistencies.
  • Multimodal input: reading screenshots, scanned forms, charts and speech (with the right model).

Where they fail

WeaknessWhat it looks like in productionArchitectural response
HallucinationConfident, plausible, wrong facts; invented policy clauses and citationsGround answers in retrieved sources (RAG), require citations, check claims against sources, allow "I don't know"
Stale knowledgeDoesn't know last week's price changeRetrieval or tool calls for anything that changes
Arithmetic and exact logicOff-by-one dates, wrong totalsCalculations in code or a tool; the model only explains
Non-determinismSame input, different outputLow temperature where consistency matters, structured outputs, evals over many runs, store what was shown
Instruction-following under attackPrompt injection from user text or documentsTreat all text as data; enforce permissions and actions in code
Long-context degradationMisses facts buried in the middle of long inputsRetrieve fewer, better chunks; put key facts near the start or end; test at real lengths
OverconfidenceNever says "I'm not sure" unless designed toExplicit abstain option, confidence signals, escalation paths
Bias and inconsistencyDifferent treatment of similar casesEvaluate across groups; keep humans in high-impact decisions
Cost and latency at scaleSeconds per answer, real money per million requestsSmaller models where good enough, caching, batching, routing
"The model will figure it out" is not a design

If a step has a right answer that code can compute (a date, a total, a permission), compute it. Use the model for the part that needs language or judgement, and pass it the computed facts.

Where an LLM belongs in a process

A step in the process Rules known and stable? Write code Language, judgement,messy input? Error cost high? LLM + checks LLM + human approval Lots of labelled data,numeric prediction? Classic ML model yes yes low high yes
User / businessService / infraDataGuardrail / securityModel / LLMEvaluation / ops
Where an LLM belongs. Deterministic rules stay in code; numeric prediction with labelled data suits classic ML; LLMs handle language and judgement, with checks, and with a human when mistakes are costly.
Text description

A process step is examined three ways. If its rules are known and stable, write code. If it needs language understanding, judgement or messy input, use an LLM: with automated checks when the cost of an error is low, and with human approval when it is high. If it is a numeric prediction with plenty of labelled data, a classic ML model is usually better.

Walk the business process step by step and ask three questions:

  1. Are the rules known and stable? Eligibility checks, routing by product code, tax calculation: write code. It's cheaper, faster, testable and auditable.
  2. Is it a numeric prediction with plenty of labelled history? Demand forecasting, churn scoring, fraud scoring: classic ML usually beats an LLM on accuracy, cost and explainability. LLMs can sit on top, explaining a score to a human.
  3. Does it need language, judgement or messy input? Reading an email, drafting a reply, extracting fields from a scanned invoice: an LLM. Then ask what a mistake costs. Low cost: automated checks and sampling. High cost (money moves, a customer is told something binding, a person is affected): human approval or a narrow, verifiable task.

Most good designs end up as a pipeline of mostly code with a few LLM steps, not one giant prompt.

Non-determinism and what it changes

Even at temperature 0, outputs can vary between runs because of batching and floating-point effects in the serving stack, and providers update models behind stable names. Consequences:

  • Testing: evaluate on a set of inputs and, for agents, over several runs; one passing example proves little.
  • Auditing: store the exact prompt, context, model version and output that was shown to the user. You can't reproduce it later on demand.
  • Versioning: pin model versions where the platform allows it, and re-run evals before moving to a new one.

Reasoning models

Some models "think" before answering, spending extra tokens on hidden or visible reasoning. They're markedly better at multi-step problems (planning, maths, complex extraction) and markedly slower and more expensive per request. Use them where the quality gain is measured on your evals, often in planning or hard-case paths, not for every chat turn.

The sentence to say

"I start by placing the model: deterministic steps stay in code, numeric predictions use classic ML, and the LLM handles language and judgement with grounding, checks and, where mistakes are expensive, a human approval step."

Self-check

Walk me through how you decide whether a step in a process should use an LLM.
  • Known, stable rules → code. Numeric prediction with labelled history → classic ML.
  • Language, judgement or messy input → LLM, grounded in data and with output checks.
  • Then the cost of a mistake: low → automated checks and sampling; high → human approval or a narrower, verifiable task.
Why can't you reproduce an LLM answer a customer complains about, and what do you do about it?
  • Outputs vary even at temperature 0, and model versions change behind stable names.
  • So log the exact prompt, retrieved context, model and version, parameters and the output shown, with retention and access controls; pin versions where possible.

Last reviewed 2026-11-05.