Search architecture revamp

Lipeng Zhang17 May 2022

Problem

Grab's food and grocery search could only match query text against an inverted index and sort the matches by hard-coded weights. It ignored what the user wanted, and when and where they searched. Ads and organic results from different verticals were merged in the API layer, after the recall stage, so ranking could not use recall data. Every new search use case meant rebuilding much of the flow.

Example from the article: for the query "Roti Prata" the legacy system listed every entity whose name partly matched and always put merchant-name matches first, even when the user wanted the dish.

Solution in brief

The Deliveries search team split the flow into three layers: boosting (intent recognition and query expansion), multi-recall (lexical, embedding-based, ads and other verticals fetched side by side) and one ranker over all candidates. The platform owns this flow, and service teams plug in recall and boosting modules through configuration.

Questions this case answers
  • How to rank results from several sources with different semantics in one list without losing recall-stage signals
  • How to extend a single-method retrieval system with intent recognition and extra recall methods without rewriting it for each new use case
  • How to make search results follow the user's intent instead of hard-coded text-match weights?
  • How to rank ads together with organic results from several business verticals in one list?

Tools and methods

  • Boosting layer — intent recognition and query expansion before retrieval
  • Multi-recall — several recall methods (lexical, semantic embedding, ads, other verticals) run in parallel
  • Unified ranker — ranks all recalled candidates together, ads included
  • Plugin framework — platform-owned main flow, plugins assembled by configuration
  • Elasticsearch — lexical recall over the inverted index
Continue reading — it's free

Google or a one-time email code. No password.