Extract Product Attributes From Seller Titles With Language Models
Last updated: November 29, 2026
Quick Overview
Marketplace sellers submit messy titles like "2pk Mens Crew Socks Blk sz 10-13 cotton". Design an approach to extract structured attributes (brand, size, color, count, material) and compare a fine-tuned token tagger with prompting a large language model.
Walmart Labs
November 29, 20260
0
0 solved
Marketplace sellers submit messy titles like "2pk Mens Crew Socks Blk sz 10-13 cotton". Design an approach to extract structured attributes (brand, size, color, count, material) and compare a fine-tuned token tagger with prompting a large language model.
Catalog quality drives search, filters and comparison on walmart.com, and the Marketplace brings in a large volume of loosely structured listings. The interviewer looks for a practical NLP plan: labeling, model choice, normalization to canonical values, cost at scale, and how to measure extraction quality.
What the Interviewer Expects
- Frame the task as sequence tagging plus normalization
- Compare a fine-tuned encoder tagger with LLM prompting on accuracy, cost and latency
- Plan labeled data with weak supervision from structured feeds
- Normalize extracted spans to canonical attribute values
- Measure per attribute precision and recall and handle hallucination
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How would you handle attributes that are implied but not written, such as gender from "Mens"?
- How do you keep an LLM from inventing a brand?
- How would you process 50 million titles cheaply?
- How do you add a new attribute like "pack type" quickly?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Input: title, optional description, category, and seller-provided attributes that are often missing or wrong. Output per item: JSON of attributes with canonical values (color = Black, size = 10-13, co...
Approach
Two stage system:
- Span extraction: a fine-tuned encoder (DeBERTa or a distilled BERT) with a BIO tagging head over tokens, labels like B-BRAND, B-SIZE, B-COLOR, B-COUNT. Training data comes fro...