01 · See every call
You can't tune what you can't see
The first job was to log every LLM call: why it ran (its purpose), the desk, the model, tokens including cache, latency and cost. That data feeds an admin cost dashboard.
- Model routing is per purpose (
summary_article, newsagent_triage...), chosen in admin, not hard-coded.
- That makes prompting experiments cheap. Swap a model for one purpose, watch cost and quality move, and swap it back if needed.
02 · Cut the bill by reading the log
$10.27 a day to under $3 in one pass
$10.27
LLM spend, 18 Nov (7,075 calls)
- Prompt caching on multi-turn desk runs, which re-sent 20-50K tokens of context every turn. Cache reads cost 10% of input.
- The live desk ran hourly overnight whether or not anything happened. Now code checks for new articles first and the LLM is only called if there are some.
- Four summaries per article when the apps read two.
03 · Research agent challenges
An agent that mostly paid to learn nothing
The research agent profiles new people and teams with web search. The log told an awkward story:
- 352 entities researched in a day, and 81% ended "skipped". Most of them had been mentioned once.
- The prompt was motorsport-only, but politics entities went through it too, only to be rejected as "not a motorsport entity".
- A backlog of 25,953 never-researched entities meant the queue never emptied, so every run spent its full cap.
- After pausing it, "research" spend continued. It turned out to be dedup's own calls, logged under the wrong purpose.
Lesson: trigger on evidence (mentions), scope prompts per desk, and audit the audit labels.
04 · Images
From generic stock to an anchored house style
- Text-only briefs all looked alike, and I rejected them as too generic.
- Image-in worked better: restyle the story's own photo, then make anchored edits with FLUX.2 klein-9B as the story develops, so the art evolves instead of drifting.
- Pop-art and comic panels are the styles I kept. A vision model looks at the photo and writes the brief.
05 · The open stack
One GPU box does all the generative work
A scheduled conductor launches a GPU box (spot first, then on-demand). It serves gpt-oss-20b with vLLM, and the existing services route their LLM calls to it. The box drains the queues, runs dedup and the desks, publishes the bulletin, renders the klein images, then shuts itself down.
- If no box is up, each call falls back to Haiku, so a bulletin always goes out.
- Only the chatbot talks to a hosted API.