---
title: "Shaping Product Understanding with Contrastive Reinforcement Learning"
description: "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."
url: "https://swe.quest/articles/shaping-product-understanding-with-contrastive-reinforcement-learning-dd8440354bbdc8d2"
canonical: "https://www.etsy.com/codeascraft/shaping-product-understanding-with-contrastive-reinforcement-learning"
source: "Etsy Code as Craft"
published: "2026-05-26"
difficulty: "hard"
kind: "Case study"
reading_minutes: 9
tags: ["model-training","llms","search","recommendation-systems","ecommerce"]
---

# Shaping Product Understanding with Contrastive Reinforcement Learning

A post on [Etsy Code as Craft](https://swe.quest/sources/etsy.md), published 2026-05-26, 9 min read, Case study. Original: [https://www.etsy.com/codeascraft/shaping-product-understanding-with-contrastive-reinforcement-learning](https://www.etsy.com/codeascraft/shaping-product-understanding-with-contrastive-reinforcement-learning)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Search](https://swe.quest/tags/search.md) (Backend & APIs)
- [Recommendations & ranking](https://swe.quest/tags/recommendation-systems.md) (AI & ML)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)

## Prerequisites

- reinforcement learning fine-tuning of LLMs ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- contrastive learning
- two-tower dense retrieval

## Keywords

Qwen3-VL-8B, GRPO, Etsy, two-tower retriever, contrastive learning

## Related posts

- [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.
- [Understanding Etsy’s Vast Inventory with LLMs](https://swe.quest/articles/understanding-etsy-s-vast-inventory-with-llms-1fa28367e98029f1.md): Etsy Code as Craft · 2025-10-13 · Medium · 7 min read · LLMs, Evaluation, E-commerce, Search, Data pipelines
  Etsy extracts structured product attributes such as color, material and dimensions from unstructured listing titles, descriptions and photos using LLMs.
- [Paper Announcement: Leveraging Multimodal LLMs for Large-Scale Product Retrieval Evaluation](https://swe.quest/articles/paper-announcement-leveraging-multimodal-llms-for-large-scale-product-retrieval-f5a6b4c43b715b31.md): Zalando Engineering · 2024-11-14 · Medium · 8 min read · Evaluation, Search, LLMs, E-commerce
  Zalando uses multimodal LLMs to judge query-product relevance for search evaluation and reaches agreement comparable to human annotators on 20,000 multilingual (English and German) examples.
- [Leveraging multimodal LLMs for Shopify’s global catalogue: Recap of expo talk at ICLR 2025](https://swe.quest/articles/leveraging-multimodal-llms-for-shopify-s-global-catalogue-recap-of-expo-talk-at-5a595806db6311fb.md): Shopify Engineering · 2025-07-16 · Medium · 11 min read · LLMs, E-commerce, Model training, Inference & serving, Evaluation
  Shopify's Global Catalogue uses fine-tuned open-source vision LLMs (LLaVA 1.5 7B, then LLaMA 3.2 11B, now Qwen2VL 7B) to classify, extract attributes from, standardize and match billions of merchant product listings.
- [Automated merchant review summary system with integrated feedback](https://swe.quest/articles/automated-merchant-review-summary-system-with-integrated-feedback-48cd43919529123c.md): Grab Engineering · 2026-09-25 · Easy · 4 min read · LLMs, System design, Evaluation
  Grab generates consumer-facing merchant review summaries with a pipeline that stratifies review samples by a sentiment-scored rating distribution, uses an LLM to produce overall and topic-based summaries (taste, packaging, portion size), and has a separate LLM check each claim against the sampled reviews before publication.

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)
