Retrieval-Augmented Generation (RAG) powered app to chat with your own PDF, Word, or PowerPoint files using Ollama, LangChain, and Streamlit.
Ask questions about your uploaded documents, the system retrieves relevant chunks and responds using a locally running LLM (e.g., Mistral via Ollama).
- 📁 Upload
.pdf,.docx, and.pptxfiles - ✂️ Smart chunking with
RecursiveCharacterTextSplitter - 🧠 Embedding via
OllamaEmbeddings(Mistral) - 🗂️ Fast in-memory vector store (no disk I/O delay)
- 🔍 Similarity search-based retrieval
- 🤖 LLM response constrained to document content
- ⚡ Streamlit UI with live Q&A
- Streamlit – Frontend interface
- LangChain – RAG pipeline components
- Ollama – Local language model inference
- Mistral – LLM used for generation
- Python 3.10+
- Python 3.10+
- Ollama installed on your system
pip install -r requirements.txt-
Download and install Ollama from https://ollama.com/
-
Pull the Mistral model:
ollama pull mistral
-
Start Ollama service (keep this running in a separate terminal):
ollama serve
streamlit run app.pyThe app will open in your browser at http://localhost:8501
- Upload Documents: Drop your PDF, Word, or PowerPoint files
- Wait for Processing: The app will chunk and embed your documents
- Ask Questions: Type questions about your uploaded content
- Get Answers: The AI will respond based only on your document content
The project uses these key packages:
streamlit>=1.28.0- Web interfacelangchain-community>=0.0.1- Document loaderslangchain-text-splitters>=0.0.1- Text chunkinglangchain-ollama>=0.1.0- Ollama integrationlangchain-core>=0.1.0- Core LangChain components