BlogsInstacartSemantic IDs for Product Understanding

Semantic IDs for Product Understanding

Semantic IDs for Product Understanding

2
posts
2026

Introduced Semantic IDs (SIDs), a system for compressing product embeddings into discrete codes using an RQ-VAE. This system addresses challenges in managing large grocery catalogs, including cold start problems for new products, improving tail category coverage, and enhancing catalog quality by enabling cross-category product relationships. The new ads retrieval system leverages SIDs, moving from a scoring-based approach to a generative model that spells out product recommendations token by token, enabling a new level of contextual matching and discovery. This generative approach uses a new 'Context Template' training corpus, enriching sessions with context tokens beyond just product IDs.

2026

From Scoring to Spelling: Rebuilding Ads Retrieval at Instacart

6/3/2026

This post details the evolution of Instacart's ads retrieval system, moving from a BERT-based scoring model (Contextual Recommendations) to a generative model. The core technical innovation is the adoption of Instacart Semantic IDs (SIDs) as a new product vocabulary, replacing atomic product IDs. SIDs, generated by an RQ-VAE, compress product representations, provide coverage for new products, enable better generalization, and significantly reduce the model's embedding parameter space. The post also introduces a new training corpus format, the 'Context Template,' which enriches sessions with additional context tokens to improve the generative model's ability to understand user intent and recommend relevant products, especially for ads.

Semantic IDs: Product Understanding at Scale

6/2/2026

Developed and implemented Semantic IDs by adapting RQ-VAE with a contrastive loss function that utilizes the hierarchical structure of the product catalog for supervision. This involved designing a hierarchical batch sampling strategy to ensure effective training of the contrastive loss. The system generates multi-level integer codes that represent product similarity, enabling better product understanding and discovery across different categories. Two distinct embedding strategies (ESCI and ESCI+Gemma) were developed to cater to different use cases (precision vs. discovery).