You've probably used an AI, right? You asked it for something, maybe a quick summary, some code, a social media post. Yeah, and you get something back. It works, technically. But it's usually just... Yeah. Okay. Average. That average result. Well, believe it or not, that's often not the model's fault entirely. It's more about the architecture. Architecture. How so? We're still giving it, like, simple instructions when we should be thinking in terms of recipes, design
patterns. Okay. Welcome to the Deep Dive. This is for you, the listener, who's ready to go beyond just basic prompting. You're looking to build real AI agency. Exactly. We all know the basic parts, right? The model, that's the brain, the tools, and those are the hands, and evals, the quality checks. Crucial stuff. But those are just the ingredients. Spot on. Today we're digging
into the structure, the recipes. We're exploring four critical design patterns that take an AI agent from just following a command to running a really sophisticated autonomous workflow. So we're shifting the focus from what AI can do to how we make sure it does it well, reliably, every single time. Let's start with recipe one, reflection. This one feels like maybe the easiest entry point, something you can use right away, no fancy tools needed. Yeah, it's definitely
powerful and accessible. The core idea is simple. Build in self -critique. Don't just take the AI's first answer. Okay. Instead, you force it to review its own work. critique it against specific rules before it even thinks about rewriting. Right. Because the usual way, the basic prompting, it's often too vague. We ask it to write something, then we just say... Is that good? Make it better. Exactly. And better could mean anything. So the AI just kind of fiddles with words. It often
misses the real problem. Yeah. So the pro -level move here, the expert recipe, is using a specific structured rubric. A rubric. Like in school? Sort of, yeah. It forces a structured analysis. Let's say the AI writes a blog post. Instead of make it better, you give it, say, three things to grade itself on. Scale of one to five. OK. Grade the intro for clarity and hook one to five. Yep. Then maybe grade the examples used. How relevant are they? One to five. And the call
to action, is it clear? One to five. Exactly. You're making the agent switch gears. It goes from just a fast writing mode. To thinking mode. Analysis mode. Right, structured analysis. And the trick often is using structured formats, things like XML tags or maybe JSON. You put the draft. Inside draft tags? Inside rubric tags? Why do those tags matter so much? Why not just bullet points in the prompt? It's about signaling,
really. When the AI sees those specific tags, draft, rubric, it knows its job isn't creative writing anymore. Its job is now logical parsing, following strict rules. It has to look inside those tags, find the flaws according to the rubric before it can try again. It literally needs to figure out why it got a 2 out of 5 on clarity before rewriting. That makes a lot of sense. It's like putting up guardrails. Okay, but let's talk trade -offs. Doesn't this double the time
and the cost? You're basically running it twice. It absolutely does increase latency and cost. Yeah, it's a multi -step process. Takes longer, uses more tokens, no question. Why do it? Because you're paying for quality assurance. It's a trade -off, yes, but the improvement you get. Going from a med draft to a really solid final piece, that quality jump usually far outweighs the extra cost or time. It's an investment then. and getting
it right. Precisely. I have to admit, though, even knowing this, sometimes I still catch myself typing that lazy, make -it -better prompt. You know, before I stop, delete it and actually build the rubric. It's a habit that's kind of hard to break. That's honest, and I think a lot of people can relate. It takes discipline. But OK, if you had to boil down the immediate benefit of Recipe 1, what's the core shift for the user?
Quality goes up instantly, because the AI has to judge itself against clear, strict rules. OK, so reflection helps the AI improve itself internally. Recipe two, tool use, is about giving it external powers. Giving it hands, you said earlier. Connecting it to the outside world. APIs, search databases. Exactly. And modern models, they're pretty smart. They often know they might need a tool. But just relying on that built -in knowledge, that zero -shot ability, it can get
tripped up by complex questions. Yeah, like if you ask something with multiple parts. Right. You ask, is it going to be cold in Hanoi tomorrow? And based on that, should I pack a jacket and maybe an umbrella? Okay, that's a few steps. Yeah, and the AI might just check the temperature but completely forget the part about the umbrella. It gets confused. So the pro -level technique is using guiding examples. Few -shot learning, right? Exactly. We don't just tell it the tool
exists. We show it how to think through specific problems using examples. Like teaching it the decision process. Precisely. If a user asks that two -part question, maybe... How much does this cost and is it in stock? The example teaches the AI an internal thought process. Like what? Like, OK, wait, I need the product ID before I can check price or stock. So step one, I must use the ask you for info action first. Ah, so
the key isn't just using the tool. It's teaching the AI when to stop and ask for missing info. Yes, that dramatically cuts down on errors. On the AI just guessing or making stuff up. So teaching the context, the steps needed, makes the whole system way more predictable and less error -prone. Totally. It reduces errors drastically. Makes it reliable. Yeah. Whoa. Just imagine scaling that. A system built with these robust guiding examples. Handling, say, a billion complex financial
queries a day. Wow. That level of reliable connection to real -world systems, that unlocks some serious business value. Truly powerful stuff. Okay, so tools give the AI hands. This next recipe, planning. That sounds like giving it foresight. Yeah, now we're getting into really autonomous territory. The user just gives the high -level goal, and the agent has to figure out the entire step -by -step plan itself. But basic planning often fails, right? It does, because the AI tends to jump
the gun. You say... Plan a trip to Paris for three days. And it immediately starts looking for flights. Exactly. Flights, hotels. It skips the crucial first step, asking questions. What's the budget? When are you going? Who's even traveling? It just defaults to a generic plan. Right. Minimum effort solution. Yeah. So the better structure, often called React, reasoning and action. It forces a mandatory plan and critique cycle. Oh, cycle. Yeah. A rigid four -step process it must
follow before it does anything. OK, what are the steps? Thought. Clearly define the user's ultimate goal. Step two. Initial plan. Write down the steps it thinks it needs. One. Two. Three. Makes sense. This is the core self -critique. The AI must ask itself. What information am I missing? Budget. Dates. Interests. Where could this plan go wrong? This is where it confronts its own ignorance. It forces it to see the gaps. Exactly. Then step four. Final plan. It takes
the critique and fixes the plan. And here's the key. The very first step in that final plan, almost always it should be using that ask user for info tool we talked about. Ah, connecting back to tool use. Yep. This whole structure stops the AI from just rushing ahead vaguely. It makes sure it gets the necessary info first before wasting time or, you know, computing resources. So that mandatory self -critique phase forces it to gather info first. That one step prevents
the rush to a bad generic solution. It builds quality in right from the start. Okay, that makes a lot of sense. We need to take a quick break. When we come back, we'll dive into the final most advanced recipe, multi -agent workflows. Sounds good. Mid -roll sponsor read content to be inserted by Rider. All right, we're back. We've covered reflection, tool use, and planning. Now for the final recipe, which you said is the
most advanced, multi -agent workflow. Yeah, this is where we stop trying to make one single general AI do everything perfectly. Instead, we build a team. A team of specialized AI agents. OK, because the normal way, that's usually just us, right? Doing the glue work. Exactly. Manual glue work. You ask your research AI for market trends. You copy the text. You paste it into your writing AI to generate some ad copy. And you're the one connecting the dots, trying to keep the context
straight between copy paste. Right. And context gets lost or muddied. It's inefficient. The pro approach is setting up clear specialized roles for each agent and really strict rules for how they hand off. information. Think of it like a hyper -specialized assembly line. An assembly line for AI. Pretty much. The key concept here is fighting something called function creep. Function creep? What's that? It's when a single agent starts getting asked to do jobs it wasn't
really designed or optimized for. Its core quality slowly degrades because it's being stretched too thin. Specialization prevents that. Okay, let's use that ad campaign example you mentioned. So instead of one AI, we have three. Yeah, let's say three distinct roles. Agent one. We'll call him Data Dave. Data Dave. OK. His job is purely logical, factual, analyze market trends. And crucially, his output must be a very strict JSON object. Maybe detailing target audience, key
trends, the core pain point. He only speaks data, no creativity allowed. Strict JSON. Got it. Then that JSON goes to? Creative Carla. Her role is all about emotion narrative. turning Dave's dry data into, say, three compelling ad options. Yeah, because she gets that strict JSON contract from Dave. She does exactly which pain points she needs to address. No guesswork. OK, makes sense. And agent three. Manager Mike. His role
is practical, results focused. He takes Carla's creative ads, compares them against Dave's original data analysis. Checks if they actually match the research. Right. And then he picks the single best ad and explains why based on the data and the goal. OK, but. Couldn't you just use one really big powerful model like GPT -4 for all of this? Seems way less complicated than setting up and managing this whole AI team. It might seem simpler up front, yeah, but the quality
difference can be huge. That specialization is key. Why though, if the big model is smart enough? Because of that function creep we talked about. Data Dave cannot write good ad copy. Creative Carla cannot do rigorous data analysis. Forcing them into specialized lanes maintains peak performance for their specific task. And the other crucial piece, that strict JSON format for handoffs, it acts like an unbreakable contract between
them. It drastically reduces the risk of hallucination or misinterpretation as information moves down the line. Context is preserved perfectly. The quality boost comes from forcing specialization and using that strict data contract. between them. Exactly. Specialization stops function creep. Strict JSON ensures perfect context transfer. You get a better final product from the assembly line. Okay, so let's recap the big ideas. Four recipes for moving beyond basic prompts. Yep.
First, reflection improving internal quality using a strict rubric for self -critique. Second, tool use giving the AI external capabilities but guiding it with few -shot examples so it knows when and how. Third, planning creating autonomy with that mandatory self -critique step to force information gathering before acting, using structures like React. And fourth, multi -agent building specialized teams that communicate via strict formats like JSON to maximize quality
and avoid function creed. That's the progression. From simple internal checks to complex orchestrated teams. Now, you probably shouldn't try to build a complex multi -agent system tomorrow. Definitely not. My advice is start simple. Get comfortable with the earlier recipes first. Right. So here's some actionable homework for you, the listener. Try recipe one, reflection, today. Yeah, pick a simple task you do often, maybe writing email subject lines. OK. Ask your AI to write, say,
three subject lines for an email. Then immediately
after, give it a rubric. Tell it. Grade these subject lines from one to five on curiosity and one to five on urgency make it be strict and then the final step Demand new subject lines tell it now write three new ones that score five out of five on both curiosity and Urgency based on your own critique and just notice the difference between that first attempt and the refined reflected version you can be dramatic it really shows that if Just changing a prompt slightly, adding that
reflection step can give you such a better result. Imagine the power when you start layering these patterns, tool use on top of reflection, planning, managing tool use. It compounds. So here's a final thought to leave you with, something to chew on. OK. If your AI agent, the one you use every day, if it always checked what critical information it was missing before it took any
action. How would that one change, that architectural shift based on the planning recipe, how would that fundamentally change your daily workflow, your decision -making? That's a really interesting question to consider. How much guesswork would that eliminate? Something to think about. Definitely. A thought to carry with you until our next deep dive. Thanks for tuning in.
