📄 PaperPal — AI Research Paper Explainer

🚀 Elevator Pitch

Turn any research paper into simple explanations, slides, and instant answers with Gemini.

💡 What Inspired Me

As a solo hacker and student, I constantly ran into the same problem: research papers are dense, technical, and time-consuming to digest. Even after reading for hours, equations and experimental sections often remained unclear.

Many tools summarize documents, but few teach them.

I wanted to build something that felt like a personal tutor—an AI that doesn’t just shorten a paper, but walks you through it step by step, explains the math, and helps you prepare to present it.

That idea became PaperPal.

🛠️ What I Built

PaperPal is a web application where users upload academic PDFs and interact with them conversationally.

Once a paper is uploaded, the system:

  1. Extracts structured text from the PDF.
  2. Splits the content into logical sections.
  3. Sends those sections to Gemini with carefully designed prompts.
  4. Generates:
    • Plain-English summaries
    • Section explanations
    • Equation breakdowns
    • Slide outlines
    • Flashcards
  5. Supports real-time Q&A grounded in the document.

When mathematical expressions appear, PaperPal rewrites them in LaTeX and adds intuition.

For example, a loss function like:

[ L(\theta) = \sum_{i=1}^{n} \left(y_i - f_\theta(x_i)\right)^2 ]

is translated into:

This formula measures how far the model’s predictions ( f_\theta(x_i) ) are from the real values ( y_i ). Training minimizes this total squared error.


🧠 What I Learned

Building PaperPal taught me several important lessons:

  • Prompt design is everything. Small wording changes drastically improved explanation quality.
  • Chunking large documents matters. Long papers needed to be broken into sections before being sent to the model.
  • User experience drives adoption. Features like “Explain Simply” and “Generate Slides” made the tool intuitive.
  • Trust and transparency are crucial. I added guardrails so outputs always referenced the provided paper rather than hallucinating new facts.

🧱 How I Built It

Tech Overview:

  • Frontend: Next.js + React + Tailwind CSS
  • Backend: FastAPI
  • AI: Google Gemini API
  • PDF Parsing: pdfplumber
  • Math Rendering: KaTeX
  • Diagrams: Mermaid.js
  • Cloud: Google Cloud Run
  • Storage & Auth: Firebase

Pipeline:

  1. PDF upload → server processing.
  2. Text extraction + section detection.
  3. Semantic chunking.
  4. Prompted Gemini calls for explanation, math interpretation, and slide generation.
  5. Streaming responses back to the UI.
  6. Chat interface for follow-up questions.

⚠️ Challenges I Faced

📚 Handling Long PDFs

Some papers exceeded token limits. I solved this by:

  • summarizing each section individually,
  • then synthesizing a final overview from those summaries.

📐 Explaining Mathematics Reliably

Generic prompts produced vague explanations. I introduced targeted instructions like:

“Explain this equation step by step and give an intuitive interpretation.”

This significantly improved clarity.

🧪 Reducing Hallucinations

Occasionally the model invented datasets or results. To mitigate this:

  • I always passed the exact paper excerpt,
  • asked Gemini to stay strictly grounded in the provided text,
  • and requested paragraph-level references.

⏱️ Solo Time Constraints

With limited time, I prioritized features that created the strongest demo: upload → explain → ask questions → generate slides. Advanced exports and collaboration were saved for future work.


🌟 What’s Next

With more time, PaperPal could grow into a full research assistant:

  • 📊 Auto-generated architecture diagrams
  • 🔗 Section-level citations
  • 👥 Collaborative study rooms
  • 📤 Export to PowerPoint or Google Slides
  • 📚 Personal research libraries
  • 🔍 Cross-paper comparisons and literature maps
  • 🗣️ Voice-based Q&A

🙌 Final Thoughts

PaperPal demonstrates how Gemini can move beyond summarization to become a genuine learning partner—helping students and researchers unlock complex ideas faster.

Built solo for the Gemini Hackathon.

Built With

Share this project:

Updates