---
title: "Our Early Journey to Transform Instacart’s Discovery Recommendations with LLMs"
description: "Instacart rebuilt its Shopping Hub discovery recommendations around a top-down, cascaded LLM pipeline."
url: "https://swe.quest/articles/our-early-journey-to-transform-instacart-s-discovery-recommendations-with-llms-2b1f0ff7e32d37b4"
canonical: "https://tech.instacart.com/our-early-journey-to-transform-instacarts-discovery-recommendations-with-llms-cf4591a8602b"
source: "Instacart Tech"
published: "2026-02-26"
difficulty: "medium"
kind: "Case study"
reading_minutes: 14
tags: ["recommendation-systems","llms","rag","evals","ecommerce"]
---

# Our Early Journey to Transform Instacart’s Discovery Recommendations with LLMs

A post on [Instacart Tech](https://swe.quest/sources/instacart.md), published 2026-02-26, 14 min read, Case study. Original: [https://tech.instacart.com/our-early-journey-to-transform-instacarts-discovery-recommendations-with-llms-cf4591a8602b](https://tech.instacart.com/our-early-journey-to-transform-instacarts-discovery-recommendations-with-llms-cf4591a8602b)

## Summary

Instacart rebuilt its Shopping Hub discovery recommendations around a top-down, cascaded LLM pipeline. It first generates personalized page themes, then taxonomy-grounded retrieval keywords, then applies quality and diversity filtering, and finally hands off to existing product and pagewise ranking services. Keyword generation uses a teacher-student fine-tuned open-weight model (Llama/Qwen with LoRA ablations). It also uses RAG that prunes a 300,000-term keyword corpus to about 100 nearest neighbors per theme, which cut generation costs 15–20%. Quality is enforced through embedding-based deduplication, LLM-as-a-judge evaluators calibrated with human-in-the-loop data, and a fine-tuned cross encoder for theme-product relevance at scale.

Written by swe.quest, not by the author.

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

## Topics

- [Recommendations & ranking](https://swe.quest/tags/recommendation-systems.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)

## Prerequisites

- recommendation system basics
- LLM fine-tuning ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- embeddings and similarity search ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))

## Keywords

Instacart, LoRA, Llama, Qwen, LLM-as-a-judge, cross encoder, teacher-student distillation

## Related posts

- [How Etsy Uses LLMs to Improve Search Relevance](https://swe.quest/articles/how-etsy-uses-llms-to-improve-search-relevance-3911d99788b5bd04.md): Etsy Code as Craft · 2026-01-16 · Medium · 10 min read · Search, LLMs, Evaluation, Model training, E-commerce
  Etsy built an LLM-powered semantic relevance framework that complements engagement signals, which favor popular listings, with judgments of how well listings match query intent across three classes: relevant, partially relevant and irrelevant.
- [Shopify’s generative discovery model](https://swe.quest/articles/shopify-s-generative-discovery-model-99e5ac502d9a8c68.md): Shopify Engineering · 2026-11-11 · Hard · 12 min read · Recommendations & ranking, Search, LLMs, Inference & serving, Model training
  Shopify trained a single generative model, adapted from an open-weight LLM, that emits semantic-ID tokens to generate product candidates for both personalized search and recommendation across a catalog of billions.
- [From Scoring to Spelling: Rebuilding Ads Retrieval at Instacart](https://swe.quest/articles/from-scoring-to-spelling-rebuilding-ads-retrieval-at-instacart-1eba18ee15c15a7e.md): Instacart Tech · 2026-06-02 · Hard · 13 min read · Recommendations & ranking, Ads, Inference & serving, ML platforms
  Instacart replaced its BERT-based ads retrieval model, which scored every atomic product ID in a fixed vocabulary, with a generative model that autoregressively decodes Semantic IDs (RQ-VAE codeword sequences) via beam search.
- [From Activity to Intent: Generating User Journeys with LLMs](https://swe.quest/articles/from-activity-to-intent-generating-user-journeys-with-llms-0ff3c950d1bbfa2d.md): Pinterest Engineering · 2026-10-09 · Medium · 15 min read · Recommendations & ranking, LLMs, Inference & serving, Model training, Evaluation
  Pinterest replaced a multi-stage keyword-clustering pipeline for inferring user "journeys" (long-horizon goals like a kitchen remodel) with a single fine-tuned 4B Qwen3 model.
- [Bypassing inference bottlenecks: Accelerating complex AI search with Retrieve-for-Train](https://swe.quest/articles/bypassing-inference-bottlenecks-accelerating-complex-ai-search-with-retrieve-95676e43f1ce9cc3.md): Google Research · 2026-09-15 · Hard · 8 min read · Search, Model training, Inference & serving, LLMs, Recommendations & ranking
  Retrieve-for-Train replaces expensive inference-time LLM reasoning for query fan-out with a one-time offline RL stage.

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)
