AI-generated editorial illustration; not a documentary photograph.
Shopify has detailed a continual learning system that turns failures from its production GraphQL agent into new training data each day. In a case study published on September 22, 2026, the company says the resulting specialized model surpassed its frontier-model baseline while cutting estimated serving costs by 96%.
Failures Become Training Data
The process begins with a scoring rubric covering completeness, execution, response quality and safety. Shopify calibrates automated judges against expert annotations, checks whether they reflect previous A/B test outcomes, and deliberately degrades individual behaviors to confirm that the corresponding scores respond.
Once changes to prompts, tools and orchestration stop producing sufficient gains, the system mines anonymized production traffic for low-scoring conversations. Frontier reasoning models propose repairs, an arbiter combines their critiques, and successful replays become reinforcement-learning trajectories. Cases that remain unresolved are sent to Toloka annotators.
Daily Full-Parameter Training
Shopify first applies supervised fine-tuning to complete repaired trajectories, including their reasoning, and then uses GRPO to optimize responses against the calibrated judge. The pipeline adds new trajectories daily and repeats full-parameter fine-tuning and GRPO over both new and earlier data to limit drift and catastrophic forgetting. PyTorch distributes this training across GPUs using tensor, context and data parallelism.
Prompt Compression Cuts Latency
The company also trained a small set of gist-token embeddings to replace most of the agent's static system prompt while keeping the underlying model weights frozen. Shopify says this reduced the prompt from roughly 6,000 tokens to about 1,500, with no quality loss measured by its judge.
At 350 requests per minute, Shopify reports that the compressed prompt reduced time to first token by about 19% and end-to-end latency by about 38%. On identical GPUs, throughput increased by about 16% for requests and 12% for output tokens, translating to roughly 14% fewer GPUs for equivalent traffic.
Production Economics
The GraphQL agent handles as many as 2,000 requests per minute, generating and running Admin GraphQL API queries to answer merchant questions. Shopify serves the model through vLLM. Based on average token costs, the company estimates that comparable frontier-model traffic could cost $27 million annually, versus closer to $1 million for its fine-tuned model; these are internal estimates rather than disclosed spending figures.
Source: How Shopify built a continual learning loop with PyTorch and vLLM

Leave a Reply