Plain code — no model needed
A function, a rule, a query — written once, runs the same forever. It's free, instant, testable, and never hallucinates. If a clear rule on clean input produces the answer, an LLM here is a liability dressed as a feature.
Choose this when
- A rule or calculation determines the right answer
- The input is already structured and predictable
- You want it fast, cheap, deterministic, and easy to test
Trade-offs
- Can't handle inputs you didn't anticipate or messy human language
- You have to actually write and maintain the logic
- Add an LLM later only if a real fuzzy edge shows up
Hybrid — code core, model at the edges
The sophisticated middle, and more often the right answer than either extreme. Deterministic code does the load-bearing work and owns the source of truth; the model handles only the fuzzy part — reading messy input, drafting, proposing — while your rules ground and verify it. You get the model's flexibility without betting correctness on it.
Choose this when
- The logic is scriptable, but the input arrives as messy language
- It needs judgment, yet there's a structured spine or a checkable answer
- You want the model's reach but refuse to trust it unchecked
Trade-offs
- More moving parts than either pure approach — two layers to design
- You have to draw the line: what the code owns vs. what the model is allowed to decide
- The model step still needs grounding and verification, not blind trust
An LLM — this is genuinely its job
Messy free-form language in, open-ended judgment out, with no single right answer to compute. Summarizing, drafting, classifying fuzzy intent, answering in natural language — this is what only a model does well, and pretending otherwise means rebuilding a worse one by hand.
Choose this when
- The task is open-ended language or judgment, not a rule
- The input is messy, varied human text you can't fully anticipate
- There's no single correct output to check against
Trade-offs
- Costs money and latency on every call — watch it at scale
- Non-deterministic and hard to verify — wrap it in evals and guardrails
- Ground it in a real source of truth; never let an unchecked answer touch anything that matters