An AI-powered PDF Chatbot built using FastAPI, Streamlit, FAISS, Sentence Transformers, and Google Gemini AI.
Upload PDF documents and interact with them conversationally using Retrieval-Augmented Generation (RAG), semantic search, and AI-powered contextual responses.
- PDF Upload & Processing
- PDF Text Extraction
- Recursive Text Chunking
- Local Embedding Generation
- FAISS Vector Database Integration
- Semantic Search Retrieval
- Gemini-powered Response Generation
- Conversational Chat Interface
- Retrieved Source Chunk Display
- FastAPI Backend
- Streamlit Frontend
- Modular RAG Pipeline Architecture
- FastAPI
- Python
- Uvicorn
- Streamlit
- Google Gemini API
- Sentence Transformers
- FAISS
- LangChain Text Splitters
- PyMuPDF
PDF Upload
↓
PDF Text Extraction
↓
Recursive Chunking
↓
Embedding Generation
↓
FAISS Vector Storage
↓
User Query
↓
Query Embedding
↓
Semantic Retrieval
↓
Context Injection
↓
Gemini Response Generation
AI-PDF-CHATBOT
│
├── backend
│ ├── app
│ │ ├── core
│ │ │ └── config.py
│ │ │
│ │ ├── routes
│ │ │ ├── upload.py
│ │ │ └── chat.py
│ │ │
│ │ ├── services
│ │ │ ├── chunk_service.py
│ │ │ ├── embedding_service.py
│ │ │ ├── pdf_service.py
│ │ │ ├── rag_service.py
│ │ │ ├── retrieval_service.py
│ │ │ └── vector_store_service.py
│ │ │
│ │ └── main.py
│ │
│ ├── data
│ │ ├── uploads
│ │ └── vector_store
│ │
│ ├── .env
│ └── requirements.txt
│
├── frontend
│ └── streamlit_app.py
│
├── screenshots
├── README.md
└── requirements.txt
git clone https://github.com/decoded15/ai-pdf-chatbot.git
cd ai-pdf-chatbotpython -m venv venvvenv\Scripts\activatesource venv/bin/activatecd backend
pip install -r requirements.txtcd frontend
pip install streamlit requestsCreate a .env file inside backend/
GOOGLE_API_KEY=your_api_key_herecd backend
uvicorn app.main:app --reloadBackend runs on:
http://127.0.0.1:8000
cd frontend
streamlit run streamlit_app.pyFrontend runs on:
http://localhost:8501
PDF Upload
↓
Text Extraction
↓
Chunk Generation
↓
Embedding Creation
↓
FAISS Vector Indexing
↓
User Question
↓
Query Embedding
↓
Semantic Retrieval
↓
Context Injection
↓
Gemini AI Response
- Retrieval-Augmented Generation (RAG)
- Semantic Search
- Vector Databases
- Embeddings
- Recursive Chunking
- Prompt Engineering
- Context Injection
- Similarity Search
- AI Orchestration Pipelines
- FastAPI Backend Architecture
- Streamlit Frontend Integration
- Local Embedding Models
- Semantic Retrieval Systems
- Multi-PDF Support
- Conversational Memory
- Citation-based Responses
- Hybrid Search
- Reranking
- OCR Support
- Authentication System
- Cloud Vector Database Integration
- Streaming Responses
- Docker Deployment
Built by Dibyansh (decoded15)



