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
| Weakness | What it looks like in production | Architectural response |
|---|---|---|
| Hallucination | Confident, plausible, wrong facts; invented policy clauses and citations | Ground answers in retrieved sources (RAG), require citations, check claims against sources, allow "I don't know" |
| Stale knowledge | Doesn't know last week's price change | Retrieval or tool calls for anything that changes |
| Arithmetic and exact logic | Off-by-one dates, wrong totals | Calculations in code or a tool; the model only explains |
| Non-determinism | Same input, different output | Low temperature where consistency matters, structured outputs, evals over many runs, store what was shown |
| Instruction-following under attack | Prompt injection from user text or documents | Treat all text as data; enforce permissions and actions in code |
| Long-context degradation | Misses facts buried in the middle of long inputs | Retrieve fewer, better chunks; put key facts near the start or end; test at real lengths |
| Overconfidence | Never says "I'm not sure" unless designed to | Explicit abstain option, confidence signals, escalation paths |
| Bias and inconsistency | Different treatment of similar cases | Evaluate across groups; keep humans in high-impact decisions |
| Cost and latency at scale | Seconds per answer, real money per million requests | Smaller models where good enough, caching, batching, routing |
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
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:
- Are the rules known and stable? Eligibility checks, routing by product code, tax calculation: write code. It's cheaper, faster, testable and auditable.
- 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.
- 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.
"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.