Course: Natural Language Processing CS 6120
Project: Final RAG System Demo
This project is a Retrieval Augmented Generation (RAG) system that runs entirely on your own computer. It searches through a large database of over 10,000 app reviews to answer user questions. It uses local machine learning models (Mistral via Ollama, SentenceTransformers, and BM25) to write helpful bug reports and provide clickable sources for its answers.
- 💬 Interactive Q&A: Ask questions about app reviews. The system searches for the 5 most relevant reviews and uses them to answer your question. It provides clickable links, like
[Review #1234], so you can read the exact review it used for the answer.
- 📊 Global Dataset Analysis: This tab automatically creates summary reports for common issues, like battery drain or app crashes. It searches for the top 5 reviews for each topic, reads them, and writes a professional report.
Because this project runs locally to keep your private data safe, you need to install these two programs:
- Docker Desktop (to run the app easily)
- Ollama (to run the Mistral AI model)
We use Docker so anyone can easily run this app without installing complex Python code directly.
First, make sure Ollama is downloaded. Since Docker runs in its own environment, we need to tell Ollama to allow Docker to talk to it.
On your Mac Terminal: Open a simple terminal window and run this command:
OLLAMA_HOST="0.0.0.0" ollama serveLeave this terminal window open in the background!
In a second, new terminal window, download and start the AI model:
ollama run mistralNavigate to the main folder of this project in your terminal and build the app:
docker build -t rag-app-review .Start the app using this command:
docker run -p 8501:8501 rag-app-reviewIt will take a few seconds to load the search models into memory.
Go to your web browser and open this link:
http://localhost:8501
- User Interface: Built with Streamlit
- Local APIs: Uses Docker to safely talk to Ollama (
http://host.docker.internal:11434) - Search System: Uses BM25 (keyword search) and SentenceTransformer (meaning search) to find the best reviews.
- AI Model: Mistral (via Ollama)
- Local Models: The entire system runs locally on your computer. It does not use any cloud APIs like OpenAI.
- Easy Setup: The system is completely containerized with Docker, meaning the instructors can run it perfectly without dealing with Python libraries.
- Clickable Citations: The AI provides exact citations for all answers. The app shows the original review text right below the answer to prove the AI did not hallucinate.