The short version
- If the answer must be exactly the same every time, use rules, not a language model.
- If you are predicting a number from structured data, classic machine learning is usually better and cheaper.
- Use generative AI for language, documents and judgment. Even then, keep rules around it.
The idea
There are four broad tools, and each fits a different kind of problem.
| Problem | Best tool |
|---|---|
| Fixed logic: pricing rules, approvals, calculations | Rules and normal software |
| Finding a known item | Search |
| Predicting a number or a class from tables of data | Classic machine learning |
| Reading, writing or summarizing language; handling varied input | Generative AI |
A simple determinism test helps. Ask three questions about the step. Must the output be identical every time? Can the logic be written down completely? Would a wrong answer be costly and hard to notice? Three “yes” answers mean rules. Three “no” answers mean a model is a fair choice. A mix means a model inside a workflow, with checks.
Do not use a calculator’s job as a test of creativity, and do not ask a writer to do your accounts. Match the tool to the type of work.
- Is the logic fixed? Use rules
- Is it a prediction from data? Use machine learning
- Is it language or judgment? Use generative AI, with checks
An example
A company wants “AI for demand forecasting”. Forecasting demand from sales history is a prediction from structured data. A classic forecasting model does it better, at a fraction of the cost, and explains its result. Generative AI still has a role beside it: reading the planner’s notes, explaining the forecast in plain words, and answering “why did this number change?” The forecast itself stays with the classic model.
Common mistakes
- Starting from “we need a generative AI use case” and not from the problem.
- Asking a language model to do arithmetic or apply exact pricing rules.
- Replacing a working rule engine with a model because it feels modern.
- Ignoring classic machine learning skills the company already has.
What to do this week
- Take your list of AI ideas. Label each one: rules, search, machine learning or generative AI.
- Move the mislabelled ones to the right team.
- For the generative AI ones, write down which checks will sit around the model.
The terms, in plain language
| Term | What it means |
|---|---|
| Classic machine learning | Models that predict numbers or classes from structured data |
| Rule engine | Software that applies written business rules |
| Determinism test | Three questions that show whether a step needs rules or a model |
Further reading
- Anthropic, Building Effective Agents (2024)
- Chip Huyen, AI Engineering (O’Reilly, 2025)
Section 1.6 of the AI Engineering Guide · Last reviewed November 2026




