Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Shopify Engineering 9 min read Case study mediumAdept

Teaching Sidekick to say no: automated data curation with LLM judge consensus

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. Naively merging a small human-annotated refusal dataset (~1,200 examples from Toloka) with the production corpus produced contradictory labels, so the team used that seed to calibrate four frontier LLM judges. Labels are accepted only on unanimous agreement on both verdict and reasoning, using a mutually exclusive taxonomy: solvable with more context, missing capability, wrong skill, or ambiguous. The curated data raised the segmentation pass rate from 0.762 (naive merge) to 0.798, with 86.3% refusal accuracy at a 4.6% false positive rate and judge kappa above 0.75. The pipeline now runs as a flywheel that feeds new production traffic back into training.

Related posts

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

    Shopify Engineering mediumAdept

    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%.

  • Stop Building Models. Start Building Systems.

    Scribd Tech mediumAdept

    A repeatable human-in-the-loop pipeline let a three-person team (engineer, SME, data scientist) classify roughly 25M Slideshare slideshows and 350M Scribd documents for adult content in about two months. A cheap fast model labels the whole corpus via asynchronous batch inference with short rationales. A stronger judge model re-checks a 0.1% random sample, and SMEs review only the disagreements plus spot-check agreements in Google Sheets, with corrections ingested into Databricks as a versioned golden dataset. Practical guidance covers standardized inputs, prompt/model version tracking, validating on a 1% corpus slice beyond the curated golden set, tracking disagreement and SME correction rates, and handling failure modes such as idempotent batch retries and Sheets bottlenecks.

  • Aligning LLM-as-a-Judge with Human Preferences

    LangChain easyNovice

    LangSmith evaluators now store human corrections to LLM-as-a-Judge scores as few-shot examples, optionally with explanations, and inject them into the judge prompt on later runs so the evaluator aligns with team preferences without manual prompt engineering. LLM judges work because they can see information the generator lacked, such as reference answers, and because judging is easier than generating. Common uses are detecting RAG hallucinations, RAG correctness and toxic outputs, in both online and offline evaluation. The design draws on few-shot learning and Shreya Shankar's Berkeley paper "Who Validates the Validators?".

  • Fine-tuning open LLM judges to outperform GPT-5.2

    Together AI mediumAdept

    DPO fine-tuning open-weight LLM judges on RewardBench 2 preference data lets them match or beat GPT-5.2 at agreeing with human preference labels. GPT-OSS 120B was trained with LoRA on 5,407 preference pairs built from ~1,500 examples (beta 0.1, LR 5e-6, 3 epochs, ~1.5 hours) and rose from 57.91% to 62.63% accuracy, against GPT-5.2's 61.62%, at about 15x lower cost and 14x higher throughput. Qwen3 235B already beat GPT-5.2 at baseline (62.63%) but dropped slightly to 61.28% after DPO. Category analysis shows Safety and Factuality are easy for judges while Focus and precise instruction following remain hard, and high tie counts point to positional bias.

  • Turbocharging Customer Support Chatbot Development with LLM-Based Automated Evaluation

    Instacart Tech mediumAdept

    Instacart's LACE framework evaluates multi-turn support chatbot sessions with LLM judges, scoring binary True/False criteria across five dimensions: query understanding, answer correctness, chat efficiency, client satisfaction and compliance. Binary scoring proved more consistent and closer to human judgment than 1–10 scales. A debate setup, with parallel customer and support agents feeding a judge, reached near-perfect accuracy on simple criteria and over 90% on Instacart-specific contextual ones. Reasoning in free-form text (e.g. o1-preview) and converting to JSON in a separate step avoided quality loss from constrained decoding. Repeated human-vs-LACE alignment rounds refined the criteria, while subjective measures like conciseness are kept only as directional checks.

The quest for software engineering knowledge.

Look:
Layout: