An AI-powered PDF Question Answering Assistant built using Streamlit, LangChain, Google Gemini, ChromaDB, and Hugging Face Embeddings.
The application allows users to upload PDF documents, ask natural language questions, retrieve relevant information using Retrieval-Augmented Generation (RAG), generate document summaries, and export chat conversations.
- 📄 Upload PDF documents
- 🤖 Ask questions using Google Gemini AI
- 🔍 Semantic search with ChromaDB
- 🧠 Retrieval-Augmented Generation (RAG)
- 📚 Hugging Face Embeddings
- 📑 AI-generated PDF Summary
- 📊 PDF Statistics
- 💬 Chat Interface
- 📄 View Source References
- 💾 Export Chat as TXT
- 📝 Export Chat as Markdown
| Technology | Purpose |
|---|---|
| Python | Backend |
| Streamlit | Web Application |
| LangChain | RAG Pipeline |
| Google Gemini | Large Language Model |
| Hugging Face Embeddings | Text Embeddings |
| ChromaDB | Vector Database |
| PyMuPDF | PDF Text Extraction |
PDF-RAG-AI/
│
├── app.py
├── requirements.txt
├── README.md
├── .env.example
├── .gitignore
│
├── assets/
│ ├── logo.png
│ └── styles.css
│
├── downloads/
├── uploads/
├── chroma_db/
│
└── utils/
├── embedding.py
├── export.py
├── gemini.py
├── pdf_loader.py
├── rag.py
├── search.py
├── statistics.py
├── summary.py
├── ui.py
└── vector_store.py
Clone the repository.
git clone https://github.com/Saikishorep15/PDF-RAG-AI.gitMove into the project folder.
cd PDF-RAG-AICreate a virtual environment.
python -m venv .venvActivate the virtual environment.
.venv\Scripts\activatesource .venv/bin/activateInstall the dependencies.
pip install -r requirements.txtCreate a .env file.
GOOGLE_API_KEY=YOUR_GEMINI_API_KEYstreamlit run app.py- Upload a PDF document.
- Extract text using PyMuPDF.
- Split the text into chunks.
- Generate embeddings using Hugging Face.
- Store embeddings in ChromaDB.
- Retrieve the most relevant chunks.
- Send the context to Google Gemini.
- Display the generated answer with source references.
Add screenshot here
Add screenshot here
Add screenshot here
SaiKishore P
GitHub: https://github.com/Saikishorep15
Give this repository a ⭐ on GitHub.
This project is licensed under the MIT License.