Rule-Based Software or Learned Behavior: How to Tell Which You Are Using
Practical clues and simple tests for working out whether a tool follows written rules, a trained model or a mix of both.
Key takeaways
- Rules give the same result for the same input and can be written out as plain conditions, while learned models estimate from patterns in examples.
- Clues to learned behavior include confidence scores, tolerance of messy input, occasional surprising errors and changes after updates.
- No single outside test is conclusive, so combine observations with the vendor's documentation and direct questions.
- When a decision matters, ask which part is a fixed rule, which part is a model and who can overrule either one.
Rule-based software does what a person explicitly wrote down: if this condition holds, do that. Learned behavior comes from a model that was trained on examples and then makes its own estimate for each new case. You can often tell which you are facing by watching how the tool handles small changes, odd inputs and requests for an explanation.
The difference matters because the two fail differently. A rule fails in predictable ways that you can look up and fix. A learned model can be right almost all the time and then wrong in a way nobody listed. Most real products combine the two, so the practical question is usually which part made the decision that affects you.
Two ways of building behavior
Suppose a library wants to decide which loans are overdue. The rule is simple: if today's date is later than the due date and the item has not been returned, it is overdue. Anyone can read that rule, test it and predict the result for every possible loan.
Now suppose the library wants to guess which borrowers are likely to return items late. No one can write a complete rule for that. Instead, a model studies past loans and finds combinations of factors that went with lateness. It outputs an estimate, perhaps a score between 0 and 1. Nobody wrote the logic line by line.
The article on algorithms, models and data explains the vocabulary if these terms blur together for you.
Clues that a tool follows rules
Rule-based behavior tends to look crisp. Look for these signs:
- Sharp thresholds. An order of 49.99 pays shipping and an order of 50.00 does not, every time.
- Exact input demands. A form rejects a phone number because you typed spaces, or a menu understands only its listed options.
- Clear reasons. An error message names the condition you failed.
- Perfect repetition. The same entry produces the same result today and next week, unless someone changed the settings or the underlying data.
- Published policy. The behavior matches a written rulebook, tariff or schedule.
An old-style phone menu is the classic case. "Press 1 for billing" leaves nothing to interpretation. A chatbot built as a decision tree, where each reply offers buttons leading to fixed answers, belongs in the same family even if it types in a friendly tone.
Clues that something was learned
Learned behavior looks softer and more flexible.
- Tolerance for mess. It copes with typos, slang, accents, tilted photos or phrasing it has presumably never seen exactly.
- Scores and likelihoods. Results arrive ranked, or with a match percentage or confidence level.
- Near misses. It confuses things that resemble each other, such as two similar faces or two words that sound alike.
- Unexplained choices. The reason given is vague, such as "recommended for you."
- Drift after updates. Behavior shifts after a new version even though you changed nothing.
- Feedback buttons. Marking a message as junk or rating a suggestion hints that examples are being gathered, though it does not prove your click trains anything directly.
None of these is proof alone. A rule-based system can rank results with a hand-made formula, and a learned model can sit behind a rigid form.
Simple experiments you can run
You can learn a lot with a few careful trials, as long as you only use your own account and ordinary inputs.
- Repeat. Enter exactly the same thing several times. Varying wording in the replies suggests a generative model. Identical replies are consistent with rules but also with a model set to answer the same way.
- Rephrase. Ask the same thing in three different ways. A keyword-based system often handles one and misses the others.
- Misspell. Introduce a realistic typo and see whether it still understands.
- Nudge a number. Change a value slightly. A sudden jump at a round number points to a threshold rule.
- Go off topic. Ask something outside its purpose. A menu system falls back to a stock line, while a language model usually attempts an answer or declines in freshly written words.
Write down what you tried and what happened. Memory tends to keep the surprising result and forget the nine ordinary ones.
Keep your conclusions modest. Outside testing shows how a system behaved on the inputs you tried, on that day. It cannot show you every rule inside, and a company may change either the rules or the model without announcing it.
Why most products are hybrids
Pure examples are less common than mixtures. A bank's fraud system may use a learned model to score each transaction and then apply rules: block above one score, send a text message in a middle range, allow the rest. The model estimates and the rule decides what to do with the estimate.
Chat products layer things too. A language model writes the replies, while separate filters block certain content, fixed code looks up your order number and a rule hands you to a person when you type a particular request. If you hit a firm refusal with identical wording every time, you may be seeing a rule wrapped around a model.
Because of this, "Is it AI?" often has no single answer. A better question is "Which step produced this result?"
What the difference means when something goes wrong
When a rule produces a bad result, there is a specific line to blame. Maybe the threshold is unfair or the rule never considered your situation. You can ask for the rule, and someone can change it, with effects that are easy to predict.
When a model produces a bad result, the cause is usually spread across its training data and many internal numbers. The fix may involve better data, retraining, adjusting how scores are used or adding a human check. Changing one case can affect others in ways that need fresh testing.
Rules are not automatically fairer. A rule that rejects every applicant without a fixed address is perfectly transparent and may still be unjust. Models are not automatically biased either, but they can pick up unfair patterns from past decisions in ways that are harder to see. Both deserve scrutiny of their results across different groups of people.
Asking the people who run it
For anything that affects money, work, school, housing or health, ask directly. Useful wording includes:
- "Is this decision made by fixed criteria, by a predictive model, or both?"
- "What information about me does it use?"
- "Can you tell me the main reasons for this result?"
- "Can a person review it, and how do I request that?"
Some places give you legal rights to information about automated decisions, and the details vary by country, state and type of decision. Check the current guidance from the relevant regulator, and get qualified advice for a serious dispute. The piece on credit scoring and explanation duties shows how this plays out in one setting.
A worked scenario
Say a gym app suggests your next workout. You notice that after three runs it always proposes rest, no matter how hard the runs were. That regularity points to a rule. You also notice that its playlist suggestions seem to follow your taste loosely and sometimes miss badly. That looks learned.
You can now respond sensibly to each. If the rest advice is too cautious, look for a setting or ignore it, knowing it does not read your fatigue. If the music is off, skipping or rating tracks might help over time, depending on how the maker built it. And if you have a health concern, neither feature replaces a qualified professional.
For more places where both kinds hide, see everyday AI you may not notice.
Common questions
Can a learned model give identical answers every time?
Yes. Many models are deterministic when run the same way: a given photo gets the same score. Repetition alone cannot rule out learning.
Is a long list of rules ever as flexible as a model?
It can cover a surprising amount, but each new variation needs another rule, and rules start to conflict. That growing burden is a major reason developers turn to learning for messy inputs.
Does the maker have to tell me which it is?
It depends on where you live and what the system does. Some uses carry disclosure duties and many do not. When in doubt, ask, and read the privacy notice and terms.