LLMs for regex? Idiotic.
And here’s the thing — Pascal Cescato nailed it in the comments on my SEO audit agent piece. “You don’t need an LLM for this. Everything you’re sending to Claude can be done directly in Python — zero cost, fully deterministic, no hallucination risk.” Spot on. Those basic checks? Title length over 60 chars, missing meta descriptions, zero H1s, no canonical tags. That’s not “reasoning.” That’s counting. A script handles it free.
But I pushed back — flags like “title reads like a navigation label” need judgment. Pascal conceded, then dropped gold: two-pass audits. Binary checks first in Python. Escalate only the weird ones to a model. Boom. Costs tank.
Julian Oczkowski piled on: deterministic rules, then lightweight models for triage, big ones for true edge cases. Latency low, costs predictable. Three randos in comments just redesigned my tool better than I did.
Why Were We Burning Cash on LLMs?
Look, the original agent? Slapped everything at Claude Sonnet. $0.006 per URL. For 50 sites? $0.30 easy. Most failed on dumb stuff — long titles, ghost descriptions. No model needed. Ever.
Pascal called it two-pass. Julian, tiered. I dubbed it the cost curve. Free Python. Cheap Haiku. Pricey Sonnet only where it shines.
Tier 1: Python. $0. Title >60? Fail. No H1? Fail. Pure logic.
Tier 2: Haiku. Pennies — $0.0001/URL. Weird passes, like four-char titles or redirects. Cheap enough to not sweat.
Tier 3: Sonnet. $0.006. Semantic calls only. “This title’s a menu item, not SEO bait.”
Routing’s the magic. On 50 URLs, eight hit Sonnet. Rest? Tier 1. Bill dropped to $0.05. Those eight? Worth every cent.
“Deterministic Python for binary checks, model call only on pages that pass the mechanical audit but need a second look. You pay per genuinely ambiguous case, not per URL.”
Pascal, again. That’s the quote that broke me.
Is This the Future of LLM Tools?
Hell yes — and it’s about time. We’ve treated models like magic wands. Zap every task. Wasteful. This mirrors early cloud days: why spin up a full EC2 for a static file? Use S3.
My unique twist? This tiered routing isn’t SEO-specific. It’s the blueprint for every LLM app. Customer support bots? Regex FAQs first. Code review? Syntax checks free. Edge cases to GPT. Costs crash 80-90%. Latency? Sane. Hallucinations? Rare.
Bold prediction: By 2025, 70% of production LLM pipelines route like this. Or die on bills.
But wait — the repo rebuild? Core stays MIT-flat. Seven modules untouched. Fork v1? Identical.
Premium layer? Four new beasts. cost_curve.py routes tiers. multi_client.py silos projects. enhanced_reporter.py spits WeasyPrint PDFs with screenshots, severity sorts, fix suggestions. rewrite_agent.py? Post-audit rewrites — Python truncates, Haiku metas, Sonnet intros. Feed it your writing sample? Sounds like you.
One command: python main.py –project client-x –pro –tiered –rewrite. CSV in, PDF out, history logged. Core imports zilch from premium. Fork-proof trust.
Mads Hansen asked the killer: blind spots on patterns? Answer: state.json logs runs. Fail trends emerge. Fix ‘em.
Skeptical take: Open core’s smart PR. Hooks devs, sells pro. But core’s public good — auditable, PR-friendly. Premium? Closed. Fine, if it delivers.
Corporate hype alert? None here. This was comments-to-code in days. No vaporware.
Agencies: Run this on client sites. Spot mechanical trash free. Pay for nuance. Clients love PDFs with pics.
Devs: Fork core. Tweak checks. Add your regexes.
Me? Wish I’d thought of it first. But credit where due — commenters win.
And yeah, it’s Python. No frameworks bloating it. Lean. Mean. Cheap.
One punchy caveat.
Don’t sleep on Tier 2. Haiku’s sneaky good for triage. Skips Sonnet bloat.
Historical parallel? Like jQuery era — bloated libs everywhere. Then vanilla JS optimized. LLMs next.
Why Does Tiered Routing Crush Flat LLM Calls?
Simple math. 80% pages mechanical fails. Python eats ‘em. 20% ambiguous? Haiku filters to 10-15%. Sonnet sips.
No more $0.30 runs. Predictable scaling. 500 URLs? $0.50 tops.
Edge: Rewrite agent mimics your voice. –voice-sample your.txt. Not generic Claude slop.
🧬 Related Insights
- Read more: Why Kubernetes Is Quietly Becoming the Operating System for AI Production
- Read more: Why Nodemon Zombies Haunt Your Turso Setup (And How to Kill Them)
Frequently Asked Questions
What is a tiered SEO audit agent?
Python-first checks for basics ($0), cheap models for oddities, full LLMs only for semantics. Costs plummet.
How much does the SEO audit tool save?
From $0.006/URL to $0.001 average. 80% drop on real runs.
Is the SEO audit repo free?
Core yes, MIT. Premium pro features behind license.