Back to Workshops
Workshop Free with sign-in

Build a Documentation RAG Agent with Search Tools

May 4, 2026
rag ai-agents llm-engineering search tooling-architecture

We build a RAG system over real documentation and evolve it into an agentic search flow. For the knowledge base we use the Evidently AI documentation, a real set of Markdown files that keeps changing as the library evolves. This is where RAG helps most, since LLMs can't keep up with library docs on their own.

What we cover:

  • Build a classic RAG pipeline: index documents with minsearch and retrieve highlighted snippets
  • Implement search (returns snippets) and get_file (returns the full document)
  • Let the LLM decide which tool to call
  • Add the tools to an agent using toyaikit and PydanticAI
  • The agent mirrors how humans read docs: search, scan snippets, open the promising one

We originally delivered this workshop at DataMakersFest 2026 in Porto, Portugal. There's no recording available.

The system you will build

The architecture has one LLM agent with two tools and two data sources:

flowchart LR USER["User"] AGENT["Agent (LLM)"] SEARCH["search tool highlighted snippets"] GETFILE["get_file tool full document"] MINSEARCH["minsearch index Evidently docs"] FILEINDEX["file_index filename -> content"] USER -->|question| AGENT AGENT -->|search query| SEARCH AGENT -->|filename| GETFILE SEARCH -->|query| MINSEARCH MINSEARCH -->|snippets| SEARCH GETFILE -->|filename| FILEINDEX FILEINDEX -->|full text| GETFILE SEARCH -->|results| AGENT GETFILE -->|results| AGENT AGENT -->|answer| USER

The agent has two tools. search returns short highlighted snippets so the agent can decide which document to open, and get_file returns the full document so it can read that one end-to-end. This mirrors how humans read documentation: search, scan snippets, open the promising one.

Links

Resources not included in the workshop materials list:

Free with sign-in

Sign in to access this workshop

Create a free account Already have an account? Sign in