How rajuguguloth/agentic-rag-research-assistant-with-mcp-integration- works
This repository is an agentic RAG research assistant: users ingest PDFs or papers, build an index, then ask questions, chat with documents, or generate deep-read reports. The main retrieval path combines dense and BM25 search before answering; separate branches provide verification, MCP tools, feedback, and evaluation/optimization. The map includes documented capabilities whose source was not sampled, but omits uncertain connections. Relationships are based on the README, excerpts, and SOURCE INDEX references; unsampled implementation details are not assumed.
Main entry points: app.py Gradio and FastAPI · orchestrator.py Deep-read workflow · hybrid_retriever.py Hybrid retrieval · document_chat.py Document chat
Components 26
Application interfaces
- Gradio and FastAPI
research_assistant/app.py - Feedback API
research_assistant/api/feedback_router.py - MCP tools
research_assistant/mcp_server.py
Document ingestion
- PDF and paper loading
research_assistant/etl/universal_loader.py - Rich PDF extraction
research_assistant/etl/pdf_rich_loader.py - Document chunking
research_assistant/etl/chunker.py
Retrieval and answering
- Hybrid retrieval
research_assistant/retrieval/hybrid_retriever.py - Dense search
research_assistant/retrieval/dense_retriever.py - BM25 search
research_assistant/retrieval/sparse_retriever.py - Query normalization
research_assistant/retrieval/query_utils.py - Document chat
research_assistant/orchestration/document_chat.py - Research agent
research_assistant/orchestration/agent.py - Research planner
research_assistant/orchestration/planner.py
Deep research
- Deep-read workflow
research_assistant/orchestration/deep_read/orchestrator.py - Section analysis
research_assistant/orchestration/deep_read/section_agents.py - Report merger
research_assistant/orchestration/deep_read/merger.py - Slide generation
research_assistant/orchestration/deep_read/ppt_builder.py
Quality and operations
- Answer verification
research_assistant/verification/gemini_verifier.py - User memory
research_assistant/memory/user_memory.py - RAG evaluation
research_assistant/evaluation/ragas_batch.py - Feedback and tracing
research_assistant/observability/feedback.py - Prompt optimization
research_assistant/optimization/prompt_optimizer.py - LLM gateway
research_assistant/llm/gateway.py
Other components
- Research user
- MCP client
- LLM provider
Connections 32
- Research user → Gradio and FastAPI: uses
- Gradio and FastAPI → PDF and paper loading: loads documents
research_assistant/app.py - Gradio and FastAPI → Document chunking: chunks documents
research_assistant/app.py - Gradio and FastAPI → Hybrid retrieval: builds index
research_assistant/app.py - PDF and paper loading → Rich PDF extraction: extracts PDF
- Hybrid retrieval → Dense search: searches vectors
research_assistant/retrieval/hybrid_retriever.py - Hybrid retrieval → BM25 search: searches terms
research_assistant/retrieval/hybrid_retriever.py - Research user → Document chat: asks questions
- Gradio and FastAPI → Document chat: routes chat
research_assistant/app.py - Document chat → Hybrid retrieval: retrieves context
research_assistant/orchestration/document_chat.py - Document chat → Answer verification: checks relevance
research_assistant/orchestration/document_chat.py - Document chat → User memory: uses memory
research_assistant/orchestration/document_chat.py - Research user → Research agent: requests research
- Gradio and FastAPI → Research planner: plans research
research_assistant/app.py - Research agent → Hybrid retrieval: retrieves evidence
research_assistant/orchestration/agent.py - Research agent → Answer verification: verifies answer
research_assistant/orchestration/agent.py - Research user → Deep-read workflow: submits paper
- Gradio and FastAPI → Deep-read workflow: starts deep read
research_assistant/app.py - Deep-read workflow → PDF and paper loading: resolves source
research_assistant/orchestration/deep_read/orchestrator.py - Deep-read workflow → Rich PDF extraction: extracts content
research_assistant/orchestration/deep_read/orchestrator.py - Deep-read workflow → Section analysis: analyzes sections
research_assistant/orchestration/deep_read/orchestrator.py - Deep-read workflow → Report merger: merges report
research_assistant/orchestration/deep_read/orchestrator.py - Deep-read workflow → Slide generation: builds slides
research_assistant/orchestration/deep_read/orchestrator.py - MCP client → MCP tools: invokes tools
- Gradio and FastAPI → Feedback API: mounts endpoint
research_assistant/app.py - Feedback API → Feedback and tracing: records feedback
research_assistant/api/feedback_router.py - Research user → RAG evaluation: evaluates answers
- RAG evaluation → Hybrid retrieval: tests retrieval
research_assistant/evaluation/ragas_batch.py - RAG evaluation → Answer verification: judges evidence
research_assistant/evaluation/ragas_batch.py - Prompt optimization → LLM provider: generates variants
- LLM gateway → LLM provider: generates text
- Deep-read workflow → LLM gateway: gets gateway
research_assistant/orchestration/deep_read/orchestrator.py