AI Automation

Automation first, AI second: use LLMs only where judgment is needed

TL;DR

Steps with clear rules (filtering, format conversion, API calls, math) → plain logic: cheap, fast, stable, testable. Steps needing language understanding, fuzzy classification, summarizing, drafting → an LLM. Result: lower cost and fewer unpredictable failures.

Classifying workflow steps

StepUseWhy
Filter email by sender / subjectRuleClear rule, 100% accurate
Read content, detect customer intentLLMNatural language, ambiguous
Look up an order in the DBCode / APIStructured data
Draft a polite replyLLMContext-aware writing
Compute refunds, delivery datesCode“Roughly right” isn't allowed
Approve refunds above a thresholdHumanFinancial risk

Questions to ask per step

  1. Can you write an if/else or regex for it? → If yes, don't use AI.
  2. What does one mistake cost? → If high, add human approval.
  3. Does the output need a fixed structure? → Enforce a JSON schema + validate.