Semantic Search for Organizations

Andrey Danilchenko, Nikita Kiselev27 May 2023

Problem

Yandex Maps gets complex discovery queries: the user is choosing a place and wants a property, not a category ("wood-fired banya", "hotel with a beautiful bathroom"). The property often sits in reviews or photos, not in the organization card, because owners leave attributes empty or no owner exists. A comparison with a competitor showed too few good places in Yandex results: recall was too low. Even found places did not show why they matched, so users had to open the card.

Example from the article: for "wood-fired banya", a banya whose card just says "banya" but whose reviews mention a wood-fired steam room was missed by the attribute-based search.

Solution in brief

The fix targets recall at each stage of the retrieval, ranking and post-filter pipeline. A heavy offline relevance classifier supplies labels for the CatBoost ranker. A two-tower retrieval branch with a city-sharded HNSW index is blended in. The snippet then shows the photo, review quote and price that best match the query.

Questions this case answers
  • How to find entities whose key attribute is missing from structured records but present in unstructured text and photos, for complex natural-language queries
  • How to add neural retrieval with an approximate nearest-neighbour index to a search system built on inverted indexes, and get more ranking labels from a fixed labeling budget
  • How to find places for complex discovery queries such as 'hotel with a beautiful bathroom' when the business card lacks the attribute
  • How to add neural retrieval (two-tower plus ANN index) to a search system built on inverted indexes

Tools and methods

  • Offline relevance classifier (CatBoost) — picks candidates for labeling and generates extra labels.
  • Two-tower retrieval, HNSW index — query and organization towers, index sharded by city.
  • Hard negative mining, MSE loss — training tricks for the towers.
  • DSSM on photo embeddings — picks the photo that matches the query.
  • Review clustering and quote selectors — choose the quote to show.
Continue reading — it's free

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