Teaching Refusal Behavior Through Automated Data Curation with LLM Judge Consensus

shopify · E-commerce · 2026 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Merchant-facing AI assistant refusal behavior

Shopify Sidekick's customer segmentation skill was trained on successful production queries, so it did not know when to refuse impossible requests and instead produced hallucinated or zero-result segment queries.

Constraints:

Architecture

Shopify built an automated data-curation pipeline for refusal training. A seed set of 600+ human-annotated refusal examples calibrated an ensemble of four frontier LLM judges, strict consensus and a mutually exclusive taxonomy reconciled production logs with refusal labels, and the curated dataset fine-tuned the segmentation skill.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  outer_planner["Outer planner"] --> customer_segmentation_skill["Customer segmentation skill"]
  production_query_logs["Production query logs"] --> llm_judge_ensemble["LLM judge ensemble"]
  human_refusal_seed_dataset["Human refusal seed dataset"] --> llm_judge_ensemble
  llm_judge_ensemble --> consensus_filter["Consensus filter"]
  consensus_filter --> conflict_resolver["Conflict resolver"]
  production_query_logs --> conflict_resolver
  conflict_resolver --> curated_refusal_training_data["Curated refusal training data"]
  curated_refusal_training_data --> customer_segmentation_skill
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Outer planner Interprets merchant intent and routes work to specialized Sidekick skills. Customer segmentation skill
Customer segmentation skill Translates plain-English merchant requests into Shopify query syntax and learns refusal behavior. Outer planner, Curated refusal training data
Production query logs Successful segmentation queries and production traffic used as data sources. LLM judge ensemble, Conflict resolver
Human refusal seed dataset Toloka-created seed labels used to calibrate automated judges. LLM judge ensemble
LLM judge ensemble Four frontier LLM judges that classify queries into refusal categories. Human refusal seed dataset, Production query logs, Consensus filter
Consensus filter Keeps high-confidence labels when judges agree under a mutually exclusive taxonomy. LLM judge ensemble, Conflict resolver
Conflict resolver Resolves contradictions between production-success labels and refusal annotations. Production query logs, Consensus filter, Curated refusal training data
Curated refusal training data Fine-tuning dataset used to teach the segmentation skill when to refuse. Customer segmentation skill

Data flow

Production customer-segmentation queries and human refusal seed labels enter the curation engine. Four frontier LLM judges classify each query into mutually exclusive categories, strict consensus filters labels, conflicts with production logs are resolved, and the resulting training set fine-tunes the Sidekick segmentation skill.

4 supporting quotes
“Sidekick operates as Shopify's merchant-facing AI assistant with a two-layer architecture: an outer planner that interprets merchant intent and specialized skill models”summary, stated
“To solve this, Shopify built an automated data curation pipeline using an ensemble of four frontier LLMs as judges”summary, stated
“calibrated on a small seed dataset of 600+ human-annotated refusal examples.”summary, stated
“Through strict consensus requirements and a mutually exclusive taxonomy, they curated training data that reso”summary, stated

Why this architecture

Shopify needed automated curation because successful production logs could not teach refusal, while naively merging refusal labels caused conflicts; consensus judging traded coverage for label quality.

3 supporting quotes
“The core problem emerged from the nature of production training data itself.”summary, stated
“training data derived exclusively from successful queries cannot teach models appropriate refusal behavior.”summary, stated
“The consensus requirement trades coverage for quality—better to miss valid refusals than to mislabel legitimate merchant requests”summary, stated

Models used: Sidekick segmentation skill model · Four frontier LLM judges

Scale

Alternatives considered (roads not taken)

Train only on successful production queries

Rejected because: That corpus could not teach the skill to refuse impossible requests.

“trained exclusively on successful production queries, couldn't recognize when to refuse impossible requests”summary, stated

Naively merge the refusal seed set with production data

Rejected because: It created label conflicts and failed to deliver meaningful improvements.

“This naive merging approach failed to deliver meaningful improvements. The fundamental issue was label conflict.”summary, stated

Scale manual annotation directly

Rejected because: Shopify used frontier LLM judges instead of manual scaling, with the human set as calibration seed.

“Rather than scaling manual annotation, Shopify transformed the small Toloka dataset into a seed for an automated curation engine.”summary, stated

Patterns

eval-driven-development (data quality)

Frontier LLM judges and evaluation scores guided refusal-data curation and model improvement.

“To solve this, Shopify built an automated data curation pipeline using an ensemble of four frontier LLMs as judges, calibrated on a small seed dataset of 600+ human-annotated refusal examples.”summary, stated

safety-policy-enforcement (refusal behavior)

The model learned when to refuse requests that the segmentation skill could not satisfy.

“teaching specialized skill models when to refuse requests rather than hallucinating responses.”summary, stated

human-in-the-loop-gate (annotation)

Human refusal annotations seeded and calibrated the automated judge process.

“calibrated on a small seed dataset of 600+ human-annotated refusal examples.”summary, stated

Tradeoffs

Use strict LLM-judge consensus.

Chose High-precision consensus labels over Higher-coverage but noisier labels.

Rationale: False positive refusals would damage legitimate merchant workflows.

“The consensus requirement trades coverage for quality—better to miss valid refusals than to mislabel legitimate merchant requests”summary, stated

Use automated judge curation instead of scaling human labels directly.

Chose Four-frontier-LLM judge ensemble over Manual annotation at full scale.

Rationale: The human dataset became a seed for a reusable curation flywheel over production traffic.

“establishing a continuous improvement flywheel that turns production traffic into progressively better training data.”summary, stated

Gotchas (what bit them)

Production success logs can erase refusal behavior.

Root cause: The corpus contains examples of solvable requests, not impossible ones.

Resolution: Curate explicit refusal examples and reconcile them with production labels.

“training data derived exclusively from successful queries cannot teach models appropriate refusal behavior.”summary, stated

Adding refusal data naively creates contradictory labels.

Root cause: Semantically similar queries can receive both success and refusal signals without reconciliation.

Resolution: Use a mutually exclusive taxonomy and strict judge consensus to resolve conflicts.

“The same query (or semantically similar variants) appeared in both datasets with contradictory labels—flagged as successful in production logs but annotated as requiring refusal in the Toloka data.”summary, stated

False positive refusals are more damaging than missed refusals for common merchant workflows.

Root cause: A legitimate merchant request mislabeled as impossible blocks useful behavior.

Resolution: Prefer strict consensus and accept lower coverage in exchange for high precision.

“better to miss valid refusals than to mislabel legitimate merchant requests and degrade the model's ability to handle common cases.”summary, stated

Evaluation

Shopify measured segmentation evaluation score, refusal accuracy, false-positive rate, and label consistency after curation.

Metrics: 0.619 to 0.798 segmentation evaluation score. · 28.9% relative gain. · 86.3% refusal accuracy. · 4.6% false-positive rate. · 600+ human-annotated refusal seed examples.

“improved segmentation evaluation scores from 0.619 to 0.798 (28.9% relative gain), achieved 86.3% refusal accuracy with only 4.6% false positives”summary, stated

Outcomes

The case reports 600+ human refusal examples, four frontier LLM judges, and production traffic as ongoing training signal.

“established a continuous data flywheel where each production deployment generates new training signal for the next iteration.”summary, stated