ChatGPT-like PDF & Knowledge Assistant (RAG-Powered)
DocuMind AI is a full-stack Retrieval-Augmented Generation (RAG) application that allows users to upload PDFs and chat with them intelligently, while also supporting general AI conversation when no document context is provided.
Built with a production-grade architecture, DocuMind AI combines modern LLMs, vector search, and a clean chat UI to deliver accurate, context-aware answers.
-
Frontend (Vercel): https://docu-mind-ai-zeta.vercel.app/
-
Backend API (Render): https://documind-ai-2.onrender.com
-
Upload any PDF document
-
Automatically chunks and indexes content
-
Answers questions strictly from document context
-
Works like ChatGPT when no PDF is selected
-
Intelligent fallback if document context is not relevant
-
Maintains conversation history per session
-
Supports natural follow-up questions
-
Uses Pinecone for fast semantic similarity search
-
Isolates documents using namespaces (multi-PDF ready)
-
ChatGPT-style interface
-
PDF upload + chat in one flow
-
Clear distinction between PDF mode and General mode
-
Frontend on Vercel
-
Backend on Render
-
Designed for real-world production usage
User (Browser)
↓
React UI (Vercel)
↓
Express API (Bun, Render)
↓
LangChain RAG Pipeline
↓
Pinecone Vector Database
↓
LLM (Groq)
-
PDF Upload
-
User uploads a PDF
-
Backend saves it temporarily
-
Document is chunked and embedded
-
Vectors are stored in Pinecone under a unique namespace
-
-
Chat Flow
-
User asks a question
-
If a pdfId exists → RAG search is performed
-
Relevant chunks are sent to the LLM
-
If no relevant context is found → fallback to general chat
-
-
Conversation Memory
-
Recent messages are stored per session
-
Enables follow-up questions with context
-
-
React (Vite)
-
JavaScript
-
Fetch API
-
Deployed on Vercel
-
Bun runtime
-
Node.js / Express
-
LangChain
-
Multer (PDF upload)
-
Deployed on Render
-
Groq LLM API
-
Pinecone Vector Database
-
Google Generative AI Embeddings
-
LangChain PDF Loader
company-chatbot/
├── routes/
│ ├── chat.route.js
│ └── upload.route.js
├── services/
│ ├── chat.service.js
│ └── pdf.service.js
├── prepare.js
├── server.js
├── uploads/
└── package.json
Frontend is maintained separately in a chat-ui project.
GROQ_API_KEY=your_api_key
PINECONE_API_KEY=your_api_key
PINECONE_INDEX_NAME=your_index_name
VITE_BACKEND_URL=https://your-backend-url
bun install
bun server.js
npm install
npm run dev
-
Uses disk-based PDF uploads (safe on Render)
-
Avoids unstable PDF parsing logic
-
Relies on LangChain’s proven PDFLoader
-
Keeps infrastructure simple and reliable
-
Optimized for correctness before optimization
-
User authentication (JWT / OAuth)
-
Persistent chat history (Redis / DB)
-
Streaming responses (typing effect)
-
PDF management dashboard
-
Usage analytics & limits
Savan Kansagara GenAI & Full-Stack Developer