Skip to content

adiv5/ResearchPrism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔬 ResearchPrism

ResearchPrism is a desktop ResearchPrism that lets you have deep, cited conversations with any academic PDF — and automatically builds an interactive knowledge layer on top of it: figures, equations, citation graphs, and on-demand code generation.

Built with PyQt5 and powered by a multi-backend AI cascade (Gemini → local HuggingFace).


✨ Features

📄 Paper Analysis

  • Drag-and-drop any PDF to load it instantly
  • Deep structured analysis across every section — abstract, methods, equations, results, appendices
  • Streaming token-by-token output so you see the analysis as it arrives
  • Cited Q&A: every answer references the exact paper section ([Paper § Methods])

📊 Overview Panel (5 Tabs)

Tab What it does
Overview Structured summary of the full paper
Figures Extracted figures/tables with AI-generated descriptions
Equations Every equation pulled out and explained term-by-term
Citation Graph Interactive, draggable graph of the paper's reference network enriched via Semantic Scholar + arXiv
Code Full working codebase generated on demand, file by file, from the paper's methodology

🔗 Integrations

  • Semantic Scholar — citation metadata, reference enrichment, related works
  • arXiv — paper lookup by title or arXiv ID, cached for offline reuse
  • GitHub detection — auto-detects any official repo URL mentioned in the paper and links it to map it against the paper

🤖 Multi-Backend AI with Auto-Cascade

ResearchPrism automatically cascades through backends when quota is exhausted or a key is unavailable:

Gemini (cloud) → HuggingFace (Local - eg. DeepSeek-R1-Distill-Qwen-14B)

to get specific huggingface model locally

python download_model.py <org_name>/<model_name>

eg. python download_model.py deepseek-ai/DeepSeek-R1-Distill-Qwen-14B

All backends support streaming. The active model badge in the UI updates live when a cascade occurs.

🖱️ Smart Selection UX

  • Select any text in the PDF viewer then click on Ask AI button to quote the text and ask further questions
  • "Find references" button to find references of selected text

🖥️ Screenshots

ResearchPrism Demo


🚀 Setup

Prerequisites

  • Python 3.9+
  • At least one API key (Gemini), or a local GPU with ≥16 GB VRAM for the HuggingFace backend
  • API key could be created in free tier on Google AI studio

1. Clone the repo

git clone https://github.com/your-username/ResearchPrism.git
cd ResearchPrism

2. Install dependencies

pip install -r requirements.txt

For PyTorch with GPU support, install the CUDA build for your system first: https://pytorch.org/get-started/locally/

3. Set your API key

Enter your API key in-app via Settings (Ctrl+,).

4. Run

python main.py

🧑‍💻 Usage

  1. Load a paper — click Load Paper or drag & drop a PDF anywhere on the window (Ctrl+O)
  2. Wait for analysis — streaming analysis appears in the Overview tab (30–60s for complex papers)
  3. Explore tabs — Figures, Equations, Citation Graph, and Code tabs populate as background workers finish
  4. Ask questions — type in the chat input, press Enter to send, Shift+Enter for a new line
  5. Use selection popups — select any text in the PDF viewer for AI actions using buttons
  6. Generate code — go to the Code tab and click Generate, or ask in chat: "Write the full PyTorch implementation"

Example questions

"What is the main contribution of this paper?"
"Explain the equations that are used?"
"What datasets were used and how were they preprocessed?"
"How does this compare to prior work on [topic]?"
"Is there an official GitHub repository?"
"Write the full PyTorch implementation of the model."

🗂️ Project Structure

ResearchPrism/
├── main.py                      # Entry point
├── requirements.txt
├── README.md
│
├── agent/
│   ├── core.py                  # Multi-backend AI agent, streaming, auto-cascade
│   └── __init__.py
│
├── ui/
│   ├── main_window.py           # Main PyQt5 window, layout, drag-and-drop
│   ├── overview_panel.py        # 5-tab overview: summary, figures, equations, citation graph, code
│   ├── pdf_panel.py             # PDF viewer with selection popup
│   ├── settings_dialog.py       # API key & model settings modal
│   ├── workers.py               # QThread workers for async API calls
│   └── __init__.py
│
└── utils/
    ├── figure_extractor.py      # PDF figure/table extraction (PyMuPDF)
    ├── markdown_renderer.py     # Markdown → HTML for QTextBrowser
    └── __init__.py

⚙️ Backends

Backend Model Context Notes
Google Gemini gemini-2.0-flash(better models available if you have Cloud API Key) 1M tokens Default; native PDF support
HuggingFace - Local; requires ≥16 GB VRAM

🤝 Contributing

Pull requests are welcome. For large changes, please open an issue first to discuss what you'd like to change.

  1. Fork the repo
  2. Create your feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m 'Add my feature'
  4. Push to the branch: git push origin feature/my-feature
  5. Open a Pull Request

📄 License

AGPLv3 License — see LICENSE for details.


🙏 Acknowledgements

Releases

No releases published

Packages

 
 
 

Contributors

Languages