Skip to content

This project is an interactive question-answering bot for a pizza restaurant. It uses LangChain, Ollama's LLMs, and ChromaDB to answer user questions based on realistic customer reviews.

Notifications You must be signed in to change notification settings

kawish918/CritiqueChain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ• Pizza Restaurant QA Bot

An interactive question-answering bot for a pizza restaurant, built using LangChain, Ollama's LLMs, and ChromaDB. The bot answers user questions by leveraging realistic customer reviews stored in a local vector database.


✨ Features

  • Uses LangChain and Ollama LLM (llama3) to generate accurate, context-aware responses.
  • Embeds customer reviews using the mxbai-embed-large model for efficient semantic search.
  • Stores embedded reviews in ChromaDB, a local vector database.
  • Retrieves the top 5 most relevant reviews per query to provide informed answers.

πŸ“¦ Requirements

To run this project, you need the following Python packages:

  • langchain
  • langchain-ollama
  • langchain-chroma
  • pandas

Install all dependencies using the provided requirements.txt:

pip install -r requirements.txt

🧠 Local LLM Setup (Ollama)

  1. Install Ollama from the official website:
    πŸ‘‰ https://ollama.com/download

  2. Pull the required models:

ollama pull llama3
ollama pull mxbai-embed-large
  1. Ensure the Ollama service is running in the background before executing any scripts.

πŸ“ File Structure

β”œβ”€β”€ main.py                            # Main QA bot loop
β”œβ”€β”€ vector.py                          # Embeds reviews into ChromaDB
β”œβ”€β”€ realistic_restaurant_reviews.csv  # Customer review dataset
β”œβ”€β”€ requirements.txt                   # Project dependencies
└── README.md                          # Project documentation

▢️ How to Run

  1. Clone the repository:
git clone https://github.com/kawish918/CritiqueChain.git
cd CritiqueChain
  1. Install dependencies:
pip install -r requirements.txt
  1. Create the vector database (only needed once):
python vector.py
  1. Start the QA chatbot:
python main.py

βœ… Ask questions about the restaurant!
πŸ’¬ Type q to quit.


πŸ’‘ Notes

  • Ensure Ollama is running before starting any script.
  • This project runs entirely locally with no cloud dependencies.

About

This project is an interactive question-answering bot for a pizza restaurant. It uses LangChain, Ollama's LLMs, and ChromaDB to answer user questions based on realistic customer reviews.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages