Move Over Loop Engineering, Graph Engineering Is Now Here
CChase AI
Computing/SoftwareInternet Technology
Transcript
00:00:00So last month it was loop engineering and before that it was context engineering and today's new
00:00:05hotness is graph engineering. But is this something you need to actually understand or is this just
00:00:11the AI hype train doing its thing and slapping a fancy title on a nonsense topic? Well in this
00:00:17video we are going to answer that question and spoiler alert this is not a nonsense topic. Now
00:00:23graph engineering isn't something that's going to apply to every single little thing you build
00:00:28but it's a concept you are going to want to understand especially if you're someone who uses
00:00:33complex loops. So if that sounds like you or it's going to be you in the near future you're going to
00:00:38want to stick around. So graph engineering is really just an extension or an evolution of loop engineering.
00:00:43So very quickly we're going to go over what loop engineering actually is so we're all on the same
00:00:47page. Now all loops really have three sections to them. Number one is the trigger. How does this
00:00:54thing actually start? Ideally this is autonomous. It runs every day at a certain time or it's event based.
00:01:00Step two is the task. What is it it's actually doing? And then step three we need some sort of success
00:01:07criteria. So we're telling it to do something. How did we know if it actually did it correctly? Because
00:01:13if it didn't do it correctly I want it to run again from the beginning. And ideally all of it runs and data
00:01:19is stored somewhere so we can even add some sort of like self-improvement aspect to it. But at Spare Bones
00:01:25we need a trigger. It needs to do something and then we need to be able to like test it to see if it worked and that
00:01:30should be all automatic. Now for our example right here we have a loop that generates a morning report
00:01:35every day for us. So we have this AI agent. It runs every day at 7 a.m. That's our trigger.
00:01:42Its task is to look at a bunch of different social media platforms. YouTube, Twitter, and Reddit to find
00:01:47information about AI for us. What's trending. And I want it to check my email. Once it does all that
00:01:54I want it to consolidate the information and generate a report for me. That is the task. Now success in this
00:02:00case is a little bit murky. How do we define that report? It was done correctly. Well in this case we have
00:02:05told our loop that hey the report needs information about this sort of stuff. It needs to be this length.
00:02:11It needs to include links. So we've given it some sort of criteria to measure against. So that is our
00:02:17loop. Easy enough. It's executed by a single agent. Now how would we turn this into a graph? How would
00:02:25we go from loop engineering to graph engineering with this same exact task in mind? I still want our
00:02:30morning report completed every single day. Let's take a look. Because over here on the right is the
00:02:35graph engineered version of that same task. We're trying to get the same report. However we have
00:02:40increased the amount of agents doing things. Specifically we've gone from one agent doing
00:02:46everything to a number of agents doing specific tasks that are also connected to one another. So we
00:02:53still have the same trigger. You know every morning at 7 this is going to run. But we now have one agent
00:02:58that's looking at YouTube. We have one agent that's looking at Twitter. One at Reddit. And one doing the
00:03:04email. So on and so forth. Each of these agents is going to get the required information. It's going
00:03:09to synthesize that information on its own. And then it is going to send their synthesis to the report
00:03:17agent. Which then collects all that data. Further synthesizes it into the report we want. We could
00:03:23even take this a step further and say we also have a review agent that is going to be the one that takes
00:03:30a look on its own at the generated report. Compares it to what we defined as a successful report and
00:03:36do we need to loop through all this again? Or can we go ahead and push it to production? And that
00:03:41is graph engineering in a nutshell. So let's sort of break that down. Because you're probably like
00:03:48all we did was add a bunch of agents. I don't actually understand what happened.
00:03:51Well, yes, we did add some more agents. And there is a reason for that. The reason graph engineering is a
00:03:58little more complicated isn't because we just want to make things more complicated. It's because we
00:04:03have now taken every single task and we've essentially turned it into an agent that's running its own
00:04:09version of loop engineering. So before, what do we have? We had loop engineering, right? It's doing all
00:04:14these things. It's checking success criteria. But it was doing that at a very high level thing and was
00:04:18doing a bunch of different things at once. Instead, what we've done with graph engineering,
00:04:22we have zoomed in to one specific task and we now have this guy with just his YouTube analysis and
00:04:29YouTube research. We've turned that into a loop engineered construct as well. Because think about
00:04:34it. Well, it's reduced to one task. It's still loop engineering. We have a trigger, right? It's still
00:04:39going to be 7 a.m. We have a task. He still needs to find information on YouTube about AI and he still
00:04:46needs to synthesize it. And then three, we still have success criteria. But because we've turned this
00:04:51into a graph engineered thing, we can get very specific about what success looks like on every
00:04:57step of the journey. So for us, that might be, hey, I need you to get at least five sources. And hey,
00:05:03I need that synthesis to at least be two paragraphs long. Or hey, for every single source and every single
00:05:09bit of information you find, I need you to tell me a so what, right? So instead of the verification
00:05:16process being like very high level and trying to cram all of these things into like one sort of, hey,
00:05:22this worked, hey, this didn't, we've broken it down into discrete sections. And why should you care
00:05:27about that? Well, for one, it's going to increase the quality. Because instead of having one agent do
00:05:33everything, I instead have one agent doing one thing. And strictly from a context rot point of view,
00:05:40and the fact that it's context window is going to be relatively clear versus this guy over here trying
00:05:44to do 10 things at once, it means we're going to get a better output. Further, it's going to be quicker.
00:05:51Because instead of one agent doing 10 things, I have four agents in parallel doing four things.
00:05:56So it's quicker, it's more effective, and it's easier to tell when something is failing. Because I can tell
00:06:03very quickly if this is a YouTube problem versus a Reddit problem. It's a little harder here to sometimes
00:06:08filter the signal for the noise where it's like, all right, where along the path did we screw up where we
00:06:15didn't like the report and we had to send it back for revision. And again, that's because success criteria
00:06:20can be defined on every single subtask. So that is kind of what graph engineering is, and why you should
00:06:27care. We don't just have one agent, we have a series of agents, these agents are connected in a number of
00:06:33different ways. We've broken down their tasks individually, sort of an atomic manner. And because
00:06:38it's like an atomic task, we can be very specific with each task in terms of what we want it to do,
00:06:44what success looks like. And again, each of these agents is now essentially their own like
00:06:48loop engineered construct. We've just connected a bunch of loops. So the next question at this point
00:06:54should be, well, when do I need to use graph engineering versus loop engineering? Because
00:06:58let's be honest, you don't always need to create some super complicated multi-agent setup like this.
00:07:04You just don't. Oftentimes, doing a simple loop is more than enough. But there are three cases where
00:07:09you are going to want to consider a graph engineered creation. Well, the first scenario you're going to
00:07:15want to consider that is when we are running into context problems, specifically context rot. If I'm
00:07:20asking what agent to loop over and over and over again, and at each loop, I'm having it do, you know,
00:07:25four, five, six, seven, eight tasks, and we're getting to the point where the context window after
00:07:29each run is getting into the 300, 400, 500,000 token range, probably makes sense to just split up the work.
00:07:36There's no reason for us to be subjecting ourselves to lower quality because of that filled up context
00:07:41window when we don't have to. Now scenario number two is when we need an independent review. When we
00:07:48talk about proper loops, what we need to do at some point is judge success, that whole success criteria
00:07:55thing. You need to ask yourself, can the agent that created whatever it is we're creating, in this case report,
00:08:01does it make sense for it to judge the report itself and say this was good, this was not? In the case of a
00:08:07morning report, it probably can. It's probably not that complicated. It's not that high stakes to say, all right,
00:08:13this report is pretty good, not to mention it's relatively subjective. However, if this is something that is
00:08:18high stakes and we want a second pair of eyes, well, perhaps we need to start leaning into graph
00:08:24engineered scenarios where we bring in an entirely different agent to take a look at what we created.
00:08:28Perhaps it's not even a cloud code agent. Perhaps this is something like GPT 5.6.
00:08:32Either way, that's a scenario where we have some sort of multi-agent orchestration and graph engineering
00:08:37makes a lot of sense there. And three is timing, right? How fast do we need this to work? In this case,
00:08:44it makes a ton of sense to have a graph engineered automation because why am I having one
00:08:48agent look at YouTube and then look at Twitter and then look at Reddit and then look at Gmail.
00:08:52Cloud code doesn't even do that. When you run something like deep research, right, is it
00:08:57sequentially one thing at a time researching all those sources? No, it's deploying like a hundred
00:09:02sub-agents at once to do this. And in fact, virtually all of the things that cloud code creates when you
00:09:08use ultra code and dynamic workflows are some form of graph engineering where we have multiple agents
00:09:13doing things like collecting information. We have multiple agents doing things like synthesis.
00:09:17We have multiple agents doing things like adversary review of the information we gathered. At no point
00:09:23in those complicated setups are we just relying on a single loop. Instead, it is a connection of looped
00:09:28agents. But as I said in the beginning, most things you're going to do don't fall into any of those
00:09:34three categories. And if they don't, there's really no reason to use graph engineering. It's just one tool
00:09:39in our toolbox. Sometimes we need it, sometimes we don't, but there are advantages to doing so.
00:09:44But on the flip side, there are disadvantages where we're just adding complicated steps and
00:09:48complicated infrastructure to something that just doesn't need it. So that's where I'm going to leave
00:09:52you guys in this video on graph engineering. I hope that gave you some sort of insight into what graph
00:09:57engineering actually is. I think you're going to hear it talked about over and over and over again.
00:10:01But if you understand loop engineering and just think about it this way, it's just multiple agents running
00:10:07loop engineering. They're just doing it together and they speak to one another and it gives our quality
00:10:12a boost. It makes stuff faster and it's easier for us to figure out what is going wrong where. And if
00:10:17you don't know if you need it for your particular task, the answer is probably no. So as always,
00:10:24let me know what you thought. Make sure to check out Chase AI Plus if you want to get your hands on my
00:10:27Cloud Code Masterclass. I'll put a link to that down below. And besides that, I'll see you around.