Documentation Index
Fetch the complete documentation index at: https://docs.raglight.com/llms.txt
Use this file to discover all available pages before exploring further.
Agentic RAG
Overview
Agentic RAG extends the classic RAG pattern by introducing an agent capable of reasoning, planning, and iteratively interacting with the vector store. Instead of a single retrieve → generate pass, Agentic RAG allows the model to:- decide what to retrieve next
- perform multiple retrieval steps
- refine its understanding iteratively
- optionally interact with external tools (MCP)
- explicit
- debuggable
- close to standard RAG semantics
How Agentic RAG differs from standard RAG
Standard RAG
- single retrieval step
- fixed context
- no planning
Agentic RAG
- iterative retrieval
- reasoning between steps
- adaptive use of context
Agentic RAG in RAGLight
RAGLight provides a dedicated high-level API:AgenticRAGPipeline
- embeddings
- vector store
- LLM
Option 1: AgenticRAGPipeline (simple API)
AgenticRAGPipeline is the recommended way to experiment with Agentic RAG.
Use it when you want:
- reasoning-aware retrieval
- minimal boilerplate
- fast experimentation
Basic example
What happens during execution
At runtime, the agent:- receives the user question
- decides whether retrieval is needed
- queries the vector store
- reasons over retrieved context
- optionally repeats steps 2–4
- produces a final answer
- the agent reaches
max_steps - or it decides it has enough context
Key configuration parameters
Agentic RAG introduces additional parameters compared to standard RAG.max_steps
k
system_prompt
The agent prompt defines:
- reasoning structure
- tool usage rules
- when retrieval should be invoked
num_ctx
verbosity_level
0 to silence agent traces, or 2 (default) for full step-by-step logging.
Option 2: Builder-based Agentic RAG
Under the hood, Agentic RAG is still built from the same primitives. Using the Builder API allows:- custom agent loops
- manual control over tools
- experimentation with reasoning strategies
MCP integration (tools)
Agentic RAG can be extended with external tools via MCP servers. This allows the agent to:- execute code
- query databases
- fetch live data
When to use Agentic RAG
Agentic RAG is useful when:- a single retrieval pass is insufficient
- questions require exploration or refinement
- reasoning over large knowledge bases
- combining retrieval with tools
Summary
- Agentic RAG introduces an agent loop on top of RAG
- Retrieval becomes iterative and reasoning-driven
- RAGLight provides a simple
AgenticRAGPipelineAPI - Configuration stays explicit and debuggable
- Agentic RAG shines on complex, multi-step questions