Use deterministic automation when inputs and rules are known. Use an AI feature when interpretation or generation adds real value and the result can be evaluated. Use an agent only when controlled tool use is necessary. High-impact decisions still need permissions, validation, and a human or deterministic guardrail.
Classify the decision
Write the input, allowed actions, output, cost of error, and how correctness will be judged. If the same input should always produce the same action, begin with deterministic logic.
Give models a bounded role
Use the model for classification, extraction, synthesis, or generation where ambiguity is real. Keep identity, authorization, money movement, deletion, and irreversible state changes behind explicit product rules.
| Factor | Deterministic automation | AI feature | Controlled agent |
|---|---|---|---|
| Predictability | highSame input, same output | mediumBounded by evaluation | lowPlans vary per run |
| Handles ambiguity | lowNeeds clear rules | highInterprets and generates | highExplores as it goes |
| Reversibility needed | Any — rules are tested | Prefer reversible results | Irreversible steps need approval |
| Permissions | Fixed by code | Read context, write via product rules | Least-privilege tools, allow-lists |
| Human approval | Rarely | For high-impact results | Before sensitive actions |
| Cost per task | low | medium | high |
| Failure tolerance | Failures are bugs | Some wrong output is expected; fallback exists | Wrong actions must be stoppable |
Design evaluation before launch
Create representative success, edge, and failure cases. Track usefulness, incorrect output, refusal, latency, and cost. A demo prompt is not an evaluation plan.
Keep recovery visible
Show users when AI is involved, preserve source context where appropriate, provide review or correction, and define what happens when the model or an external tool is unavailable.
Architecture choice matrix
| Need | Best starting point | Control |
|---|---|---|
| Same input, same action | Deterministic automation | Rules and tests |
| Interpret or generate | Bounded AI feature | Evaluation and fallback |
| Use several tools | Controlled agent | Permissions and approvals |
| Irreversible decision | Deterministic guardrail | Human authorization |
Use this as a starting filter, then confirm the choice against the actual workflow and constraints.
Decision checklist
- Write the input, allowed actions, output, and cost of error.
- Keep identity, authorization, money movement, and deletion behind product rules.
- Build an evaluation set of success, edge, and failure cases before launch.
- Track usefulness, incorrect output, refusal, latency, and cost.
- Define what happens when the model or a tool is unavailable.
Common mistakes
- Using a model where a rule would do.
- Letting a model trigger irreversible actions directly.
- Treating a demo prompt as an evaluation plan.
- Hiding from users that AI was involved.
Primary references
These official resources support the implementation details and should be checked again when provider behavior changes.

