Airbnb Categories
Beyond Search: The Importance of Personalized Categories
When faced with thousands of options, traditional search can feel limiting. Airbnb recognized this challenge and revolutionized travel discovery with its personalized categories. By organizing its vast inventory into meaningful groups like "Beachfront Getaways" or "Urban Apartments," Airbnb achieved several key benefits:
- Enhanced Discovery: Users can explore listings beyond their initial search terms, uncovering hidden gems and new possibilities.
- Simplified Decision-Making: Categorization narrows down choices, making it easier for users to find accommodations that match their preferences.
- Personalized Experiences: Categories dynamically adapt to user behavior and preferences, leading to a more engaging and tailored browsing experience.
The Challenges of Dynamic Categorization
Building an effective category-based discovery system involves addressing several complexities:
- Dynamic Content: New listings are constantly added, requiring real-time categorization.
- Evolving Preferences: User interests change over time, necessitating adaptive categories that reflect these shifts.
- Balancing Exploration and Exploitation: Surfacing familiar categories while also introducing users to new and potentially relevant options.
- Scalability and Performance: Handling vast inventories and delivering personalized results quickly and efficiently.
Airbnb's Approach: A Symphony of Data and Algorithms
Airbnb leverages a sophisticated system to power its personalized categories:
- Content Understanding: Analyzing listing descriptions, images, and reviews to extract meaningful features and categorize properties effectively.
- User Modeling: Capturing user preferences through booking history, search queries, and interactions with listings and categories.
- Real-Time Personalization: Dynamically adjusting category rankings and recommendations based on user behavior and context.
To learn more about the nuances of Airbnb's approach, check out our blog post.
Recreating the Magic with Shaped
Shaped makes it easy to build your own personalized category system, mirroring Airbnb's key elements:
- Flexible Data Ingestion: Connect Shaped to your data sources housing user profiles, item details, and interaction logs.
- Advanced Modeling Techniques: Shaped leverages powerful algorithms for content understanding, user modeling, and personalized ranking.
- Seamless Integration: Effortlessly integrate Shaped's API into your platform to deliver dynamic category recommendations and personalized listing results.
Building Your Personalized Category System: A Practical Guide
Let's imagine you have data for users
, listings
, and
events
stored in BigQuery. Here's how you can leverage
Shaped:
1. Define Your Shaped Models:
Create two models: one for recommending categories
(category_recs
) and another for recommending listings within
each category (listing_recs
).
---
model:
name: category_recs
connectors:
- type: Dataset
id: bigquery_data
name: bigquery_data
fetch:
users: |
SELECT
user_id,
country
FROM
bigquery_data.users
items: |
SELECT
category_id as item_id,
FROM
bigquery_data.categories
events: |
(
SELECT
user_id,
category_id as item_id,
created_at,
CASE
WHEN event_name in ('filter_for_category') THEN TRUE
ELSE NULL
END AS label
FROM
bigquery_data.events
)
UNION DISTINCT
(
SELECT
e.user_id,
l.category as item_id,
e.created_at,
CASE
WHEN event_name in ('view_listing', 'booked') THEN TRUE
WHEN event_name in ('impression') THEN FALSE
END AS label
FROM
bigquery_data.events AS e
JOIN
bigquery_data.listings AS l ON e.listing_id = l.listing_id
}
---
model:
name: listing_recs
connectors:
- type: BigQuery
id: bigquery_data
location: us-east1
project_id: my_app
dataset: my_dataset
fetch:
users: |
SELECT
user_id,
country
FROM
bigquery_data.users
items: |
SELECT
listing_id as item_id,
location,
photos,
guest_reviews,
price,
size,
amenities,
property_type,
category_id
FROM
bigquery_data.listings
events: |
SELECT
user_id,
listing_id as item_id,
created_at,
CASE
WHEN event_name in ('booked') THEN TRUE
WHEN event_name in ('impression') THEN FALSE
END AS label
FROM
bigquery_data.events
2. Create Your Models:
shaped create-model --file category_recs_model.yaml
shaped create-model --file listing_recs_model.yaml
3. Power Your Platform with Recommendations:
- Get Personalized Category Recommendations:
shaped rank --model-name category_recs --user-id "325913"
- Retrieve Personalized Listings for Each Category:
shaped rank --model-name listing_recs --user-id "325913" --filter-predicate "category_id == $category_id"
(Replace $category_id
with the actual category ID.)
Conclusion
Shaped empowers you to build engaging, personalized discovery experiences inspired by Airbnb's innovative approach to categories. By combining powerful models with a user-friendly platform, you can enhance content discovery, simplify decision-making, and create a more personalized experience for your users.