When does a rules engine beat a prompt?

Quick answer

A rules engine beats a prompt when the same inputs must always give the same answer, and you need to show why. Use a prompt where the input is messy language. Use rules where the decision has to be repeatable, checked and defended. Many good systems use both.

What is an AI business rules engine?

A rules engine is software that makes decisions by following written rules. If the business has been trading for under two years, do this. If the margin is above this level, do that. Each rule is plain, and each outcome can be traced back to the rules that produced it.

A prompt works differently. You describe the task to a language model in words, and it writes an answer. It is flexible and fast to set up. It also gives slightly different answers on different days, and it can't always tell you why.

Why do prompts give different answers to the same question?

A language model picks likely words. It does not look up a rule. Ask it the same thing twice and you may get two different answers, both confident. Change a word in the question and the answer may shift again.

For a poem or a summary, that is fine. For a number a client will rely on, a price, a score or a yes or no that a regulator might ask about, it isn't. You need the same input to give the same output, every time, and you need to be able to point at the reason.

When should you use a rules engine instead of a prompt?

Look for these signs:

  • The decision has a right answer that experts agree on.
  • The same case must get the same result next month.
  • Someone may ask you to explain it, such as a client, an auditor or a regulator.
  • An error is costly, so you need to test it against known cases.
  • The logic changes in steps you control, such as when a policy updates.

And when is a prompt the better tool? When the input is messy and open, the answer is language, and a slightly different wording each time does no harm.

QuestionRules enginePrompt
Same input, same output?AlwaysNot guaranteed
Can you show why?Yes, rule by ruleOnly loosely
Handles messy text?PoorlyWell
Setup effortHigher: the rules must be capturedLower: describe the task
Changing the logicEdit one rule and testReword and hope
Best forValuations, pricing, eligibility, scoring, compliance checksDrafting, summarising, answering questions, reading documents

How does expert know-how become rules?

Experts rarely have their method written down. They just know. Turning that into rules is an interview job, and it goes faster than people expect.

  1. Pick real cases. Use a handful of past jobs where the expert's answer is known.
  2. Ask for the why. At each step ask what they looked at and what made them decide. Write down every "it depends".
  3. Turn it into rules. Each answer becomes an if-then, with the inputs named.
  4. Run the old cases. The engine should match the expert on every one. Where it doesn't, either a rule is missing or the expert has a new thing to tell you.
  5. Keep the expert as the editor. When their thinking changes, the rules change, on purpose and on the record.

That is how it went in our AI business valuation case. Business owners upload their financials and a rules engine produces a full valuation report. Producing one used to take an expert days. We turned 30 years of the expert's know-how into rules in a few sessions. An opportunity and pipeline tracker is built in.

Can you combine a rules engine with an AI model?

Yes, and it is often the best answer. Give each part the job it is good at.

The model reads, the rules decide

Let a language model pull the figures out of a messy upload: a scanned statement, a spreadsheet with odd headings, a PDF. Then hand clean, named fields to the rules, which make the decision the same way every time.

The rules decide, the model explains

After the rules produce a result, a model can write it up in plain English for the client. The numbers come from the rules. The model only changes the wording, and it can be told it may not change a figure.

The model flags, a person confirms

Where a case falls outside the rules, the model can flag it and suggest why. A person decides, and if the case is common, the answer becomes a new rule.

Let the model handle the language. Let the rules handle the decision.

What goes wrong with each approach?

Rules engines get brittle if nobody maintains them. A rule that was right last year is wrong after a policy change, and nobody notices. Give each rule an owner and a date it was last checked.

Prompts drift. A change to the model, or to one line of the instructions, can quietly shift results. If you rely on a prompt for something that matters, keep a set of test cases and run them after every change.

In both, the failure is the same: nobody is watching. This is the part people skip when they say they want AI to make decisions. Someone has to own the decision, even when a machine produces it.

How do you decide where to start?

Take one decision your business makes again and again. Write down how an expert makes it. If that takes more than a few "it depends", you probably have a rules problem. If the input is free text and the answer is words, you probably have a prompt problem. If it is both, you have a hybrid.

Not sure which one you have? Our custom AI tools and rules engines work starts with a short paid discovery, where we map the decision and tell you which tool fits. See what happens in the two days, or compare with agents, chatbots and automation.

Questions, answered.

What is the difference between a rules engine and AI?

A rules engine follows written rules and gives the same answer every time. A language model predicts likely words and can vary. Many systems use a model to read and explain, and a rules engine to decide.

Is a rules engine still AI?

It depends who you ask. It is not machine learning, but it encodes expert judgement in software. What matters for a business is whether the decision is repeatable and can be explained.

Can ChatGPT replace a rules engine?

For some tasks, yes. For decisions that must be repeatable and defensible, such as a valuation or an eligibility check, it is a poor fit on its own, because its answers can change and it can't show a fixed chain of reasons.

How long does it take to turn expert knowledge into rules?

It varies with the decision. In our valuation work, 30 years of an expert's know-how went into rules in a few sessions. The test is whether the rules match the expert on past cases.

What are rules engines used for?

Valuations, pricing, eligibility checks, scoring, assessments and compliance checks: anywhere the same inputs must give the same, explainable result.

Talk it through.

Talk to Agentsy