Problem
Shopify fine-tuned an open-source model for Sidekick, its merchant assistant, to turn plain-English segment descriptions into queries in Shopify's segmentation syntax. The training data was tens of thousands of de-identified production queries, all successful, so it held no refusals. Asked for something impossible, the model returned a query that matched zero customers. Merchants read this as "no one matches" instead of "this cannot be done", which led to bad targeting. Training metrics did not show it.
Example from the article: asked for "customers who are doctors", the model produced a valid query with an empty result, although Shopify stores no occupation data.
Solution in brief
Use a small human-annotated dataset as a seed. Calibrate four frontier LLM judges on it and run them over the whole training corpus. A label changes only when all four agree on both the verdict and the reasoning. Disagreements are dropped, trading coverage for precision. The refreshed corpus feeds fine-tuning, and production traffic of the new model feeds the next round.
Questions this case answers
- How to add negative examples (correct refusals) to a training corpus that, by construction, contains only successful outcomes, when manual annotation of the full corpus is too expensive
- How to resolve contradictory labels between a small trusted dataset and a large noisy one without annotating everything by hand
- How to teach a fine-tuned LLM to refuse impossible requests when production logs contain only successful examples?
- How to reconcile conflicting labels when a small human-annotated set is merged with a large production corpus?
Tools and methods
- LLM judge ensemble (four frontier models) — label queries independently; unanimity gate decides what enters training
- Few-shot calibration on seed data — anchors each judge to what human annotators flagged as impossible
- Toloka annotation — human-labeled seed set
- Four-category taxonomy — mutually exclusive classes for query outcomes
- Data flywheel — judged production traffic returns to the training corpus each cycle
Google or a one-time email code. No password.