https://github.com/genesisblock3301/restuarant_review_management
π Restaurant Review & Weather Assistant (LangChain + Ollama + RAG) An AI-powered assistant that answers restaurant-related questions using realistic customer reviews (RAG) and provides live weather updates through integrated APIs. Built with LangChainβs ReAct agent, Ollama LLM, and FastAPI.
https://github.com/genesisblock3301/restuarant_review_management
Last synced: 9 months ago
JSON representation
π Restaurant Review & Weather Assistant (LangChain + Ollama + RAG) An AI-powered assistant that answers restaurant-related questions using realistic customer reviews (RAG) and provides live weather updates through integrated APIs. Built with LangChainβs ReAct agent, Ollama LLM, and FastAPI.
- Host: GitHub
- URL: https://github.com/genesisblock3301/restuarant_review_management
- Owner: GenesisBlock3301
- License: mit
- Created: 2025-09-03T09:56:15.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-10-08T05:36:46.000Z (9 months ago)
- Last Synced: 2025-10-08T07:23:02.453Z (9 months ago)
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### π **README.md**
# π Restaurant Review & Weather Assistant
An **AI-powered interactive assistant** that can:
- Answer questions about restaurants (food quality, service, pricing, etc.)
- Retrieve and summarize real customer reviews using **RAG (Retrieval-Augmented Generation)**
- Provide **live weather information** for any city via an integrated API
- Combine both tools through a **LangChain ReAct agent** for reasoning and decision-making
---
## π Features
- **LangChain ReAct Agent**: Combines reasoning with action to decide when to use tools.
- **RAG Pipeline**: Fetches relevant restaurant reviews from a vector database.
- **Weather Tool**: Retrieves real-time weather data via API.
- **Local LLM Integration**: Runs on `Ollama (llama3.2)` for on-device inference.
- **Interactive CLI Mode**: Chat directly with the assistant in your terminal.
---
## π§ Architecture
```
User Input
β
βΌ
[ LangChain ReAct Agent ]
βββ Tool 1 β Weather API (get_weather_info)
βββ Tool 2 β Restaurant RAG (ask_restaurant)
βΌ
LLM (Ollama Llama3.2)
βΌ
Final Answer β Console Output
````
---
## π§© Components Overview
| File | Description |
|--------------------------------------|--------------------------------------------------|
| **main.py** | Core application & agent loop |
| **vector.py** | Loads vector store and defines retriever for RAG |
| **weather_api.py** | Fetches live weather data |
| **realistic_restaurant_reviews.csv** | Dataset used for restaurant review retrieval |
| **requirements.txt** | Python dependencies |
| **README.md** | Project documentation |
---
## βοΈ Installation
### Cone the Repository
```bash
git clone https://github.com/GenesisBlock3301/restuarant_review_management.git
cd restuarant_review_management
````
### Create and Activate a Virtual Environment
```bash
python -m venv venv
source venv/bin/activate # For Linux/Mac
venv\Scripts\activate # For Windows
```
### Install Dependencies
```bash
pip install -r requirements.txt
```
### Run Ollama Locally
Ensure you have [Ollama](https://ollama.ai/download) installed and running:
```bash
ollama run llama3.2
```
---
## βΆοΈ Run the Application
Simply run:
```bash
python main.py
```
---
## π¬ Example Interactions
```
π Pizza Restaurant & Weather Assistant
Ask me about restaurants or weather information!
Type 'q' or 'quit' to exit.
Ask your question: What do people say about the pizza quality?
π€ Processing: What do people say about the pizza quality?
β
Final Answer:
Customers love the crispy crust and fresh toppings. Several reviews mention fast delivery and great taste.
```
---
### π¦οΈ Weather Example
```
Ask your question: What's the weather like in Dhaka today?
π€ Processing: What's the weather like in Dhaka today?
β
Final Answer:
Currently 31Β°C in Dhaka with light rain and 80% humidity.
```
---
## π§± Project Structure
```
π restuarant_review_management
β£ π main.py
β£ π vector.py
β£ π weather_api.py
β£ π realistic_restaurant_reviews.csv
β£ π requirements.txt
β π README.md
```
---
## π§° Tools & Technologies
* **Python 3.10+**
* **LangChain**
* **Ollama Llama 3.2**
* **Vector Store**
* **Weather API**
* **ReAct Agent Framework**
---
## π¨βπ» Author
**GenesisBlock3301**
π [GitHub Profile](https://github.com/GenesisBlock3301)