Skip to content

If Rules Can Solve It, Skip the AI First

Separate the steps explicit rules can handle from those that need semantic understanding, then choose between rules, code and AI models.

Workflow automation6 min read

A person working on a laptop in a dim office

When a request gets labelled an “AI project”, that does not mean every step in the workflow needs a model. Break the work down first — the inputs, how each decision is made, what a mistake would cost — and choose the tooling afterwards. That order usually makes both cost and maintenance easier to control.

None of this is an argument that AI is useless. It is an argument for spending the model only where rules cannot reach.

One test to apply

Before deciding whether a model belongs in the workflow, ask one question:

Can this decision be written as explicit if-then rules with a predictable result?

If the answer is yes, use rules. The reason is not caution, it is arithmetic.

Rules Models
Cost per run Usually lower, though it still depends on infrastructure and maintenance Varies with the model, input length and usage volume
Response latency Usually lower, depending on system design Affected by the model, the network and service load
Predictability of results Reproducible under the same conditions Output can vary; verification has to be designed in
Diagnosing a failure Traceable through program logic and logs Requires reviewing the model, prompt, data and tool logs
Maintenance cost Update the rules when conditions change Requires evaluating model, data and workflow changes
Evaluation harness Not required Required

Rules suit steps with clear conditions and verifiable results. Models suit semantic judgements that resist being written as fixed conditions. The real choice still depends on the cost of an error, the state of your data and how the system will be maintained.

When a model is genuinely needed

These four situations are where rules spiral out of control — and where a model starts to earn its place:

1. Input formats cannot be enumerated

Customer emails, quotations, contracts and complaints all arrive in different shapes. When the exceptions keep multiplying, handling free text with regular expressions alone tends to produce a rule set that grows and rots faster than you can maintain it, and it may still not cover the next input you receive.

2. The decision needs semantic understanding, not literal matching

“Is this customer complaining, or just asking?” Keyword matching cannot answer that — especially when the customer is being sarcastic or indirect.

3. The decision requires reasoning across fields

“Taken together, do this order’s address, payment method and items look unusual?” Once a judgement spans several fields, rules turn into a knot of conditions that reference each other.

4. Unstructured content has to become structured output

Meeting notes, interview transcripts, summaries of technical documents. This is the work language models are best at.

An illustrative scenario

The example below uses inbound customer email as a hypothetical scenario to show how the work might be split between tools. It is an illustration, not a client case:

Email arrives
  │
  ├─ rule: is the sender on the customer list?                    → deterministic
  ├─ rule: does the email quote an existing ticket id?            → deterministic
  ├─ model: classify the intent and read the sentiment            → needs semantic understanding
  ├─ rule: intent → handling queue                                → deterministic
  ├─ model: retrieve from the knowledge base and draft a reply    → needs retrieval and generation
  └─ rule: does it meet the auto-send conditions?                 → deterministic

The model handles only the two middle steps; the other four are rules. The benefits:

  • If the model is unavailable, the workflow falls back along a path designed for that task and system — handing the work to a person, for example — instead of stalling in a broken state
  • A model error cannot leak into routing or permission decisions
  • Cost is spent only where semantic understanding is genuinely required

Order matters

The right order is: finish the rule-based part first, then take on the part that needs a model.

Do it the other way round and you end up using a model for work a rule should have handled. Then you discover:

  • The cost is far higher than expected
  • Evaluation results miss the target, and you lack the data to say why
  • You have to build an evaluation harness to monitor something that did not need monitoring in the first place
  • Every change to a business rule turns into another round of prompt tuning

A checklist before you start

Before labelling a request an “AI project”, check the following:

  • Can you list the decision conditions and the exceptions in full? If yes, evaluate a rules-based approach first.
  • Are the inputs fixed fields or free text? If the fields are fixed and the rules are clear, consider whether a model is needed at all.
  • What happens when the judgement is wrong? If the outcome is irreversible, design a human approval step rather than trying to make the model more accurate.
  • If the model were unavailable today, could the workflow still run in a degraded mode?
  • Which representative cases can you evaluate against? Set a baseline in line with the task risk, then review it against spot checks and real usage logs.

HiddenNSeek’s design principle is to handle the clear steps with rules first, then decide whether a model is needed. That is not pessimism about AI; it is putting AI where semantic understanding or generation is required. If deterministic automation can do the job, we do not start with an agent.

Related insights

Workflow automation

Connect Systems Before You Automate

Automation only makes a process faster; it never makes the process right. If upstream data is wrong, automation carries the error downstream sooner.

6 min read

AI agent systems

Production AI Agent Checklist: 11 Checks

From task boundaries and tool permissions to evaluation and monitoring, 11 areas to confirm before a production AI agent goes live.

9 min read

Engineering practice

What Forward-Deployed Engineering Is

FDE is engineering that faces the business problem directly, with outcomes rather than a delivery checklist as the definition of done.

7 min read

Free 30-minute intro call

Start with 30 minutes and leave with a next step.

The intro call is free: we start by understanding how your workflows and systems run today, then agree whether working together is a fit. The full L0 audit is scoped and quoted separately.

1 個工作天內回覆