WhoBuilt

Transforming search and discovery using LLMs

Jul 16, 2025· 21 min· 5.1K views·Watch on YouTube

Speakers

Instacart search and machine learning team members Tejaswi and Vinesh explain how they use LLMs to improve grocery search understanding and product discovery at AI Engineer.

Why grocery search needs discovery

Most grocery orders come through search, and many are repeat purchases. Search must help customers quickly find known items while also surfacing new products that can increase discovery and basket size. Broad queries such as “snacks” create a cold-start problem, while rare, specific queries such as “unsweetened plant-based yogurt” lack engagement data for precise ranking.

Using user context to improve query understanding

Tejaswi describes using LLMs for query-to-category classification across a taxonomy with about 10,000 labels. Direct LLM predictions did poorly in an A/B test because they missed Instacart-specific intent: people searching for “protein” often want shakes or bars, not chicken or tofu. Adding top converting categories as context improved tail-query precision by 18 percentage points and recall by 70 percentage points. LLM-generated query rewrites also reduced searches with no results; head and torso outputs were batch-computed and cached to limit latency.

Generating discovery content from search intent

Vinesh explains how LLMs generate substitutes and complementary items for search results, such as alternative fish for “swordfish” or cooking ingredients and drinks for “sushi.” Initial generations sounded reasonable but did not match user behavior, so Tejaswi describes adding converting categories, query annotations, and users’ subsequent searches as context. The team generated content from historical search logs in batches and served it through a feature store, reporting improved engagement and revenue.

Serving and evaluating LLM output

The team identified three challenges: aligning generated content with business metrics, ranking it effectively, and checking that it was relevant and not fabricated. Traditional click and conversion ranking models did not work well, so they tried diversity-based ranking. Tejaswi says evaluation was more difficult than expected and that an LLM judge became an important part of assessing both content and query predictions.

Lessons from natural-language search

In response to a question about long natural-language queries, Tejaswi describes Ask Instacart, which maps requests such as healthy foods for a young child into search intents for the usual retrieval and ranking stack. The team learned to pass Instacart context into the model, evaluate results with an automated pipeline, and carry context into downstream systems. For example, a Mother’s Day request for perfumes should preserve the intended women’s category.

Takeaways

  • Use LLM world knowledge to extend query coverage where engagement data is sparse, and ground predictions in real user behavior.
  • Feed domain signals such as converting categories and follow-up searches into prompts to align outputs with customer intent.
  • Batch-generate and cache common query outputs when live LLM calls would add latency or cost.
  • Evaluate relevance and business outcomes directly; fluent, plausible generations may not match what users want.
  • Preserve intent context through downstream retrieval and ranking, especially for natural-language requests.

Mentioned in this talk

Search inside this talk

What was claimed 4

Related talks