Inspiration
My girlfriend always struggles with deciding what to eat. When I discovered the Yelp AI API, I saw the perfect opportunity to build an app that helps with this everyday decision-making challenge.
The core concept draws inspiration from Akinator, the game that guesses which famous person you're thinking of through a series of strategic questions. I realized that figuring out what my girlfriend wants to eat follows a similar pattern: asking the right questions to narrow down preferences until we find the perfect match. This became the foundation for the intelligent question-answer recommendation engine.
What it does
What Should I Eat? is a mobile app that helps users discover personalized dish and restaurant recommendations through two interactive experiences:
Intelligent Question Flow: An Akinator-style Q&A session that uses Bayesian inference to learn your preferences. The system asks strategic questions (e.g., "Do you want something spicy?") and updates dish probabilities in real-time, automatically determining when it has enough information to make a recommendation.
Swipe Card Selection: A quick, visual preference builder where users choose between Yes or No (and Unsure) to build their preference profile.
Once preferences are collected, the app recommends a specific dish and uses the Yelp AI Chat API to find the best restaurant for that dish nearby. Users can refine recommendations through a chat interface (e.g., "Make it less spicy" or "Find something closer"), save favorites for later, and view restaurant locations on interactive maps.
How we built it
The application consists of two main components:
Backend API (Node.js, Express, TypeScript):
- Built a Bayesian inference engine that updates dish probabilities based on user answers
- Implemented information gain optimization to select questions that maximize learning
- Used Redis for session storage for session persistence
- Created dynamic question generation for cuisine and course types
- Integrated with Yelp AI Chat API for restaurant recommendations
- Deployed as a Docker container to Google Cloud Run for scalable, serverless hosting
Mobile App (React Native, Expo, TypeScript):
- Used React Native Reanimated for smooth card swipe animations
- Implemented React Context API for state management
- Integrated AsyncStorage for persistent data (saved meals, dietary restrictions)
- Added haptic feedback and map integration for UX
I chose a mobile-first approach because food decisions happen on-the-go, and mobile apps provide the most accessible, native experience for location-based recommendations.
Challenges we ran into
Dish Dataset Curation: Building a comprehensive dish database was challenging. I scraped TasteAtlas's list of 11,814 dishes and needed to narrow it down to a manageable, US-relevant set. I used GPT to score each dish based on popularity in the US, reducing the dataset to 1,181 high-quality dishes.
Question Generation at Scale: I used GPT to initially characterize dishes only by flavor profile, but creating questions only based on flavor profile was limiting. I then added texture profile for string matching with texture-based questions to have a larger number of questions in the question bank, though this approach has limitations in providing nuanced recommendations.
First-Time Mobile Development: This was my first mobile app project. Learning React Native, Expo, and mobile-specific patterns (like handling location permissions, backend API hosted separately, and keyboard avoidance) required significant research and iteration.
Accomplishments that we're proud of
I'm particularly proud of building a sophisticated Bayesian recommendation engine that:
- Uses probabilistic inference to learn user preferences efficiently
- Optimizes question selection through information gain maximization
- Automatically determines when enough information has been gathered
- Incorporates time-of-day awareness (breakfast dishes more likely in the morning)
- Provides a smooth, engaging user experience that feels like a game
What we learned
- Mobile Development: First time building a mobile app with React Native and Expo, learning about navigation, state management, animations, and platform-specific considerations
- Architecture: Designed and implemented a distributed system with a separately hosted backend API, understanding how to structure client-server communication
- Bayesian Inference: Deep dive into probabilistic modeling and information theory for recommendation systems
- API Integration: Working with Yelp's AI Chat API and understanding how to structure prompts for effective restaurant recommendations
- Deployment: Deploying containerized applications to cloud platforms (Google Cloud Run)
What's next for What Should I Eat?
Enhanced Question Generation: The current question system is limiting. I plan to improve the recommendation engine by:
- Adding an embedding model trained on dish descriptions
- Using semantic similarity to dynamically generate questions based on top-k dish candidates
- Creating more nuanced questions that capture flavor profiles, cooking methods, and cultural contexts
Better User Experience:
- Reduce question repetition across sessions by tracking user history
- Provide more personalized recommendations by learning from past choices
- Add social features to share recommendations with friends
- Implement machine learning to improve question selection over time
Technical Improvements:
- Optimize the Bayesian inference algorithm for faster response times
- Add caching layers to reduce API calls
- Implement offline mode for saved recommendations
- Add analytics to understand which questions are most effective
The goal is to make the app feel more intelligent and personalized with each use, turning the "what should I eat?" dilemma into an enjoyable discovery experience.
Built With
- artifact-registry
- docker
- expo.io
- express.js
- google-cloud-run
- gpt
- node.js
- react-native
- redis
- typescript
- upstash
- yelp
Log in or sign up for Devpost to join the conversation.