Develop a Restaurant-Recommendation Engine with Logistic Regression
Quick Overview
Evaluates restaurant recommendation modeling with logistic regression. Strong answers define the target and metrics, choose behavioral, social, context, and item features, justify logistic regression as a calibrated baseline, and evaluate recommendations with offline ranking metrics and online tests.
Develop a Restaurant-Recommendation Engine with Logistic Regression
Company: Meta
Role: Data Scientist
Category: Machine Learning
Difficulty: medium
Interview Round: Technical Screen
##### Scenario
Designing a restaurant-recommendation engine for a social app.
##### Question
What business goal and engagement metrics would you track for restaurant recommendations? Which behavioral, demographic and social features would you include in the model and why? Which model would you choose? Explain why logistic regression may be appropriate. How would you evaluate whether the logistic-regression model is accurate? Define precision, recall and accuracy, give their formulas, and explain which you would prioritize here.
##### Hints
Define target clearly, discuss feature–label alignment, and link evaluation metric to business goal.
Quick Answer: Evaluates restaurant recommendation modeling with logistic regression. Strong answers define the target and metrics, choose behavioral, social, context, and item features, justify logistic regression as a calibrated baseline, and evaluate recommendations with offline ranking metrics and online tests.
Develop a Restaurant Recommendation Engine with Logistic Regression
You are designing a restaurant recommendation engine for a social app. You need to define the business goal, choose features, justify a modeling approach, and evaluate a logistic-regression model.
Constraints & Assumptions
Treat this as a first-version recommender design, not a full deep-learning ranking system.
Define the prediction target and label window before choosing features.
Avoid leakage from post-impression actions.
Include engagement metrics, model metrics, and product guardrails.
Clarifying Questions to Ask Guidance
What user action should the recommender optimize: click, save, directions, reservation, order, or repeat visit?
Where will recommendations appear, and how many restaurants are shown?
What data is available on users, restaurants, social graph, location, and context?
Is interpretability important for product or business stakeholders?
Part 1 - Define Goal and Metrics
What business goal and engagement metrics would you track for restaurant recommendations?
What This Part Should Cover Guidance
Goal such as helping users discover relevant restaurants and increasing local engagement or downstream actions.
Metrics such as CTR, saves, directions, reservations, orders, repeat usage, retention, hides, and complaints.
Guardrails for diversity, quality, fairness, privacy, and over-personalization.
Part 2 - Choose Features
Which behavioral, demographic, social, context, and item features would you include, and why?
What This Part Should Cover Guidance
User preferences, past restaurant interactions, cuisine affinity, location context, time, price, distance, popularity, restaurant quality, freshness, and social signals.
Cold-start features for new users and restaurants.
Leakage and privacy checks.
Part 3 - Choose Logistic Regression
Why might logistic regression be appropriate?
What This Part Should Cover Guidance
Binary outcome modeling, probability scoring, interpretability, speed, calibration, and strong baseline behavior.
Feature engineering needed for nonlinearities and interactions.
Limitations compared with more expressive ranking models.
Part 4 - Evaluate the Model
How would you evaluate whether the logistic-regression model is accurate and useful?
What This Part Should Cover Guidance
Offline metrics such as AUC, PR-AUC, log loss, calibration, precision, recall, accuracy, and lift at top K.
Online metrics from A/B tests and guardrails.
Segment analysis, cold-start evaluation, and selection-bias concerns.
Part 5 - Define Classification Metrics
Define precision, recall, and accuracy, provide their formulas, and state which metric or metrics you would prioritize for this use case.
What This Part Should Cover Guidance
Correct formulas and interpretation.
Why ranking, precision at K, calibration, or downstream conversion may matter more than raw accuracy.
Trade-off between showing fewer high-confidence recommendations and discovering broader user interests.
What a Strong Answer Covers Guidance
A strong answer frames the recommendation task clearly, uses features available at ranking time, justifies logistic regression as a baseline, evaluates both offline and online impact, and chooses metrics that match a top-K recommendation product.
Follow-up Questions Guidance
How would you handle restaurants with no historical interactions?
What if the model has high accuracy but low click lift online?
How would you prevent the model from recommending only popular restaurants?