An open API service indexing awesome lists of open source software.

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.

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)