---
title: "Building Smarter Search Products: 3 Steps for Evaluating Search Algorithms"
description: "Shopify's Help Center search team evaluates new ranking algorithms in three steps: collect ground truth from Kafka interaction events and expert-annotated relevance ratings, score variants offline with MAP and NDCG over thousands of historical queries, then run online A/B tests on metrics like click-through rate, average clicked rank, abandonment and support deflection."
url: "https://swe.quest/articles/building-smarter-search-products-3-steps-for-evaluating-search-algorithms-f267f58da4febc3b"
canonical: "https://shopify.engineering/evaluating-search-algorithms"
source: "Shopify Engineering"
published: "2021-04-01"
difficulty: "medium"
kind: "Case study"
reading_minutes: 12
tags: ["search","evals","data-pipelines","messaging"]
---

# Building Smarter Search Products: 3 Steps for Evaluating Search Algorithms

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2021-04-01, 12 min read, Case study. Original: [https://shopify.engineering/evaluating-search-algorithms](https://shopify.engineering/evaluating-search-algorithms)

## Summary

Shopify's Help Center search team evaluates new ranking algorithms in three steps: collect ground truth from Kafka interaction events and expert-annotated relevance ratings, score variants offline with MAP and NDCG over thousands of historical queries, then run online A/B tests on metrics like click-through rate, average clicked rank, abandonment and support deflection. Applied to a new Query-specific Pagerank, which boosts results frequently clicked for similar past queries, the framework showed slightly better offline scores. In the A/B test, users clicked more, picked higher-ranked results and ran fewer follow-up searches, so it replaced the view-count-based Vanilla Pagerank. Annotated datasets should be refreshed regularly because document sets go stale.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Search](https://swe.quest/tags/search.md) (Backend & APIs)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Queues & messaging](https://swe.quest/tags/messaging.md) (Backend & APIs)

## Prerequisites

- search ranking basics ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))
- A/B testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))

## Keywords

Kafka, NDCG, Mean Average Precision, Query-specific Pagerank, Shopify Help Center

## Related posts

- [Modernizing the Facebook Groups Search to Unlock the Power of Community Knowledge](https://swe.quest/articles/modernizing-the-facebook-groups-search-to-unlock-the-power-of-community-62d16e6ecf9f895a.md): Meta Engineering · 2026-04-21 · Medium · 5 min read · Search, Vector search, Recommendations & ranking, Evaluation, LLMs
  Facebook Groups scoped search moved from keyword-only retrieval to a hybrid design that runs lexical and semantic retrieval in parallel.
- [ML based ranking using Nrtsearch](https://swe.quest/articles/ml-based-ranking-using-nrtsearch-7c7a1334adf546d5.md): Yelp Engineering · 2026-09-16 · Medium · 8 min read · Search, ML platforms, Inference & serving, Recommendations & ranking, Deployment
  Yelp moved ML-based ranking out of a standalone scoring service and into Nrtsearch, its Lucene-based search engine, via an Inference Plugin that extracts features from indexed documents and request parameters and scores them in-process on replica nodes.
- [How Etsy Uses LLMs to Improve Search Relevance](https://swe.quest/articles/how-etsy-uses-llms-to-improve-search-relevance-3911d99788b5bd04.md): Etsy Code as Craft · 2026-01-16 · Medium · 10 min read · Search, LLMs, Evaluation, Model training, E-commerce
  Etsy built an LLM-powered semantic relevance framework that complements engagement signals, which favor popular listings, with judgments of how well listings match query intent across three classes: relevant, partially relevant and irrelevant.
- [Search Quality Assurance with AI as a Judge](https://swe.quest/articles/search-quality-assurance-with-ai-as-a-judge-64fdd8c596751052.md): Zalando Engineering · 2026-03-16 · Medium · 12 min read · Search, Evaluation, LLMs, Data pipelines, E-commerce
  Zalando validated search quality for new markets (Luxembourg, Portugal, Greece) before launch by using a multimodal LLM-as-a-judge instead of manual expert review.
- [Engineering stories behind the Medium Daily Digest Algorithm: Part 2](https://swe.quest/articles/engineering-stories-behind-the-medium-daily-digest-algorithm-part-2-d64641974e16e6ff.md): Medium Engineering · 2025-08-28 · Medium · 17 min read · Recommendations & ranking, Data structures, Cost optimization, Databases
  Medium replaced the Bloom filters behind its recommendation filters (muted writers, already-read, presented 3+ times) with per-user DynamoDB queries against the source-of-truth tables, cutting filtering cost roughly 10x and simplifying maintenance.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
