Upload any PDF and ask questions in plain English. Get instant answers with exact page references — powered by Claude AI.
Stop reading 50-page documents to find one answer. Upload your PDF, ask your question, get the answer with the exact page it came from.
You upload PDF → Ask a question → Get answer with page references in seconds.
- PDF Upload — Drag and drop or click to upload, up to 50MB
- Natural Language Questions — Ask anything in plain English
- Accurate Answers — Claude answers only from your document
- Page References — Every answer includes which page(s) it came from
- Honest Responses — Says "I couldn't find that" instead of hallucinating
- Dark UI — Clean, professional interface
- PDF uploaded → text extracted page by page
- Text split into 500-word chunks with 50-word overlap
- User asks a question
- TF-IDF ranker finds the most relevant chunks
- Top chunks + question sent to Claude API
- Claude answers using only that context and cites page numbers
| Layer | Technology |
|---|---|
| Backend | Node.js + Express |
| AI | Anthropic Claude API |
| PDF Parsing | pdf-parse |
| Relevance Ranking | TF-IDF (custom implementation) |
| Frontend | HTML, CSS, Vanilla JS |
- Node.js v18+
- Anthropic API key — get one at console.anthropic.com
git clone https://github.com/manasa-shivananda/ai-document-qa.git
cd ai-document-qa
npm install
Create a .env file:
ANTHROPIC_API_KEY=your_api_key_here
PORT=3000
node server.js
Open http://localhost:3000 in your browser.
- RAG pipeline implementation — chunking, relevance ranking, context injection
- TF-IDF ranking — scoring document chunks against user queries without a vector DB
- PDF text extraction — per-page extraction to enable accurate page citations
- Prompt engineering — instructing Claude to answer only from provided context
- Claude API integration — multi-turn context management and structured responses
- Vector embeddings for better relevance matching
- Support for multiple documents
- Chat history (follow-up questions)
- Deploy to Railway/Render
Built by Manasa Shivananda — Full-Stack Developer specialising in AI-powered tooling.
AI Portfolio Series:
- Project 1: AI Code Reviewer
- Project 2: AI Document Q&A (this project)
MIT License
