Skip to content

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

Etsy Code as Craft 11 min read Case study mediumAdept

Context engineering case studies: Etsy-specific question answering

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.

Related posts

  • 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.

  • 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.

  • Beyond the Menu Tree: How Yelp Built a Smarter Customer Success Chatbot with AI

    Yelp Engineering mediumAdept

    Yelp replaced a menu-tree and fixed-phrase customer support chatbot with an LLM system. It routes each query to one of five workflows (QA, Billing, Refund, Cancel, Review), and high-risk intents get templated responses. The QA path retrieves whole Support Center articles, about 370 of them, without chunking. Retrieval runs against a vectorstore built only from article metadata: each title, summary and top header is embedded separately with text-embedding-ada-002, because embedding whole articles diluted the semantic signal and small chunks produced false matches. The roughly 8 MB index is loaded in memory with FAISS, rebuilt daily from S3, and retrieves the top 5 articles with a similarity threshold, reaching about 94% recall@5. Generated answers pass trust-and-safety, link-provenance and length checks to catch hallucinated URLs, and the system doubled the resolution rate in an A/B test.

  • Aligning LLM-as-a-Judge with Human Preferences

    LangChain easyNovice

    LangSmith evaluators now store human corrections to LLM-as-a-Judge scores as few-shot examples, optionally with explanations, and inject them into the judge prompt on later runs so the evaluator aligns with team preferences without manual prompt engineering. LLM judges work because they can see information the generator lacked, such as reference answers, and because judging is easier than generating. Common uses are detecting RAG hallucinations, RAG correctness and toxic outputs, in both online and offline evaluation. The design draws on few-shot learning and Shreya Shankar's Berkeley paper "Who Validates the Validators?".

  • Our Early Journey to Transform Instacart’s Discovery Recommendations with LLMs

    Instacart Tech mediumAdept

    Instacart rebuilt its Shopping Hub discovery recommendations around a top-down, cascaded LLM pipeline. It first generates personalized page themes, then taxonomy-grounded retrieval keywords, then applies quality and diversity filtering, and finally hands off to existing product and pagewise ranking services. Keyword generation uses a teacher-student fine-tuned open-weight model (Llama/Qwen with LoRA ablations). It also uses RAG that prunes a 300,000-term keyword corpus to about 100 nearest neighbors per theme, which cut generation costs 15–20%. Quality is enforced through embedding-based deduplication, LLM-as-a-judge evaluators calibrated with human-in-the-loop data, and a fine-tuned cross encoder for theme-product relevance at scale.

The quest for software engineering knowledge.

Look:
Layout: