An AI-powered PDF Question Answering Chatbot built using Streamlit, LangChain, Google Gemini, and FAISS.
The application allows users to upload PDF documents and ask questions based on the uploaded content. The chatbot retrieves the most relevant information from the document and generates accurate answers using Google Gemini.
- Upload PDF files
- Extract text from PDF documents
- Intelligent text chunking
- Vector embeddings using Google Gemini
- FAISS vector database for semantic search
- Context-aware question answering
- Fast and interactive Streamlit interface
- Retrieval Augmented Generation (RAG)
- Streamlit
- Python
- Google Gemini 2.5 Flash
- LangChain
- FAISS
- Google Generative AI Embeddings
- PyPDF2
ChatBot-main/
│
├── assets/
│ ├── Syllabus_Theory_of_Automata.pdf
│ ├── question_1.png
│ └── question_2.png
│
├── faiss_index/
│ ├── index.faiss
│ └── index.pkl
│
├── app.py
├── requirements.txt
├── .env
└── README.mdgit clone https://github.com/your-username/RAG-ChatBot.git
cd RAG-ChatBotpython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtCreate a .env file:
GOOGLE_API_KEY=your_google_api_keyGet your Gemini API Key from:
https://aistudio.google.com/app/apikey
streamlit run app.pyOpen:
http://localhost:8501
PDF Upload
│
▼
Text Extraction
│
▼
Text Chunking
│
▼
Generate Embeddings
│
▼
Store in FAISS
│
▼
User Question
│
▼
Similarity Search
│
▼
Relevant Context
│
▼
Gemini LLM
│
▼
Final Answer
The project was tested using:
Syllabus_Theory_of_Automata.pdf
This PDF contains course syllabus and academic content used for chatbot testing.
Through this project I learned:
- LangChain Fundamentals
- RAG (Retrieval Augmented Generation)
- FAISS Vector Databases
- Google Gemini Integration
- Embeddings and Semantic Search
- Streamlit Application Development
- PDF Processing using Python
- Chat History
- Conversation Memory
- Document Summarization
- Voice Assistant Integration
- Cloud Deployment

