An intelligent travel assistant that combines helps users discover restaurants, hotels, and attractions across Tunisia.
# Travel Assistant - AI-Powered Location Discovery
An intelligent travel assistant that combines natural language processing with interactive mapping to help users discover restaurants, hotels, and attractions across Tunisia. Built with LangGraph, the system provides conversational interactions backed by a vector database and real-time map visualizations.
## Overview
The Travel Assistant leverages a multi-agent architecture powered by LangGraph and Groq's LLM to understand user queries, search a vector database of locations, and dynamically generate interactive maps. The system features both a modern web interface and a Gradio demo for easy interaction.
## How It Works
```mermaid
graph LR
A[User Query] --> B[LangGraph Agent]
B --> C{Select Tool}
C -->|Search| D[ChromaDB Vector Database]
C -->|Fetch New Data| E[External APIs]
C -->|Create Map| F[Map Generator]
D --> G[Search Results]
E --> G
G --> H[LLM Response]
F --> I[Interactive Map]
H --> J[User Interface]
I --> J
style B fill:#4285F4,stroke:#333,stroke-width:2px,color:#fff
style D fill:#EA4335,stroke:#333,stroke-width:2px,color:#fff
style F fill:#F0FFFF,stroke:#333,stroke-width:2px
```
### System Architecture
**User Query Flow:**
1. User submits a natural language query through the web interface or Gradio demo
2. LangGraph agent analyzes the query and determines the appropriate action
3. Agent uses LLM (LLaMA 3.1 via Groq) to understand intent and extract entities
**Tool Selection & Execution:**
4. Based on query analysis, agent selects appropriate tools:
- **Search Database Tool**: Queries ChromaDB vector database for relevant locations
- **Fetch API Tool**: Retrieves fresh data from Geoapify or OpenStreetMap APIs
- **Generate Map Tool**: Creates interactive maps with location markers
**Data Processing:**
5. Location data is embedded using sentence transformers
6. Vector similarity search finds relevant amenities
7. Results are filtered by relevance threshold
**Map Generation:**
8. Coordinates a …