A Streamlit-powered AI Assistant that lets you upload Multiple research papers (PDFs) and ask natural language questions about them.
No more manual skimming through dozens of pages — this bot extracts, chunks, embeds, and retrieves the most relevant context from your PDFs and generates concise, accurate answers.
- 📂 Upload multiple research papers in PDF format
- 🔍 Extracts and preprocesses text from PDFs
- ✂️ Splits content into semantic chunks for better retrieval
- 📊 Uses FAISS Vector Store for efficient similarity search
- 🧠 Powered by Google Generative AI (Gemini & Embeddings)
- 💬 Interactive Q&A chat interface with Streamlit
- ⚡ Accurate, context-aware answers with guardrails against hallucinations
- Python 3.10+
- Streamlit – UI for user interaction
- PyPDF2 – PDF text extraction
- LangChain – Text chunking & QA chain
- FAISS – Vector store for semantic search
- Google Generative AI – Embeddings & Gemini LLM
- dotenv – Manage API keys securely
Here’s the step-by-step data flow pipeline that powers the bot:
- PDF Upload – User uploads one or more research papers via Streamlit.
- Text Extraction – Extract raw text from each page using PyPDF2.
- Text Chunking – Break text into overlapping chunks using RecursiveCharacterTextSplitter (helps preserve context).
- Embeddings Generation – Convert text chunks into embeddings using Google Generative AI Embeddings.
- Vector Store Indexing – Store embeddings in a FAISS index for efficient similarity search.
- User Query – User asks a question in natural language.
- Retrieval – Relevant chunks are fetched from FAISS.
- Answer Generation – Context + query passed to Gemini LLM via LangChain for structured, accurate answers.
- Streamlit UI – Display answers in real-time.
git clone https://github.com/your-username/research-qa-bot.git
cd research-qa-botpip install -r requirements.txtCreate a .env file in the root directory and add your Google API key:
GOOGLE_API_KEY=your_api_key_herestreamlit run app.py- Upload one or multiple research papers.
- Type your question in the input box.
- Get concise, context-aware answers instantly.