AI / Engineering journal

Rules or AI: Designing Automated Workflows

Most automated workflows work best as rules with a few model steps where reading or judgment is needed. A practical way to choose for each step.

Sylantix Engineering Team7 min read
A workflow editor and review queue on a monitor beside an approval form.
Sylantix / Engineering journalAI · Automation · LLM
In this article 8 sections
TL;DR

Key takeaways

  • Decide per step, not per workflow. Most processes need a model in one or two places and rules everywhere else.
  • Structured input, high cost of error and a need to explain decisions all point to rules.
  • The strongest pattern is a model that reads and suggests, followed by rules that check and act.
  • Every model step needs a measurable confidence check, a fallback to a person and a log you can read later.

Assigning the right work to the model

A refund process might involve reading an email, finding an order, checking the policy and sending a payment. The email can be ambiguous; the eligibility rules and payment permissions should be explicit.

A model can extract the order number and reason from the message. Application code can then check the records and apply the policy, with a person reviewing uncertain cases. That separation makes decisions easier to test and explain.

Four questions for every step

Write the process down as a list of steps, the way a new employee would learn it. Then ask four questions about each one.

Is the input structured?

If the step works on fields from a database, a form or an API, rules are almost always better. They are fast, cheap, testable and they do the same thing every time. A model adds nothing when the data already has a shape.

If the input is free text, a scanned document, an image or an email written by a stressed customer, a model is usually the only practical way to turn it into something structured.

What does a mistake cost?

Some errors are cheap: a ticket routed to the wrong queue gets moved by a person in seconds. Others are expensive: money sent, a contract amended, a message to a customer that cannot be taken back.

The more a mistake costs, the more that step should be deterministic, or at least checked by rules or a person after a model suggests something.

Does the decision need explaining?

Auditors, regulators and customers ask why. "The order was outside the 30-day window" is an explanation. "The model thought so" is not. If a step's outcome must be justified, express the decision as rules and use a model only to gather the facts those rules need.

How much volume, and how varied?

A step that happens ten times a week may not be worth automating at all. A step that happens thousands of times with endless variation in wording is where models earn their cost. High volume with low variation is rules territory again.

Run the four questions over every step and a pattern appears. The model steps cluster at the edges of the process, where messy input arrives. The middle, where decisions are made and actions taken, is mostly rules.

Hybrid patterns that hold up

A few combinations come up so often that they are worth naming.

The model classifies, rules act. A model reads an incoming message and assigns a category and urgency. Rules decide what happens for each category. Changing the routing never requires touching the model.

The model extracts, rules validate. A model pulls fields out of a document, then rules check them: totals add up, dates are plausible, the customer exists. Failed checks go to review. The same approach underpins most invoice automation, as described in invoice processing automation.

Rules filter, the model handles the rest. Known cases are handled by simple rules first, and only what is left goes to a model. This keeps cost down and makes the common path completely predictable.

The model drafts, a person approves. For outbound communication or anything sensitive, the model writes and a person sends. Over time, categories that never need edits can be released to send automatically.

What these share is that the model never has the final word on an action with consequences. It reads, suggests and drafts. Something verifiable decides.

Thresholds and fallbacks

Every model step should produce not just an answer but a signal of how far to trust it, and the workflow should treat low trust as a normal outcome rather than an error.

Be careful where that signal comes from. A language model does not return a calibrated confidence, and the certainty it states in its own words is not a reliable measure. Build the signal from things you can measure: validation rules that pass or fail, agreement between two independent extractions, scores from a separate classifier, and checks against source data such as an existing customer record.

In practice that means three paths after a model step: proceed automatically when the checks pass, send to a person when they do not, and reject outright when the input is clearly unusable. Where you set the bar is a business decision. Start conservative, with more cases going to people, and relax it as you see how often the model is right on your own data.

Fallbacks also cover failure. Model providers have outages and slow days. A workflow that stops completely when a model call times out was designed wrong. Queue the item, retry with a limit, and fall back to manual handling with the case clearly marked.

A worked example: supplier onboarding

Take a process many companies run by hand: onboarding a new supplier. A request arrives by email with an attached company registration document, bank details and a tax certificate.

Reading the attachments and pulling out the company name, registration number, address and bank account is messy input with endless formats. That is a model step, followed by rules that check the registration number format and that the bank account belongs to a country you pay into.

Checking the company against a sanctions list and your existing supplier records is structured, costly to get wrong and needs an audit trail. That is rules, with any near-match sent to a person.

Deciding the payment terms comes from your procurement policy. Rules again.

Writing the welcome email to the supplier with their portal login can be drafted by a model and sent after a quick human glance, until the drafts have proven they need no edits.

Three of the five steps end up as rules. The two model steps are exactly where documents and free text enter the process. That ratio is typical.

Keep it observable

Automation that nobody can inspect becomes automation that nobody trusts. A few habits keep it readable.

Log every step with its input, output and decision, including what the model returned and which checks it passed or failed. When a customer complains, someone should be able to reconstruct exactly what happened in a few minutes.

Count outcomes per step: how many items passed automatically, how many went to a person, how many failed. A sudden change in those numbers is often the first sign of a new kind of input, a broken integration or a model behaving differently.

Keep a small set of real examples with known correct outcomes and rerun it whenever a prompt, a model or a rule changes. That is the closest thing workflows have to unit tests, and it is what lets you change things without fear.

Moving a manual process across gradually

The safest route from manual work to automation is not a big switch.

Start by automating only the reading. The system extracts and classifies, and a person still makes every decision with the information prepared for them. That alone often saves most of the time, and it produces the data you need to judge accuracy.

Next, let the system suggest decisions while people confirm them. Measure how often they agree. Where agreement is consistently high and mistakes are cheap, switch those cases to automatic. Leave the rest with people.

Some steps will never be automated, and that is fine. Mixed workflows where software handles the routine and people handle the exceptions are not a half-finished project. For most businesses they are the right end state.

Map the steps and their risks

Take one process that eats the most hours in your team and write every step on a single page. Mark each step as structured or messy input, cheap or costly mistake, and explainable or not. The steps marked messy, cheap and high volume are your model candidates. Everything else is rules, or stays with people.

Our automation service covers process mapping, implementation and testing with the people who do the work.

Facing this in your own product?

Describe your situation in a few sentences. Our engineering team replies within 24-48 hours on business days, and the first 30-minute consultation is free.

Sylantix Engineering Team

Written by the senior engineers who build these systems for clients: backends, AI features, mobile apps and the infrastructure under them. Questions about your own case go straight to them.

About the team →