Skip to content
mentoor

Topic 2 of 6 · 4 min read

When a fixed rule beats an AI step

Goal: Split a workflow into steps that need a fixed rule and steps that need a model, and justify each choice.

Use a fixed rule whenever the answer can be computed exactly, and use a model only for work that needs language. A rule gives the same result every time. A model gives a likely result, and sometimes a wrong one.

Check yourself · 1 of 3

Which job in a workflow is best done by a fixed step, not an AI step?

Choose one answer

Why it matters

It is tempting to put an AI step everywhere, because it feels flexible. But a model guesses. Ask it to add up a column of invoice totals, convert a date, or check whether a customer ID exists, and it may sound sure while being wrong. Fixed steps are also free of the model's cost and delay, and they behave the same on every run, which makes failures easy to trace.

What each kind is good at

Fixed steps (filters, formatters, lookups, maths, text splitting, date conversion, a database or sheet search):

  • Checking a value: "is the total over 500?"
  • Reshaping data: turning "03/04/2026" into "2026-04-03", trimming spaces, making text lower case.
  • Looking something up by an exact key, such as a customer ID or order number.
  • Calculating: sums, percentages, due dates.

AI steps (a call to ChatGPT, Claude, Gemini or another model):

  • Classify: is this email a complaint, a sales lead or a question?
  • Extract: pull the order number, the product and the complaint from a messy paragraph.
  • Draft: write a reply in a given tone.
  • Summarise: shorten a long thread.

A simple test

Ask: "Could I write the exact rule on a card?" If yes, use a fixed step. If the input is free text that people write in a hundred ways, use a model. Often you use both, in order: the model turns messy text into clean fields, and fixed steps then do the maths and the lookup on those fields.

Before and after

Before: One AI step receives the whole invoice email and is asked to "check the total, see if it is over the approval limit, and decide who should approve it."

The model may misread a figure and apply the limit wrongly, and nobody can see why.

After: An AI step extracts only the vendor name and total as two fields. A filter checks "total greater than 500". A lookup finds the approver for that vendor in a sheet. A final step sends the approval request.

The model does the one job only it can do. Everything else is exact.

What goes wrong

  • Asking a model to do arithmetic or date maths. Results look right and are not.
  • Using a model to look up facts. It may invent a customer record that does not exist. Look it up in the real source.
  • Using a fixed rule on free text. A keyword filter for "refund" misses "I want my money back".
  • Making the model do the decision, not just the reading. Let it classify, and let a rule decide what happens next.

Examples

Splitting an expense workflow

Model step: read the receipt text and extract merchant, date and amount. Fixed steps: convert the date to a standard format, check that the amount is under the 200 limit, look up the employee's cost centre by employee ID, and add the row to the sheet. Model step: draft a short note asking the employee for a missing receipt, only when a field was empty.

The index card test

"Send to finance if the total is over 5,000." That fits on a card, so use a filter. "Decide whether this customer sounds upset." That has no exact rule, so use a model to classify, then let a branch act on the label.

Key points

  • A fixed rule returns the same exact result every run, while a model returns a likely result that can be wrong.
  • Use fixed steps for checks, reshaping, calculations and lookups by exact key.
  • Use model steps for language work: classify, extract, draft and summarise.
  • The common pattern is a model that turns messy text into clean fields, followed by fixed steps that act on those fields.
  • Let the model read and label, and let a rule decide what happens next.

Common mistakes

  • Putting an AI step in front of a task that a filter or formatter does exactly.
  • Asking a model to calculate totals, dates or limits instead of using a maths or date step.
  • Letting the model look up customer or order data from memory instead of searching the real source.
  • Using keyword filters on free text and silently missing the cases written in other words.

Check yourself · 2 of 3

An AI step reads a messy email and returns the order number. What should find the matching customer record?

Choose one answer

Check yourself · 3 of 3

A keyword filter sends only emails containing "refund" to the billing team. A customer writes "please give me my money back". What happens?

Choose one answer

Practice items, not counted towards your mastery.

Start here