Optimizing Relevance When Sorting by Price in Market

Ilya Gorshkov24 May 2025

Problem

Yandex Market users often re-sort search results by price. In 90% of those cases they choose ascending price, and sorting accounts for about 10% of orders and add-to-carts. Under sorting the only control left is the filter, because the price order cannot be broken afterwards. A constant score threshold separates relevant from irrelevant items badly: a high threshold cuts relevant items and lowers orders, a low one lets cheap accessories fill the top. Offline nDCG under sorting was about half of that of the default results.

Example from the article: for the query "Garmin watch", the default results start with watches, while after sorting by ascending price the top shows cords and straps.

Solution in brief

Add a second, dynamic filtering stage after the constant threshold. Calibrate filter scores to probabilities, discount them by price position, and pick the subset of price-sorted documents that maximizes DCG with dynamic programming. Also train the sorting model on a large pool labeled by an LLM instead of crowd annotators.

Questions this case answers
  • How to keep a ranked result list relevant when the user imposes a fixed attribute order that cannot be changed afterwards, so that filtering is the only lever
  • How to choose the subset of candidates to show that maximizes expected discounted gain when raw relevance scores are uncalibrated and low-attribute items are systematically under-scored
  • How to keep search results relevant when the user sorts them by price
  • How to filter irrelevant documents without losing recall of cheap relevant items

Tools and methods

  • Dynamic filtering — picks the DCG-maximizing subset of the price-sorted candidates.
  • Dynamic programming — finds that subset without enumerating all 2N options.
  • Sigmoid calibration — turns the raw filter score into a probability-like relevance value.
  • Price-position discount with α — protects cheap relevant items.
  • YandexGPT labeling — replaces Toloka annotators for the training pool.
Continue reading — it's free

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