This episode of The AI Fundamentalists explores how AI development has evolved from simple chatbots into structured, end-to-end workflows powered by agentic harnesses - orchestration code wrapping large language models (LLMs) to handle memory, tool permissions, and system access. The key topics covered in the episode include: AI Security and Regulation: Existing legal frameworks and FTC enforcement against unsafe releases are sufficient to hold AI labs accountable without passing redundant or rapidly outdated regulations. Local vs. Frontier Models: Organizations are balancing expensive remote frontier models with local, open-weight deployments (such as Ollama or Apple Silicon configurations) to improve privacy and lower costs. Context Management & Multi-Agent Design: Uncleared context degrades system performance similarly to a 95% full hard drive. To solve this, developers should structure workflows like an assembly line, breaking complex goals into discrete tasks handled by specialized sub-agents. Spec-Driven Development: Development approaches are shifting from prompt engineering to spec-driven development, leveraging plan modes to produce precise design documents for human review prior to execution. Token Efficiency & Cost Optimization: Maximizing efficiency requires right-sizing model selection, applying prompt caching, restricting output verbosity, modeling costs before automating, and auditing agent chains to replace redundant LLM calls with deterministic code or database lookups (listen to our episode on Token Economics www.monitaur.ai/podcast/token-economics-tokenomics) Building effective AI systems requires moving beyond basic prompt prompts toward thoughtful agentic flow design. By establishing clear specifications, managing context efficiently, and pairing strong harness controls with deterministic optimizations, teams can maximize performance and cost efficiency while maintaining reliability and security. What did you think? Let us know. Do you have a question or a discussion topic for the AI Fundamentalists? Connect with them to comment on your favorite topics: LinkedIn - Episode summaries, shares of cited articles, and more. YouTube - Was it something that we said? Good. Share your favorite quotes. Visit our page - see past episodes and submit your feedback! It continues to inspire future episodes.
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00Welcome to the AI Fundamentalists, a podcast about the fundamentals of the AI that impacts our lives and businesses. Here are your hosts, Dr. Andrew Clark and Dr. Sid Mengelik.
SPEAKER_02Welcome to this episode of the AI Fundamentalists. Today we'll be discussing some of the best practices and fundamentals of thoughtfully setting up your agentic flows. Today, we'll be sharing some of the building blocks and techniques you'll need to adopt on your journey to creating your own end-to-end agentic workflows. But before we get started, I think we had some interesting news we wanted to discuss.
SPEAKER_01That's an understood. Yeah, the concept of, I guess, self-regulation and some of the agentic uh rogue agents and things. I don't know if we've addressed all of that on the podcast before, but sandboxing does work. I think we might have talked about this some last episode and reading some of the mitre and some of the other um you know incident reports and things from Hugging Face. There's a little bit of negligence going on. It is interesting with the process of self-regulation as kind of the answer.
SPEAKER_01Although saying, hey, you need to actually be responsible and use your guardrails is not something it's not like we need to have a bunch of new laws and a bunch of new regulators coming in to say do the thing that you should have already been doing anyway, that's basic Security 101. So it is a little interesting how that plays out. But one also interesting fact is, and which is we have advocated, I personally anyway, of you already have laws in the books that can help regulate some of these components. The FTC, a couple days ago, right after the self-regulation was signed, said that they're gonna start investigating OpenAI and Anthropic for like unsafe product releases, which it makes a lot of sense and shows that like that's like what the FTC's job is.
SPEAKER_01And I would also argue that this is what uh Nvidia CEO had said is like if your product is not ready, if it's not safe or you're not developing it well, like you should not be doing that. So I do agree with that approach. So I'm I'm kind of mixed on the on this topic in general, but I do agree that like we have you if something is unsafe and it's gonna it's gonna be harmful to consumers, you can't be doing that. So that we already have laws in the books, just enforce those, and it's it's good to see the FTC is is at least investigating that versus like I'm I'm not quite sure what we would be adding new laws to do or regulations to be like, hey, make sure you do cybersecurity best practices and be responsible with your development versus just and then we have we have the ways we can still enforce that.
SPEAKER_01Sid, what are your thoughts?
SPEAKER_02Yeah, I mean, you know, this whole idea of self-regulation kind of gets this idea of like these LMs and these mod these models have gotten extremely hard to regulate, to understand, to control. And so there's a pretty strong incentive to make it your problem. Uh to say, like, you know, it's best if we leave this to the consumer and to the customer to decide how this works, uh, rather than having individual companies having to actually take ownership of the mistakes these models make.
SPEAKER_01Yeah. And that's the thing is I want to see the companies have to be responsible. And that's where it's sometimes it felt like, well, I want to make it someone else's problem to be for us to be responsible, versus no, you guys, in whatever competition the two or three labs are doing against each other, you you all have to be responsible with what you're doing. Every other industry has to not do things that harm consumers. You have to do that as well. So I however mechanically we do that, I want the labs to be held responsible for doing the right thing. Um, the mechanism that happens, not as important as uh don't do things you shouldn't do.
SPEAKER_01And as we get into today a little bit on like skills and things, a lot of how some of these systems are trained is you'll have 80,000 or more of these subagents and they're like reinforcement learning based off of the internet and things. So, yes, it's faster to do that when you don't have the guardrails and the sandboxes, but that's not responsible with where the models are. Don't just give it a skill that says, here's my constitution, don't do anything that you that I wouldn't want you to do, and then say, here, go free and be wild and do things. That's not a responsible way of doing it. Um and how things move so fast, getting a bunch, writing a bunch of regulations, getting public comment, and then saying you can't do this exact paradigm.
SPEAKER_01Well, the labs will already be doing something else by the time that's that regulation comes down. So I like it the the FTC approach potentially is the best way of don't do things that are harmful consumers when you know better.
SPEAKER_00Yeah, completely agree with both of you. I think the way I look at it is it's not serious until there are consequences, and that's really what part of the responsibility of the government. How do you step in? How do you impose those consequences? I think we've seen some of the examples with the EU AI Act and some of the penalties or guidance that has been provided to customers. I'd like to see uh a little bit more, slightly more big government stepping in saying, hey guys, this is hurting our people.
SPEAKER_00Uh, you need to stop it.
SPEAKER_01Yeah, and uh hopefully that's what the FTC will be doing a little bit. But at the high-level takeaway is saying you're you're being reckless and then calling it rogue agent activity, that's not okay. You are being reckless. And hopefully, to your point, Mike, we already have things of when you're being super reckless with consumers, that's and also we have cybersecurity laws in the books too. We have laws that you are not allowed to hack people. And if you were being reckless and allowing that to happen, like that's where I'm also a mix on this, because there's you don't need another law that says don't hack. We already have a lot of them. We have federal laws with real penalties on that, just enforce them on this situation.
SPEAKER_01But it it also it's interesting because it also sometimes feels like the labs that are calling for the slowdown and things is a little bit like a kicking away the ladder. And I don't want that either. I don't want it to be like anthropic and open AI trying to find a way to be, I don't want competition, so do some way that makes me stay where I am, and we'll just gentleman's handshake, there's the two of us left, uh, or three if you include Jim and I. So we don't want that either. So it's it's interesting how this plays out, but uh definitely we don't want people being reckless, we don't want them hurting consumers, and we need to have some sort of enforcement of that.
SPEAKER_01The details aren't as important as long as we're not playing the game of making rules that are defunct by the time they're published.
SPEAKER_00Shots fired at Microsoft. Just three players? No Microsoft? I'm joking, I'm joking, I'm joking, I'm joking.
SPEAKER_01Well, they don't really have like they don't have really a huge fun foundational model. They probably do, but it's not it's not in the big three, I would say, that that are talked about.
SPEAKER_02Uh and as a last little topic before we hop into our episode here, uh, what has ever been reading?
SPEAKER_00I'll cheat. I haven't been reading, I've been listening. Um I shared it with you guys yesterday, but I was recently recommended, ironically, a podcast called If Books Could Kill. And the first one that I listened to was surrounded by idiots. And it is a very interesting deconstruction of some of we'll call them statistics used in freakonomics and um the lack of guardrails, any real research and information, and the lasting impacts that it's had.
SPEAKER_00So I thought it was an extremely interesting topic. And uh I guess books can kill sometimes.
SPEAKER_01Yeah, it's on my my my cue up. We gotta hit that on a run in the next couple days. Uh, interested in hearing that one. I'm still working through the Churchill book. That's definitely it's very interesting and it's very perspective of like we've talked about, I'm almost a broken record on the perspective you get from reading history and things, and same with like some of the financial things going on right now. Like the as of this morning, the bond market and things like that are crazy. The most dangerous words in finance is this time is different. Uh so it's it that's life in general. So, like the the reading the different history things and seeing the parallels or seeing how you know what happened in the 1880s and like how that repeats and things.
SPEAKER_01So that book I'm definitely um enjoying working through. I started now, I I think I've talked about them before the great mental models by Shane Parrish. Like there's a if a series has kind of been slowly. I read a book, I'm on the third one now, Systems Design and Things, which is really good of different mental models and bottlenecks and things like that. So I'm just kind of been working through periodically those different books. But one item I don't think I've mentioned yet on the podcast, I've been doing um, it's kind of like a daily book. It's a a calendar of wisdom by Leo Tolstoy. Weirdly enough, it's been one of those banned books.
SPEAKER_01So I'm a big fan of Ryan Holiday and all of his stuff, but like his bookstore, I think it got it from him. It's the primarily banned books places around the world, is like that's what he primarily stocks. So I don't really know why this has been a banned book. Um, but it it's pretty good. It's like a daily kind of quotes of wisdom from Confucius and Tolstory and Talmud and just a lot, and just John Ruskin and just a bunch of different quotes and things like that for each day of the year. So it's a it's pretty, pretty solid to read through.
SPEAKER_02Excellent. Personally, I've been reading a little bit more into media literacy. I think that like now we're in a more challenging digital landscape than ever. Um, and so my most recent read that I'm starting up, and it's a it's a nice short book for anyone wants to try it, it's The Society of Spectacle. I it's a it's a French book. I think it's translated a couple ways. The spectacle society, the Society of Spectacle. Uh really wonderful book. Really nicely aligns with anyone that's been reading stuff like Jean Baudrillard, a lot of people that are interested in like I won't say simulation theory, but if you love The Matrix, you should give this book a read.
SPEAKER_02I think you'll find there's a lot in common.
SPEAKER_01Oh, that's very timely. Yeah. That's a whole nother topic. What the the news behind the news and what's the signaling the news is doing.
SPEAKER_02Oh boy. Matrix is a high praise, Sid. Look, the Wachowski's would probably consider this like a top book for them. I think it very much aligns with a lot of stuff they're interested in. They'll tell you to read Simulation Simulacer. That's like one of the assigned readings they gave the actors for that movie. Great, which is also a great read.
SPEAKER_00Love it. All right. Sounds like we've got some uh books to come back to and topics to go into.
SPEAKER_02Yes. All right, all right. So let's let's hop into the meat of today's episode. And so this episode is broadly about agents, but we want to give a little bit of background since we've talked about agents before from a traditional agentic coding standpoint, but now we are going to talk a little bit about the modern landscape of agents and what's going on. So the first question we want to answer for you is when did my LLM become an agent? The LLM was just a model that was sitting somewhere hypothetically, then it became a chatbot.
SPEAKER_02We figured out that happened because of reinforcement learning. We were on top of that large language model. We taught it what kind of answers humans like to hear. And we saw stuff like sycophantic behavior, but then also we saw controls against like dangerous topics. So, how did that model become an agent and how's that model now doing things? I used to just chat with this model. So to give two levels of explanation, the first just being an explain it like on five level. We've been using these chatbots since Chat GPT, but you might have struggled to have this chatbot do your actual work for you in the past.
SPEAKER_02So, what's changed is we've developed something called an agentic harness. And you can think of this agentic harness as a car that can be driven by the language model, which allows it to act as the brain to drive a car to operate and do the tasks you want it to do. To take that up a level, think of this as an engineer. This harness then can be thought of as orchestration code around your LLM, which is responsible for things like memory management, history compacting, tool permission, system access, and much more.
SPEAKER_02This is good old-fashioned human code we would have written before, but now we have this LLM acting as the we'll say, quote, reasoning engine behind this model.
SPEAKER_01Yeah, it's really making a an expert system, if you will. So it's what we've talked about a lot on this this podcast is the system design and things, and what we were realizing, which is a little bit uh oh, we've talked about a lot, like the thoughts about AGI, and no one really talks about 2020, like the 2027 stuff anymore, or it's super intelligent in AGI, no one's really even talking about that stuff. But what essentially we are doing now is realizing like you just prompt an LLM, it's not gonna actually do what you want it to do. We're all gonna accept that now.
SPEAKER_01So now we're gonna get take it back to engineering. It's kind of like um when I was coming up as an as an accountant, it was always a joke of you know, Sarbane Zoxley is the full employment act for accountants and lawyers. A uh generative AI or a gentic AI, anyway, is a full employment act for software engineers, really, because you have it does so much work around making these systems useful. So the count juxtaposition is you chatbots used to be more like toys, like the chat GPTs of the world, anyway. Everybody knew they weren't accurate. That you ever you can spot the generative text a mile away, even before now that Anthropic does the watermarking.
SPEAKER_01So it's gonna be interesting to see. Now you can some first person that makes really an app that you can copy and paste text into and see everybody's gen AI. But in any case, thank you, EUAI Act, for enforcing that. But we're really now, we're we are actually seeing a lot of value with these systems. So it's kind of like the hype cycle, if you will, are actually starting to see where the where we can have some very successful improvements, but it's it's not like revolutionary. It's it's it's evolutionary, uh, of it's more we're making better systems, better consumer experiences with customer-facing chatbots and things, and we're seeing a lot of success there, but those are complicated built agentic systems that have a lot of deterministic code and layers and different LLMs testing each other and things like that.
SPEAKER_01Uh, we can get all of that in in the future, but it's really we're building these systems now where an LLM is a brain or fuzzy logic in the middle.
SPEAKER_02That's right. And this kind of gets at the larger paradigm we've seen in the last year or two, which is not just we need a smarter model, the model needs to do something. And you know, a lot of Sagentac harness work is basically taking the models that we already have, which are sufficient for a lot of simple tasks, and just giving them the tooling to do the things we want them to do. So, some common examples of this we're seeing now are in the coding space, a very popular application for this, uh, maybe because the people that use these models are already very tech savvy. Uh, we have things like Cloud Code, which is widely considered the premier enterprise option.
SPEAKER_02Uh, it's it's kind of taken as an industry standard sometimes. We have codecs from OpenAI, uh, which people have been liking a lot, especially for coding tasks more narrowly. And then on the other end of the spectrum, we have things like Lang Graph. And Lang Graph represents this paradigm of building your own stateful agency workflows, not counting on the harnesses made by a cloud code or a codex to do this kind of maintenance for you. And I don't want to make it sound like this is just for coding.
SPEAKER_02We've also seen things like Cloud Co-Work, uh, which is more interested in knowledge work, document analysis, day-to-day tasks, and you know, even potential like low-code, no-code solutions like Microsoft Copilot Studio, uh, which is a platform where you can build your own custom multi-agent systems and they hook right into Microsoft 365 or Teams. So it really is your garden to pick what level of agent you're looking for. Are you having it do the hard industry work of your organization, or are you having it do your day-to-day tasks more like a personal assistant or secretary would?
SPEAKER_01And they're great overview, and all of those tools are very useful for what they have, and it really comes into those two, really two camps. I see it of there's the personal productivity. It's kind of like how computers sped a lot of things up. Internet made people faster at their jobs and changed workflow a little bit. AI is now going to get embedded everywhere, and these like little no-code style agents you could be doing, or like clawed code. Honestly, for software engineers, it's kind of a B C A D moment, if you will, of I can't imagine going back to being a software engineer without some of these things.
SPEAKER_01It's very integrated in your flow, but it's it makes you more productive at what you do. But you are in like the software engineering example with a clawed code, instead of the bottleneck being you writing the code, it's now the reviewing and understanding of it. It's kind of going into you are a director of a bunch of interns doing work for you. You don't trust the work, but it's still helpful and faster to have them go do things and maybe it's useful, maybe it's not, but you're now orchestrating them and putting the things together. So it's it's huge zero-to-one moment. Weirdly enough, we're not seeing any change on GDP though yet on this, but it's a whole nother conversation for another day on GDP gross.
SPEAKER_01I've been doing some analysis on that lately. So that's another topic for another day. But then there's the, as Sid mentioned, the like the lane graph, uh before before I shipped over the no-code, low code, or interacted coding environments, if you will. Huge improvements in business longer term, changing how work is done, TBD on some of the economic things, but I do think that's a lagging indicator, very helpful in how we just slow productivity growth for everybody. It's great. And then there's that actual, you have to build like a land graph. You have that's a deep research-driven data science modeling.
SPEAKER_01It's, you know, we we used to have just basic linear models and we went to machine learning models, we went to deep learning models, now we're going to agentic systems based on LLMs. All of them are, each level is more complicated and honestly harder to build, but they're increasing the experience for customers if done, if done right, allowing you to do things you couldn't do, disrupting business models. So it is definitely a uh change. We'll see a lot more agentic powered things. And we're also seeing sometimes customer service experiences can be much better than talking to a human on some of these. So, like, there's a lot of improvements we'll see, but by that by no means building a land graph system, you're not going to be just asking Chat GPT to make it for you and it's good and deploy it.
SPEAKER_01There's so much engineering to do well. And now with the flywheel of these of these systems that can find security vulnerabilities, the infrastructure engineering and security engineering is uh so much work. And that's all the high-level understanding how the components fit together and orchestration. So the nature of like engineering is changing, but it's not going anywhere.
SPEAKER_02And this drives home this idea that this is not just something you have to purchase off the shelf, right? Your responsibility is not just to purchase an anthropic license than to just use a ton of cloud code. You have actually the ability to do a lot of customization with a land graph, or uh, as we'll link in the show notes, uh, something like Py.dev. And there's a lot of engineering work still to be done on your end to set these kind of flows up. These flows aren't just necessarily something you want to purchase and use because they're very expensive to use in that way. And maybe only large enterprises are realistically going to be able to hand over this work to someone else.
SPEAKER_02You may want to consider something like a local versus a remote flow. So these remote flows are these frontier models that we're paying for. We're paying by the token, we pay their hosting costs. Uh, but this gives us access to frontier models. You know, maybe potentially the cost of privacy for those of us that aren't on enterprise plans. But this is not the only option. We have the option when using these kinds of agentic flows to take them on board, take control of them ourselves, and own more of this configuration stack in terms of the building of the model and the deployment of the model.
SPEAKER_02In previous episodes, I think we've discussed OLAMA. This is basically an open source platform that's available, which allows people to build their own agents on their own machines. If you have your own GPUs, if you have your own laptop, you can deploy it there. Uh, I also want to give a shout-out to OMLX. Uh, this is a Mac optimized version for Apple Silicon, since that's the device that most people have. And the Apple Silicon is pretty good. You've seen people using their Mac minis as little open clause servers.
SPEAKER_01Yeah, and let's uh unpack thereof as an industry, specifically as we're moving towards, we're realizing there's no master fable instance that can do everything for you. There's no circa 2025 August Sam Altman PhD level foundational systems. We're all realizing that's not really where we are. So we're building, we're getting really good at the harnessing and things like that. But that also with the pushing from China with the open weight models, and open weight may or may not be open source, but that means the the licensing is usually permissive, but it's the weights are open. You have Google's now released the Gemini Suite.
SPEAKER_01Nvidia is being very smart and playing all sides of whoever needs chips. Um, they're also investing with their acquisition of Hugging Face, they're investing in a lot of open weight development. Their Nematron models, people sleep on those, those are really good. They have some optimized Nematron models for different workflows, like reading lots of documents in an enterprise setting and things like that. And there's also a trend among Silicon Valley firms of going to like even fine-tuning again is making a comeback. And it to Sid's point of like you want some more privacy, you want to run things locally and things like that.
SPEAKER_01Open weight models, especially if we're realizing the competitive differentiation for a lot of workflows, is really the harness. Why is Cloud Code so good? Sure, it's using uh Opus and whatever, but the the model you could use that somewhere else. Cloud code is so good because of all the tool skills and the actual harness of how it is built. It's a great application. Same with the codex. Those are really good applications that are leveraging an LLM. They are agentic, exactly an agentic system. So you could be using some of these, uh, and that's what when we get into what OpenClaw, Hermes, and Nemo Claw and things like that are um, they're really great harnesses.
SPEAKER_01And that's there is really an interesting trend towards this is where the commoditization of the LLMs, if you will. Do you really need fable? Or do you just need some fuzzy logic and the the harness is what you need? Can you just run something locally on your laptop? So this is where it's getting really interesting and exciting from a uh development perspective.
SPEAKER_02Yeah, absolutely. And you know, we want to drive. Home, this idea that you're not beholden to using these large providers. There are really great open source opportunities out there for those who are willing to do a lot of setup and those who aren't willing to do a lot of setup. As Andrew talked about, Aaron's been using OpenClaw for a long time, but there's even new things now, right? Like Hermes and NemoClaw, which make use of all these other great open source models that are available out there. Those are updating all the time, those are changing all the time. It's becoming less clear if more powerful models are just all that we need now. I think that now we're trying to get these models to really do something.
SPEAKER_02It is about these great harnesses. And so we recommend that you know it's worth keeping up to date. On top of all these great models that are coming out, what can you really get them to do? And what kind of tooling is available to make them practically useful for you. We want to take this time to now jump into some best practices, right? So these are some common questions that a lot of people seem to have, a lot of concerns we we've seen expressed, and then how do we solve them? So I think one really big problem that we see with people using these agents is the concern of how do I keep my agent on track and on the same page as me.
SPEAKER_02So what does it what does that look like in terms of like a human AI alignment problem, right? Like I have some task I want it to do. I give, let's say, a one-paragraph prompt saying, please do this, and then I come back two hours later and it hasn't done what I've wanted it to do. There are a couple steps we can do to manage this kind of behavior and try and make sure that we get the results that we want. Uh, these have been shown to empirically work. Uh, we don't have a lot of theoretical frameworks for how things have to work, but take this with the understanding that people have tried this in industry and gotten good results with it.
SPEAKER_02So, one great example of this is context management. Context basically you can think of as all of the information that your agent is expected to load every time it tries to do your task. And every time you ask it a follow-up question, and every time it comes up with more reasoning, it's expected to reread that context every single time it gives a response. So we have some options to help clear up this kind of memory. One way that we can do this is we can clear our unused context often, right?
SPEAKER_02So if we have a planning session with our agent and we're talking to it for 100,000 tokens before we get started, let's synthesize that down to just what we need, and then let's throw away the rest. Let's not keep that old original reasoning logic and let's just keep what's useful. This can help large models not fixate on small details that aren't actually leading to the desired outcome. And it can make sure the context that it's using is actually useful and relevant to our task. If you want to take this as an analogy, you can think of this as trying to run a computer with a brand new hard drive versus a hard drive that's 95% full, right?
SPEAKER_02You could you should think of your context as basically an actual storage which is affecting the performance of your model. In exact comparison, a fuller drive or fuller context means you're gonna have a model that's more error prone, it'll be slower, and it needs more compute every single time it wants to find some kind of relevant data.
SPEAKER_01This is where the art involves as well. Is this the concept between personal agents like the Hermes is you do want, and this is that concept of memory within a harness, you don't want to always just clear your hard drive all the time. Same with like you might have your personal photos and things like that on your hard drive. Yes, you don't want the 95% bloat, but it's how do you know what to store? Uh of course, we're assuming for this conversation, we're assuming it's just personal workflows, there's no like data retention and things like that concerns, but you want it to have you learn some of your preferences and what you like, like even back to how we've talked about the travel agent things and things like that.
SPEAKER_01So the the art and a lot of the engineering around this is what are some of the things that are helpful for it to remember? So you're not onboarding a new personal assistant every time you wipe the hard drive, but making sure we don't have that bloat or it's not it's not mixing conversations, and because it's not smart enough to filter through this kind of stuff by itself, we're building all of these different types of memory systems to figure that out.
SPEAKER_02And another major topic that we see people really interested in trying to dive deeper into, but maybe getting stuck on is multi-agent solutions. This idea that you can have one agent do a job, but wouldn't it be better if you had five, 10, 100 agents working at a job? I find that we often get stuck on discussing how we implement this and why we implement this. So I'm gonna walk you through a best case scenario for this, and I think that'll elucidate some of the options we have available to us. We want to think of tasks like we do in the real world.
SPEAKER_02When we have a project, we break projects down into subtasks, and then we complete those subtasks, and then these all come together to arrange into the larger project. This is exactly where a sub-agent is perfect to be used. We want to think of our larger goal as a bunch of byte-sized components which can be verified separately and assigned to sub-agents. This kind of model reduces a lot of the concerns about low performance, since we can verify small things. If we say build a website and the website isn't perfect, there's nothing we can do.
SPEAKER_02The website has been built. But if we say this agent, please build the login page, this agent, please take care of the design, we have a better chance of building up a system which in totality can actually succeed at our task.
SPEAKER_01I think a helpful analogy for me has been it's basically an assembly line. So if we thought about, we we used to think, hey, we're gonna have this magical bot that we ask a question and it's gonna be like a uh your own art, like a great artisan that can craft you a whole car from scratch or whatever by itself. That's kind of how we the industry used to think about just throw more data and compute at the problem. We will make agents that can do every or AI that can do everything themselves. And that's this subtle shift. We nobody talks about that anymore. Now we're like going to Henry Ford assembly line.
SPEAKER_01We are now finding that we're having these little bite-sized chunks. It's easier to man like to train people and to manage, like when you're doing ascended lines and get a lot of efficiency because you have people and machine and or robots is the new trend, focusing on one little discrete task and only that task. So they can get really good at that one little task and then feed it to the next area. So we're essentially making assembly lines for how we we craft the different tasks, even like every single task gets brought into these little very narrow components, which some of them, some of the parts will even be made with deterministic code.
SPEAKER_01Some of them will be using the LLM as fuzzy logic, but that's how we can get past, like we talked about last episode, that that issue of you know 90% accuracy times four equals 60% accuracy, roughly. And that was that issue we identified last year with agents. Well, that's where the the narrative is very much changing. And uh as we get into the different models for different things component, it it this factory analogy continues to play.
SPEAKER_02Yeah, so let's dig into that a little bit. So we take this factor, we take this factory analogy to the next step. It's not that you just need to use a single type of agent to do all of your workflows, since that's not realistic. In fact, you probably want different kinds of models that are better at different kinds of tasks to handle different parts of your pipeline. If you want to do planning, high-level reasoning, go for an Opus fable, right? Get these larger frontier models, let them do the planning for you. But when it comes time to doing execution, you likely don't need the super large model.
SPEAKER_02You don't need Opus to write you an email. Something like a sun is perfectly reasonable to do your execution work. Once you have this kind of balancing between very powerful models to do your high-level planning, smaller models to do execution, you might even go to a different vendor like an OpenAI to handle your verification. Taking these multiple model techniques allows us to smooth out a lot of the weaknesses of the models we use in a way that can either save us cost by making sure that we're not using overly powerful models to do simple tasks, or can be used to artificially increase cost because we have a high expectation for success.
SPEAKER_02In the world of QA, we don't simply test something once, we test something multiple times, and sometimes with more than one QA engineer. But that can look like in this case, instead of having just the largest anthropic model do our planning, we also have OpenAI do its planning, and we have GemI do its planning, and we can combine those agents together into a larger consensus opinion. These types of pipelines are very popular for the highest hierarchy of tasks. We expect a lot of correctness on in very ambiguous worlds.
SPEAKER_01Want to highlight what's one of the parts you just did said, Sid, which is we are really seeing an industry, people are playing the labs against each other. As we talked about, we've talked about the tokenomics and things like that previously, and that's a key part of the we we it's faster and more efficient regardless of the cost to use these other agents, but that's a component as well. But there are no, at least that I've met, anthropic card carrying fans or open AI, everybody is like, we're gonna play them against each other, and they are built slightly different, even though there's obviously a lot of knowledge sharing across.
SPEAKER_01So it makes a lot of sense to be, I don't want a fully anthropic flow where everything's sonic. You want the diversity of training data, of the approaches to be validating again. So you can have, and we're seeing this in industry, you're gonna have open AI, one or two open AI models, one or two uh anthropic models, and maybe an open weight model all within the same AI system. And then that system is getting really solid. And that's where we're seeing that the applications we build getting much better. But that's such a change in the narrative from what it was even 12 months ago and what's the accepted fact now.
SPEAKER_01But like we're this is where we're finally seeing that utility by doing things that would have a year or two ago sounded kind of crazy.
SPEAKER_02That's right. And and you know, this kind of emphasizes more that this really is an art. We need to try out a couple of solutions, we need to see what happens, we need to see what works. It's really great to read what other other people are doing, but this is not like a clear-cut solution like other things have been, right? It's not like you pull out React.js and React.js does everything. No, we're probably gonna have to use a couple of tools and a couple of different ways to make our workflows work to expect them to work.
SPEAKER_01You mean we're kind of getting back to what data science has always been, which is experimentation.
SPEAKER_02That's right. We're we're finally getting back to our empirical roots.
SPEAKER_01Yeah. Well, I mean, that's always been the tagline. Bring stats back here. We're we're getting that that's kind of data science as a discipline has never has always been it's based on statistics of the the hypothesis testing. And you, you're you're why is it say scientist ever in the name? Because you're testing things and figuring out what works. And straight software engineering is very difficult, but it's it's the more deterministic, like the React, like you're mentioning. So we're really getting back to the it being an art and having like research. You have to literally do research on what's the best option for your your use case.
SPEAKER_01And when you we'll have to talk about JEV another day, but when you have these new, like you're constantly almost a lot of your time is just evaluating all these new solutions and doing this constant RD on what's the best way to solve the problem.
SPEAKER_02That's right. And maybe one of those levers that was popular earlier on was things like prompt engineering, which is like, well, if I could just write a better prompt, I can probably get it to do what I want to do. Maybe I need to be polite to the LLM, maybe I need to give it a ransom, maybe I need to like uh write a very long spec. This has evolved, and the way that this is involved is we have these ideas of planning and these specs. So if you've used Cloud Code before, you've probably noticed it has a plan mode. And we recommend that you use that kind of mode.
SPEAKER_02This allows you to create these really nice, concise, precise design docs, the same when the same ones that we would have had a PM right for us before, and then execute those. This is twofold. One, this is great for memory usage. These are very compact plans. These contain just the great information we want, and they're very verifiable. You as a human can go and check that plan, make sure it meets what you expect it to have, and then send it off for execution. This is infinitely better than just having a prompt or just having a prompt and then telling a different AI, hey, can you touch up this prompt for me?
SPEAKER_02This will give you a very large systematic design document to then have executed that you can make sure contains the details that you want to contain. Uh, this will also save you a lot of time, especially if your models take hours or days to complete a task to actually know what it's going to do at the end of it. We'll point to some resources in the show notes. Cloud Code, for example, has some built-in spec planning, and they have a whole playbook for teaching you how to do this, which is a great little mini course. There's also some community-driven plugins like Obra, superpowers, which you do this kind of work.
SPEAKER_02And uh Cloud Code also has some additional education materials on sub-H and best practices.
SPEAKER_01Yeah, and this is an area I'm honestly surprised that Anthropic seems a little bit behind the community on. It's like the plan mode is fine with cloud, but like the superpower stuff is really good. The spec driven development, there's lots of, we used to have you know test-driven development back in the day there in software engineering. There's pros and cons to all these approaches. But this spec-driven development is getting really interesting. Um, Anthropic did propose recently an SDLC playbook. There's a few kind of it still is a little clunky. I'm surprised they're not farther along on how they're thinking about this. But it's a potential future of how we're building applications with these areas of uh breaking into components.
SPEAKER_01So everybody like you understand exactly what the intent is. You have the team review what the intent is and things like that, then you'll spec it out and you do these review cycles this way to help not get into this area of vibe code, and then now someone has to do a code review. And are they really code reviewing bottleneck? To to like you're evaluating as it's going. So then the parts that uh maybe if you're not reading every single line of code, it's not less important because of how particular you are in the steps of the journey. So lots of we've personally are in our RD team, had a lot of success with some of these superpowers and things like that.
SPEAKER_01But it's interesting than like software engineering life cycles are really changing, and it's very very much an I think I see this area in the next six to 12 months. Like, there's so much growth as an industry for how do we refine this? I think we're heading the right direction, but there's so many more areas we need to get cleaned up here. But it's very intriguing of it, and it's this same factory assembly line type thing. We're talking about like very discrete components. How do we get those really dialed in, figure out where to insert the humans for and the expertise?
SPEAKER_01And then it's like giving interns little tasks that you're orchestrating, but this is where it also, as we think macro of if the industry stays how it is, in 10 years you're not gonna have any seniors anymore because you're not gonna be training people, you're gonna be using the AI. So there's a lot of uh existential kind of questions to think through, but it makes the senior engineers and and data scientists that have the expertise of holistically seeing how the parts fit together invaluable. And it's to be able to orchestrate these components because the LLMs aren't very smart, but they're good at these very discrete tasks if you give them the right instructions.
SPEAKER_02So we want to synthesize a lot of what we discussed here today into five very practical steps that you can use to improve your gentic usage, tying in with our tokenomics episode and with the blog. These are ways that you can save money and be more efficient. And you'll notice that a lot of these themes we've taught we've discussed early in the episode. So the first thing we want to discuss is make sure that you right-size your model selection. It's not always best use the most expensive and slow frontier model for every single task that you're doing. It's often not the right tool.
SPEAKER_02And we want you to think critically about things that are simple like summarization or classification or a structured extraction task. Is there a smaller model that can do this for you? You know, is this gonna realistically save you, you know, 80, 90% of your compute, and you're not gonna see a big output difference? This is where you need to think very critically and very strategically about how we use this tool. Our next theme is prompt caching. So we've talked a lot about memory today.
SPEAKER_02If your workflow uses a lot of prompts or uses a very large prompt that's very competitive, try out techniques like caching. Most providers, like specifically Anthropoc and OpenAI, offer caching solutions at very steep discounts. For agentic workflows with very stable context, this is often a really great lever that's available to you for optimization and is maybe not obvious to you that it's available. So this is something you should look into, especially because, like we're saying, if your model needs to reread this prompt every single time, using a smaller version of or having it pre-cache for you is very useful, especially for these very repetitive workflows.
SPEAKER_01Yeah, it's kind of a riff on that memory management and also AWS Bedrock, if you're deploying those production systems, which we'll talk about in another episode. Well, we'll have probably several episodes on these, like the personal as well as still the like building agentic applications. But prompt caching is huge. And bedrock and other other providers uh have that kind of option as well. Um, but it's all kind of comes down to that context management.
SPEAKER_02On the other side of context is output. Left unconstrained, a lot of these models, especially the ones that were built on these chatbots frameworks, are very verbose and they have a lot to say. And it's like that light bulb joke we told you where if you just want to turn off a light bulb, it's gonna give you a little bit of essay on the history of light bulbs. Let's not have this happen. We can be very explicit with our models, especially in the prompting stage or in our specs, about what is the exact response we expect with nothing extra allowed. We pay for every single token these model outputs.
SPEAKER_02So let's be very deliberate about using exactly what we want as models, since most workflows are not gonna benefit from these kinds of large responses to simple queries that are often just yes no. Our fourth theme here is that we should model our costs before we automate. Realistically, this means that we shouldn't say this is going to be agentic, it has to be agentic, I'm not gonna take any other solution. Let's really take a moment to estimate our tokens for each of the execution, make sure that we're using the right model every side, multiply that spend by the number of expected runs and the frequency of these runs, pressure test to make sure that what we're paying for this model makes sense, that this workflow is actually accomplished and we want it to at a cost that we're comfortable with, and that this kind of cost efficiency is accounted for.
SPEAKER_02Trying to retroactively cop to optimize, trying to retroactively cost optimize a workflow that you've been using is very hard. It's much better to design deliberately with this efficiency and with these budget constraints from the start, since it can be difficult to give up capabilities or speed that you've been using.
SPEAKER_01Sometimes that's open weight as an option to consider as well. We know how to budget for cloud cost. It's sometimes, you know, depending on what our application is, some of those components could be open weight models that you're self-hosting.
SPEAKER_02And I think this actually brings us really nicely into our final theme, which is to audit your agentic chains. These multi-agent pipelines can be multiplicatively expensive for your token costs, especially as we hop between agents, especially if we're doing additional judging rounds. We should be very clear about what are our layers of orchestrators and subagents and agents that those subagents might call to understand this exponential token burning machine? Make sure that we understand very clearly expectations about what's going to be run, how this flow goes, and understanding if there's any clear efficiencies.
SPEAKER_02So this might require asking questions like before you add an agent or orchestration step, could this be done with a function call? Is this just a database lookup? Could a simple deterministic rule accomplish the same goal? So being very deliberate about auditing our agents and our agent chains to make sure that everything here really makes sense and is accomplishing what we want to accomplish. And with that, we'd like to take you to the conclusion of today's episode. We have a had a lot to say about this topic, and we invite listeners to stay tuned for future discussions about governing agents and how tech debt might be shifting into cognitive debt.
SPEAKER_02We'll be back specifically with a part two of this episode on thoughtfully setting up a genetic flows, where we'll dig a bit deeper into technical aspects, talk about some more advanced techniques, talk about how you can scale this up and build more powerful flows, uh, especially beyond what is possible for single individuals and taking this to larger organization levels. Uh, the closing thought that I'll leave the episode on is that it might feel like we're like in a wild west of open development, but we emphasize that a lot of these core principles that we've always discussed of thoughtful design, intentional engineering, taking data science as an empirical art, which needs to be tested and verified, these things still matter.
SPEAKER_02And it's what's going to separate robust, reliable solutions, which work at the parameters we expect them to, from brittle, unreleasable models that we're often struggling with and arguing with, and ultimately having to explain to people who may not feel that there's like meaningful ROI behind.
SPEAKER_01Thank you, Sid, for taking us through all this. Yeah, this was a a big episode and much more to come on these topics. This is a huge topic that's constantly evolving. But thank you, Sid, for getting taking us through this.
SPEAKER_00Thanks for tuning in to another episode of the AI Fundamentalists. Make sure to smash that follow button on iTunes, Spotify, or your favorite streaming service so you don't miss out on new episodes. Until next time, keep thinking, questioning, and learning about AI.
As multi-step agentic AI systems evolve, performance is increasingly driven by orchestration harnesses and stepwise outcome verification rather than raw model scale. While gated sub-agent architectures help prevent...
Andrew and Sid break down the hidden costs of AI tokens, why current prices are artificially low, and whether AI tokens could become the next global commodity. As AI adoption surges and agentic workflows burn through...
In this episode of The AI Fundamentalists, hosts Andrew and Sid are joined by AI alignment and safety researcher Dr. Jillian Fisher to unpack the complex realities of political bias in Large Language Models. Dr. Fisher...
In this episode we conclude our series about Metaphysics and modern AI, we explore the definitions of consciousness, reasoning, and thinking to understand if AI possesses these traits. From examining legal...
As the AI landscape evolves, the methods we use to process structured data are undergoing a silent revolution. Join us to explore how Tabular Foundation Models (TFMs) are challenging the decade-long reign of tree-based...