Problem
A team launches an AI assistant on a frontier model, the fastest route to users. At scale the model is too slow and expensive for every request, and it does not learn: a user correction or recurring failure never improves the next answer. Lessons pile up as prompt edits and code, while the weights stay untouched. Shopify faced this with Sidekick, its merchant assistant.
Example from the article: the GraphQL agent writes and runs queries against Shopify's Admin GraphQL API to answer merchant questions, at up to 2,000 requests per minute. Serving it on a frontier model was estimated at USD 27M per year.
Solution in brief
Turn a quality rubric into a calibrated LLM judge. Use it to tune the frontier-based system, then to mine low-scoring conversations. Frontier critics repair them, and the repaired trajectories train a smaller model with fine-tuning and GRPO, with the judge as the reward. The loop runs daily. Prompt compression then cuts latency and GPU use.
Questions this case answers
- How to convert low-scoring production conversations of an LLM agent into training data without labeling each one by hand
- How to make an automated quality judge trustworthy enough to optimize a model against it
- How to cut inference cost and latency of an LLM agent while keeping quality above a frontier-model baseline
- How to turn failures of an LLM assistant in production into a steady model improvement?
Tools and methods
- LLM-as-a-judge — scores conversations; offline metric and RL reward
- Cohen's kappa — tests the rubric
- DSPy, GEPA, Agentic Context Engineering — calibrate the judge prompt
- Autoresearch loop — an agent edits the system, keeps changes that raise the judge score
- Frontier-model critics and Toloka annotators — repair failed conversations
- Supervised fine-tuning and GRPO — train the smaller model
- Gist tokens — replace the system prompt
Google or a one-time email code. No password.