This project is an AI-powered PDF Question Answering system built using Google Gemini and LangChain. It allows users to upload multiple PDF files and ask questions based on their content. The system uses embeddings and vector search (FAISS) to retrieve relevant information and generate accurate answers.
PDF-Chatbot/ │ ├── app.py ├── requirements.txt ├── README.md ├── .gitignore ├── .env.example │ ├── faiss_index/ (ignored) │ ├── index.faiss │ └── index.pkl │ └── venv/ (ignored)
- Google Gemini (Chat Model)
- Gemini Embeddings (models/gemini-embedding-001)
- FAISS Vector Store for similarity search
- Retrieval-Augmented Generation (RAG) architecture
- Python
- Streamlit
- LangChain
- Google Generative AI (Gemini)
- FAISS
- PyPDF2
- python-dotenv
- Install dependencies:
pip install -r requirements.txt- Copy .env.example to .env:
copy .env.example .env-
Open the .env file and add your Google API key: GOOGLE_API_KEY="your_google_api_key_here"
-
Run the Streamlit app:
streamlit run app.pyThe application allows users to:
- Upload multiple PDF files
- Process and embed the document text
- Ask contextual questions
- Receive accurate answers based on the uploaded PDFs
Pranav Chauhan