This project is a Local Retrieval-Augmented Generation (RAG) system that answers questions about a restaurant based on realistic customer reviews.
It runs completely offline, powered by:
- 🧠 Ollama LLMs
- 🔗 LangChain
- 🗂 ChromaDB
- 📊 CSV-based dataset
Ask any question like:
"What do customers think about the pizza crust?" "What are the top complaints?" "Which pizzas are most praised?"
The model answers using actual retrieved reviews.
local-rag/
│── main.py # RAG pipeline & chatbot loop
│── vector.py # Vector DB creation + retriever
│── realistic_restaurant_reviews.csv # Dataset
│── requirements.txt # Dependencies
│── chrome_langchain_db/ # Auto-created vector DB
│── venv/ # Virtual environment
Runs without cloud APIs using Ollama.
Top 5 relevant reviews fetched using vector similarity.
Chroma saves embeddings & reloads instantly.
Answers directly grounded in CSV data.
Perfect for learning + portfolio projects.
- Load CSV (Pandas)
- Convert rows → LangChain Documents
- Generate embeddings using mxbai-embed-large
- Store vectors in ChromaDB
- User asks a question
- Retriever gets top 5 relevant reviews
- Llama 3.2 generates the final answer
Models required:
ollama pull llama3.2
ollama pull mxbai-embed-largeuv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windowspip install -r requirements.txtpython main.pyYou will see:
====================================
Ask your question (q to quit):
====================================
- What do customers think about the service?
- Summarize the positive reviews.
- What complaints are mentioned most?
- Give feedback about thin crust pizza.
- Are there gluten-free options mentioned?
| Component | Purpose |
|---|---|
| 🐍 Python | Application logic |
| 🧠 Ollama | Local LLM + embeddings |
| 🔗 LangChain | RAG chain |
| 🗂 ChromaDB | Vector storage |
| 📊 Pandas | CSV processing |
Columns included:
- Title
- Date
- Rating
- Review
Used for retrieval + summarization.
- Streamlit UI version
- Sentiment Analysis
- Multi-query reasoning (Agentic RAG)
- Summary Dashboard