---
title: "How Shopify turns open models into task experts"
description: "Shopify's Sidekick keeps a frontier model for merchant conversation and planning but offloads token-heavy subagent work, such as GraphQL query generation, to open models it post-trains and self-hosts."
url: "https://swe.quest/articles/how-shopify-turns-open-models-into-task-experts-a2ba67e222beb92b"
canonical: "https://shopify.engineering/open-model-task-experts"
source: "Shopify Engineering"
published: "2026-10-21"
difficulty: "hard"
kind: "Case study"
reading_minutes: 5
tags: ["model-training","inference","evals","ai-agents","cost-optimization"]
---

# How Shopify turns open models into task experts

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2026-10-21, 5 min read, Case study. Original: [https://shopify.engineering/open-model-task-experts](https://shopify.engineering/open-model-task-experts)

## Summary

Shopify's Sidekick keeps a frontier model for merchant conversation and planning but offloads token-heavy subagent work, such as GraphQL query generation, to open models it post-trains and self-hosts. Each model is built through a loop: a rubric and an LLM judge tuned with GEPA/ACE to match human agreement, an optimized frontier agent as the baseline, open-model selection, early inference benchmarking with AIPerf, nightly self-healing that converts failed conversations into training data via critic hints, and post-training with Megatron Bridge. For GraphQL, Nemotron 3.5 Lightning went from 37.7 to 74.5 on the judge after six loops and about 61,000 healed examples, beating the frontier model's 73. It also cut median latency from 6.50s to 0.87s and serving cost by about 90%, and Blackwell GPUs made both training and serving cheaper.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)

## Prerequisites

- LLM fine-tuning basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- LLM-as-judge evaluation ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- GPU inference serving ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- mixture-of-experts models

## Keywords

Sidekick, Nemotron 3.5 Lightning, Megatron Bridge, AIPerf, TensorRT-LLM, GEPA, Blackwell, GraphQL

## Related posts

- [Sidekick's continual learning loop](https://swe.quest/articles/sidekick-s-continual-learning-loop-f72e46000910fa09.md): Shopify Engineering · 2026-08-05 · Hard · 9 min read · Model training, Evaluation, Inference & serving, LLMs, Cost optimization
  Shopify's Sidekick GraphQL agent improves daily through a continual learning loop that turns production failures into model weight updates, beating frontier-model quality while cutting estimated serving costs from about $27M to $1M per year (96%).
- [Flow generation through natural language: An agentic modeling approach](https://swe.quest/articles/flow-generation-through-natural-language-an-agentic-modeling-approach-84b1ba2f65ecd1a0.md): Shopify Engineering · 2026-04-22 · Medium · 12 min read · Model training, AI agents, Evaluation, LLMs, ML platforms
  Shopify fine-tuned Qwen3-32B into a tool-calling agent that turns natural-language requests into Shopify Flow automations for Sidekick, reporting 2.2x lower latency and 68% lower cost than the closed frontier model it replaced.
- [Mubit + Neon AI Gateway: an agent that cuts its own frontier-model tokens by 73%](https://swe.quest/articles/mubit-neon-ai-gateway-an-agent-that-cuts-its-own-frontier-model-tokens-by-73-358da1147275d399.md): Neon · 2026-11-12 · Medium · 10 min read · AI agents, LLMs, Cost optimization, Inference & serving, PostgreSQL
  Mubit, a proxy placed in front of Neon AI Gateway, records an agent's model calls, groups recurring calls into tasks, and fine-tunes a small open-weight model once a task has at least 25 good replies.
- [Open-weight models are fast on Neon AI Gateway. Here's why](https://swe.quest/articles/open-weight-models-are-fast-on-neon-ai-gateway-here-s-why-a042a513966cd27f.md): Neon · 2026-08-20 · Medium · 7 min read · Inference & serving, LLMs, Performance engineering, Caching, AI agents
  Neon AI Gateway serves open-weight models through Databricks Foundation Model APIs, so it gets that stack's inference optimizations: continuous batching with PagedAttention-style KV-cache paging and overlapped prefill/decode, a TensorRT-LLM backend with fused and GroupGEMM kernels for MoE, tensor parallelism, FP8 quantization, and per-GPU tuning.
- [Together AI at ICML 2026: frontier research across the full stack](https://swe.quest/articles/together-ai-at-icml-2026-frontier-research-across-the-full-stack-7ba2ab06914581c4.md): Together AI · 2026-06-30 · Hard · 10 min read · Inference & serving, Model training, LLMs, AI agents, Evaluation
  Together AI's nine ICML 2026 papers span the AI stack from agents to GPU kernels, each with a headline result.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
