← Notes

The model matches, the code decides

Looking back at what I've been building this year, I realized I kept arriving at the same pattern without really planning to: let the model handle the messy, ambiguous part, and let plain code make the final call.

  • Yardsale. Claude's role is figuring out which past eBay sales actually match the item in your photo, while plain code calculates the asking price and holds the floor.
  • Highlander Hub. Gemini determines whether an Instagram post is a campus event, but it has to point back to the specific caption or flyer slide that says so. Code verifies that citation, and if it doesn't hold up, the result gets discarded.
  • SpyGlass. A claim only gets highlighted inside a tweet once code confirms that exact text appears in the original post, and the overall verdict is computed deterministically in code too.
  • Second Grader. Models extract claims from a coding agent's messages and generate tests, but deciding whether "all tests pass" is actually true is never left to an LLM—code checks the recorded evidence and makes that call.

Why I keep coming back to it

Models are great at making sense of messy, unstructured inputs, but it's hard to hold them accountable when something matters. Plain code is predictable in all the ways models aren't. Splitting the work this way means anything a user ends up seeing can be traced back to something concrete—a real past sale, a specific flyer slide, an exact sentence in a post, or a recorded test run.

What it asks in return

The tradeoff is extra plumbing. Every project ended up needing a verification layer that knows when to push back, which forces a more interesting product question: what should happen when the check says no? Sometimes the right answer is to refuse, sometimes to fall back to a source link, and sometimes just to ask the user instead of guessing. It's a balance I'm still exploring as I keep building.