An AI-powered multi-agent system that automatically analyzes academic research papers using Retrieval-Augmented Generation (RAG), hybrid search, and specialized AI agents.
The system extracts information from research papers, retrieves relevant context, generates structured summaries, critiques research quality, and produces comprehensive reports.
- 📄 Upload research papers (PDF)
- 🔍 Hybrid Retrieval (Dense Embeddings + BM25)
- 🧠 Multi-Agent Architecture
- 📑 Automatic metadata extraction
- 📖 OCR support for scanned PDFs
- ✂️ Section-aware document chunking
- 🚫 Reference page filtering
- 📂 Parent-child chunking strategy
- 🤖 Gemini with automatic Groq fallback
- 📝 Structured research report generation
- ⚡ FastAPI REST APIs
- 🗄️ ChromaDB Vector Database
User Uploads PDF
│
▼
PDF Processing Service
│
┌─────────────────────────────┼─────────────────────────────┐
│ │ │
▼ ▼ ▼
PyMuPDF Loader OCR Fallback Metadata Extraction
(Title, Authors, Abstract)
│
▼
Reference Page Filtering
│
▼
Section Detection
│
▼
Parent → Child Chunking
│
▼
Metadata Enrichment
│
▼
ChromaDB Vector Store
│
┌───┴─────────────┐
▼ ▼
Dense Retrieval BM25 Retrieval
│ │
└────── Hybrid Retrieval ───────┘
│
▼
Parent Context Expansion
│
▼
Multi-Agent Pipeline
│
┌─────────────────────────────────────────────┐
│ │
▼ ▼
Planner Agent Search Agent
│ │
▼ ▼
Research Agent ----------------------------► Review.py
│ │
▼ ▼
Summarizer Agent --------------------------► Critic Agent
│
▼
Writer Agent
│
▼
Final Research Report
multi_agent_research_assistant/
│
├── agents/ # AI agents
│ ├── planner_agent.py
│ ├── search_agent.py
│ ├── research_agent.py
│ ├── summarizer_agent.py
│ ├── writer_agent.py
│ ├── critic_agent.py
│ └── review_agent.py
│
├── api/ # FastAPI endpoints
│
├── core/ # Configuration & utilities
│
├── database/ # Database operations
│
├── orchestration/ # Multi-agent workflow
│
├── prompts/ # Agent prompts
│
├── reports/ # Generated reports
│
├── schemas/ # Pydantic schemas
│
├── services/
│ ├── rag_service.py
│ ├── pdf_processor.py
│ └── embedding_service.py
│
├── tests/
│
├── tools/
│
├── uploads/
│
├── vectorstore/
│
├── logs/
│
├── .env
├── Dockerfile
├── requirements.txt
└── main.py
The user uploads a research paper through the FastAPI endpoint.
↓
The system
- extracts text using PyMuPDF
- performs OCR if necessary
- extracts metadata
- removes reference pages
- identifies document sections
↓
The processed document is converted into
- parent documents
- child chunks
Each chunk is enriched with metadata.
↓
The chunks are stored inside ChromaDB while BM25 indexes are built for lexical retrieval.
↓
For every user query the system
- checks metadata cache
- performs hybrid retrieval
- expands parent context
- prepares context for the LLM
↓
The retrieved context flows through specialized agents.
Planner
↓
Search
↓
Research
↓
Summarizer
↓
Critic
↓
Writer
↓
Final Report
Plans the research workflow and determines the execution order.
Retrieves relevant document chunks using hybrid retrieval.
Analyzes retrieved content and extracts key information.
Produces structured summaries and highlights important findings.
Evaluates limitations, weaknesses, and missing information.
Combines outputs from all agents into a structured research report.
Performs quality validation before generating the final response.
- FastAPI
- Python
- Google Gemini
- Groq (Fallback)
- LangChain
- ChromaDB
- BM25
- Sentence Transformers
- PyMuPDF
- OCR
- Retrieval-Augmented Generation (RAG)
- Hybrid Search
- Multi-Agent Systems
✅ PDF Upload
✅ OCR Support
✅ Metadata Extraction
✅ Hybrid Retrieval
✅ ChromaDB Integration
✅ BM25 Search
✅ Parent-Child Chunking
✅ Reference Filtering
✅ Multi-Agent Workflow
✅ Structured Report Generation
✅ Gemini → Groq Fallback
- Query routing
- Multi-document analysis
- Citation-aware retrieval
- Agent memory
- Streaming responses
- Web research integration
- Research paper comparison
- Knowledge graph generation
Prerna Mishra