Building Agentic RAG From Scratch in Pure Python

Dave Ebbelaar · Beginner ·🔍 RAG & Vector Search ·3d ago
Want to start freelancing? Let me help: https://go.datalumina.com/HbJnpc8 Want to learn real AI Engineering? Go here: https://go.datalumina.com/XlYLRjP 🔗 GitHub Repository https://github.com/daveebbelaar/ai-cookbook/tree/main/knowledge/agentic-rag ⏱️ Timestamps 00:00 Introduction to Agentic RAG 00:48 Semantic vs. Agentic RAG 02:12 Tool Definitions and Setup 04:11 Listing Files 06:01 Searching for Patterns 10:19 Reading Files 12:37 Building the Agent 13:31 Debugging the Agent 18:34 Structured Output 20:33 Production Considerations 25:19 Conclusion and Next Steps 📌 Description Learn how to build an agentic RAG system from scratch in pure Python without relying on heavy frameworks. This tutorial walks through creating custom tools for listing, searching, and reading markdown files, then connecting them to an AI agent using Pydantic AI for iterative tool calling and self-correction. Whether you're moving past basic semantic RAG or integrating private company data into LLMs, this hands-on guide covers the full workflow from core code to production deployment. 👋🏻 About Me Hi! I'm Dave, AI Engineer and founder of Datalumina®. On this channel, I share practical tutorials that teach developers how to build production-ready AI systems that actually work in the real world. Beyond these tutorials, I also help people start successful freelancing careers. Check out the links above to learn more!
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related AI Lessons

Production RAG: Shipping a RAG System Into an Enterprise Product
Learn how to ship a RAG system into an enterprise product, overcoming operational realities and challenges beyond the demo stage
Medium · RAG
HyDE: Search With the Answer You Wish You Had
Learn how HyDE improves search by using the answer you wish you had as a query, and why traditional question-based searches are limited
Medium · RAG
Hierarchical Indices: Find the Section First, Then Find the Sentence
Learn how hierarchical indices work by mimicking human search behavior in long documents, improving search efficiency
Medium · RAG
Hybrid Search Explained: Why Smart RAG Uses Both Keywords AND Meaning
Learn how Hybrid Search combines keyword and semantic search for better retrieval accuracy in RAG systems
Medium · Machine Learning

Chapters (11)

Introduction to Agentic RAG
0:48 Semantic vs. Agentic RAG
2:12 Tool Definitions and Setup
4:11 Listing Files
6:01 Searching for Patterns
10:19 Reading Files
12:37 Building the Agent
13:31 Debugging the Agent
18:34 Structured Output
20:33 Production Considerations
25:19 Conclusion and Next Steps
Up next
Watch this before applying for jobs as a developer.
Tech With Tim
Watch →