A Retrieval-Augmented Generation (RAG) application that allows users to upload PDF documents and interact with them using natural language. DocMind AI retrieves the most relevant sections from the document and generates context-aware answers powered by LLaMA 3.3 70B.
DocMind AI is a Retrieval-Augmented Generation (RAG) system that enables users to upload PDF documents and ask natural language questions about their contents.
Instead of relying solely on an LLM's internal knowledge, the application retrieves the most semantically relevant portions of the uploaded document using vector search and supplies them as context to the language model. This ensures responses remain grounded in the document while significantly reducing hallucinations.
The application also displays the retrieved source chunks, allowing users to verify exactly where each answer originated.
- Upload any PDF and start chatting instantly
- Semantic document retrieval using FAISS
- Fast inference with Groq's LLaMA 3.3 70B
- Context-aware answers grounded in uploaded documents
- Source chunk references for transparency
- Fully local embedding generation
- Modern Streamlit interface
- Low-latency RAG pipeline
| Layer | Technology |
|---|---|
| Language Model | Groq - LLaMA 3.3 70B |
| RAG Framework | LangChain |
| Vector Database | FAISS |
| Embeddings | HuggingFace all-MiniLM-L6-v2 |
| PDF Parsing | PyMuPDF |
| Frontend | Streamlit |
| Deployment | Streamlit Community Cloud |
Upload PDF
│
▼
┌────────────────┐
│ PyMuPDF │
│ PDF Extraction │
└────────────────┘
│
▼
┌────────────────┐
│ Text Chunking │
│ Recursive Split│
└────────────────┘
│
▼
┌────────────────┐
│ HuggingFace │
│ Embeddings │
└────────────────┘
│
▼
┌────────────────┐
│ FAISS Index │
└────────────────┘
▲
│
User Question
│
▼
┌────────────────┐
│ Embed Question │
└────────────────┘
│
▼
┌────────────────┐
│ Similarity │
│ Search (Top-K) │
└────────────────┘
│
▼
┌────────────────┐
│ LangChain RAG │
│ Prompt Builder │
└────────────────┘
│
▼
┌────────────────┐
│ Groq LLaMA │
│ 3.3 70B │
└────────────────┘
│
▼
Answer + Retrieved Source Chunks
Users upload any PDF through the Streamlit interface.
↓
PyMuPDF extracts raw text from every page.
↓
The extracted text is split into overlapping chunks to preserve context while keeping each chunk within the embedding model's limits.
↓
Each chunk is converted into dense vector embeddings using HuggingFace's all-MiniLM-L6-v2 model.
↓
The embeddings are indexed inside FAISS for efficient similarity search.
↓
The user's query is embedded using the same embedding model.
↓
FAISS returns the Top-K most semantically similar chunks.
↓
LangChain combines the retrieved chunks with the user's query and sends them to Groq's LLaMA 3.3 70B.
↓
The generated answer and supporting source chunks are presented to the user.
- Multiple PDF support
- Conversational memory
- OCR for scanned documents
- Hybrid search (BM25 + Vector Search)
- Persistent vector databases (ChromaDB / Pinecone)
- PDF highlighting for cited passages
- Chat history
- User authentication
- Export chat conversations
- Fast embedding generation
- Millisecond-scale vector retrieval using FAISS
- Low inference latency via Groq
- Optimized for real-time document question answering
This project is licensed under the MIT License.