Semantic Relevance Evaluation and Enhancement Framework for E-commerce Search

etsy · E-commerce · 2025 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: E-commerce search relevance evaluation and ranking

Etsy needed search relevance models that reflect buyer intent rather than popularity-biased engagement signals, while still operating at marketplace scale and real-time latency.

Constraints:

Architecture

Etsy built a Semantic Relevance Evaluation and Enhancement Framework with human-curated golden labels, an o3 LLM annotator implemented in LangGraph, a fine-tuned Qwen 3 VL 4B teacher for high-throughput annotation, and a lightweight BERT two-tower student embedded into the search stack for filtering, feature enrichment, loss weighting, and relevance boosting. The teacher runs offline recurring evaluation at scale with vLLM, while the student supports real-time search with under-10ms added latency.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  A["Human golden labels"] --> B["LLM annotator"]
  B --> C["Teacher model training data"]
  C --> D["Teacher model"]
  D --> E["Student model"]
  D --> F["Offline relevance evaluation"]
  F --> G["Search team review"]
  E --> H["Search ranking stack"]
  H --> I["Buyer search results"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Human golden labels Curated relevance judgments and guidelines that define semantic relevance. LLM annotator, Model evaluation
LLM annotator o3-based judge aligned to human labels and used to scale training data. Human golden labels, Teacher model training data
Teacher model training data Large-scale query-listing labels generated from the aligned LLM annotator. LLM annotator, Teacher model
Teacher model Fine-tuned Qwen 3 VL 4B model for high-throughput offline annotation and evaluation. Teacher model training data, Student model, Offline relevance evaluation
Student model Lightweight BERT two-tower model optimized for real-time production inference. Teacher model, Search ranking stack
Offline relevance evaluation Daily teacher-model scoring and metric aggregation for monitoring and A/B decisions. Teacher model, Search team review
Search ranking stack Production search integration points for filtering, features, loss weighting, and boosting. Student model, Buyer search results
Buyer search results Search results optimized for semantic relevance and seller opportunity. Search ranking stack

Data flow

Human admins create golden relevance labels and guidelines. Etsy aligns an o3 LLM annotator to those labels, uses it to generate large-scale training data, fine-tunes a Qwen teacher model, distills that teacher into a BERT student, uses the teacher for daily offline measurement, and deploys the student into real-time ranking through filtering, features, loss weighting, and boosting.

3 supporting quotes
“humans define what good looks like, and LLMs help us scale it. LLMs do not replace human judgment, instead they align with and amplify it.”article, stated
“Our modeling pipeline uses a three-tier cascaded distillation design, where each model balances accuracy and efficiency for a specific purpose.”article, stated
“The lightweight student model is embedded directly into Etsy’s real-time search stack.”article, stated

Why this architecture

Etsy separates the relevance stack into human labels, LLM annotation, teacher modeling, and student inference because each layer solves a different cost-quality-latency problem: humans define relevance, LLMs scale judgments, the teacher supports high-throughput offline evaluation, and the student keeps realtime search fast.

3 supporting quotes
“larger LLMs offer stronger reasoning but are expensive for large-scale inference, while smaller LLMs are faster and cheaper, but less accurate”article, stated
“The LLM annotator aligns best with the golden labels, but is too costly for recurrent, large-scale inference.”article, stated
“The teacher, however, is too slow to surface relevant search results quickly, which is critical for helping our sellers reach potential buyers.”article, stated

Models used: o3 · Qwen 3 VL 4B · BERT-based two-tower model · vLLM

Scale

Alternatives considered (roads not taken)

Rely on engagement signals alone

Rejected because: Engagement metrics can reward popularity even when listings are not the best semantic match.

“These signals are objective, but they can also be biased: popular listings get more clicks, even when they’re not the best match for a specific query.”article, stated

Use human judgments for all query-listing pairs

Rejected because: Full human annotation is too slow and expensive for Etsy-scale search evaluation.

“large-scale human annotation is time-consuming and expensive, rendering it infeasible.”article, stated

Use the LLM annotator directly for recurrent production-scale inference

Rejected because: The LLM annotator is most aligned to golden labels but too costly for recurrent large-scale use.

“The LLM annotator aligns best with the golden labels, but is too costly for recurrent, large-scale inference.”article, stated

Use the teacher model directly in real-time search

Rejected because: The teacher is too slow for realtime search, so Etsy distilled it into a lightweight student.

“The teacher, however, is too slow to surface relevant search results quickly”article, stated

Patterns

llm-as-judge (evaluation)

Etsy uses an o3 LLM annotator to judge semantic relevance after validating it against human golden labels.

“we introduced a few-shot, chain-of-thought (CoT) prompting strategy using the o3 model, implemented in LangGraph.”article, stated
“This model, known as the LLM annotator (as seen in Figure 1), is first validated against the human-labeled golden data”article, stated

model-distillation (model-adaptation)

Etsy distills an expensive LLM annotator into a Qwen teacher and then into a BERT student for real-time search.

“we performed supervised fine-tuning (SFT) with a smaller LLM, Qwen 3 VL 4B, using the training data generated by the LLM annotator.”article, stated
“As such, we further distilled the teacher into a student model with a two-tower architecture. The distillation process aligns the student’s output with that of the teacher, so that the student judges relevance labels nearly as accurately as the teacher, while being lightweight and fast.”article, stated

eval-driven-development (evaluation)

Teacher-model semantic relevance metrics are reviewed in monitoring and A/B-test rollout decisions.

“These metrics are reviewed regularly by our team, and if we observe unexpected trends like a sudden decline of relevance”article, stated
“The computed relevance metrics are discussed when we decide whether to roll out a new change to our search system”article, stated

human-in-the-loop-gate (governance)

Human-curated golden labels and ongoing admin review anchor the LLM relevance stack.

“Each query-listing pair is labeled by two Etsy admins, with an ongoing review process to both break ties and adjust labeling guidelines accordingly.”article, stated

Tradeoffs

Use LLM annotation after human alignment.

Chose human labels plus scalable LLM judgments over human labels for every query-listing pair.

Rationale: Humans define the target, but LLMs make large-scale annotation feasible.

“In other words, humans define what good looks like, and LLMs help us scale it. LLMs do not replace human judgment, instead they align with and amplify it.”article, stated

Distill to a student model for serving.

Chose BERT-based two-tower student over teacher model in realtime search.

Rationale: The student sacrifices some model complexity to preserve real-time latency.

“The distillation process aligns the student’s output with that of the teacher, so that the student judges relevance labels nearly as accurately as the teacher”article, stated

Combine semantic relevance with engagement optimization.

Chose semantic filtering/features/boosting in the search stack over replacing production ranking with semantic labels alone.

Rationale: The framework improves relevance through multiple integration points while search remains influenced by multiple factors.

“The lightweight student model is embedded directly into Etsy’s real-time search stack. It improves relevance through several integration points:”article, stated
“While search results are influenced by multiple factors, and outcomes may vary, on the seller side, improving semantic relevance can also help surface items from small or new sellers who may not yet have the visibility of more established shops.”article, stated

Gotchas (what bit them)

Engagement labels create popularity bias.

Root cause: Search models trained on clicks and purchases reward items that already have visibility.

Resolution: Add semantic relevance labels and models that directly judge query-listing intent match.

“These signals are objective, but they can also be biased: popular listings get more clicks, even when they’re not the best match for a specific query.”article, stated

Off-the-shelf LLM judges may not match Etsy's marketplace semantics.

Root cause: Etsy's user vocabulary and preferences create domain shift from generic LLM knowledge.

Resolution: Align the LLM annotator with human-curated golden labels and evolving relevance guidelines.

“1. Domain shift: off-the-shelf LLMs may not capture the unique preferences and vocabulary of Etsy users”article, stated

The most accurate model is not the production-serving model.

Root cause: The LLM annotator and teacher are too expensive or slow for recurrent production inference.

Resolution: Use cascaded distillation down to a lightweight realtime student.

“Our modeling pipeline uses a three-tier cascaded distillation design, where each model balances accuracy and efficiency for a specific purpose. The stack includes:”article, stated

Relevance definitions drift with cultural context.

Root cause: The same query can mean different things over time, such as face masks before and after 2020.

Resolution: Maintain evolving relevance guidelines informed by research and annotation feedback.

“What relevance means in our marketplace shifts over time and social context. For example, people searching for “face masks” pre-2020 were primarily looking for masks for costumes or fashion, which is a completely different intent from protective masks post-2020.”article, stated

Evaluation

Etsy evaluates semantic relevance with human golden labels, Macro F1 and class F1 against golden data, daily teacher-model offline inference, row-level disagreement rates, and A/B-test relevance metrics considered before search rollouts.

Metrics: multi-class Macro F1 · individual class F1 · row-level disagreement rate · percentage of fully relevant listings · A/B-test semantic relevance metrics · additional latency

3 supporting quotes
“All three models – the LLM annotator, teacher, and student – are evaluated against the same golden dataset to ensure traceable performance and consistent alignment with human judgment.”article, stated
“Figure 3 shows their accuracy measured using multi-class Macro F1, and individual class F1 scores.”article, stated
“For quality control, we continuously track metrics such as row-level disagreement rates, which measures how often multiple annotators disagree with each other for the same query-listing pair.”article, stated

Outcomes

Etsy reports millions of query-listing pairs processed daily for offline relevance evaluation and a realtime student model with less than 10ms added latency.

3 supporting quotes
“The Semantic Relevance Evaluation and Enhancement Framework is fully deployed in Etsy’s search stack, and continues to evolve.”article, stated
“the percentage of fully relevant listings (as defined by the relevance categories described earlier) has increased from 58% to 62%”article, stated
“By complementing engagement metrics with semantic relevance, we address real customer pain points and deliver more satisfying search experiences.”article, stated