Back to Skills Library

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
2026-07-29445.3k

Deterministic security, session, and role guardrails to protect mission-critical flows.

SecurityDeterministicAuth
2026-06-1126k

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
2026-06-281.6k

Action framework

  1. Ask: can the rule be written as a finite list that doesn't change with context? If yes → use a deterministic rule.
  2. Ask: does the system need to explain its decision to users or auditors? Rules are easier to explain than models.
  3. Ask: is the input varied, ambiguous, or does it keep shifting over time? If yes → a model is the better fit.
  4. 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?
  5. 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)."

Go deeper: Lesson 01 - AI Literacy