← Back to Projects

📄 Medical Literature RAG

Upload a research paper (PDF or TXT) → the system chunks and embeds it → then ask natural language questions and get AI-generated answers grounded in the paper with citations.

📤 Upload a Research Paper

Upload a PDF or TXT file. The text will be chunked, embedded, and stored for querying.

🏗️ How This Works

  1. PDF text extracted client-side via pdf.js
  2. Text chunked into ~800 char overlapping segments
  3. Each chunk embedded with Gemini's text-embedding-004
  4. Query embedded → cosine similarity → top-5 chunks retrieved
  5. Gemini generates answer grounded in retrieved context