Hisham Alhussain
← All posts

From notebooks to platforms: hardening ML delivery

· 2 min read

April was a wild month. GPT-4.1 landed, then o3 and o4-mini a couple of days later, and Meta dropped Llama 4 right at the start of the month. I spent a good chunk of it doing what I suspect a lot of you did: re-running the same prompts against new models and squinting at the outputs.

And that's when it hit me. The question I kept getting from teammates wasn't "which model is best?" It was "how scary would it be to switch?" If the honest answer is "very," the model isn't the problem. The delivery pipeline is.

Notebooks are where ideas are born, not where they should live

I love notebooks. Most of my best experiments started in one. But I've also inherited more than one "production system" that was really a notebook someone scheduled with cron and then left the company.

The pattern I push for now is simple: keep a lab space where people can move fast and break things, and a production repo where anything that touches users goes through a PR, tests, and review. You promote work from one to the other on purpose. Nobody should be scared to experiment, and nobody should be surprised by what's running in prod.

Make the model a config value

This one sounds obvious but it rarely is. If changing models means editing code in six places, you'll never do it. I like having the model, its parameters, and the prompt version all live in config, with one code path that reads them.

Then a model swap becomes a one-line diff that goes through the same checks as everything else. That's exactly where you want it.

Tests that catch the boring failures

You don't need a research-grade eval suite on day one. Start with the stuff that actually breaks:

  • Data contracts. Did an upstream column change type or go null? Fail loudly before the model ever sees it.
  • Feature and schema compatibility. If the input shape changes, catch it in CI, not in a user complaint.
  • A small golden set. Even 30 to 50 hand-checked examples will catch a surprising number of regressions when you swap models.

Trace everything

When something goes wrong, you want to see the whole story: the request, what data was pulled, which model answered, and what it said. Request to retrieval to model output, all in one trace. Without that you're guessing, and guessing at 11pm before a demo is not fun. Trust me on that one.

The goal is boring

None of this is glamorous. That's sort of the point. Model releases are going to keep coming every few weeks, and I'd much rather spend that time asking "is the new one better for us?" than "will the new one break everything?"

If your team can swap a model on a Tuesday afternoon without a war room, you're in good shape.