A hyper-local AI cultural guide for travelers — powered by RAG (Retrieval-Augmented Generation), Groq LLM, ChromaDB, and Streamlit.
| Feature | Description |
|---|---|
| 💎 Hidden Gems | Off-the-beaten-path spots locals love |
| 🙏 Cultural Etiquette | Dress codes, customs, behavior tips |
| 🚌 Transit Guide | Metro, bus, auto, cab navigation |
| 🍜 Local Food | Street food, must-try dishes, best spots |
| 🌅 Time-Based Tips | Morning, afternoon, evening, night experiences |
| 📂 Document Upload | Upload your own PDF/TXT travel guides |
| 💬 Chat Memory | Session-based conversation history |
| 🎨 Theme Toggle | Dark and Light UI modes |
| 📚 Source Display | Expandable source attribution per answer |
| ♻️ Reset Button | Clear vector store and re-index |
- LLM: Groq API (
llama-3.1-8b-instant) — fast, free tier - Embeddings: TF-IDF (built-in, zero downloads, works offline)
- Vector DB: ChromaDB (persisted to
./chroma_db/) - Framework: LangChain + Streamlit
- Document Loaders: PyPDF + TextLoader
local_tourism_bot/
├── app.py ← Main Streamlit app (entry point)
├── requirements.txt
├── .env ← Your API key (never commit this)
├── README.md
│
├── core/
│ ├── rag_pipeline.py ← Full RAG pipeline
│ ├── embeddings.py ← TF-IDF embedding (zero-download)
│ ├── retriever.py ← ChromaDB vector store manager
│ └── llm_client.py ← Groq LLM client (swappable)
│
├── ui/
│ ├── components.py ← Chat bubbles, buttons, expanders
│ └── styles.py ← Dark/Light CSS themes
│
├── utils/
│ ├── file_loader.py ← PDF/TXT loaders + upload handler
│ └── text_splitter.py ← Chunking logic
│
└── data/
└── sample_docs/
├── bangalore_guide.txt ← Pre-loaded Bangalore guide
└── delhi_guide.txt ← Pre-loaded Delhi guide
- Python 3.10 or higher
- A free Groq API key → https://console.groq.com/keys
cd local_tourism_bot# Create
python -m venv venv
# Activate — Windows
venv\Scripts\activate
# Activate — macOS / Linux
source venv/bin/activatepip install -r requirements.txt✅ No model downloads. All dependencies install in under a minute.
Edit .env in the project root:
GROQ_API_KEY=your_actual_key_hereGet a free key at: https://console.groq.com/keys
streamlit run app.pyOpens at: http://localhost:8501
| Button / Control | Location | What it does |
|---|---|---|
| 🌙 Dark / ☀️ Light | Sidebar → Theme | Switches between dark and light CSS themes |
| Region selector dropdown | Sidebar | Prepends city context to every query |
| 📂 Upload files | Sidebar | Uploads PDF/TXT and indexes instantly |
| 🗑️ Clear Chat History | Sidebar | Clears all chat messages |
| ♻️ Reset Vector Store | Sidebar | Deletes ChromaDB, clears index, ready to re-index |
| 💎 Hidden Gems | Main quick buttons | Asks for hidden/off-beat spots |
| 🍜 Local Food | Main quick buttons | Asks for must-try local dishes |
| 🙏 Cultural Tips | Main quick buttons | Asks for etiquette and customs |
| 🚌 Transit Guide | Main quick buttons | Asks for transport and navigation tips |
| 🌅 Morning Tips | Main quick buttons | Asks for morning-specific activities |
| 🌃 Evening & Night | Main quick buttons | Asks for evening and night experiences |
| 📚 View Sources | Under bot replies | Expands to show retrieved document passages |
| Chat input box | Bottom of page | Type any custom question |
Edit core/llm_client.py:
# Options (all free on Groq):
"llama-3.1-8b-instant" # Fast, default
"llama-3.3-70b-versatile" # More capable
"mixtral-8x7b-32768" # Strong reasoning| Problem | Solution |
|---|---|
GROQ_API_KEY not found |
Check .env file exists with your key |
No module named 'chromadb' |
Run pip install -r requirements.txt |
| Answers seem off-topic | Click ♻️ Reset Vector Store, restart app |
| Port in use | streamlit run app.py --server.port 8502 |
| Quick buttons not responding | Reload page (F5) and try again |
Drop any .txt or .pdf into data/sample_docs/. The bot auto-indexes it on the next startup. Or use the Upload button to add files without restarting.