sagelearnai

Case: Semantic Product Search for 5 Million Products

Prompt: "Our e-commerce search fails on queries like 'something to keep my tea hot at office' or 'red kurta for wedding under 2000'. Design a better search for our 5 million products, with results in under 200 ms."

This case flips the usual AI design: the latency budget is so tight that the LLM can't sit on the request path. The art is moving AI work offline or into cached steps, and combining semantic relevance with ranking signals that drive sales.

In this lesson

  • Learning objectives
  • Clarify
  • Architecture
  • Where the LLM goes (and doesn't)
  • Retrieval and ranking
  • Latency budget
  • Evaluation
  • Failure modes
  • Self-check

Questions covered

  1. Design semantic search for a 5M-product catalogue with p95 < 200 ms.

This lesson is part of AI Architect: System Design & AI Integration. Unlock the full course to read it, take the quiz and track your progress.

See plans →

Last reviewed 2026-11-05.