How Yandex reinvented search for developers

Alexey Stepanov20 Sep 2022

Problem

A search team sees complaints from its own engineers about poor results for programming queries, while product metrics say quality is on par with competitors. The cause is the measurement: relevance labels are not guaranteed to come from assessors who can judge programming content, so the metric hides the gap. Without a trustworthy metric, nobody can tell whether a ranking change helps this segment.

Example from the article: for the query [C++ find_if] a non-programmer sees the words C++, find and if in a document and marks it as good, although it does not answer the question.

Solution in brief

First fix the metric: collect pairwise comparisons against a competitor from domain experts, then hire and screen programmer-assessors so relevance labels are reliable. Then add a separate domain transformer (CS YATI) used only for programming queries, picked by a cheap distilled classifier, and merge the domain ranker into the main CatBoost so fresh queries keep working.

Questions this case answers
  • How to detect that a relevance metric overstates quality for a niche query segment when the people labeling results lack the domain expertise to judge them
  • How to serve a heavy specialised ranking model on a small slice of traffic under a tight latency budget
  • How to find out that search quality for a narrow user segment is worse than the product metrics say?
  • How to get reliable relevance labels for queries that need domain expertise?

Tools and methods

  • Side-by-side evaluation — shuffled pairs of top-1 documents from two search engines, judged by developers.
  • Relevance labeling — hired and screened programmer-assessors to relabel queries.
  • Supervised fine-tuning — a domain transformer pre-trained on programming texts, then trained on click logs and expert labels.
  • Knowledge distillation — a light DSSM-like network imitates the transformer as a query classifier.
  • Gradient boosting (CatBoost) — the final ranker over query and document factors.
Continue reading — it's free

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