UDSKRIFT 🔗
WEBVTT
00:00:00.239 --> 00:00:07.200
Welcome to the AI Fundamentalists, a podcast about the fundamentals of the AI that impacts our lives and businesses.
00:00:07.440 --> 00:00:08.960
Here are your hosts, Dr.
00:00:09.039 --> 00:00:10.400
Andrew Clark and Dr.
00:00:10.560 --> 00:00:11.839
Sid Mengelik.
00:00:12.320 --> 00:00:15.039
Welcome to this episode of the AI Fundamentalists.
00:00:15.199 --> 00:00:21.440
Today we'll be discussing some of the best practices and fundamentals of thoughtfully setting up your agentic flows.
00:00:22.239 --> 00:00:29.440
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.
00:00:29.679 --> 00:00:34.640
But before we get started, I think we had some interesting news we wanted to discuss.
00:00:36.159 --> 00:00:37.119
That's an understood.
00:00:37.439 --> 00:00:43.359
Yeah, the concept of, I guess, self-regulation and some of the agentic uh rogue agents and things.
00:00:43.520 --> 00:00:49.039
I don't know if we've addressed all of that on the podcast before, but sandboxing does work.
00:00:49.359 --> 00:00:57.359
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.
00:00:58.960 --> 00:01:00.560
There's a little bit of negligence going on.
00:01:00.719 --> 00:01:07.040
It is interesting with the process of self-regulation as kind of the answer.
00:01:07.200 --> 00:01:20.959
Although 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.
00:01:21.040 --> 00:01:23.439
So it is a little interesting how that plays out.
00:01:23.519 --> 00:01:31.920
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.
00:01:32.079 --> 00:01:47.040
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.
00:01:47.120 --> 00:01:55.519
And 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.
00:01:55.840 --> 00:01:57.120
So I do agree with that approach.
00:01:57.200 --> 00:02:06.480
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.
00:02:06.640 --> 00:02:28.560
So that we already have laws in the books, just enforce those,
Load full transcript
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.
00:02:28.800 --> 00:02:30.080
Sid, what are your thoughts?
00:02:30.800 --> 00:02:40.639
Yeah, 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.
00:02:41.039 --> 00:02:43.520
And so there's a pretty strong incentive to make it your problem.
00:02:43.599 --> 00:02:56.000
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.
00:02:57.759 --> 00:02:58.080
Yeah.
00:02:58.240 --> 00:03:01.599
And that's the thing is I want to see the companies have to be responsible.
00:03:01.680 --> 00:03:15.039
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.
00:03:15.199 --> 00:03:18.319
Every other industry has to not do things that harm consumers.
00:03:18.560 --> 00:03:20.000
You have to do that as well.
00:03:20.159 --> 00:03:26.240
So I however mechanically we do that, I want the labs to be held responsible for doing the right thing.
00:03:26.479 --> 00:03:33.199
Um, the mechanism that happens, not as important as uh don't do things you shouldn't do.
00:03:33.280 --> 00:03:43.759
And 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.
00:03:43.840 --> 00:03:50.719
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.
00:03:50.879 --> 00:03:59.759
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.
00:03:59.840 --> 00:04:01.840
That's not a responsible way of doing it.
00:04:02.000 --> 00:04:09.520
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.
00:04:09.599 --> 00:04:13.280
Well, the labs will already be doing something else by the time that's that regulation comes down.
00:04:13.439 --> 00:04:20.879
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.
00:04:22.079 --> 00:04:24.800
Yeah, completely agree with both of you.
00:04:24.959 --> 00:04:34.319
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.
00:04:34.560 --> 00:04:35.439
How do you step in?
00:04:35.519 --> 00:04:37.680
How do you impose those consequences?
00:04:38.079 --> 00:04:48.240
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.
00:04:48.560 --> 00:04:56.560
I'd like to see uh a little bit more, slightly more big government stepping in saying, hey guys, this is hurting our people.
00:04:56.720 --> 00:04:57.839
Uh, you need to stop it.
00:04:58.079 --> 00:05:01.279
Yeah, and uh hopefully that's what the FTC will be doing a little bit.
00:05:01.439 --> 00:05:08.240
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.
00:05:08.399 --> 00:05:09.759
You are being reckless.
00:05:10.000 --> 00:05:17.439
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.
00:05:17.519 --> 00:05:19.920
We have laws that you are not allowed to hack people.
00:05:20.079 --> 00:05:26.000
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.
00:05:26.160 --> 00:05:27.120
We already have a lot of them.
00:05:27.199 --> 00:05:31.439
We have federal laws with real penalties on that, just enforce them on this situation.
00:05:31.680 --> 00:05:38.560
But 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.
00:05:38.639 --> 00:05:39.680
And I don't want that either.
00:05:39.759 --> 00:05:52.399
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.
00:05:52.480 --> 00:05:53.439
So we don't want that either.
00:05:53.519 --> 00:06:03.360
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.
00:06:03.839 --> 00:06:10.079
The 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.
00:06:10.560 --> 00:06:12.639
Shots fired at Microsoft.
00:06:12.800 --> 00:06:13.759
Just three players?
00:06:13.920 --> 00:06:14.720
No Microsoft?
00:06:15.120 --> 00:06:17.040
I'm joking, I'm joking, I'm joking, I'm joking.
00:06:17.360 --> 00:06:21.360
Well, they
don't really have like they don't have really a huge fun foundational model.
00:06:22.240 --> 00:06:26.959
They probably do, but it's not it's not in the big three, I would say, that that are talked about.
00:06:27.279 --> 00:06:32.319
Uh and as a last little topic before we hop into our episode here, uh, what has ever been reading?
00:06:34.160 --> 00:06:35.040
I'll cheat.
00:06:35.199 --> 00:06:36.879
I haven't been reading, I've been listening.
00:06:37.040 --> 00:06:45.040
Um I shared it with you guys yesterday, but I was recently recommended, ironically, a podcast called If Books Could Kill.
00:06:45.600 --> 00:06:50.160
And the first one that I listened to was surrounded by idiots.
00:06:50.800 --> 00:07:09.839
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.
00:07:10.000 --> 00:07:12.959
So I thought it was an extremely interesting topic.
00:07:13.040 --> 00:07:15.360
And uh I guess books can kill sometimes.
00:07:15.600 --> 00:07:17.759
Yeah, it's on my my my cue up.
00:07:17.839 --> 00:07:19.920
We gotta hit that on a run in the next couple days.
00:07:20.079 --> 00:07:21.680
Uh, interested in hearing that one.
00:07:21.839 --> 00:07:23.600
I'm still working through the Churchill book.
00:07:23.680 --> 00:07:36.000
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.
00:07:36.160 --> 00:07:39.439
Like the as of this morning, the bond market and things like that are crazy.
00:07:39.600 --> 00:07:42.879
The most dangerous words in finance is this time is different.
00:07:42.959 --> 00:07:45.120
Uh so it's it that's life in general.
00:07:45.199 --> 00:07:52.160
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.
00:07:52.319 --> 00:07:55.360
So that book I'm definitely um enjoying working through.
00:07:55.519 --> 00:08:00.240
I started now, I I think I've talked about them before the great mental models by Shane Parrish.
00:08:00.399 --> 00:08:02.560
Like there's a if a series has kind of been slowly.
00:08:02.720 --> 00:08:09.600
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.
00:08:09.680 --> 00:08:13.360
So I'm just kind of been working through periodically those different books.
00:08:13.600 --> 00:08:18.480
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.
00:08:18.639 --> 00:08:21.519
It's a a calendar of wisdom by Leo Tolstoy.
00:08:21.680 --> 00:08:23.600
Weirdly enough, it's been one of those banned books.
00:08:23.759 --> 00:08:28.639
So I'm a big fan of Ryan Holiday and all of his stuff, but like his bookstore, I think it got it from him.
00:08:28.720 --> 00:08:33.279
It's the primarily banned books places around the world, is like that's what he primarily stocks.
00:08:33.360 --> 00:08:36.000
So I don't really know why this has been a banned book.
00:08:36.240 --> 00:08:39.360
Um, but it it's pretty good.
00:08:39.440 --> 00:08:49.519
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.
00:08:49.600 --> 00:08:52.960
So it's a it's pretty, pretty solid to read through.
00:08:53.360 --> 00:08:54.159
Excellent.
00:08:54.480 --> 00:08:58.720
Personally, I've been reading a little bit more into media literacy.
00:08:58.879 --> 00:09:02.240
I think that like now we're in a more challenging digital landscape than ever.
00:09:02.399 --> 00:09:09.279
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.
00:09:09.360 --> 00:09:10.480
I it's a it's a French book.
00:09:10.559 --> 00:09:12.080
I think it's translated a couple ways.
00:09:12.399 --> 00:09:16.000
The spectacle society, the Society of Spectacle.
00:09:16.159 --> 00:09:17.840
Uh really wonderful book.
00:09:18.159 --> 00:09:29.519
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.
00:09:29.759 --> 00:09:31.759
I think you'll find there's a lot in common.
00:09:32.399 --> 00:09:34.000
Oh, that's very timely.
00:09:34.240 --> 00:09:34.879
Yeah.
00:09:35.919 --> 00:09:37.279
That's a whole nother topic.
00:09:37.440 --> 00:09:41.440
What the the news behind the news and what's the signaling the news is doing.
00:09:42.879 --> 00:09:43.600
Oh boy.
00:09:43.840 --> 00:09:45.759
Matrix is a high praise, Sid.
00:09:46.000 --> 00:09:49.279
Look, the Wachowski's would probably consider this like a top book for them.
00:09:49.360 --> 00:09:51.919
I think it very much aligns with a lot of stuff they're interested in.
00:09:52.240 --> 00:09:54.080
They'll tell you to read Simulation Simulacer.
00:09:54.240 --> 00:09:57.440
That's like one of the assigned readings they gave the actors for that movie.
00:09:57.679 --> 00:09:59.519
Great, which is also a great read.
00:09:59.919 --> 00:10:00.320
Love it.
00:10:00.480 --> 00:10:00.799
All right.
00:10:00.960 --> 00:10:04.559
Sounds like we've got some uh books to come back to and topics to go into.
00:10:04.960 --> 00:10:05.200
Yes.
00:10:05.360 --> 00:10:05.919
All right, all right.
00:10:06.000 --> 00:10:09.039
So let's let's hop into the meat of today's episode.
00:10:09.279 --> 00:10:24.559
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.
00:10:24.879 --> 00:10:30.159
So the first question we want to answer for you is when did my LLM become an agent?
00:10:30.399 --> 00:10:36.080
The LLM was just a model that was sitting somewhere hypothetically, then it became a chatbot.
00:10:36.159 --> 00:10:39.039
We figured out that happened because of reinforcement learning.
00:10:39.120 --> 00:10:41.679
We were on top of that large language model.
00:10:42.240 --> 00:10:45.039
We taught it what kind of answers humans like to hear.
00:10:45.279 --> 00:10:51.120
And we saw stuff like sycophantic behavior, but then also we saw controls against like dangerous topics.
00:10:52.000 --> 00:10:55.440
So, how did that model become an agent and how's that model now doing things?
00:10:55.600 --> 00:10:57.440
I used to just chat with this model.
00:10:57.840 --> 00:11:03.039
So to give two levels of explanation, the first just being an explain it like on five level.
00:11:03.600 --> 00:11:12.000
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.
00:11:12.240 --> 00:11:16.399
So, what's changed is we've developed something called an agentic harness.
00:11:16.720 --> 00:11:29.440
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.
00:11:29.840 --> 00:11:32.240
To take that up a level, think of this as an engineer.
00:11:32.320 --> 00:11:46.399
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.
00:11:46.960 --> 00:11:59.600
This 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.
00:12:00.240 --> 00:12:03.360
Yeah, it's really making a an expert system, if you will.
00:12:03.519 --> 00:12:21.919
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.
00:12:22.159 --> 00:12:28.960
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.
00:12:29.120 --> 00:12:30.559
We're all gonna accept that now.
00:12:30.799 --> 00:12:32.879
So now we're gonna get take it back to engineering.
00:12:32.960 --> 00:12:40.559
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.
00:12:40.960 --> 00:12:50.000
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.
00:12:50.159 --> 00:12:55.919
So the count juxtaposition is you chatbots used to be more like toys, like the chat GPTs of the world, anyway.
00:12:56.480 --> 00:12:57.919
Everybody knew they weren't accurate.
00:12:58.080 --> 00:13:03.840
That you ever you can spot the generative text a mile away, even before now that Anthropic does the watermarking.
00:13:03.919 --> 00:13:05.200
So it's gonna be interesting to see.
00:13:05.279 --> 00:13:10.799
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.
00:13:10.960 --> 00:13:13.759
But in any case, thank you, EUAI Act, for enforcing that.
00:13:14.000 --> 00:13:18.480
But we're really now, we're we are actually seeing a lot of value with these systems.
00:13:18.559 --> 00:13:27.200
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.
00:13:27.279 --> 00:13:47.840
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.
00:13:48.000 --> 00:13:57.039
Uh, 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.
00:13:57.919 --> 00:13:58.399
That's right.
00:13:58.559 --> 00:14:06.639
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.
00:14:06.799 --> 00:14:16.480
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.
00:14:16.879 --> 00:14:27.039
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.
00:14:27.360 --> 00:14:34.320
Uh, we have things like Cloud Code, which is widely considered the premier enterprise option.
00:14:34.480 --> 00:14:37.759
Uh, it's it's kind of taken as an industry standard sometimes.
00:14:38.000 --> 00:14:44.639
We have codecs from OpenAI, uh, which people have been liking a lot, especially for coding tasks more narrowly.
00:14:44.960 --> 00:14:49.759
And then on the other end of the spectrum, we have
things like Lang Graph.
00:14:49.919 --> 00:15:02.240
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.
00:15:02.559 --> 00:15:04.960
And I don't want to make it sound like this is just for coding.
00:15:05.120 --> 00:15:28.559
We'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.
00:15:28.799 --> 00:15:34.480
So it really is your garden to pick what level of agent you're looking for.
00:15:34.799 --> 00:15:46.879
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?
00:15:47.919 --> 00:15:56.639
And 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.
00:15:56.720 --> 00:15:58.879
I see it of there's the personal productivity.
00:15:58.960 --> 00:16:01.440
It's kind of like how computers sped a lot of things up.
00:16:01.759 --> 00:16:05.840
Internet made people faster at their jobs and changed workflow a little bit.
00:16:06.000 --> 00:16:12.399
AI is now going to get embedded everywhere, and these like little no-code style agents you could be doing, or like clawed code.
00:16:12.559 --> 00:16:20.240
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.
00:16:20.320 --> 00:16:24.720
It's very integrated in your flow, but it's it makes you more productive at what you do.
00:16:24.799 --> 00:16:33.360
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.
00:16:33.440 --> 00:16:37.679
It's kind of going into you are a director of a bunch of interns doing work for you.
00:16:37.840 --> 00:16:46.240
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.
00:16:46.399 --> 00:16:48.399
So it's it's huge zero-to-one moment.
00:16:48.559 --> 00:16:54.480
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.
00:16:54.720 --> 00:16:56.159
I've been doing some analysis on that lately.
00:16:56.240 --> 00:16:57.600
So that's another topic for another day.
00:16:57.759 --> 00:17:06.799
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.
00:17:07.119 --> 00:17:17.759
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.
00:17:17.839 --> 00:17:18.319
It's great.
00:17:18.480 --> 00:17:21.680
And then there's that actual, you have to build like a land graph.
00:17:21.759 --> 00:17:26.720
You have that's a deep research-driven data science modeling.
00:17:26.880 --> 00:17:35.200
It'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.
00:17:35.279 --> 00:17:46.319
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.
00:17:46.400 --> 00:17:48.720
So it is definitely a uh change.
00:17:48.799 --> 00:17:50.799
We'll see a lot more agentic powered things.
00:17:50.880 --> 00:17:55.440
And we're also seeing sometimes customer service experiences can be much better than talking to a human on some of these.
00:17:55.519 --> 00:18:05.440
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.
00:18:05.519 --> 00:18:08.079
There's so much engineering to do well.
00:18:08.160 --> 00:18:16.720
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.
00:18:16.880 --> 00:18:21.279
And that's all the high-level understanding how the components fit together and orchestration.
00:18:21.440 --> 00:18:25.200
So the nature of like engineering is changing, but it's not going anywhere.
00:18:25.599 --> 00:18:30.799
And this drives home this idea that this is not just something you have to purchase off the shelf, right?
00:18:30.960 --> 00:18:35.680
Your responsibility is not just to purchase an anthropic license than to just use a ton of cloud code.
00:18:35.839 --> 00:18:43.839
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.
00:18:44.799 --> 00:18:49.599
And there's a lot of engineering work still to be done on your end to set these kind of flows up.
00:18:49.680 --> 00:18:54.319
These flows aren't just necessarily something you want to purchase and use because they're very expensive to use in that way.
00:18:54.400 --> 00:18:59.759
And maybe only large enterprises are realistically going to be able to hand over this work to someone else.
00:19:00.480 --> 00:19:04.160
You may want to consider something like a local versus a remote flow.
00:19:04.400
--> 00:19:08.240
So these remote flows are these frontier models that we're paying for.
00:19:08.400 --> 00:19:11.440
We're paying by the token, we pay their hosting costs.
00:19:11.759 --> 00:19:15.119
Uh, but this gives us access to frontier models.
00:19:15.599 --> 00:19:20.240
You know, maybe potentially the cost of privacy for those of us that aren't on enterprise plans.
00:19:21.519 --> 00:19:23.759
But this is not the only option.
00:19:23.920 --> 00:19:34.480
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.
00:19:34.720 --> 00:19:37.519
In previous episodes, I think we've discussed OLAMA.
00:19:37.599 --> 00:19:44.720
This is basically an open source platform that's available, which allows people to build their own agents on their own machines.
00:19:44.799 --> 00:19:48.480
If you have your own GPUs, if you have your own laptop, you can deploy it there.
00:19:48.640 --> 00:19:51.519
Uh, I also want to give a shout-out to OMLX.
00:19:52.160 --> 00:19:57.599
Uh, this is a Mac optimized version for Apple Silicon, since that's the device that most people have.
00:19:57.759 --> 00:19:59.440
And the Apple Silicon is pretty good.
00:19:59.519 --> 00:20:02.960
You've seen people using their Mac minis as little open clause servers.
00:20:04.160 --> 00:20:12.720
Yeah, 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.
00:20:12.880 --> 00:20:18.799
There's no circa 2025 August Sam Altman PhD level foundational systems.
00:20:18.960 --> 00:20:20.960
We're all realizing that's not really where we are.
00:20:21.119 --> 00:20:24.160
So we're building, we're getting really good at the harnessing and things like that.
00:20:24.319 --> 00:20:33.920
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.
00:20:34.079 --> 00:20:36.079
You have Google's now released the Gemini Suite.
00:20:36.319 --> 00:20:40.559
Nvidia is being very smart and playing all sides of whoever needs chips.
00:20:40.720 --> 00:20:45.519
Um, they're also investing with their acquisition of Hugging Face, they're investing in a lot of open weight development.
00:20:45.599 --> 00:20:49.200
Their Nematron models, people sleep on those, those are really good.
00:20:49.279 --> 00:20:55.440
They have some optimized Nematron models for different workflows, like reading lots of documents in an enterprise setting and things like that.
00:20:55.599 --> 00:21:01.119
And there's also a trend among Silicon Valley firms of going to like even fine-tuning again is making a comeback.
00:21:01.359 --> 00:21:06.160
And it to Sid's point of like you want some more privacy,
you want to run things locally and things like that.
00:21:06.319 --> 00:21:12.079
Open weight models, especially if we're realizing the competitive differentiation for a lot of workflows, is really the harness.
00:21:12.319 --> 00:21:13.920
Why is Cloud Code so good?
00:21:14.160 --> 00:21:19.519
Sure, it's using uh Opus and whatever, but the the model you could use that somewhere else.
00:21:19.599 --> 00:21:24.720
Cloud code is so good because of all the tool skills and the actual harness of how it is built.
00:21:24.799 --> 00:21:25.839
It's a great application.
00:21:26.000 --> 00:21:27.039
Same with the codex.
00:21:27.119 --> 00:21:29.920
Those are really good applications that are leveraging an LLM.
00:21:30.000 --> 00:21:32.559
They are agentic, exactly an agentic system.
00:21:32.720 --> 00:21:40.640
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.
00:21:40.720 --> 00:21:45.920
And that's there is really an interesting trend towards this is where the commoditization of the LLMs, if you will.
00:21:46.079 --> 00:21:47.039
Do you really need fable?
00:21:47.519 --> 00:21:50.960
Or do you just need some fuzzy logic and the the harness is what you need?
00:21:51.119 --> 00:21:52.960
Can you just run something locally on your laptop?
00:21:53.039 --> 00:21:57.599
So this is where it's getting really interesting and exciting from a uh development perspective.
00:21:57.920 --> 00:21:58.640
Yeah, absolutely.
00:21:58.880 --> 00:21:59.759
And you know, we want to drive.
00:22:00.079 --> 00:22:03.279
Home, this idea that you're not beholden to using these large providers.
00:22:03.359 --> 00:22:09.359
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.
00:22:09.519 --> 00:22:13.920
As Andrew talked about, Aaron's been using OpenClaw for a long time, but there's even new things now, right?
00:22:14.000 --> 00:22:19.359
Like Hermes and NemoClaw, which make use of all these other great open source models that are available out there.
00:22:19.519 --> 00:22:22.240
Those are updating all the time, those are changing all the time.
00:22:23.440 --> 00:22:27.680
It's becoming less clear if more powerful models are just all that we need now.
00:22:27.759 --> 00:22:30.640
I think that now we're trying to get these models to really do something.
00:22:30.799 --> 00:22:32.480
It is about these great harnesses.
00:22:32.640 --> 00:22:36.400
And so we recommend that you know it's worth keeping up to date.
00:22:36.720 --> 00:22:40.559
On top of all these great models that are coming out, what can you really get them to do?
00:22:40.720 --> 00:22:43.839
And what kind of tooling is available to make them practically useful for you.
00:22:44.079 --> 00:22:48.240
We want to take this time to now jump into some best practices, right?
00:22:48.319 --> 00:22:55.920
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?
00:22:56.079 --> 00:23:04.240
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.
00:23:05.759 --> 00:23:09.839
So what does it what does that look like in terms of like a human AI alignment problem, right?
00:23:09.920 --> 00:23:12.160
Like I have some task I want it to do.
00:23:12.400 --> 00:23:20.400
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.
00:23:21.680 --> 00:23:27.279
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.
00:23:27.359 --> 00:23:29.839
Uh, these have been shown to empirically work.
00:23:29.920 --> 00:23:39.359
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.
00:23:39.519 --> 00:23:42.480
So, one great example of this is context management.
00:23:42.799 --> 00:23:50.799
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.
00:23:50.960 --> 00:23:58.960
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.
00:23:59.519 --> 00:24:04.319
So we have some options to help clear up this kind of memory.
00:24:05.599 --> 00:24:10.400
One way that we can do this is we can clear our unused context often, right?
00:24:10.480 --> 00:24:22.480
So 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.
00:24:22.640 --> 00:24:26.880
Let's not keep that old original reasoning logic and let's just keep what's useful.
00:24:27.119 --> 00:24:33.039
This can help large models not fixate on small details that aren't actually leading to the desired outcome.
00:24:33.279 --> 00:24:38.160
And it can make sure the context that it's using is actually useful and relevant to our task.
00:24:38.400 --> 00:24:46.799
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?
00:24:46.880 --> 00:24:52.319
You could you should think of your context as basically an actual storage which is affecting the performance of your model.
00:24:53.440 --> 00:25:06.960
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.
00:25:07.920 --> 00:25:10.640
This is where the art involves as well.
00:25:10.720 --> 00:25:20.160
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.
00:25:20.240 --> 00:25:23.519
Same with like you might have your personal photos and things like that on your hard drive.
00:25:23.599 --> 00:25:28.000
Yes, you don't want the 95% bloat, but it's how do you know what to store?
00:25:28.240 --> 00:25:41.119
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.
00:25:41.279 --> 00:25:46.480
So 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?
00:25:46.640 --> 00:26:03.359
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.
00:26:03.920 --> 00:26:11.359
And another major topic that we see people really interested in trying to dive deeper into, but maybe getting stuck on is multi-agent solutions.
00:26:11.599 --> 00:26:18.240
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?
00:26:19.440 --> 00:26:24.400
I find that we often get stuck on discussing how we implement this and why we implement this.
00:26:24.640 --> 00:26:31.440
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.
00:26:32.000 --> 00:26:36.480
We want to think of tasks like we do in the real world.
00:26:36.559 --> 00:26:45.359
When 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.
00:26:45.599 --> 00:26:49.680
This is exactly where a sub-agent is perfect to be used.
00:26:49.920 --> 00:26:57.839
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.
00:26:58.640 --> 00:27:05.920
This kind of model reduces a lot of the concerns about low performance, since we can verify small things.
00:27:06.079 --> 00:27:09.920
If we say build a website and the website isn't perfect, there's nothing we can do.
00:27:10.079 --> 00:27:11.200
The website has been built.
00:27:11.359 --> 00:27:22.799
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.
00:27:23.680 --> 00:27:27.440
I think a helpful analogy for me has been it's basically an assembly line.
00:27:27.519 --> 00:27:40.240
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.
00:27:40.400 --> 00:27:45.119
That's kind of how we the industry used to think about just throw more data and compute at the problem.
00:27:45.200 --> 00:27:49.279
We will make agents that can do every or AI that can do everything themselves.
00:27:49.519 --> 00:27:50.880
And that's this subtle shift.
00:27:50.960 --> 00:27:52.400
We nobody talks about that anymore.
00:27:52.480 --> 00:27:55.920
Now we're like going to Henry Ford assembly line.
00:27:56.079 --> 00:27:58.480
We are now finding that we're having these little bite-sized chunks.
00:27:58.559 --> 00:28:10.000
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.
00:28:10.079 --> 00:28:13.440
So they can get really good at that one little task and then feed it to the next area.
00:28:13.599 --> 00:28:28.319
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.
00:28:28.480 --> 00:28:38.559
Some 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.
00:28:38.720 --> 00:28:41.200
And that was that issue we identified last year with agents.
00:28:41.279 --> 00:28:44.640
Well, that's where the the narrative is very much changing.
00:28:44.720 --> 00:28:51.920
And uh as we get into the different models for different things component, it it this factory analogy continues to play.
00:28:52.559 --> 00:28:54.400
Yeah, so let's dig into that a little bit.
00:28:54.559 --> 00:28:58.880
So we take this factor, we take this factory analogy to the next step.
00:28:59.119 --> 00:29:05.279
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.
00:29:05.359 --> 00:29:12.880
In fact, you probably want different kinds of models that are better at different kinds of tasks to handle different parts of your pipeline.
00:29:13.119 --> 00:29:18.799
If you want to do planning, high-level reasoning, go for an Opus fable, right?
00:29:19.039 --> 00:29:22.079
Get these larger frontier models, let them do the planning for you.
00:29:22.240 --> 00:29:26.319
But when it comes time to doing execution, you likely don't need the super large model.
00:29:26.480 --> 00:29:28.480
You don't need Opus to write you an email.
00:29:28.880 --> 00:29:32.640
Something like a sun is perfectly reasonable to do your execution work.
00:29:33.599 --> 00:29:45.359
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.
00:29:46.640 --> 00:30:06.880
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.
00:30:07.839 --> 00:30:15.519
In the world of QA, we don't simply test something once, we test something multiple times, and sometimes with more than one QA engineer.
00:30:15.680 --> 00:30:29.279
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.
00:30:29.599 --> 00:30:34.559
These types of pipelines are very popular for the highest hierarchy of tasks.
00:30:34.799 --> 00:30:38.240
We expect a lot of correctness on in very ambiguous worlds.
00:30:39.759 --> 00:30:48.319
Want 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.
00:30:48.400 --> 00:30:58.640
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.
00:30:58.720 --> 00:31:10.240
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.
00:31:10.400 --> 00:31:15.119
So it makes a lot of sense to be, I don't want a fully anthropic flow where everything's sonic.
00:31:15.200 --> 00:31:19.599
You want the diversity of training data, of the approaches to be validating again.
00:31:19.759 --> 00:31:31.359
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.
00:31:31.680 --> 00:31:33.759
And then that system is getting really solid.
00:31:33.920 --> 00:31:37.599
And that's where we're seeing that the applications we build getting much better.
00:31:37.759 --> 00:31:44.319
But that's such a change in the narrative from what it was even 12 months ago and what's the accepted fact now.
00:31:44.400 --> 00:31:52.000
But 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.
00:31:53.839 --> 00:31:54.319
That's right.
00:31:54.480 --> 00:31:57.599
And and you know, this kind of emphasizes more that this really is an art.
00:31:57.759 --> 00:32:00.960
We need to try out a couple of solutions, we need to see what happens, we need to see what works.
00:32:01.119 --> 00:32:06.640
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?
00:32:06.720 --> 00:32:09.759
It's not like you pull out React.js and React.js does everything.
00:32:09.920 --> 00:32:15.119
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.
00:32:15.359 --> 00:32:19.680
You mean we're kind of getting back to what data science has always been, which is experimentation.
00:32:20.160 --> 00:32:20.640
That's right.
00:32:20.720 --> 00:32:24.079
We're we're finally getting back to our empirical roots.
00:32:24.319 --> 00:32:24.559
Yeah.
00:32:24.640 --> 00:32:26.160
Well, I mean, that's always been the tagline.
00:32:26.400 --> 00:32:27.440
Bring stats back here.
00:32:27.599 --> 00:32:36.079
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.
00:32:36.160 --> 00:32:38.960
And you, you're you're why is it say scientist ever in the name?
00:32:39.119 --> 00:32:41.599
Because you're testing things and figuring out what works.
00:32:41.839 --> 00:32:47.200
And straight software engineering is very difficult, but it's it's the more deterministic, like the React, like you're mentioning.
00:32:47.359 --> 00:32:52.640
So we're really getting back to the it being an art and having like research.
00:32:52.720 --> 00:32:57.200
You have to literally do research on what's the best option for your your use case.
00:32:57.279 --> 00:33:08.319
And 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.
00:33:08.960 --> 00:33:09.599
That's right.
00:33:09.839 --> 00:33:18.640
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.
00:33:18.880 --> 00:33:26.480
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.
00:33:27.599 --> 00:33:34.400
This has evolved, and the way that this is involved is we have these ideas of planning and these specs.
00:33:34.640 --> 00:33:38.160
So if you've used Cloud Code before, you've probably
noticed it has a plan mode.
00:33:38.240 --> 00:33:40.640
And we recommend that you use that kind of mode.
00:33:40.960 --> 00:33:51.680
This 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.
00:33:51.839 --> 00:33:52.960
This is twofold.
00:33:53.200 --> 00:33:55.200
One, this is great for memory usage.
00:33:55.279 --> 00:33:57.599
These are very compact plans.
00:33:57.759 --> 00:34:02.880
These contain just the great information we want, and they're very verifiable.
00:34:03.039 --> 00:34:09.679
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.
00:34:10.000 --> 00:34:17.039
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?
00:34:17.280 --> 00:34:24.960
This 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.
00:34:25.119 --> 00:34:33.119
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.
00:34:33.360 --> 00:34:35.440
We'll point to some resources in the show notes.
00:34:35.599 --> 00:34:42.559
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.
00:34:42.719 --> 00:34:48.079
There's also some community-driven plugins like Obra, superpowers, which you do this kind of work.
00:34:48.400 --> 00:34:54.320
And uh Cloud Code also has some additional education materials on sub-H and best practices.
00:34:55.760 --> 00:35:01.199
Yeah, and this is an area I'm honestly surprised that Anthropic seems a little bit behind the community on.
00:35:01.280 --> 00:35:05.599
It's like the plan mode is fine with cloud, but like the superpower stuff is really good.
00:35:05.679 --> 00:35:11.280
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.
00:35:11.360 --> 00:35:13.039
There's pros and cons to all these approaches.
00:35:13.119 --> 00:35:16.079
But this spec-driven development is getting really interesting.
00:35:16.239 --> 00:35:19.440
Um, Anthropic did propose recently an SDLC playbook.
00:35:19.519 --> 00:35:21.679
There's a few kind of it still is a little clunky.
00:35:21.760 --> 00:35:24.800
I'm surprised they're not farther along on how they're thinking about this.
00:35:24.960 --> 00:35:31.360
But it's a potential future of how we're building applications with these areas of uh breaking into components.
00:35:31.440 --> 00:35:34.320
So everybody like you understand exactly what the intent is.
00:35:34.400 --> 00:35:44.480
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.
00:35:44.559 --> 00:35:46.559
And are they really code reviewing bottleneck?
00:35:46.719 --> 00:35:49.360
To to like you're evaluating as it's going.
00:35:49.519 --> 00:35:56.960
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.
00:35:57.119 --> 00:36:03.360
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.
00:36:03.519 --> 00:36:15.039
But 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.
00:36:15.119 --> 00:36:18.320
Like, there's so much growth as an industry for how do we refine this?
00:36:18.400 --> 00:36:22.800
I think we're heading the right direction, but there's so many more areas we need to get cleaned up here.
00:36:22.880 --> 00:36:26.719
But it's very intriguing of it, and it's this same factory assembly line type thing.
00:36:26.800 --> 00:36:28.400
We're talking about like very discrete components.
00:36:28.480 --> 00:36:33.920
How do we get those really dialed in, figure out where to insert the humans for and the expertise?
00:36:34.000 --> 00:36:47.039
And 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.
00:36:47.119 --> 00:37:01.280
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.
00:37:01.440 --> 00:37:10.079
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.
00:37:10.480 --> 00:37:21.840
So 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.
00:37:22.079 --> 00:37:24.880
These are ways that you can save money and be more efficient.
00:37:24.960 --> 00:37:29.199
And you'll notice that a lot of these themes we've taught we've discussed early in the episode.
00:37:29.440 --> 00:37:33.519
So the first thing we want to discuss is make sure that you right-size your model selection.
00:37:33.760 --> 00:37:39.440
It's not always best use the most expensive and slow frontier model for every single task that you're doing.
00:37:39.599 --> 00:37:41.440
It's often not the right tool.
00:37:41.679 -->
00:37:51.360
And we want you to think critically about things that are simple like summarization or classification or a structured extraction task.
00:37:51.599 --> 00:37:54.159
Is there a smaller model that can do this for you?
00:37:54.320 --> 00:38:02.559
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?
00:38:02.800 --> 00:38:07.119
This is where you need to think very critically and very strategically about how we use this tool.
00:38:07.440 --> 00:38:10.079
Our next theme is prompt caching.
00:38:10.320 --> 00:38:12.480
So we've talked a lot about memory today.
00:38:12.719 --> 00:38:21.360
If your workflow uses a lot of prompts or uses a very large prompt that's very competitive, try out techniques like caching.
00:38:21.679 --> 00:38:28.960
Most providers, like specifically Anthropoc and OpenAI, offer caching solutions at very steep discounts.
00:38:29.280 --> 00:38:38.880
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.
00:38:39.119 --> 00:38:52.000
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.
00:38:52.480 --> 00:38:59.840
Yeah, 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.
00:38:59.920 --> 00:39:05.760
Well, we'll have probably several episodes on these, like the personal as well as still the like building agentic applications.
00:39:05.920 --> 00:39:07.840
But prompt caching is huge.
00:39:07.920 --> 00:39:11.840
And bedrock and other other providers uh have that kind of option as well.
00:39:12.000 --> 00:39:15.840
Um, but it's all kind of comes down to that context management.
00:39:16.239 --> 00:39:19.280
On the other side of context is output.
00:39:19.599 --> 00:39:27.840
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.
00:39:28.000 --> 00:39:35.199
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.
00:39:35.360 --> 00:39:36.559
Let's not have this happen.
00:39:36.719 --> 00:39:45.440
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.
00:39:45.679 --> 00:39:48.159
We pay for every single token these model outputs.
00:39:48.320 --> 00:39:59.360
So 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.
00:40:00.000 --> 00:40:05.519
Our fourth theme here is that we should model our costs before we automate.
00:40:06.480 --> 00:40:15.440
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.
00:40:15.599 --> 00:40:41.599
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.
00:40:41.920 --> 00:40:49.760
Trying to retroactively cop to optimize, trying to retroactively cost optimize a workflow that you've been using is very hard.
00:40:50.719 --> 00:41:01.360
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.
00:41:03.199 --> 00:41:06.159
Sometimes that's open weight as an option to consider as well.
00:41:07.039 --> 00:41:08.800
We know how to budget for cloud cost.
00:41:08.960 --> 00:41:15.280
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.
00:41:15.760 --> 00:41:21.840
And I think this actually brings us really nicely into our final theme, which is to audit your agentic chains.
00:41:22.320 --> 00:41:32.159
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.
00:41:32.960 --> 00:41:44.000
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?
00:41:44.159 --> 00:41:53.039
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.
00:41:53.199 --> 00:42:01.519
So this might require asking questions like before you add an agent or orchestration step, could this be done with a function call?
00:42:01.760 --> 00:42:03.360
Is this just a database lookup?
00:42:03.599 --> 00:42:06.400
Could a simple deterministic rule accomplish the same goal?
00:42:07.280 --> 00:42:17.039
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.
00:42:17.599 --> 00:42:21.360
And with that, we'd like to take you to the conclusion of today's episode.
00:42:21.519 --> 00:42:30.880
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.
00:42:31.199 --> 00:42:53.519
We'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.
00:42:53.760 --> 00:43:13.840
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.
00:43:14.079 --> 00:43:32.159
And 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.
00:43:32.800 --> 00:43:34.880
Thank you, Sid, for taking us through all this.
00:43:35.039 --> 00:43:39.679
Yeah, this was a a big episode and much more to come on these topics.
00:43:39.840 --> 00:43:41.840
This is a huge topic that's constantly evolving.
00:43:42.000 --> 00:43:44.320
But thank you, Sid, for getting taking us through this.
00:43:44.639 --> 00:43:48.480
Thanks for tuning in to another episode of the AI Fundamentalists.
00:43:48.639 --> 00:43:55.920
Make sure to smash that follow button on iTunes, Spotify, or your favorite streaming service so you don't miss out on new episodes.
00:43:56.159 --> 00:44:00.880
Until next time, keep thinking, questioning, and learning about AI.