“The problem in front of you could be solved with if-else or with AI - which do you pick, and why?”
Deterministic rules or an AI model - how do you decide?
Recommended AI Agent Skills
Software architecture decision frameworks separating deterministic domain rules from stochastic AI pipelines.
ArchitectureSystem DesignRules
Deterministic security, session, and role guardrails to protect mission-critical flows.
SecurityDeterministicAuth
A framework for deciding whether to adopt a new AI/model-based approach or stick with an existing deterministic solution, based on real cost and risk.
Tech EvaluationDecision MakingArchitecture
Action framework
- Ask: can the rule be written as a finite list that doesn't change with context? If yes → use a deterministic rule.
- Ask: does the system need to explain its decision to users or auditors? Rules are easier to explain than models.
- Ask: is the input varied, ambiguous, or does it keep shifting over time? If yes → a model is the better fit.
- Compare the cost of being wrong: a bad rule is a one-line fix; a bad model needs retraining and re-evaluation - which risk can this problem tolerate?
- When unsure, start with a rule for the 80% common cases and reserve AI for the harder-to-predict remainder.
Before
"Just use AI, it'll probably be more accurate."
After
"Approving refunds under $20: a deterministic rule (clear conditions, must be explainable to customers). Fraud detection: an AI model (input is varied, patterns keep shifting)."