Skip to content

Khushisawalkar/document-qa-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 DocMind β€” AI Document Q&A System

DocMind is a modern AI-powered multi-document question answering and document intelligence system built using Streamlit, LangChain, FAISS, HuggingFace embeddings, and Google Gemini AI.

The application allows users to upload multiple PDFs, DOCX, TXT, and Markdown files and interact with them conversationally using semantic search and AI-generated responses.

Designed with a premium dark editorial interface, DocMind focuses on intelligent retrieval, clean UI/UX, source transparency, and real-world usability.


✨ Core Features

πŸ“„ Multi-Format Document Support

Supports:

  • PDF
  • DOCX
  • DOC
  • TXT
  • Markdown (.md)

🧠 AI-Powered Question Answering

Uses Google Gemini AI to:

  • Answer document-based questions
  • Explain concepts
  • Summarize content
  • Extract important information
  • Maintain contextual conversation flow

πŸ” Semantic Search with FAISS

  • Uses vector embeddings for intelligent retrieval
  • Searches based on meaning instead of exact keywords
  • Retrieves most relevant chunks from uploaded documents

πŸ“Ž Source Citations

Every AI response includes:

  • Document name
  • Page number
  • Context snippet
  • Relevance score

This improves:

  • transparency
  • trust
  • explainability

πŸ“ AI Summaries

Automatically generates:

  • document overview
  • important points
  • major conclusions
  • suggested questions

🏷️ Keyword Extraction

Automatically extracts:

  • important terms
  • technical concepts
  • recurring topics
  • key phrases

πŸ’¬ Conversational Memory

Maintains previous conversation turns for:

  • follow-up questions
  • contextual understanding
  • more natural interactions

🌍 Multi-Language Responses

Supports responses in:

  • English
  • Hindi
  • French
  • Japanese
  • German
  • Spanish
  • Chinese

🎨 Premium Editorial UI

Features:

  • dark futuristic aesthetic
  • animated streaming responses
  • responsive layout
  • modern citation cards
  • minimal professional design

πŸ› οΈ Tech Stack

Frontend

  • Streamlit

Backend

  • Python

AI & NLP

  • Google Gemini API
  • LangChain
  • HuggingFace Sentence Transformers

Vector Database

  • FAISS

Document Processing

  • PyPDFLoader
  • python-docx

πŸ“‚ Project Structure

document-qa-system/
β”‚
β”œβ”€β”€ ui.py
β”œβ”€β”€ app.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
β”œβ”€β”€ .env
β”‚
└── utils/
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ document_processor.py
    β”œβ”€β”€ vector_store.py
    └── llm_handler.py

βš™οΈ Installation Guide

1️⃣ Clone Repository

git clone https://github.com/Khushisawalkar/document-qa-system.git
cd document-qa-system

2️⃣ Create Virtual Environment

Windows

python -m venv venv
venv\Scripts\activate

Linux / Mac

python3 -m venv venv
source venv/bin/activate

3️⃣ Install Dependencies

pip install -r requirements.txt

πŸ”‘ Gemini API Setup

Create a .env file in the root directory:

GEMINI_API_KEY=your_api_key_here

Get API key from:

https://aistudio.google.com/app/apikey


▢️ Running the Application

Run Streamlit UI

streamlit run ui.py

Open browser:

http://localhost:8501

πŸ’‘ Example Questions

  • Summarize this document
  • Explain the main concepts
  • What are the key conclusions?
  • Give important points from page 5
  • What technologies are discussed?
  • Compare two sections from the document
  • What are the major findings?
  • Extract important formulas
  • Generate revision notes

🧠 How It Works

Step 1 β€” Document Upload

User uploads one or more documents.

Step 2 β€” Text Extraction

The system extracts text while preserving metadata.

Step 3 β€” Chunking

Documents are split into semantic chunks for retrieval.

Step 4 β€” Embedding Generation

Chunks are converted into vector embeddings using sentence transformers.

Step 5 β€” FAISS Indexing

Embeddings are stored in a FAISS vector database.

Step 6 β€” Semantic Retrieval

Relevant chunks are retrieved based on user query similarity.

Step 7 β€” AI Response Generation

Gemini generates contextual responses using retrieved document content.


πŸ“Έ Main Interface Features

πŸ“‚ Sidebar

  • document upload
  • language selection
  • settings
  • processing controls

πŸ’¬ Chat Interface

  • conversational AI responses
  • streaming text animation
  • source citations
  • contextual memory

πŸ“‹ Summary Tab

  • AI-generated summaries
  • concise document understanding

🏷️ Keywords Tab

  • extracted keywords
  • technical terms
  • important concepts

πŸš€ Future Improvements

πŸ”Ž OCR Support

Extract text from:

  • scanned PDFs
  • handwritten notes
  • images

πŸ–ΌοΈ Multimodal AI

Support:

  • image understanding
  • charts
  • diagrams
  • screenshots

🎀 Voice Interaction

  • speech-to-text queries
  • AI voice responses

☁️ Cloud Deployment

Deploy using:

  • Streamlit Cloud
  • Render
  • AWS
  • Azure
  • HuggingFace Spaces

πŸ” Authentication System

  • user accounts
  • secure login
  • saved conversations

πŸ’Ύ Persistent Database

Store:

  • document embeddings
  • chat history
  • user sessions

πŸ“Š Advanced Analytics

  • document statistics
  • topic modeling
  • knowledge graph visualization

πŸ“€ Export Features

Export:

  • chats
  • summaries
  • notes
  • reports

πŸ“š Research Assistant Mode

  • citation generation
  • paper summarization
  • academic Q&A

πŸ§ͺ Fine-Tuned Local Models

Future support for:

  • local LLMs
  • offline mode
  • privacy-focused deployment

🎯 Use Cases

πŸ‘©β€πŸŽ“ Students

  • exam preparation
  • note summarization
  • revision assistance

πŸ‘¨β€πŸ’Ό Professionals

  • document analysis
  • contract review
  • report summarization

πŸ‘©β€πŸ”¬ Researchers

  • literature review
  • paper understanding
  • semantic search

πŸ‘¨β€πŸ« Teachers

  • educational content extraction
  • question generation
  • teaching assistance

πŸ“ˆ Performance Optimizations

  • semantic chunking
  • lazy embedding loading
  • incremental indexing
  • optimized retrieval
  • contextual memory handling

πŸ§‘β€πŸ’» Author

Khushi Sawalkar

Electronics & Telecommunication Engineering Student Python Developer | AI Enthusiast | ML & NLP Projects

GitHub

https://github.com/Khushisawalkar

LinkedIn

https://linkedin.com/in/khushisawalkar


⭐ Project Highlights

  • Real-world AI application
  • Production-style UI
  • Modular architecture
  • Retrieval-Augmented Generation (RAG)
  • Multi-document intelligence
  • Explainable AI responses
  • Strong portfolio project

πŸ“„ License

This project is licensed under the MIT License.

You are free to:

  • use
  • modify
  • distribute
  • improve

with proper attribution.


πŸ™Œ Acknowledgements

Built using:

  • Streamlit
  • LangChain
  • FAISS
  • HuggingFace
  • Google Gemini AI
  • Open-source AI ecosystem

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors