ResearchGPT - Project Overview Workflow

┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ PDF Upload │────▶ │ PDF Processing │────▶ │ Vector Storage │ │ (Frontend) │ │ (PyMuPDF) │ │ (Pinecone) │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ ┌─────────────────┐ ┌─────────────────┐ ┌───────▼─────────┐ │ AI Response │◀──── │ LLM (Groq) │◀──── │ RAG Retrieval │ │ (Frontend) │ │ LLaMA 3.3 70B │ │ (Semantic) │ └─────────────────┘ └─────────────────┘ └─────────────────┘

  1. Upload → User uploads a PDF research paper
  2. Process → Backend extracts text, detects sections, chunks content
  3. Embed → Each chunk is embedded using BGE-base embedding model
  4. Store → Vectors stored in Pinecone with metadata (page, section)
  5. Query → User asks a question
  6. Retrieve → Semantic search finds relevant chunks
  7. Generate → LLM generates answer with citations
  8. Display → Response shown with page references

Inspiration

Researchers and students spend countless hours reading (or skimming really) dense academic papers, often struggling to quickly find specific information or understand complex concepts. The inspiration was to create a tool that makes research papers interactive ,allowing users to have a conversation with their documents instead of manually scanning through pages. Existing websites like Paperpal is limited and is not convenient on the long run.

What it does

ResearchGPT is an AI-powered research assistant that lets you:

  • Upload PDF research papers and have them automatically processed (chunked,injested and queryed)
  • Ask questions in natural language about any uploaded paper.
  • Get accurate answers with page citations so you can verify the source.
  • Choose between 3 explanation modes:
    • Academic - Formal terminology with detailed analysis
    • Simple - Everyday language without jargon
    • ELI5 (Explain Like I'm 5!) - Explained like you're 5 with fun analogies
  • Build a personal research library with multiple papers and also group multiple papers and query as a whole

How we built it

  1. Backend (FastAPI): Built a REST API with endpoints for uploading papers, listing them, deleting, and asking questions. Used async/await for efficient processing.

  2. PDF Processing Pipeline: Used PyMuPDF to extract text page-by-page, implemented section detection (Abstract, Methods), and chunked documents with overlap for context preservation.

  3. RAG System: Integrated Pinecone vector database for semantic search. Each chunk is embedded using HuggingFace's BGE model and stored with metadata.

  4. LLM Integration: Connected to Groq's API for fast inference with LLaMA 3.3 70B. Built custom prompts for each explanation mode.

  5. Frontend (Next.js): Created a modern, dark-themed UI with animated intro screen, real-time chat interface, and responsive sidebar for paper management.

Challenges we ran into.

  1. Hydration Mismatch: Random particle positions in the intro animation caused server/client differences. Solved by using predefined positions.

  2. Model Deprecation: The initial LLaMA 3.1 model was decommissioned mid-development. Had to quickly switch to LLaMA 3.3.

  3. Chunk Boundary Issues: Important information often split across chunks. Solved with overlapping chunks (100 character overlap).

  4. Citation Accuracy: Ensuring page numbers matched the actual PDF required careful metadata tracking through the entire pipeline.

  5. UI Responsiveness: Balancing the sidebar, chat area, and input box positioning for different screen sizes.

  6. Reimplemented frontend UI several times for sharp but smooth usage.

Accomplishments that we're proud of

Page-accurate citations - Every answer includes exact page references users can verify Three explanation modes - Making research accessible to everyone from experts to beginners Fun and animated UI - Galaxy-themed design with smooth transitions and intro animation Fast responses - Groq's LPU delivers answers in seconds, not minutes Clean architecture - Modular code with separate services for LLM, vector store, and document processing

What we learned

-RAG is powerful but needs tuning - Chunk size, overlap, and retrieval count significantly affect answer quality

  • Vector databases - How semantic search works and how to structure metadata for filtering
  • LLM Prompting - Different prompts dramatically change output quality and style
  • Real-time UX - The importance of loading states, animations, and feedback for user experience
  • PDF complexity - Text extraction is harder than expected with varying layouts and formats

What's next for ResearchGPT

  • Highlighted PDF viewer - Show the exact text being cited in context
  • Citation export - Generate bibliography entries in various formats -Collaborative features - Share papers and insights with team members
  • Paper summarization - Auto-generate abstracts and key takeaways -Comparison mode - Compare findings across multiple papers -Mobile app - Read and query papers on the go -Voice mode for Querying on the go

Built With

Share this project:

Updates