
ByteByteGo · 13 min readBuilding with LLMs
How Instacart Uses LLMs to Make People Buy More
Instacart enhanced its product search by applying LLMs to query understanding, using context engineering, retrieval‑augmented generation, and post‑processing guardrails. The approach combines catalog hierarchy, candidate re‑ranking, and embedding checks to handle ambiguous and long‑tail queries, improving consistency and reducing maintenance.
- RAG prompts supply catalog data and patterns to LLMs for each query
- Post‑processing guardrails validate LLM outputs against business catalog via embeddings
- Fine‑tuned smaller models and re‑ranking reduce reliance on multiple separate classifiers