System Architecture

Agentic RAG Pipeline

This system uses an agentic retrieval-augmented generation pipeline for academic paper question answering. It combines PDF processing, vector retrieval, LLM-based planning, query rewriting, evidence evaluation, grounded answer generation, conversation memory, and functional evaluation.

Architecture Flow
User Question
↓
Planner Agent
↓
Query Rewriter Agent
↓
Retriever Tool / ChromaDB
↓
Evidence Evaluation Agent
↓
Answer Generation Agent
↓
Final Answer with Page-Level Citations
Architecture Components
1. User Input

The user uploads academic PDF papers and asks a research question.

2. PDF Processing

The system extracts text page by page, splits it into overlapping chunks, and stores page metadata.

3. Vector Database

Each chunk is embedded and stored in ChromaDB for semantic retrieval.

4. Planner Agent

The planner identifies the task as document-based question answering and activates the agentic pipeline.

5. Query Rewriter Agent

The user question is rewritten into a focused retrieval query using important keywords.

6. Retriever Tool

The system searches ChromaDB and retrieves the most relevant document chunks.

7. Evidence Evaluation Agent

The retrieved chunks are checked to determine whether they are sufficient to answer the question.

8. Answer Generation Agent

The LLM generates a grounded answer using only retrieved evidence with source, page, and chunk citations.

9. Conversation Memory

The system stores the last five interactions in session memory for multi-turn context tracking.

10. Evaluation Agent

The system compares baseline LLM answers against Agentic RAG answers and scores them using evaluation metrics.

Why This Is Agentic

The system is agentic because it does not simply send a question directly to an LLM. Instead, it follows a multi-step pipeline where different agent roles perform planning, query rewriting, retrieval, evidence checking, answer generation, memory tracking, and evaluation.

External Tools and Components

©2026, System Developed by Abdullah Al Amin