---
title: "Building production-ready agentic systems: Lessons from Shopify Sidekick"
description: "Shopify's Sidekick merchant assistant outgrew a monolithic system prompt once its tool count passed ~50, so the team moved to just-in-time instructions returned alongside tool results, which kept prompt caches intact and improved maintainability and metrics."
url: "https://swe.quest/articles/building-production-ready-agentic-systems-lessons-from-shopify-sidekick-338be221de1210c1"
canonical: "https://shopify.engineering/building-production-ready-agentic-systems"
source: "Shopify Engineering"
published: "2025-08-26"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["ai-agents","evals","model-training","llms"]
---

# Building production-ready agentic systems: Lessons from Shopify Sidekick

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2025-08-26, 6 min read, Case study. Original: [https://shopify.engineering/building-production-ready-agentic-systems](https://shopify.engineering/building-production-ready-agentic-systems)

## Summary

Shopify's Sidekick merchant assistant outgrew a monolithic system prompt once its tool count passed ~50, so the team moved to just-in-time instructions returned alongside tool results, which kept prompt caches intact and improved maintainability and metrics. For evaluation they replaced curated golden datasets with ground truth sets sampled from real conversations, labeled by multiple experts and validated with Cohen's Kappa, Kendall Tau and Pearson correlation. LLM judges were calibrated from a Kappa of 0.02 to 0.61 against a human baseline of 0.69, and an LLM merchant simulator replays conversations against candidate systems before release. GRPO fine-tuning with gated procedural and semantic rewards exposed reward hacking such as opting out of tasks and misusing customer tags, and fixing the validators and judges raised syntax accuracy from ~93% to ~99%.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- LLM tool calling ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- LLM-as-a-judge evaluation ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- reinforcement learning basics ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))

## Keywords

Shopify Sidekick, GRPO, LLM-as-a-Judge, Cohen's Kappa, Just-in-Time instructions, ICML 2025

## Related posts

- [Teaching Sidekick to say no: automated data curation with LLM judge consensus](https://swe.quest/articles/teaching-sidekick-to-say-no-automated-data-curation-with-llm-judge-consensus-cbd8b5202d7ba316.md): Shopify Engineering · 2026-06-15 · Medium · 9 min read · Model training, LLMs, Evaluation, AI agents
  Production training data for Shopify's Sidekick segmentation skill contained only successful queries, so the fine-tuned model never learned to refuse impossible requests and instead generated queries returning zero results.
- [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%).
- [ShopGym: Realistic, reproducible sandboxes for shopping agents](https://swe.quest/articles/shopgym-realistic-reproducible-sandboxes-for-shopping-agents-9debdd2215041431.md): Shopify Engineering · 2026-10-01 · Medium · 6 min read · AI agents, Evaluation, LLMs, E-commerce, Testing
  ShopGym turns live storefronts into self-contained, resettable sandbox shops and generates grounded shopping tasks so agents can be evaluated reproducibly.
- [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.
- [How we used DSPy to turn AI evaluations into better responses in Dash chat](https://swe.quest/articles/how-we-used-dspy-to-turn-ai-evaluations-into-better-responses-in-dash-chat-742eadaf5e0748b5.md): Dropbox Tech · 2026-06-25 · Medium · 9 min read · Evaluation, LLMs, AI agents
  Dropbox improved its Dash chat agent with a two-stage DSPy loop.

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)
