Design a duplicate listing detection system
I was asked this
No reports yet. Sign in to say where you were asked it.
An AI/ML design interview question asked at Airbnb. It tests similarity, entity resolution and embeddings.
Some hosts on a home-rental marketplace relist the same property under a new listing, to shed bad reviews or to get around a ban. Design a system that finds these duplicates using listing text, photos, location and host signals, and routes them to the right action.
Requirements
- Functional: when a listing is created or edited, find existing or past listings (including removed ones) that are likely the same property; score each pair; take an action by confidence (auto-link to the old listing's history, send to review, or allow); support legitimate cases such as one host managing several identical units in a building.
- Non-functional: check new listings within minutes; search over millions of active and removed listings; few false accusations of honest hosts.
Clarifying questions
- What does the business do with a confirmed duplicate: merge reviews, remove the new listing, or ban the host?
- How exact is the location we have: precise coordinates or an approximate area?
- Do we have labeled examples from past enforcement or reviewer decisions?
- How common are legitimate near-duplicates, such as identical apartments in one building?
- Do bad actors also change the host account, payment details or devices?
What a strong answer covers
- Two stages: candidate generation (cheap, high recall) and pairwise scoring (precise).
- Candidates from several indexes: geographic proximity, image embeddings with near-duplicate search (perceptual hashes and learned embeddings that survive cropping and filters), text embeddings of title and description, and shared host signals such as device, payment method, phone or bank account.
- A pairwise model on features like distance, photo similarity, text similarity, matching amenities and room counts, and host-link strength, trained on reviewer labels, with hard negatives from same-building units.
- Graph thinking: link listings and accounts through shared entities to catch rings of hosts.
- Thresholds set from precision targets, human review for the middle band, and reviewer decisions fed back as labels.
- Evaluation: precision at the auto-action threshold, recall measured on a sample of known relists, and monitoring of evasion (heavier photo edits).
Follow-ups
- Hosts start editing photos heavily to avoid image matching. What do you add?
- How do you avoid flagging a property manager with 40 identical units?
- How would you backfill: run the system over all existing listings once?
Where it's asked
What it tests
similarity · entity resolution · embeddings
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. New accounts get 5 credits: each one unlocks a question for good.
What the labs asked this week
A weekly email of what OpenAI, Anthropic and the other top AI labs asked engineers, round by round.
