AI

Routing, caching and fine tuning, ranked by regret

Three ways to cut an AI bill, ranked by how sorry you'll be afterwards. One of them cost a platform engineer two weeks of grading.

Scroll

When an AI bill triples, somebody gets handed the job of bringing it down, and they have three things to try. Routing sends each request to the cheapest model that can handle it. Caching stops you paying twice for the same work. Fine tuning teaches a smaller model your particular task, so it can do what used to need a bigger one. I'd rank them by how sorry you're likely to be afterwards, and I'd rank them that way mostly because of one platform engineer I'll call Tahmina, who went through all three in a single quarter. The bill reached her as a screenshot forwarded by someone in finance, with no message attached.

  1. Caching, which I have yet to see anyone regret.

    Tahmina did this first because it doesn't change a single answer. A provider charges much less for input tokens it has seen recently (Anthropic's prompt caching documentation lists the rates), so if an agent sends the same long instructions and reference documents at every step, that repeated chunk gets cheap. It only works if the stable material sits at the front of the prompt, though. Her first win was one afternoon spent moving the changing part of each prompt to the end. Nothing in the product behaved any differently and the bill went down. The nearest thing to regret I could get out of her was that she felt a bit silly for not doing it in month one.

  2. Routing, where the regret depends almost entirely on one spreadsheet.

    The price gap is what makes routing so tempting. An analysis of Vercel's gateway data puts closed model tokens at about 7.8 times the cost of open ones, and once you've seen a number like that it's hard to look at your traffic without mentally sorting it into the expensive pile and the pile that probably didn't need to be. But you can't route anything until you've built an evaluation set. The moment some traffic goes to a weaker model you need to know what you lost, and "the answers look fine" from whoever happened to check on a Tuesday is not knowing.

    So she spent about two weeks collecting a few hundred real requests and grading them. I saw the sheet once. Column A was the request, pasted raw with the customer names blanked out. B was what the big model said, C was what the cheap one said, and D was her grade, which started as pass or fail and by the second week had turned into a 1 to 4 scale with a notes column, because pass or fail kept letting things through that she didn't like. The notes said things like "correct but curt" and "right answer, wrong currency". I never asked about the currency one.

    It reminded me of the years I spent editing other people's copy, where most of the job was reading the same mistake four hundred times and trying not to get less annoyed by it. Around the third hour you stop trusting yourself and go back to regrade the first twenty, to check you haven't drifted soft. She did that too, every few days. I still can't decide whether that's rigour or just what tired people do with a spreadsheet.

    She called it the dullest fortnight of her year, and also the only reason she trusted the router afterwards. I can't tell you whether the cheap side of her router was an open model or just a smaller closed one, because she told me over dinner in a loud place in Banani and I was more interested in column D. Where routing goes wrong, I think, is when that set is thin: fifty requests all pulled from the same week, a router that looks brilliant, and then a kind of question turns up that nobody ever graded.

  3. Fine tuning, which has the most regret by a distance.

    It's the only one of the three that leaves you with something you now have to look after. You need the training data, someone to run the training, a way to serve the model, and a plan for the day a better open base model comes out and yours is suddenly the old one. Tahmina did it for one narrow classification task, where she already had tens of thousands of labelled examples, and didn't try it anywhere else. When I asked why only the one, she said the person who ran the training had since moved teams, and she wasn't completely sure anyone still knew which folder the script lived in.