Workflows beat open-ended autonomy
The most dependable LLM systems give the model a clear job inside a controlled workflow. Use deterministic code for permissions, money, identity, and irreversible actions. Use the model where language understanding and flexible reasoning create value.
This does not make the system less capable. It makes each capability testable.
- Constrain tools and validate every tool argument.
- Require approval for high-impact actions.
- Set time, token, and retry budgets for every run.
Make context deliberate
More context is not automatically better context. Retrieve only information that is current, authorized, and useful for the task, then make source provenance visible in the output.
Measure retrieval separately from answer quality. If the correct document never enters the context window, changing the prompt is unlikely to fix the result.
- Separate user data, company knowledge, and public sources.
- Apply access control before retrieval.
- Track which sources supported each response.
Validate model output at the boundary
Treat model output like input from any external system. Parse it into a schema, reject invalid values, and apply business rules before anything reaches a database or tool.
result = model.generate(context)
parsed = OutputSchema.parse(result)
authorized = policy.check(user, parsed.action)
return authorized ? execute(parsed) : requestApproval()Evaluate the whole system
A model benchmark does not capture whether the integration completes the real task. Build an evaluation set from actual workflows and score correctness, tool use, latency, cost, and recovery from failure.
Route uncertain cases to a person instead of forcing a confident answer. A visible handoff is a feature when the alternative is an invisible mistake.
- Replay representative tasks before each release.
- Trace prompts, tools, versions, and outcomes.
- Keep failure examples as permanent regression tests.