DSPy Tutorial | Build AI Agents with Python (Fundamentals)
Complete introduction to the simplest, most efficient, and yet most powerful way I’ve found to create AI agents, AI workflows, and AI programs in Python. Instead of manual prompting, we use automatic prompt optimization with DSPy and its concept of signatures. Timestamps / Outline: 00:00 How to Call LLMs from Python, the Simple Way 0:21 Declare Your First AI Program (in 1 LOC) 2:24 Setting Up Your Large Language Model Backend 6:10 Program 2: Processing Images 9:14 Deeper Dive into Signatures 14:01 Program 3: Processing Entities from Paragraphs 19:19 Fetching text from wikipedia with Attachments 20:39 Setting Up a DataFrame 22:22 Apply Gemini Flash lite to each paragraph 23:02 Creating a Synthetic Gold Set 24:35 Quick Baseline Evaluation 25:11 Creating DSPy Examples 25:55 Evaluation Metric 26:10 Prompt Optimization with DSPy 29:10 Final Evaluation Follow Max: Twitter: [https://x.com/MaximeRivest](https://x.com/MaximeRivest) GitHub: [https://github.com/MaximeRivest](https://github.com/MaximeRivest) Links to Relevant Repositories: Attachments: [https://github.com/MaximeRivest/attac...](https://github.com/MaximeRivest/attac...) DSPy: [https://github.com/stanfordnlp/dspy](https://github.com/stanfordnlp/dspy) FunnyDSPy: [https://github.com/MaximeRivest/funny...](https://github.com/MaximeRivest/funny...) Docs: [https://dspy.ai/](https://dspy.ai/) [https://maximerivest.github.io/attach...](https://maximerivest.github.io/attach...) If you’re new to my channel, my name is Maxime Rivest. I’m an Applied AI Engineer and Data Engineer. I like to educate people on the best tools in Data Analytics and AI Engineering. Max

Don't learn AI Agents without Learning these Fundamentals

How To Build A Self-Improving AI Trading Agent (Insanely Cool)

Scrape Any Website for FREE Using DeepSeek & Crawl4AI

Complete DSPy Course | Automatic and Programmatic Prompt Optimization | Complete Course

12-Factor Agents: Patterns of reliable LLM applications — Dex Horthy, HumanLayer

How does AI actually work? Transformers explained

Let the LLM Write the Prompts: An Intro to DSPy in Compound AI Pipelines

LangChain Full Crash Course - AI Agents in Python

AI Agent Fundamentals

Yann LeCun's $1B Bet Against LLMs

Large Language Models explained briefly

How AI agents & Claude skills work (Clearly Explained)

Why AI Agents are either the best or worst thing we’ve ever built

Make your AI Agents 10x Smarter with GraphRAG (n8n)

LangChain Explained in 10 Minutes (Components Breakdown + Build Your First AI Chatbot)

Complete DSPy Tutorial - Master LLM Prompt Programming in 8 amazing examples!

DSPy Masterclass — 5 Real-World Use Cases for AI Engineers

LangChain Explained In 15 Minutes - A MUST Learn For Python Programmers

DSPy GEPA Example: Listwise Reranker

