Skip to content

Overview

Agentic RAG UI

This Solution Blueprint is an AI-powered document Q&A system that uses a LangGraph agent with Model Context Protocol (MCP) for modular, tool-based retrieval. The agent interprets user questions, iteratively searches a vector knowledge base via MCP tool calls, grades the retrieved context for relevance, and synthesizes a final answer using an LLM.

The architecture separates the reasoning agent from the data tools, allowing for a more modular and scalable deployment.

To summarize, the system consists of:

  • MCP Server: Handles document embeddings, vector storage (ChromaDB), and retrieval tools.
  • RAG Agent: The reasoning engine that connects to the MCP server to fetch context and generate answers.
  • React UI: UI for document management, question settings, answers, and citations.

AMD Solution Blueprints are packaged as helm charts for deployment on a Kubernetes cluster. For development or further exploration, the source code is public and available in the Solution Blueprints GitHub repository.

Architecture

Agentic RAG consists of an embedding service, ChromaDB, an LLM service, an MCP knowledge server, and a React client.Agentic RAG consists of an embedding service, ChromaDB, an LLM service, an MCP knowledge server, and a React client.

The user creates or selects a collection and uploads documents into it. Documents are chunked and indexed into ChromaDB via the MCP server. For each question, the RAG agent runs a LangGraph loop, reasoning with the LLM, retrieving relevant chunks through MCP tools, grading their relevance, and re-searching if needed, until a complete answer and structured citations are returned to the UI.

ComponentRole
LLM ServiceOpenAI-compatible endpoint (AIM vLLM or external), used for reasoning, grading, and answer synthesis (default: GPT-OSS 120B on Instinct, Qwen3-VL 8B Instruct on Radeon, Llama 3.2 1B Instruct on EPYC)
MCP ServerExposes collection, ingestion, retrieval, and database tools via Model Context Protocol Streamable HTTP
React UIWeb interface for uploading documents and asking questions, with activity status
RAG AgentLangGraph state machine that orchestrates LLM and MCP interactions
Embedding ServicevLLM-based embedding server that generates vector embeddings for document chunks and queries (defaults: intfloat/multilingual-e5-large-instruct on Instinct and Radeon; intfloat/multilingual-e5-small on EPYC)
ChromaDBPersistent vector store used for MMR-based semantic retrieval

Key Features

  • Document ingestion: PDF and TXT files into collection-scoped persistent vector knowledge bases
  • Agentic retrieval loop: reason → search → grade → re-search until fully answered (maximum 3 searches by default)
  • Relevance grading: Deduplication of retrieved chunks before answer synthesis
  • Structured citations: Document, page when available, and chunk text are returned with each answer
  • Configurable retrieval: Question-level collection selection, temperature, top-k, and maximum search rounds
  • Configurable chunking: Knowledge Base defaults of 300-token chunks and 60-token overlap, with collection overrides
  • MCP-based tool separation: Retrieval logic runs in an isolated pod, decoupled from the agent
  • Agent activity status: Retrieval and answer-generation status shown in the UI
  • MCP connection: Connects to the MCP server via Streamable HTTP with automatic tool discovery