Latest / AI Fire Daily / #555 Neil: AI Workflow Fixes Errors Faster With Graph Engineering
Transcript
- 0:00You know, it's genuinely wild to think about
- 0:03how fast AI is evolving right now. We used to
- 0:07just type simple instructions. Yeah, just beg
- 0:09in a text box for good answers. Right. And now
- 0:12we are building entire virtual organizations.
- 0:15Welcome to the deep dive. Today, we are exploring
- 0:19the evolution of talking to AI. Is such a master
- 0:22shift. It really is. Think about the natural
- 0:25progression we've seen. First, we started with
- 0:28basic prompt engineering. You just tried to type
- 0:30the perfect question. Then we realized the AI
- 0:34needed background material. Right, which led
- 0:36straight to context engineering. We started stuffing
- 0:38huge documents into the prompt window. Exactly.
- 0:41And from there, we moved to loop engineering.
- 0:43We made the AI repeat and refine its own work.
- 0:45Over and over. Yeah. But today, we are heading
- 0:48somewhere entirely new. We're unpacking something
- 0:51called graph engineering. Which I am so excited
- 0:54about. I know. It sounds like overly technical
- 0:56jargon, but it's actually a natural, highly practical
- 0:58evolution. It fundamentally changes how we delegate
- 1:01work. It totally demystifies the black box. Graph
- 1:05engineering divides one massive workflow. It
- 1:07breaks it into smaller connected parts. So instead
- 1:10of one AI agent handling a whole process. Right.
- 1:13From start to finish, you deploy several specialized
- 1:15agents instead. And we should probably define
- 1:18that. A specialized AI program designed to do
- 1:21one specific job. That is the perfect way to
- 1:23phrase it. And unlike loop engineering, where
- 1:26one agent repeats a cycle, graph engineering
- 1:30uses several specialized agents. I like to picture
- 1:32this like an assembly line or, you know, stacking
- 1:35Lego blocks of data. You wouldn't ask one person
- 1:38to build an entire car from scratch. Exactly.
- 1:41And every single part in this graph. has four
- 1:44strict requirements. First, it needs an input.
- 1:47Second, it needs a task. Third, an output. Fourth,
- 1:50this is huge. It needs success criteria. Checking
- 1:53the result before moving it forward. Yes. If
- 1:55a result fails, it loops back. But it only loops
- 1:58back within that specific part. So does this
- 2:00mean we're just micromanaging the AI? Oh, no.
- 2:03It's not micromanaging at all. It's about providing
- 2:06necessary boundaries. So the AI doesn't get confused
- 2:09by massive multi -step tasks. Right. So less
- 2:14micromanagement, more giving the AI a clear single
- 2:17-lane highway. Precisely. But giving an AI a
- 2:19single -lane highway requires good traffic control.
- 2:22Oh yeah, serious traffic control. So let's look
- 2:25at a concrete map of how this actually runs daily,
- 2:28like that AI news report workflow from our sources.
- 2:31Yeah, that is a great example to take this from
- 2:33theory to practice. It's a parallel workflow
- 2:36triggered daily. It builds a news report. And
- 2:39it uses four research agents working at the exact
- 2:42same Right. First up is the YouTube agent. It
- 2:45finds three to five videos under 24 hours old,
- 2:48it requires working links, and it completely
- 2:51excludes low -value topics. And then there's
- 2:53a retry rule. Right. Exactly. If it finds fewer
- 2:55than three videos, it broadens its keywords automatically.
- 2:58Meanwhile, you have the ex -agent running beside
- 3:00it. It finds announcements under 24 hours old.
- 3:03It prioritizes official company accounts or researchers.
- 3:06And it separates facts from opinions, which is
- 3:09critical. Then there's the Reddit agent, finding
- 3:12three to five practical user feedback threads.
- 3:15No speculation allowed. It requires real technical
- 3:18context. And finally, the email agent. It checks
- 3:21newsletters, ignores peer promotions, and preserves
- 3:25original links. So you have these four specialized
- 3:27agents gathering data simultaneously. Then they
- 3:32hit a bottleneck node. the report agent. Which
- 3:35is basically acting as a middle manager. Exactly
- 3:38like a middle manager. Yeah. It waits for all
- 3:40four. It groups the updates and removes the repeats.
- 3:43Then it drafts an 800 to 1200 word report, structured
- 3:47logically. Like top updates or new models. Yeah.
- 3:51And then it goes to the final checkpoint. The
- 3:53review agent. The ruthless editor. Right. It
- 3:56checks links, links, and source accuracy. And
- 3:58if it finds a broken YouTube link, it isolates
- 4:00the failure. It only sends that section back
- 4:02to the YouTube agent. The rest of the draft stays
- 4:04untouched. Exactly. You know, I have to make
- 4:06a vulnerable admission here. Oh. I still wrestle
- 4:09with prompt drift myself when I ask a model to
- 4:11do too much at once. It happens to all of us.
- 4:13Prompt drift is when an AI slowly forgets your
- 4:16original instructions over time. Yeah. And graph
- 4:19engineering prevents that entirely. So if one
- 4:22agent fails completely, does the whole report
- 4:24just crash? No, that's the beauty of graph routing.
- 4:27The workflow just pauses that one node. It requests
- 4:30a retry based on the rules, but it keeps the
- 4:33completed work safely stored. OK, got it. Only
- 4:35the broken piece restarts. The approved sections
- 4:38stay completely untouched. Exactly. So now that
- 4:41we see how the pieces move, why is this intricate
- 4:45setup vastly superior? you know, compared to
- 4:48just writing one really long prompt. Well, there
- 4:51are a few massive benefits. First is better quality
- 4:53by strictly separating the creator from the reviewer.
- 4:57Right. When an agent isn't judging its own work,
- 4:59mistakes are caught before they pollute the final
- 5:02answer. Exactly. A model is naturally biased
- 5:04toward its own outputs. A separate reviewer breaks
- 5:07that bias. The second benefit is faster execution,
- 5:11the diamond pattern. Let's explain that pattern.
- 5:13Sure. One note at the top splits the task. Then,
- 5:17workers do it in parallel. That's the wide middle
- 5:19of the diamond. And another node merges it at
- 5:22the bottom. It saves massive amounts of time.
- 5:25Whoa. I mean, imagine scaling that up to a billion
- 5:28queries across a thousand parallel agents. It's
- 5:32genuinely mind -bending to think about. And that
- 5:34massive scale leads to the third benefit, easier
- 5:38error tracking. Because every output belongs
- 5:40to a specific agent. Yes. You know exactly where
- 5:44a hallucination started. You can trace it in
- 5:46the logs and you can set a fixed retry limit.
- 5:49If it keeps failing you send it to a human. Does
- 5:51having a separate review agent really stop the
- 5:53AI from hallucinating facts? Well, it doesn't
- 5:56eliminate hallucinations entirely. But by giving
- 5:59the review agent only one job, verifying claims
- 6:02against sources, it catches the vast majority
- 6:05of them. That makes perfect sense. Separating
- 6:07the writer from the editor adds the friction
- 6:09needed to catch lies. Perfectly said. We are
- 6:11going to take a quick pause right here. We'll
- 6:13be right back. And we're back. So before the
- 6:15break, we were looking at these AI assembly lines.
- 6:18These massive, perfectly tuned system. Right,
- 6:22but just because we can build them doesn't mean
- 6:23we should use them for everything. Oh, definitely
- 6:25not. I feel like tech culture often over -engineers
- 6:28things, you know, just because a concept is trendy.
- 6:31It happens all the time. You have to know when
- 6:33to actually use it. So when should we use graph
- 6:35workflows? You use graph engineering when an
- 6:38AI has too much context to hold, when you absolutely
- 6:42need an independent reviewer. or when tasks can
- 6:45run at the same time. Parallel execution. Right,
- 6:48and when processing speed is critical. Okay,
- 6:51but when should we absolutely avoid it? If one
- 6:53single agent can already do the task with high
- 6:56quality, stop right there. Do not use graph engineering.
- 7:00Just keep it simple. Yes. Adding more agents
- 7:03to a simple workflow just adds unnecessary fragility.
- 7:07It adds extra steps and costs for no real reason.
- 7:10So if I'm just asking an AI to summarize a single
- 7:12meeting transcript, This is overkill. Absolutely
- 7:15overkill. A single prompt or loop is perfect
- 7:18for that. Graph engineering is for building systems,
- 7:22not doing your quick daily chores. Right. Keep
- 7:24it simple. Don't build a factory when you just
- 7:26need a hammer. So let's distill all of this into
- 7:29one overarching takeaway for you listening. The
- 7:31core philosophy here is it about making AI more
- 7:34intelligent. Right. It's about giving AI a vastly
- 7:37better structure. By dividing labor. By defining
- 7:41strict success criteria. and allowing parallel
- 7:43work, we gain ultimate control over complex workflows.
- 7:47We really do. Thank you so much for joining us
- 7:49on this deep dive. It was a fun one. Before we
- 7:52wrap up, I want to leave you with a final thought.
- 7:54We are currently creating highly complex workflows
- 7:57where AI agents manage, review, and correct other
- 8:00AI agents. Yeah, that's wild. So as these systems
- 8:03become more autonomous, at what point does the
- 8:05human's role shift entirely from being the creator
- 8:08to merely a manager of virtual managers? Something
- 8:12to mull over. Take care.