Build a Documentation RAG Agent with Search Tools
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) andget_file(returns the full document) - Let the LLM decide which tool to call
- Add the tools to an agent using
toyaikitand 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:
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:
- The Agentic Loop from Scratch - the same loop built by hand, with no framework.
- toyaikit - teaching framework for agents
- PydanticAI - production agent framework
Tutorial pages
Sign in to access this workshop
This workshop is free — you just need an account. Sign in or create one in seconds.
Sign InBy creating an account, you agree to our Terms of Service and Privacy Policy.
By signing up free, you'll receive community updates. You can unsubscribe at any time.
Related content
Build a Course FAQ Agent with MCP, PydanticAI and OpenAI
We build a course FAQ assistant from the bottom up. First we expose a plain Python search(query) function to the OpenAI Responses API. Then we turn the same idea into a reusable a…
September 01, 2025
Build a Course FAQ Agent with MCP, PydanticAI and OpenAI
We build a course FAQ assistant from the bottom up. First we expose a plain Python search(query) function to the OpenAI Responses API. Then we turn the same idea into a reusable a…
September 1, 2025
Build Your Own Search Engine
We build a search engine from scratch over DataTalks.Club Zoomcamp FAQ documents. We start with TF-IDF text search, then add cosine similarity and field boosting. From there we mo…
May 14, 2026