RAG
Building a RAG-Powered Hackathon-Winning App
Crafting personalized travel itineraries with Retrieval-Augmented Generation and Vector Search.
Read the full article on Level Up Coding
Overview
How we built Hangout AI, a personalized travel-itinerary generator, and took fifth place at the TiDB Future App Hackathon 2024. I built it with Ayu Sudi Dwijayanti; the idea came from our habit of talking about new cafés to work from in East Jakarta and never actually going.
The article explains Retrieval-Augmented Generation from first principles: why a standalone LLM gets facts wrong, goes stale and struggles to scale, and how retrieving real data first fixes that. Then it walks the whole pipeline: places scraped from Google Maps and cleaned with pandas, embedded with Gemini, stored in TiDB’s vector search, and handed with weather and location filters to Groq’s Llama 3 70B to write the itinerary, served through FastAPI with chat history.
It closes with how to build RAG without a framework, and what we would harden next: monitoring and security.
Key takeaways
- RAG means retrieve, then generate: the model writes from real, current data instead of memory alone.
- Vector search in TiDB matches a traveller’s preferences to pre-embedded places in milliseconds, alongside structured filters like country.
- Context assembly matters: retrieved places, the weather and the user’s inputs become one structured prompt.
- Keeping chat history lets the itinerary adapt as preferences, dates or weather change.
- Frameworks like LlamaIndex speed you up, but RAG can be built by hand when you need full control.
Figures from the article
Resources
- Hangout AI on Devpost Project
- luthfiarifin/hangout-llm Source code
- TiDB Future App Hackathon 2024 Hackathon
Continue reading “Building a RAG-Powered Hackathon-Winning App” on Level Up Coding
Behind this article
More writing
- How Multimodal AI Actually Works: CLIP, Vector Embeddings & LLMs Explained AI Advances · Multimodal AI · 14 min read
- Is Your Coworker Now an AI? Write A Catalyst · Future of Work · 4 min read
- Building Conditional LLM Agent Workflows with LangGraph Level Up Coding · LangGraph
- All articles → Agents, retrieval, Flutter and working with AI