Extract Brand, Size and Color From Product Titles as Sequence Labeling
Last updated: November 29, 2026
Quick Overview
Sellers write free-text titles such as 'Acme Men's Running Shoe Size 10 Wide Navy Blue'. Explain how you would train a model to extract structured attributes from titles and how you would evaluate it.
Amazon
November 29, 20260
0
0 solved
Sellers write free-text titles such as 'Acme Men's Running Shoe Size 10 Wide Navy Blue'. Explain how you would train a model to extract structured attributes from titles and how you would evaluate it.
Structured attributes drive Amazon search filters, variation grouping and catalog quality, yet many listings arrive as messy text. The interviewer wants you to frame extraction as token classification, handle weak labels from existing catalog data, and evaluate at the entity level.
What the Interviewer Expects
- Frame as token classification with a BIO tagging scheme
- Fine-tune a pretrained encoder with a token classification head
- Create training data with distant supervision from existing attributes
- Evaluate with entity-level precision, recall and F1
- Normalize extracted values to canonical forms
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 an attribute that is implied but not written, like gender from 'Men's'?
- Would a generative LLM extractor be better, and how would you control its output?
- How do you scale to thousands of attribute types across categories?
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
Confirm target attributes per category (shoes: brand, size, width, color, gender), languages, and whether existing catalog values are available for some listings to bootstrap labels....
Approach
Tag each token with B-ATTR, I-ATTR or O. For the example: Acme/B-BRAND, Men's/B-GENDER, Running/O, Shoe/O, Size/O, 10/B-SIZE, Wide/B-WIDTH, Navy/B-COLOR, Blue/I-COLOR. Fine-tune a transformer encoder ...