Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Etsy Code as Craft 6 min read Case study mediumAdept

Building Etsy Buyer Profiles with LLMs

Etsy is experimenting with LLM-generated buyer profiles that infer each shopper's style, category interests and current shopping missions from recent searches, views, purchases and favorites, emitting structured output with confidence scores and an explanation. Scaling to roughly 90M buyers meant moving listing data from APIs to clustered and partitioned BigQuery tables, cutting input history from 2 years to 9 months, batching and parallelizing with managed concurrency, switching to a smaller model, and staggering Airflow batches by user_id. Together these cut generation time from 21 to 3 days per 10M users and estimated cost by 94% per million users. The profiles feed personalized query rewriting and search refinement pills, with CTR, conversion and pill engagement as success metrics, and collaborative-filtering "inheritance profiles" are being explored for cold-start users.

Related posts

  • Understanding Etsy’s Vast Inventory with LLMs

    Etsy Code as Craft mediumAdept

    Etsy extracts structured product attributes such as color, material and dimensions from unstructured listing titles, descriptions and photos using LLMs. It does this because sellers rarely fill optional attribute fields, and passing raw text and images into search would add too much latency. The pipeline injects per-listing JSON context (listing data, expert-picked few-shot examples, taxonomy rules) into parallel prompts routed through LiteLLM across regions, then validates outputs with Pydantic. Evaluation moved from error-prone human labels to expert-reviewed "silver labels" from frontier LLMs, and each run first scores a ground-truth sample and aborts if precision or recall drift from baseline. In target categories, complete attribute coverage rose from 31% to 91%, and LLM-inferred attributes in search filters raised filter engagement and conversion.

  • How Etsy Uses LLMs to Improve Search Relevance

    Etsy Code as Craft mediumAdept

    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. Human-labeled golden data validates an o3-based few-shot chain-of-thought annotator with self-consistency sampling. That annotator generates training data for a cascaded distillation stack: a fine-tuned Qwen 3 VL 4B teacher for daily offline evaluation and A/B monitoring via vLLM, and a BERT two-tower student that adds under 10ms in real-time search. The student filters irrelevant results, supplies ranking features and loss weights, and boosts relevant listings, raising fully relevant results from 58% to 62%, though engagement sometimes dips as relevance rises.

  • Shaping Product Understanding with Contrastive Reinforcement Learning

    Etsy Code as Craft hardMaster

    Etsy fine-tunes Qwen3-VL-8B with GRPO to generate natural-language listing summaries that capture distinguishing product details buried in long descriptions, attributes and images. Training uses search triplets (query, engaged listing, non-engaged listing), and the reward is the margin in query similarity between the two listings' summaries as scored by a frozen two-tower search retriever. Scoring the pair jointly discourages reward hacking, because a generic or keyword-stuffed summary cannot raise one listing's similarity while lowering the other's. Human review found the summaries grounded and specific. Feeding them into a separate semantic relevance classifier improved macro F1 by 8.7% relative to description n-grams, and online experiments are planned next.

  • Context engineering case studies: Etsy-specific question answering

    Etsy Code as Craft mediumAdept

    Etsy tested whether prompt engineering over embedding-based retrieval, without fine-tuning, could reliably answer Etsy-specific questions. On a 40-question Travel & Entertainment policy set the LLM answered about 86% correctly; on a 50-question seller-forum set it scored about 72%, with errors doubling on the more heterogeneous, opinionated data. Letting the model admit uncertainty and asking it to explain its answer (chain-of-thought) fixed some hallucinations, but adding a contextual preamble often did not help. Asking the model to cite specific source snippets proved the most useful way to flag potential hallucinations.

  • Shopify’s generative discovery model

    Shopify Engineering hardMaster

    Shopify trained a single generative model, adapted from an open-weight LLM, that emits semantic-ID tokens to generate product candidates for both personalized search and recommendation across a catalog of billions. Products are tokenized with RQ-KMeans into three-token semantic IDs (three 8,192-entry codebooks). Training combines joint continued pretraining, upsampling of first-purchase discovery events, RL with an LLM relevance judge (+1.5 OneDCG@10) and multi-teacher distillation from task experts. For serving, LFM2-2.6B was chosen for its 25.5 ms p95, GPU trie-constrained decoding via STATIC cut constraint overhead from 50 ms to about 1 ms, and multi-token prediction replaces autoregressive decoding. In production the model lifted home-feed orders by 7.95% and search OneDCG@10 by 2.1 points.

The quest for software engineering knowledge.

Look:
Layout: