LLM Systems & Production
Field notes from building with LLMs — prompting, agents, evaluation, and the production plumbing around them. What works, what breaks, and the judgment calls that decide the difference.
Follow AI posts on LLM systems, production architecture, evaluation, and reliable deployment. Browse all follow ai in this category, or view all follow ai.
AI Automation Levels: Green, Yellow, Red for Workflows
Not everything that can be automated should be automated. I use three levels — Green (automate with controls), Yellow (AI assists, human decides), and Red (human-led decision) — with a quality gate that escalates uncertainty to review.
Result: Move from "can we automate this?" to "should we automate this, and under what guardrails?" Automate the routine. Assist the uncertain. Keep high-consequence decisions human-led.
AI Maturity Levels: From Demo to Platform
A prototype answers a question once. A mature AI system keeps operating when inputs change, dependencies fail, prompts evolve, and someone else has to maintain it. The two look identical in a screenshot, so the difference only shows up later — usually as an incident rather than a design review.
Result: I use five maturity levels — prototype, deployed, production-controlled, managed and measured, platform — and ask one question: can this system be operated, measured, and recovered? For most teams the gap to the next level is a single missing control: versioning, evaluation, validation, fallback, monitoring, or ownership.
Document AI Is a Pipeline, Not One LLM Call
“The LLM reads the document” is a useful simplification. In production, document understanding is a pipeline: ingest, extract, understand the layout, route, construct the context, then validate the output.
Result: Most Document AI failures happen before the model is ever called — poor scan quality, wrong OCR, lost table structure, wrong routing, incomplete context. Naming the six stages turns one vague bug into separate, fixable ones.
AI Agents Reduce Friction, Not Judgment — A Hybrid Data Science Workflow
The most useful intersection is AI agents that reduce friction around data-science work — not ones that attempt to replace the expert.
Result: Hybrid workflow: expert defines the problem → agent supports execution and review → evidence informs the decision → human owns the outcome. When implementation becomes faster, judgment becomes more valuable.
An AI Endpoint Is a Workflow Contract, Not Just a Response
An LLM workflow response is not just generated text. It carries extracted fields, a schema-validation status, the selected route and model, fallback status, latency, usage metadata, and human-review flags — so “did it return a response?” is no longer a test.
Result: A two-request Postman collection asserts the contract instead of the status code. The happy path passed 8 checks; a deliberately degraded document triggered the fallback route and human review, passing 6. The whole boundary re-runs in under a minute.
LLM Fallback Strategy: What Happens When the Model Fails?
Your prompt can be excellent and your LLM workflow can still fail — a provider can time out, a rate limit can be reached, latency can spike, a model can return an invalid response. None of those are solved by a better prompt.
Result: A production resilience pattern: primary model, bounded retries with backoff, a tested compatible fallback, a safe degraded mode with partial results clearly flagged, and queue plus human escalation. Fallback design determines what happens when the healthy path disappears.
AI Production Readiness — 5 Red Flags in Your Architecture
Some AI systems look impressive in a demo and fragile in production. No fallback path, prompts buried in code, no cost visibility, output acting without validation, and no regression testing — five structural gaps in the operating model, not the model.
Result: Observability, controllability, and recoverability decide whether an AI system survives. Good AI systems are not only smart — they are survivable.
Structured Outputs: The Most Useful LLM Output Is Often Not Text
Before structured outputs, LLM integrations parsed free text with regex and hoped the response stayed usable. Defining a Pydantic schema before the call turns the output into validated, typed fields — category, confidence, description — that a downstream system can act on directly.
Result: Schema-constrained outputs remove the most fragile parsing logic. The model can stay probabilistic — its interface should not be chaotic.
Stable vs Changing LLM Context — Cache and Retrieve Strategically
Many RAG systems treat every document, rule, and metric as if it needs the same retrieval path — but stable context should be cached or reused, while changing context must be freshly retrieved. The design question is not only "Do I need RAG?" but "Which parts need freshness, and which need efficient reuse?"
Result: Cache the cold layer, retrieve the hot layer, validate both — fewer stale answers, lower latency, and lower retrieval cost.
Enterprise LLM Wrapper — API Call Is the Smallest Part
"Just call the API" is the prototype version of AI engineering. The wrapper layer — prompt management, model routing, guardrails, observability, caching, and reliability — is what makes LLM systems production-ready.
Result: The API call is the commodity. The wrapper is the product.
Share on LinkedIn →