Back to Browse

Evaluator - Optimizer Design Pattern | Agentic Workflow | Human in the Loop, LangChain, Python

926 views
Dec 9, 2025
26:12

LLMs are powerful, but they often struggle with self-correction. In this video, we implement the Evaluator-Optimizer design pattern to solve this. We will demonstrate how to separate the "generation" step from the "feedback" step, and most importantly, how to inject a Human-in-the-Loop (HITL) to ensure quality control before the loop continues. We will look at how to architect a system where the AI generates a draft, a human (or automated test) evaluates it, and the AI optimizes based on that specific feedback. In this video, we cover: 1. What is the Evaluator-Optimizer Pattern? 2. Architecture: Generator vs. Evaluator 3. Adding the Human-in-the-Loop (HITL) workflow 4. Code Walkthrough of the Design Pattern (from scratch) Codebase: https://github.com/SauravP97/AI-Engineering-101/tree/main/evaluator-optimizer-agent Agentic RAG paper: https://arxiv.org/pdf/2501.09136 My Socials 🚀 🙋‍♂️ Linkedin: https://www.linkedin.com/in/saurav-prateek-7b2096140/ ☀️ Instagram: https://www.instagram.com/saurav_prateek/ ⚡️ Book a 1:1 session with me for Interview Preparation and Career guidance, Mock Interviews and Resume Review on Topmate: https://topmate.io/saurav_prateek

Download

1 formats

Video Formats

360pmp442.6 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Evaluator - Optimizer Design Pattern | Agentic Workflow | Human in the Loop, LangChain, Python | NatokHD