A newer version of the Gradio SDK is available:
6.9.0
metadata
title: AI Research Paper Analyst
emoji: π¬
colorFrom: blue
colorTo: indigo
sdk: gradio
python_version: '3.10'
app_file: app.py
pinned: false
license: mit
π¬ AI Research Paper Analyst
Automated Peer-Review System powered by Multi-Agent AI (CrewAI + GPT-4o).
π Features
- Multi-Agent Pipeline: 7 agents (1 safety gate + 6 analysis) review methodology, novelty, and quality.
- Programmatic Safety: Deterministic guardrails for PII redaction, prompt injection detection, and malicious URL blocking (regex/logic-based β no LLM).
- Structured Output: All agent outputs enforced via Pydantic schemas.
- 15-Point Rubric: Binary quality scoring with automatic enhancement for failed criteria.
- Interactive UI: Gradio interface with 6 tabs, real-time progress tracking, and report export.
π οΈ Agents
- Safety Guardian β Programmatic gate that blocks unsafe documents (no LLM).
- Paper Extractor (GPT-4o) β Structures raw text into metadata, methodology, findings.
- Methodology Critic (GPT-4o-mini) β Evaluates study design, reproducibility, bias risks.
- Relevance Researcher (GPT-4o-mini) β Checks novelty via Semantic Scholar / OpenAlex.
- Review Synthesizer (GPT-4o-mini) β Drafts the initial peer-review report.
- Rubric Evaluator (GPT-4o-mini) β Scores against 15 strict binary criteria.
- Enhancer (GPT-4o-mini) β Polishes the final output into a publication-ready report.
π§ Tools
| Tool | Purpose |
|---|---|
pdf_parser |
Extract text from PDF (pdfplumber) |
pii_detector |
Detect & redact PII (emails, SSNs, phones, credit cards) |
injection_scanner |
Detect 9 prompt-injection patterns |
url_validator |
Blocklist check for malicious URLs |
citation_search |
Search Semantic Scholar / OpenAlex for related papers |
π How to Use
Prerequisites
- Python 3.10+
- OpenAI API key with GPT-4o access
Setup & Run
# 1. Install dependencies
pip install -r requirements.txt
# 2. Create .env file with your API key
echo "OPENAI_API_KEY=your-key-here" > .env
# 3. Launch the app
python app.py
Open http://localhost:7860 in your browser, upload a PDF, and click "Analyze Paper".
On HuggingFace Spaces
Add OPENAI_API_KEY as a Secret in Space Settings.
π Project Structure
βββ app.py # Main pipeline + Gradio UI
βββ agents/ # 6 CrewAI agent definitions
βββ tools/ # 5 custom tool implementations
βββ schemas/models.py # 8 Pydantic output schemas
βββ requirements.txt # Python dependencies
βββ walkthrough.md # Detailed project walkthrough
βββ PROJECT_DOCUMENTATION.md # Full technical documentation
π Environment Variables
| Variable | Required | Purpose |
|---|---|---|
OPENAI_API_KEY |
Yes | OpenAI API access (GPT-4o required) |
Homework 5 β Agentic AI Bootcamp