Journey of building a context-aware RAG chatbot for food recommendations, while reviving 500+ Instagram reviews buried by algorithms
It started simple: being confused about what to eat.
A classic problem, but it happens almost every day. Especially when you have to think about:
From there came the question: "Why not build a system that can help with this?"
Not just a chatbot that answers randomly, but a system that truly understands context and makes decisions based on data.
Many AI chatbots can answer questions about food. The problem is, the answers are often made up.
If asked: "Recommend lunch under 30k in Samarinda"
A pure LLM might answer confidently, but the data source is unclear.
At this point I realized: if I want relevant results, the LLM needs to be given the right context.
This is where I started using the Retrieval-Augmented Generation (RAG) approach.
In broad strokes, the flow is like this:
This approach makes answers:
Conceptually RAG looks simple. But when implemented, there are many technical decisions that must be made.
Some things I learned:
No matter how good the model is, it will still produce bad output if:
I spent quite a bit of time just to:
Adding too much context to the prompt is safe, but:
The solution isn't "add everything", but choose the most relevant context.
Without streaming, the chatbot feels "silent" for a few seconds. With streaming response:
I used Server-Sent Events (SSE) to send tokens gradually to the frontend.
Challenge: 637 Instagram posts with 806 columns, inconsistent format, info scattered across captions/videos/hashtags.
Solution:
Results: 806 columns → 18 relevant features, 500+ videos transcribed, ready for production RAG system.
Instagram has strict rate limits. Downloading 500+ videos would get blocked quickly.
Solution: Implemented smart cookie rotation with 3+ accounts, random delays, and retry logic. This allowed me to download all videos without permanent blocks.
In this project, I didn't focus on:
The simple reason: my main goal was to build an AI system that could be used, not just a demo.
Implemented a fallback mechanism to ensure always relevant results:
This ensures 100% response rate while maintaining relevance.
Automatic time-based categorization:
No manual filters needed - the system understands context from the query and current time.
Each recommendation includes:
Not just text recommendations - actionable information.
This project taught me that building AI is:
And often, the most important decisions are actually outside the model itself.
If this system is developed further someday, I want to:
Live Demo: https://food-recomendation-chatbot.vercel.app
For other projects, see Customer Churn Prediction, Sales Forecasting, and Sentinel Predictive Maintenance.