Lesson 29 of 38 · Written learning
Workflows, agents, and human approval
Choose between a predictable workflow and a model-driven loop.
A deterministic workflow follows predefined steps. It is easier to test when the task is known: retrieve a record, validate it, then format a response. An agent lets a model choose among steps or tools based on intermediate results. This flexibility can help with open-ended tasks, but it creates more paths to inspect and more chances for failure.
Bound the loop
State records what has happened so far. Memory can mean short-term context, stored user preferences, or external records; define which one you mean and how long it persists. Use timeouts, retry limits, action budgets, and explicit stopping conditions. Require human approval before consequential or irreversible actions.
- Start with a deterministic workflow and add model-directed choices only where they solve a real need.
- Use the least powerful permissions required for each tool.
- Treat tool outputs as untrusted data and validate them before passing them onward.
- Make uncertain or consequential decisions visible to a person.
Return to the LLM application engineering and agents stage · Suggested timing is flexible; move at your own pace.