A newer version of the Gradio SDK is available:
6.2.0
Quick Start Guide
Installation & Setup (5 minutes)
1. Install Dependencies
pip install -r requirements.txt
2. Configure Azure OpenAI
Create a .env file with your Azure OpenAI credentials:
cp .env.example .env
Edit .env:
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_API_KEY=your-api-key-here
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o-mini
3. Run the Application
python app.py
Visit http://localhost:7860 in your browser.
First Query
Try this example query:
Research Question: "What are the latest advances in multi-agent reinforcement learning?"
Category: cs.AI - Artificial Intelligence
Number of Papers: 3
Click "Analyze Papers" and wait ~1-2 minutes.
Expected Output
You should see:
- Papers Tab: Table with 3 retrieved papers
- Analysis Tab: Detailed analysis of each paper
- Synthesis Tab:
- Executive summary
- Consensus findings (green highlights)
- Contradictions (yellow highlights)
- Research gaps
- Citations Tab: APA-formatted references
- Stats Tab: Processing time and cost (~$0.20-0.40)
Troubleshooting
Error: "No module named 'xyz'"
pip install -r requirements.txt --upgrade
Error: "Azure OpenAI authentication failed"
- Check your
.envfile has correct credentials - Verify your Azure OpenAI deployment name matches your actual deployment
Error: "Failed to download paper"
- Some arXiv papers may have download issues
- Try a different query or category
Error: "ChromaDB error"
rm -rf data/chroma_db/
# Restart the app
Architecture Overview
User Query
β
Retriever Agent (arXiv search + PDF processing)
β
Analyzer Agent (RAG-based analysis per paper)
β
Synthesis Agent (Cross-paper comparison)
β
Citation Agent (Validation + APA formatting)
β
Gradio UI (4 output tabs)
Key Features
- Temperature=0: Deterministic outputs
- RAG Grounding: All claims backed by source text
- Semantic Caching: Repeated queries use cache
- Cost Tracking: Real-time cost estimates
- Error Handling: Graceful failures with user-friendly messages
Performance Benchmarks
| Papers | Time | Cost | Chunks |
|---|---|---|---|
| 3 | ~90s | $0.25 | ~150 |
| 5 | ~120s | $0.40 | ~250 |
| 10 | ~180s | $0.75 | ~500 |
Next Steps
- Customize Categories: Edit
ARXIV_CATEGORIESinapp.py - Adjust Chunking: Modify
chunk_sizeinutils/pdf_processor.py - Change Top-K: Update
top_kinrag/retrieval.py - Add Logging: Increase log level in agents for debugging
Deployment to Hugging Face
# 1. Create a new Space on huggingface.co
# 2. Upload all files
# 3. Add secrets in Space settings:
# - AZURE_OPENAI_ENDPOINT
# - AZURE_OPENAI_API_KEY
# - AZURE_OPENAI_DEPLOYMENT_NAME
# 4. Space will auto-deploy
Support
For issues: https://github.com/yourusername/Multi-Agent-Research-Paper-Analysis-System/issues