6. The same loop with no AI in it#

Terms introduced herefuzzy match

Time to test the claim from the front page. If the model is one component in a six-stage program, you should be able to pull it out and put something else in the socket. So let us fire it.

git checkout kb.json baseline.json
node loop.mjs --apply-all --backend heuristic --dry-run

heuristic is thirty lines at the top of backends.mjs. No network, no model, no world knowledge. It can only rearrange what is already in the string:

const near = fuzzy(span, kb, { threshold: 0.70, limit: 1 })[0];
if (near) return [{ tool: 'propose_alias', pattern: firstTwoTokens(span), merchant_name: near.name }];
const hit = KEYWORDS.find(([re]) => re.test(span));      // COFFEE, BAKERY, PIZZA, MARKET, FUEL
if (!hit) return [{ tool: 'skip', reason: 'no keyword matched and nothing in the KB is close' }];
return [{ tool: 'propose_merchant', pattern, name: titleCase(pattern), cat: hit[1], sub: hit[2] }];
3 propose    11 proposals from "heuristic"
4 validate   4 accepted, 0 rejected, 7 clusters skipped
5 apply      4 written to a candidate KB
6 gate       fixtures 3/3   review rate 29.4% (was 61.8%)   PASS

Nothing else in the system noticed. Same clusters, same validator, same tiers, same gate, same report. 61.8% to 29.4%, with no AI anywhere in the process.

What the thirty lines got#

propose_merchant   "BLUE BOTTLE COF"  -> Blue Bottle Cof     Dining > Coffee
propose_merchant   "PHILZ COFFEE"     -> Philz Coffee        Dining > Coffee
propose_alias      "WHOLE FOOD"       -> Whole Foods
propose_merchant   "TARTINE BAKERY"   -> Tartine Bakery      Dining > Bakery
skipped: c3 c5 c7 c8 c9 c10 c11

Three of those four are as good as the model's. The alias to Whole Foods is identical to the model's, because that decision did not need world knowledge at all: the knowledge base already scored the near-match at 0.72 and the only question was whether to trust it. Stage 2 had already done the thinking.

Look at the difference, though. Blue Bottle Cof. The heuristic put a truncation in a display name that ends up on a user's screen, because it cannot know that COF is COFFEE. It cannot know that SPOTIFY P02XYZ4471 is Spotify with a billing reference glued on (c3, skipped). It cannot know AMZN MKTP is Amazon (c5, skipped). And it skipped the Venmo and Zelle rows for a technically-true reason that is not the real one: not "no keyword matched" but "people are not merchants".

That is exactly the shape of the gap, and it is narrower and more specific than "AI is better". Both proposers can restructure a string. Only one has read the internet.

Notice also that the tiers did their job without being told which proposer was running. All three merchants went to L1, so a human sees Blue Bottle Cof before a user does. The safety came from the structure, not from trusting the source.

A human in the socket#

Same thing, with you as the model:

node loop.mjs --dry-run                    # read the cluster list

Write your answers into a file:

{
  "proposals": [
    { "tool": "propose_alias", "cluster_id": "c5", "span": "AMZN MKTP US 2X4YZ8901",
      "pattern": "AMZN MKTP", "merchant_name": "Amazon",
      "reason": "Marketplace rendering of a merchant we already have." },
    { "tool": "propose_merchant", "cluster_id": "c3", "span": "SPOTIFY P02XYZ1120",
      "pattern": "SPOTIFY", "name": "Spotify", "cat": "Entertainment", "sub": "Streaming",
      "reason": "The P02XXXXXX tail is a billing reference, not part of the name." }
  ]
}
node loop.mjs --apply-all --dry-run --backend file:examples/human-proposals.json

Your proposals go through the identical validator, the identical tiers, the identical gate. If you write Dining > Coffee Shops, you get rejected with the same message the model got. If you write a pattern that hijacks Whole Foods, the gate throws your batch away too.

So why bother with a model#

Because of the shape of the work, not the difficulty of any one decision.

Every individual judgement in this system is easy. A person does each one in a couple of seconds. There are just a great many of them, they never stop arriving, and the knowledge they need is spread across the whole internet. That is the profile that suits a model: high volume, low stakes per item, wide knowledge, and a cheap check on every answer.

Turn any of those off and the answer changes. If the volume were fifty facts total, type them. If each decision were high-stakes and unverifiable, do not automate it. If the check were expensive, the loop would cost more than it saves. If the knowledge were entirely inside your own data, the heuristic wins outright, as it did on the Whole Foods alias.

So the useful question when someone proposes an agentic system is not "can a model do this". It is:

  1. What is the smallest thing the model has to produce? Here: one row of JSON.
  2. Can I check that thing in code, cheaply, without a model? Here: yes, nine ways.
  3. What happens when it is wrong? Here: a rejection with a reason, or a thrown-away batch, and a file a human can read and delete.
  4. Would a hundred lines of if-statements get me most of the way? Here: half the way, and knowing that told me exactly what the model was for.

Answer those four and you have designed the system. Which model you use is a configuration flag, as it literally is in backends.mjs.


Next: 7. Layer one, context