WEBVTT

0:00:15.218 --> 0:00:21.495
<v A>Programming Throwdown Episode 189: Agentic Loops. Take it away, Jason. Hey everyone!

0:00:22.052 --> 0:02:18.899
<v B>How's it going? Let me adjust my microphone here a little bit. Um, so we should talk about programming. So, you know, I have been for the first time since I was probably like nine years old. I have not coded for a number of days. Um, and I was thinking a lot about this. I mean, you know, it's like ever since I was even before a teenager, I was constantly writing programs on the computer. Um, you know, we started—I don't know if you started with BASIC. I used to do a whole bunch of stuff in BASIC. I made like a choose-your-own-adventure in BASIC, and a whole bunch of things on the Commodore. And then I went from BASIC to—I used BASIC for a very long time. I think I went straight from BASIC to C++, which was terrifying. I definitely like nothing worked for a really long time. Um, and I've just been coding ever since. And the weird thing is, I've built so many more things. Like my my the things that I've built, my my build rate or my efficiency or my progress is like super super high, but all of it is in English. And it's almost at the point where I don't even really look at the code, except for very specific things that I'm trying to find. And even that is starting to dwindle. And it's just such a weird feeling. Um, I mean, even the the premise of the show is kind of, you know, learning every language. And now it's like everything you just code in English or in plain language. You could even code it in in whatever language you're most familiar with by typing whatever that is into the LLM. And it's it's really starting to hit me that—uh—

0:02:18.899 --> 0:02:24.040
<v B>That code, coding in plain language, is like really probably here to stay. It's kind of wild.

0:02:24.040 --> 0:04:20.496
<v A>Yeah, it is a bit of a mind bend. I mean, I think this is getting to the point where, I mean, especially with the framing of it. People say that a lot, like it's the worst it's ever going to be. Like this is the there's no reason to believe it would arrest. Um, yeah, I guess like if we somehow ban all GPUs or AI, isn't that the Dune thing to have a big war because like anyways AI is banned? Um, I don't think that's—I doubt it's gonna happen. Uh, so yeah, you're right though. Like it totally changes the way you approach things. And I think there's various people have lots of opinions on it. And you know, I don't think we should get into all of them, but one of the ones that you hear is like, oh, it can it can make bad code or it can make mistakes. And I'm just like, have you worked with programmers? Like have you looked at my at your own code exactly? Have you looked at my like how many times have I found a stupid just like off-by-one error? Just like, yeah, I did all the time. Like there's this weird thing that like I don't know, somehow we were infallible, or people were infallible. And I'm not saying like good engineers bad. Like I'm just saying random people, like everybody makes mistakes. And there's a lot of people I've read code from where it's clear like I'd have preferred to read the LLM code than what they wrote. Um, so yeah, it it's a bit of an interesting transition time, and I think we've been talking about for a little while, but it definitely feels like there's been a knee in the curve or a change or some threshold has been reached where it's no longer like, oh, it's it's the yeah, that was a chess and humans, right? The original idea is the chess would help the humans. Then it's like now the humans are really holding the chess engines back. And so now, like modern ones, there's like it is much better to use a chess engine directly than to try to do some cooperation. Um, yeah, and human-computer interop is not not advantageous, and I feel that's not.

0:04:20.867 --> 0:05:32.873
<v A>There yet, but it kind of feels like we're on that journey. There are definitely people who can work with the AI better and giving instructions because it's, you know, we're not going to get into like a free will discussion, but like, you know, having the AI pick something to do is still something that seems to be in the human domain. But, you know, certainly the tactical open the code editor, debug the code, like, yeah, I'm not sure how much longer that's going to be a thing. And I wonder what like gets lost a little. Like, you know, we can talk about it, but even one of the news articles I have this time, there's definitely things that I've framed in a certain way. We'll say at least in today's AI that helps it. It's like, I want you to take this approach, or I want you to use this technique, or I want you to do this thing, and I don't have to write the code for it, but I needed to know when and what I was asking for. Uh, yeah, maybe that's just because of limitations of today, but certainly, you know, it has come up in modern, you know, usage. So we'll see where it goes, where the human-computer interrupt boundary ends up being. But yeah, it is crazy to do so much time like typing text to get what you want. Yeah.

0:05:33.919 --> 0:06:07.804
<v B>I mean, now here's the here's the flip side is I've been at the word I was looking for was productive. I've been orders probably at least an order of magnitude more productive, at least if not more so. I'll give you like a number of examples. So, I I run this open-source thing called MAME Hub, and it's basically a network layer built into this arcade emulator. So, if you and I wanted to play Pac-Man together—Pac-Man's a bad example, but Night was that 1942 that game where you're an airplane.

0:06:07.804 --> 0:06:10.217
<v A>Yeah, yeah. 1943. Yeah, 43. Yeah.

0:06:10.217 --> 0:08:03.220
<v B>So, if we wanted to play one of these arcade games together, you know, you live in Florida, I live in Texas. You can use MAME Hub. We'd fire it up, and it basically plays the emulator. Um, you know, it only works for emulators that are deterministic, right? But it plays the emulator, and when you press up, it actually cues that up command in the future for both of us. And how long, how far ahead in the future it cues that command is based on, you know, an estimate of our latency. So, I try to fit um I try to fit our latency to a distribution and then pick the upper confidence bound of that distribution. It's like 99.7% of the packets arrive on time, and you know, some tiny percent of the packets don't. And when that when it doesn't arrive on time, we both have to wait. So, if you if you um so if you say in the future my joystick looks like this, and I don't get that future, then I have to wait for it, and then you're also having to wait, etc. So that's the premise behind MAME Hub. It uses some statistics to figure out how much to schedule those joystick updates so that we both get them and we can play the game. And it it runs, you know, the same on both of our computers. So that's MAME Hub. And I used to spend a ton of time just rebasing it, you know, because it's a fork of MAME. It's literally a fork of the MAME Git project, and you know, they're making a zillion changes, and you know, every few years or so I would uh bite the bullet. Uh, you know, people would ask for it on on our Discord, and I'd bite the bullet, and I would rebase it, and it'd always be a total disaster, right? Because I didn't really have it factored out maybe as good as I could have. Um, so now I just have a Git

0:08:03.220 --> 0:10:01.300
<v B>Job. I just have like a action in GitHub that uses Copilot to rebase it. And when there's conflicts—whether there's conflicts or not—it like even plays a game and makes sure that the game works. Um, and so that's something that you know I i told uh an LLM to go build some GitHub Action to go do that. And so um similarly, oh, oh, here's an even better example. So, this podcast what you all are listening to right now um runs on a ton of software, right? We have AssemblyAI for generating the transcripts. Um, we use uh um uh we have oh, we have a Transistor for actually hosting the site, and all of that. Um, and with AI, I just basically brought all of that in-house. I said, hey, you know, run and by the way, AssemblyAI, amazing. They've given us phenomenal service if you need to transcribe something and you don't want to ask AI to do it, ask these people to do it. They're phenomenal. So this isn't a slight against them or any of these people who have helped us so much for the years over the years, but um I basically went to an AI and I said, hey, here's a system that can do transcripts. Go on the internet, find some open-source models, generate some transcripts, and keep working until your transcripts look like their transcripts. And it took a while, but AI eventually did that. So, so my point is is, uh, you know, I feel like I'm building way more than ever, but I'm not coding in in code. And so I think what we're doing is coding in plain language. I think that's really the terminology. And so it seems like the future is going to be, how do we code in plain language more effectively, and how do we build these harnesses um that that you know kind of uh make all of that as as as fluid as possible. So that's

0:10:01.300 --> 0:10:06.147
<v B>What we're going to talk about this show that might even be, you know, the most important thing for a while.

0:10:09.269 --> 0:10:19.022
<v A>Talking about important things. Maybe it's time to move to our uh our news section, and I think you got the first. I don't want to spoil it, but but you take it first. Yeah.

0:10:19.022 --> 0:10:57.767
<v B>I mean, this is a late-breaking news. I'm sure nobody's heard of this, but RAM is out of control. The RAM prices are totally out of control. I think they're going to keep becoming out of control. I actually think they're going to get a lot worse. Um, and uh um and so this is just let me keep an eye on me. This is a Tom's Hardware article. I'm sure you can find plenty of others, but if you are if you're saying to yourself, I'm not going to buy a computer now because the RAM prices are really high, um you might have to just do that, just bite the bullet and get the computer. Um, you know.

0:10:59.742 --> 0:11:22.740
<v B>I just feel like the RAM shortage is going to take years, and it's not going to get better before it gets worse. So if you have a computer you need to buy or an upgrade, make your hardware or something, I really suggest kind of doing it now, locking in, even though it looks like a high price, locking it in now.

0:11:22.740 --> 0:11:33.239
<v A>Yeah, it sounds like they're saying all the RAM is spoken for for like the next year or more at even higher prices. So yeah, yeah.

0:11:35.078 --> 0:12:06.786
<v B>I didn't buy a Steam Deck as much as I wanted one because I always, actually, this is kind of sad, but I went to the Steam Deck page probably once a quarter and I got so close to buying it, and I was like, 'Ah, you know, if I do that, I'll play even more games that I'm already playing.' So I didn't pull the trigger on it, and now it's twice the price. So I decided that I'm fine with the Switch, but if I wanted, I don't expect the Steam Deck to come down in price, so.

0:12:07.495 --> 0:12:36.064
<v A>Yeah, I did get one, but now I feel like I should sell it. Oh man, yeah, I had one from early on, but you're right. Like, I don't know how people are justifying it at the price. It's, you know, what I mean. Like, I definitely, yeah, even before it wasn't necessarily cheap, but I've enjoyed it. You know, it's been good. I definitely wouldn't have gotten the current price value out of it; it would have been too expensive. So you gotta really, you know, what, and that you're gonna use the crap out of it, I guess. So.

0:12:36.722 --> 0:12:51.959
<v B>Well, and I'm not saying it's not—here's a question. I mean, if the price of computers triples and stays that way, how is that going to affect you? Like, are you still going to upgrade your computer? I mean, I feel like at some point you just kind of need to upgrade if it breaks.

0:12:51.959 --> 0:14:50.980
<v A>Or, you know, I mean, I think it depends, right? So what does it mean? Like, you need to upgrade your computer. So for me, I mean, I think I have a number of options. For one, you could just like subscribe to the gaming streaming services. They have gotten a lot better if you have good internet, and some people will call about it, but again, if it's whatever, I don't know, twenty dollars a month, thirty dollars a month to rent something, even one of the ones where you rent your own computer and install it, you know, on shared time, or like that's a form of arbitrage. I've considered, you know, for running some of the local models, like I think we'll talk about a little later. Like you could rent time and timeshare, and I think that's that's one way. You know, also, we have also other, like phones are more powerful, so some stuff can—it's not ideal. It's just be done on like gaming on a phone, you know. Consoles, if you have a console, you know, sticking with older consoles and playing games you just want to play before. I think the people are going to get hurt the most of people like want the max performance on the latest video games. Thankfully, I just not in that race. So yeah, you know, for me, short of like something straight up breaking, you know, I'm probably like you probably have like lots of electronics we could share between members of the family, laptops or something if we had to. But, you know, at some point, yeah, you would just break down and buy it if you needed it. But I think then you have like this, there's a difference between it's broken and I have nothing and I need to acquire at a cost, and I have something that is just less than I would want, you know, what I mean? Like the demand and both are slightly different. So for me, it becomes about that. But I've certainly wanted to upgrade the RAM, and I just waited too long, and like that that window is closed. That's not gonna happen. You know, at this point, upgrading the RAM, the rest of the system is just basically free. Like that's true by no hard drives, and specifically like SSDs and NVMe have also gone nuts. That's not just RAM, but if you try to buy, you're talking about like the Steam Deck. I wanted to get a bigger SD card, and I hadn't paid attention.

0:14:50.980 --> 0:14:57.696
<v A>Because everyone talks about RAM, but even SD cards have gone through the roof for people, the shortage of NAND chips. So yeah.

0:14:59.080 --> 0:15:00.801
<v B>It's pretty wild, I think.

0:15:03.552 --> 0:15:56.800
<v B>Yeah, I think it's probably a good time to replace your phone too because again, phones have a lot of RAM in it. I had an issue where my phone has started to degrade. It's about five years old, and I was like, 'Yeah, I should. It's it's time.' You know, plus I was worried about the prices going up, and so I got a phone. Actually arrived yesterday, and about two or three days ago, the GPS chip like completely failed on my older phone. So I really got super lucky. I timed it where a GPS chip fails next day the new phone is there. But there was about a day or two where my kids, I was hilarious, that we were we were in the car, and the blue dot was just like teleporting all over the city, and kids thought that was the funniest thing. But yeah, I mean, even for a phone, I would say if you're on like a four or five year old phone, you know, and you could and you can stomach it, you know, get the phone now before the

0:16:00.049 --> 0:16:28.754
<v A>Prices go up. My next article is not per se about AI, but it's kind of about AI. All right. So this is an article titled 'Mario Meets Purito,' and this is about the Purito Frontier, the efficient frontier, but it's a it's in everyone's favorite competitive video game. Okay, that's a lie. It's the only one I play competitively with my family and not online because I'm not that good, but my kids think I'm good, although not anymore because they've gotten a lot better. Okay.

0:16:29.074 --> 0:16:31.133
<v B>Blue Turtle is Purito dominant, right? Oh.

0:16:31.842 --> 0:18:28.379
<v A>In terms of weapons, but but it's basically going through, which is a very actually, you know, interesting thing even if you don't care too much about Mario Kart. But the setup is you have some number of characters, I don't know how many, it's like 16 characters you can choose from. Each of them have some number of, you know, vehicles they can be in, you know, go-karts or motorcycles. They have some kind of tires you can put on, and then some sort of like glider device in the more recent, most recent, no, nearly most recent Mario Kart, I think Mario Kart 8 Deluxe. And each one of those changes various parameters. There's also some hidden parameters that that even aren't shown. And so the question is like how do you pick? And the answer is there is no one right answer. You know, growing up, it was always, 'Oh, you pick this person or this car.' You know, this is the team you pick in Madden. You know, the answer is like more complicated than that. Depends on like how you define, and this is something that comes up a lot in software engineering, which is why it's kind of an interesting article, and also in finance. But like what are you optimizing for? And so if you think about to to spend it in terms of like finance, is it better to buy stocks or better to put your money in a savings account? And it's like, well, how much do you care about risk, and how much do you care about, you know, growth? Because you know there's no free lunch, right? Okay, that's stealing another finance idiom, I guess. Economics, but the idea is that there are strictly worse positions you can be in. So there are things you could do with your money that are more risky for less expected payoff, and you should not choose those things. Just like in Mario Kart, although there is no singular best answer, there are certain combinations which, depending on what metrics or even all the metrics, choosing them is strictly a worse choice unless you're just trolling. I guess that's not a metric, but against the normal metrics, you know, there are certain combinations that are strictly worse. So if you care about

0:18:28.380 --> 0:19:57.919
<v A>You know the trade-off between two variables, like acceleration and top speed, which are very common ones. Then there are, you know, combinations which are not strictly inferior to other ones. And so the idea is anything that lives for some combination, not in the interior, not inferior, we call those things Pareto efficient or on the Pareto frontier. Which means they're sort of like normally in the graph to the right and up, right? So there's this curve along all the choices, and this applies through so many things we do, like I mentioned trading off what you put in your investment portfolio, how you choose characters in video games. You hear it a lot coming up about LLM models. So there are LLM models with various abilities and various price per token, and that forms an efficient frontier. So you know, you may argue whether OpenAI or Anthropic today has the best model, but they certainly don't have the cheapest. So you can go cheaper if you need less, and there's like a different position. But there are also places you could pay just as much for crappier AI, right? So there is a Pareto frontier. And when we talk about improvements, we're talking about moving that frontier forward, moving to a new spot that no one has been before and forcing others to play catch up. So a very interesting, well-written, lots of cool graphics. You know, everybody loves a good video game story. If you've played Mario Kart, which lots of people have, you can definitely read this, but also an introduction to an important concept. Yeah, this.

0:19:59.033 --> 0:20:25.645
<v B>Is super cool. I always picked Bowser, and now I'm learning that that was not Pareto dominated by Donkey Kong, apparently. So that's awesome. Yeah, check it out. Yeah, this is a great visualization of a really important concept. I love this. All right, mine is Quen 3.8 versus Muse Glimmer. So it's interesting like the

0:20:27.860 --> 0:22:24.880
<v B>sizes of the models have gone through different, you know, like hype cycles over time. So you basically have the people who are trying to build the biggest models, and so currently, you know, these are the close labs, and then and then people like GLM or like Kimmy K3, which has, I think, a two and a half trillion parameter model. And so, you know, so at least for Kimmy, if you wanted to serve Kimmy K3, you would need, I think, like two hundred thousand dollars worth of equipment minimum. So, so you know, it's definitely out of reach for almost everybody on an individual level, and not practical for most companies unless you think you can really serve that model, you know, keep it busy 24/7. Now, then on the flip side, you have models that are very small that are meant to really run on edge devices. So for example, you have the Gemma 4 e2b model, and the e2b means effectively 2 billion. So there's basically a router, and without getting too much in the weeds here, there's kind of a router that decides which experts and which modules to activate. And and it's I don't know where they get the word 'effective' from, but you know, on average, you know, they're activating about 2 billion of the weights. So, so that can run on your phone, especially after you quantize it. You know, even with the KV cache and all that. You know, it can run very comfortably on your phone. So what's emerged? What's emerged is kind of this sweet spot in the middle where, you know, it's too big to run on your phone or even on an entry-level machine. So imagine a machine with like 16 gigs of

0:22:24.880 --> 0:22:53.588
<v B>RAM. You know, these models are too big to run on those, but they're small enough to run on a single high-end machine. You know, consumer high-end machine. So think like a MacBook Pro is 48 gigs of RAM, you know, or a Windows laptop and 64 gigs of RAM, etc. And so Muse Glimmer and Quen 3.8 are both around 30 billion, I think the Quen one is 27. And so, you know, as I

0:22:55.461 --> 0:23:12.623
<v B>said, if you have a high-end laptop or desktop, you can run those pretty comfortably, and they're very, very powerful. Now, I've tried it myself. I haven't quite got the level of performance for the tasks that I'm doing that people are claiming in the benchmarks. So

0:23:14.935 --> 0:25:11.420
<v B>so it does feel like maybe the model's not quite living up to the hype there, at least for Quen. Muse Glimmer, I think, is pretty good. The big thing that I've noticed from these smaller models is, and this is kind of interesting, is they don't necessarily call the right tool at the right time, and they also don't really know when to stop working. So, so they'll work for too little or they'll think for too long. And I found this really fascinating, like because if you think about it, what is a bigger model? Well, one of the most obvious thing that it is is is more parameters and so more facts, right? So if you say what's the capital of France, and it says Paris, well, there's some parameters or some set of parameters in the model that are responsible for knowing that fact. And so it stands to reason that, you know, if you have a giant model, it knows a lot more facts, and it can bring a lot more facts to bear on a particular problem. And that's true, but it just seems like the critical thinking is better, and I don't know if anyone's really the closest. I can imagine people have come to explaining this is this JSpace theory paper from Anthropic, where models like project problems into some high-level space and then try and solve it in that space. And so maybe the bigger models have a bigger space to work with. But even things like browsing the web and doing kind of pretty rote things on the web, like pretty easy things that that you know even a child can do on the web, you know, like change the dates on this set of assignments or something on this website, you know, the smaller models will tend to struggle with that. So it's just on the common sense level there is a correlation there, which I found interesting. But but the models are

0:25:11.420 --> 0:26:06.720
<v B>getting better and better. These 30B models are definitely a huge, huge improvement over the 9 and 12B models that people are running locally a year ago. So, so definitely a ton of improvement made. And I'll just end it by saying I think 90 percent of the questions people are asking can be handled by this 30B model. You know, like what are the kind of questions people are asking ChatGPT? You know, how do I fry an egg? Yesterday I took a picture of my kid's schedule that they gave us on a sheet of paper, and I said, 'You know, create a calendar ICS file for this.' You know, all of these things a 30B model could do. I'm confident of it. And so, so it's like on one hand the gap is there, and it seems like it might not be easily closed. On the other hand, you don't need the more expensive model for 90 percent of

0:26:06.720 --> 0:28:01.800
<v A>tasks. Yeah, I agree. I mean, it's definitely an interesting space. In fact, one of like the most interesting spaces because I saw, I won't, I don't know, I don't want to go too much into like personal beliefs, but I still see this just like, 'Oh hi, our, you know, ChatGPT, you know, Claude, Gemini app is happy to ingest your data. Would you like to share your calendar, your health information, your whatever?' And it's like, 'No, like, you know, whatever.' I again, I'm not going to get into privacy. It's like a thing that's you know personal and different for a lot of people, but local models to me are a way where you can say, 'Look, I can do this. There's not like I'm fine doing what I'm doing here.' You know, but it's staying on my computer. Yeah. And even just something like, 'Hey, I have a can you go through my tax returns and just make a plot of like my effective tax rate over the last few years?' I would love to know that, but I'm not uploading one, and that's like a lot of data to upload. And two, like I don't really want to expose that level of detail for, you know, who knows what reasons what happens. Now all of a sudden, you ask how much does Patrick Wheeler make or whatever, and then all of a sudden it's like, 'Oh, I know that.' That's my training. Yeah. So it's just like I think local model is like important thing, and if you've not tried it, it's definitely worth trying. Like, and like you said, I think Jason, there's a lot of like questions that yeah, it just I mean, I guess like to flip it around, Google Search like things I just couldn't search for before, whatever just get answered super fast by, but I assume it's a relatively cheap, you know, Gemini model that Google is using. And so a lot of those things can be done, and I do think the mixture of experts, the effective ones like you're saying, are really

0:28:01.800 --> 0:28:42.884
<v A>interesting, and that they give you opportunity for streaming from like an SSD into RAM. If SSDs weren't so expensive as well, but like streaming the data off of disk and into RAM for like that stage of inference. And just in general what they mean as well, but I'm excited for that level of like what you can just speed as well, like oftentimes you get a response pretty quick whereas if you're if you've ever used one of those other services extensively, sometimes I think they just get throttled, like there's just too many people using them, and so the responses are just so slow. And here it's a single user thing, right? Like I just get the response when I

0:28:43.812 --> 0:28:50.612
<v B>want it. Yeah. So I tried both of these. I tried Muse Glimmer and I tried Quen 3.8 pretty extensively.

0:28:53.009 --> 0:30:49.580
<v B>I found that for and and this has been always a problem with these Quen models is is there there tend to really struggle with text and formatting, text and outputting text correctly. So for example, I had both of them work on the same task, which involved creating a lot of Markdown content. And what I found is that the Quen 3.8 model it wouldn't close the bold. So, you know, how in Markdown you double asterisks to make something bold. So it'll start something bold like a word, but then it won't close the bold, and that they'll get real confused, and you'll either end up with like a giant amount of bold content or it'll just literally draw the two asterisks. So it just wasn't able to respect the formatting of Markdown. Muse Glimmer was able to respect it. Um the other thing I noticed, personal anecdote, is is Olama, which is which is what I was using to serve these models, it has an MLX mode for almost any model. Like for every model you can put dash mlx, and it will if you're on a macOS machine, it'll use like MLX, which I often have no idea what it is, but it's some kind of thing on the Mac that lets it do these vector operations faster. But what I came to find out, and later on, I confirm this, is the way Olama does the MLX. They um they have some way of automatically converting a model to MLX, and I don't think that that is 100% reliable. There's something lost in that process because when I compared the MLX version to the regular version, the regular version was a lot better.

0:30:49.580 --> 0:31:22.380
<v B>So um so I guess all of this to say at a high level, it's kind of like Ender's S1 3D printing days. You know, we're we're beyond like the 'Oh, you have to build your own 3D printer from scratch and it probably won't work,' but we're not quite at the like 'Oh, I buy a Bambu, and everything just works.' So we're somewhere in the middle where these 30 billion parameter models are powerful, and you can see the future right around the corner, but it's not just like drop-in yet.

0:31:25.356 --> 0:31:26.571
<v A>I'm here for that.

0:31:28.275 --> 0:31:30.620
<v B>Analogy. I figured, I figured you'd appreciate that.

0:31:30.620 --> 0:33:29.539
<v A>All right. My next one, sort of incongruous, I think with a lot of the stuff we've been talking about so far, but that's okay. Everyone should know SIMD. So we talked about SIMD a number of episodes ago. Yeah, someone's gonna—oh, it's 100 episodes ago. But I don't think it was. SIMD is Single Instruction Multiple Data, and in line with I saying before, this specific example is actually about Zig programming, which I've never done. Zig programming—there's some nuance there, but in general, just like I think we talked about in the other show, just walking through like what the pro what it is and why it's important. I think this is an example where at least today it can be difficult to balance, you know, implementation—I'll even say—with the LLMs of doing something one way and then like completely redoing it in another. So when you build a program sort of normally, the most common thing is to have an array of structures, right? So you have an array, and your array, you put your data that's interleaved, like, you know, Field A, Field B, Field C, then Field A, Field B, Field C. And it's very common, and that's how you would for loop through it. It's, you know, how an LLM would write stuff by default, but understanding when and where sometimes you want to rotate to a structure of arrays, where you say I have all my A channels together, all my B's together, and then all my C's together, is a huge unlock in some cases for doing things like in SIMD and other optimizations. And a lot of times, if you don't know that's possible, you don't know to dig into it, and there are lots of libraries, but again, compilers can do some SIMD, but there's only so much range they can act in, right? So they won't refactor, they won't recompile your whole program in order to get the same optimization. And

0:33:29.826 --> 0:35:03.567
<v A>Similarly, I think by analogy, even in the LLMs, I think this is where at least for today, I'll I'll say, I think understanding to ask for it because it's not something that it's going to know to reach for immediately. And it's also trying to, which we all want, you know, we don't want them spending extraneous tokens just doing constant refactoring and trying stuff, except when we do, but like, you know, they're trying to limit it so doing massive refactors like this and not knowing is so sometimes you kind of need to push it to say, 'Look, I want to implement some de-optimization. I want you to build it in this way.' And when and how to ask for that, and whether it even makes sense, is something you really got to think about. What hardware are you running on? What are you? And these are things I'll say to you normally doesn't figure it out. Like you normally have to tell it, you know, like, 'Hey, you know, I want you, you know, write a simple like I was doing something with a just like a cheesy ML something, and it was like trying to run CUDA stuff, and I don't have GPU that's Nvidia like on my door.' It's like, 'Why are you like stop? No, like you didn't even think to check this.' So anyway, SIMD is a very powerful tool. See our previous episode, see this blog article, but just I think to talk about how useful SIMD is and a very efficient thing, and the instruction sets have gotten better over time, from when I first used them to now they're they're really kind of awesome, and libraries use them, but also as a means to back into talking to, I think this is the kind of understanding it still is important to have because I think it's something where we still need to help give direction to what we want out of our programs. Yeah, this

0:35:03.938 --> 0:37:02.700
<v B>is a good point. You know, I think that the LLMs they make a lot of category errors. And by that, I mean, just quick recap, five second on what a category error is. The common example is, you give a student, you give a child a tour of a university, and you say, 'Here's like the Math building, here's the Computer Science building, here's the Literature building.' And then the student says, 'Well, where's the University building?' And it's like, 'Well, no, the University is like an abstraction that's like, you know, a collection of these physical buildings. It's not a building itself,' right? So that's a category error. And I've noticed the AIs a lot of these AIs really struggle when it comes to a to categorization. So, for example, you know, you'll tell an AI, 'Make this code faster.' And what you really want is for it to, you know, find the hot spots and rewrite them in SIMD, but what it actually does is like delete like the slow parts of your code, and now it's not functional. Or, or you know, rewrites the whole thing in Rust or something like that. Like it rewrites the entire program, right? So it's like it doesn't know at what category, at what level to operate. And so this is I think, you know, people people use the term taste. I think taste is something different, but I think independent of taste, I think knowing at what category you need to operate to solve the problem you're trying to solve is still kind of firmly in the realm of human beings. And so, and so you have to know that, 'Hey, here's an option.' You know, if you have this Python code, you know, one option you can do is to take the slow parts of the code and use Cython, you know, to to bring them into C, and then use SIMD after that.

0:37:02.700 --> 0:37:05.759
<v B>as opposed to like rewriting the entire thing.

0:37:10.450 --> 0:39:00.964
<v A>I think it's time for Book of the Show. I've got the first book. This is a book I have and am getting ready to start reading. So unfortunately, I can't give the full review yet. But this is Waves in an Impossible Sea by Matt Strassler, and this is a book that's I don't know how you call it. We've talked about some of these books before. They have a name. It's slipping my mind now, where it's like sort of a casual read, sort of like just a compelling story, but talking about facts. So I think Simon Singh does this for like for Man's Last Theorem and The Code Book: Cryptography, book where it's like stories, but through the stories he's explaining like the history and the operation of something in sort of like layman's terms or whatever. Anyway, so this is is that about sort of subatomic physics, and I do not know why through my entire life I've just been sort of like fascinated by elementary particles, subatomic physics, even though like it's not my background. I never ended up studying it. I know really nothing about it. I won't talk about it because I'll like horribly screw it up. But just like the way that people describe there's a couple YouTube channels where people talk about like the sort of math and physics behind sort of like discoveries, you know, why spectrographic lines were, you know, befuddling people in the early 20th century, just like all these things. I don't know. It just always really excites me. So I'm I'm happy to dig into this book and just sort of like go on an adventure because for whatever reason this domain has always is a non-fiction, I guess I should clarify, has always been something that is awesome. There's so much more going around at like the very very small level that that we kind of just never think about. And it's it's kind of crazy, but it's it's cool at the same time. So is this a

0:39:00.964 --> 0:39:05.892
<v B>is this a fictional tale that explains a real phenomena, or is it a non-fiction book?

0:39:06.381 --> 0:39:18.362
<v A>A non-fiction book. It's not like an allegory or something. It's just a sort of talk through in an engaging narrative way through the history and state of these things. Oh.

0:39:19.425 --> 0:41:16.919
<v B>Very cool. Yeah, I mean, on my I have just been diving into so many research papers that are not barely interesting to me and my friend group, you know, my colleagues. So I'm not gonna like make everyone suffer through the list of research papers I've been reading, but one of them in particular I wanted to talk about. So, okay, when when we started with Natural Language Processing with neural nets, right? People started with these recurrent neural nets. And so the idea is think about like a memory, a block of memory. But instead of it storing very explicit things, like, you know, if you were to store the word 'dog' in memory using Python or something, you know, it'd be a byte for the letter d, a byte for letter o, byte for lrg, and now you have 'dog,' right? But instead of that, it's this really abstract, really high-dimensional space where you're storing, you know, a whole library full of concepts, and then you can sort of pop things off of that. So, you know, the early Transformers did this where you had an encoder that took what the user is asking for and the, you know, partial answer, which could be nothing at the beginning, right, encoded it into, you know, this memory bank, and then a decoder that popped off, you know, tokens off the memory bank and then also updated it. So, so the idea is, you know, user input comes in typically not with a partial answer. So the user input comes in, it gets encoded in this memory bank, and then there's just this really tight loop. It's like based on the memory bank, pop off, you know, the first word of the answer, and then mutate the memory bank and then ask it again and just keep

0:41:16.919 --> 0:42:55.375
<v B>popping words off the memory bank until you pop the end of answer word, which is like the special token, right? And so the the problem with that is that you have to compress your question into this memory bank, right? And then as you're popping words off the memory bank, you're also kind of having to store what you've popped off so far. So, if you say, 'What is the capital of France?' that has to get crushed into this vector, right? That represents that question. And then if if you pop off, you know, the capital, is now that same memory bank has to know your question and know that you've already completed part of the answer. This is why early Transformers would would do things like 'The capital is is is is is is' because it couldn't figure out how to store the the the fact that it's already said that word, right? And so now Transformers are decoder-only, which means they what goes in is is the question and, you know, the part of the answer you have so far, and what comes out is a single word. So, like, 'What is the capital of France?' what comes out is 'the,' and then this whole thing starts again. So, like all that work went in just to say the word 'the,' and then start the whole process over again. You know, 'What is the capital of France? The' and then goes through this whole process and then outputs the word 'capital,' right? And then so on and so forth.

0:42:56.877 --> 0:44:52.960
<v B>So, now they've they've used KV Cache and a whole bunch of tricks so that this doesn't waste that much computation, but it's still pretty weird, right? I mean, as a human being, I don't think we really operate this way. I think, you know, we internalize the question and then we sort of roll out the answer. So, we've kind of deviated from the way a normal person or the way we expect a brain to think and and reason, and it's pretty unnatural, right? So people are constantly trying to go back to this encoder-decoder idea, and world models have to be encoder-decoder just because of their nature. We talked about world models on the last episode, and so the question is like, why how can you encode these things better so you don't have to do that really expensive thing that we said earlier? And I think part of it is, you know, the memory is flat, right? And so on your computer, you know, when you do malloc or something like that and you get a flat block of memory, you can then go and put an image in it because you know you're storing some metadata, and as a programmer, you always understand the code is an easy way to remember, oh, this huge chunk of this huge line of memory is actually a 2D image. But I don't think that the LLM internal is really good at that. And so I think what we actually need are, you know, two-dimensional, three-dimensional, like N-dimensional hypercubes of information that they can read and write to instead of just a line of information. And so this paper kind of talks about that. So this is a a paper where instead of a single line of data that you can write to.

0:44:52.960 --> 0:45:13.581
<v B>You can now write to a grid or a hypercube, and the space kind of matters. So if you write something to the left side of the cube and then you write something else to the right side of the cube, those two locations are far apart, and it actually matters. It makes it harder for them to affect each other. So,

0:45:16.146 --> 0:45:35.880
<v B>Yeah, so they basically are using, in this case, diffusion. Other people have used convolution. There's a bunch of different ways to do it, but I think that storing information this way is going to unlock something really powerful in LLMs, in a world model. So it feels like there's something cool here. We're just kind of on the cusp of it.

0:45:38.219 --> 0:45:39.602
<v A>That's exciting. Yeah, I

0:45:41.627 --> 0:46:28.590
<v A>It feels like there's this play, but it hasn't been true almost where like traditional, I think there's on the output of LLMs, like this DSPy sort of like instructions and things like that for attempting to kind of get to it, but almost where like you're talking about like memory storage or whatever. It's like tool, very limited tool invocation within the, you know, actual inference itself, right? It's like, know that you can put stuff here in this way, rather than just like learning it completely. But, you know, that complication becomes incredibly difficult. So, you know, it is definitely exciting though for them to figure it out themselves and potentially even a better way of doing it. I guess then maybe naively we would make tools to do it.

0:46:30.177 --> 0:46:30.880
<v A>Yeah, totally. Totally.

0:46:34.227 --> 0:46:34.969
<v B>All right, time.

0:46:34.969 --> 0:47:02.982
<v A>For tool of the show, Patrick. What's your tool? Uh, this is a very—no, I'm just kidding. I was gonna try to make it funny, but it's the same every time. It's a game. This game is available on many platforms—PC, phone. I think it was popular for a little while. I'm probably like past it, but I think I picked it up on a sale, and it is Nubby's Number Factory, which like the game is pretty good. Like I got pretty into it. I like it. It's a very casual, I think it's called like a Plinko, like a roguelike. Okay, is that?

0:47:03.758 --> 0:47:04.754
<v B>Where you drop

0:47:04.821 --> 0:47:05.969
<v A>A thing, and

0:47:05.969 --> 0:47:07.234
<v B>It pings off.

0:47:07.234 --> 0:47:56.400
<v A>Yeah, yeah, exactly. Yes, pings off numbers. You try to make numbers bigger, and then there's various power-ups that are randomly chosen, and you know your exponential growth in the what you need to hit at each level makes it very hard and very careful. There's not a lot of skill to it, I would say. I mean, like a little bit, but that's not the kind of main point. But the aesthetics are a trip. It's like a trip down 90s, you know, Web 1.0, I guess. That's like it's so good, just like, you know, just I don't just pull up a screenshot of it, and you'll know instantly if it's like this is this is my jam or not. So for that reason alone, just like I don't know decent gameplay, but incredible art aesthetics. But I mean, horrible but like amazing. It sounds like.

0:47:56.400 --> 0:47:58.551
<v B>Velatro, as far as the gameplay. Yeah.

0:47:59.665 --> 0:48:19.040
<v A>I mean, same same kind of idea, like a very basic game, like you're trying to play poker hands, but then like it's scaling. So you have like it's really all about the power-ups. Yeah, in that way, I guess it's kind of similar. I mean, definitely it's not at the Belatro level. I was watching people do like speed runs of Nan and like Belatro. Okay, that stuff's crazy.

0:48:19.040 --> 0:48:34.240
<v B>Oh my god, yeah, the Belatro stuff. Yeah, I still haven't beaten Belatro. Like even in one deck, I haven't gotten through all the challenges. And then I watch these people and they're like, 'Oh yeah, I have one card. I play this one card, and I just win.'

0:48:34.240 --> 0:49:21.323
<v A>But I found out a lot of them are apparently using various mods, like. And then you know, saying they don't, or just, 'Oh, charlatans.' They really want to play a certain card. So even though, like when I was watching, which you know, I trust him, but I was like trying to get Nan em like very quickly, and so there's a certain card that they want in order to be able to do it. And so they were like doing a seeded run where they had searched for seeds that would guarantee that card comes up within like the first or second shop or something. And so they've never played that run before, but they know like the card they want is going to be there. Got it? Interesting. I'm not saying everybody does that. I just like it's more common than I.

0:49:21.323 --> 0:49:25.457
<v B>Realized. So yeah, the game's actually not that easy. We're being diluted. Well, I

0:49:26.655 --> 0:49:46.332
<v A>think there are people who just play a ton, which is probably like it same like Solitaire. Like not all games of Solitaire are winnable. Yeah, it's probably like that. Like I'm not saying not all games of Belatro are winnable, but some, you know, just you're gonna have to play a certain amount of times in order to get 100 completion, like no matter how skilled you are. Yeah, that makes sense.

0:49:47.614 --> 0:49:56.912
<v B>That's my tool to show is open code, and actually Patrick, earlier you talked about doing your taxes with an LLM. Okay, I haven't done.

0:49:56.912 --> 0:50:00.100
<v A>That, no, no, not doing my taxes, reviewing my taxes.

0:50:00.962 --> 0:51:56.080
<v B>Reviewing your taxes, reviewing your taxes with an LLM. The IRS is on their way. It's like, 'Do, do, do, Patrick, open up.' So I, um, okay, so our tax accountant, which is this really nice lady that we met through church a long time ago, retired. And, and so we had this debate in the household. I think that an LLM can do my taxes. Oh, yeah. And, and, uh, I'm the only person in the family who thinks this. Um, so I was like, okay, we'll do this. We'll we'll have somebody do our taxes, and I will also do our taxes with an LLM, and then we'll see if they match up or mine's better, even right? And if they match up, or if it's even close, then we know that we're good. Um, but similarly, I was thinking, you know, taxes even like controlling the web browser where like all your cookies and your passwords are stored, like installing the Anthropic Chrome extension, or having, you know, Chat GPT do my taxes is where I draw the line, you know. Like, yes, yeah, like and I feel like I'm I'm pretty, you know, open when it comes to privacy, but but I feel like I draw the line at, you know, these kind of things. And so, um, and so I downloaded OpenCode, which is one of many harnesses. I definitely don't claim that OpenCode is better or worse than any of the other ones. Um, and maybe we should do that. Could be a whole show, but I will I could do a deep dive on that. Um, but at the moment, I'm trying OpenCode with with these Muse and and Quen local models, and um it's really, really good. Um, as far as the the harness goes, you can spin up

0:51:56.080 --> 0:53:12.319
<v B>subagents. You can do loops, which we'll talk about. Um all the things that you can do with with Claude Code are pretty well supported. Um with OpenCode, there is a little bit of jank. Um there was a situation where um Muse, like when it returned the tool response, it wasn't quite formatted correctly, and instead of, you know, dealing with that or retrying it, uh OpenCode just hung indefinitely, and so I had to kill it. Um so it definitely got some jank, you know, got some jank. But but, uh, you know, the fact that it's free and open source and uh works reasonably well, um I think it's pretty nice. I ended up writing a very simple like watchdog timer to um to kill OpenCode if it's processing and it hasn't finished in a certain amount of time and restart it. Um but again, I think it's just like we talked about with the 30B models where, you know, we're maybe six months to a year away from having something that's really polished here. And and OpenCode, it seems to be very popular. It's got a Python SDK if you want to non-interactively, um you know, ask a bunch of agentic questions. So overall, really powerful piece of software.

0:53:12.319 --> 0:53:45.552
<v A>The other one, I mean, like you said we have an episode about it, but was the Pi coding agent, which tries to strip down the harness to like kind of bare minimum and then have you add to it what you want. So you ask Pi to like improve itself, which I think is really interesting. I haven't gotten into it yet, but it's it's on my short list. And so I wonder if something like that could be for, you know, OpenCode. By the name, it's probably built mostly for coding, so if you wanted to use it as like a multi-purpose harness, I wonder if something like that might, you know, also.

0:53:46.092 --> 0:54:03.000
<v B>Work. Yeah, totally on the same page. Yeah, I want to desperately try Pi. I've heard a lot of good things. I went to lunch with somebody about a week ago who's really into it. Um so it's definitely on the list so I can try it, and we could do a show on it. Okay, all right. Sounds good. But you left us hanging.

0:54:04.992 --> 0:55:36.758
<v B>Who was right? Oh well. So, uh, so Janet, you know, our friend, she retired literally like a week or two ago. Um and so this would be for next year's taxes. I could back test it. It's a good idea, though. Maybe I should try to do my current year, you know, the ones that were already submitted, try to do that without without hindsight. Um that way I wouldn't have to wait until January or February to try this experiment out. Oh, one thing I did do, though, um kind of related, I downloaded CSV files for all my credit cards and and checking accounts and all that. So I got basically all my transaction data over the past 90 days, and I asked uh through OpenCode, I asked Muse, like, 'Hey, what, you know, give me a rundown of our expenses, and what are we spending too much money on? Where can we cut down?' Things like that. And it did a pretty good job, actually, a really good job because, you know, that's one thing LLMs are really good at. If they see like a bill that just says 'Chilies,' it knows that Chilies is a restaurant, right? Like that kind of stuff. Um so so that actually turned out great. Um so I'd highly recommend. I mean, maybe there's even something there around, you know, like a open source project or something where someone can just install some desktop app and uh I don't know how it would connect to their bank. They'd probably do that part manually, but but some desktop app that just like goes through all their finances and, you know, just for people who have a hard time setting up OpenCode and all that.

0:55:39.914 --> 0:55:42.920
<v A>You have more to say here, but well, let's go ahead and go to our topic.

0:55:42.920 --> 0:55:53.020
<v B>All right, we should do a show on automatic finance management, but we will burrito efficient.

0:55:58.797 --> 0:55:59.843
<v B>Oh man, I

0:56:01.345 --> 0:57:47.084
<v B>It's, you know, I've had the same Twitter handle for like, I don't know, 20 years or something, but I think I need to change into Burrito Efficient. Oh man, so good. All right, agentic loops. So, a bit of a history lesson here. So, modern history. Okay, when LLMs first came out, when the technology first came out, people and companies were afraid to roll it out. I don't know if you remember this era, but there was definitely an era where, you know, companies would dip their toe in the chatbot water, and there would be so much backlash. People would find the worst possible thing that it could say, the dumbest thing it could say, and that would make the news headlines. The one I'm remembering of specifically was there was a Facebook, I think it was called—was it called Liberatus? We'd have to look this up—but there was this Facebook project where it would create research papers. So, you would say, 'You know, here's a bunch of related work. I want you to write a research paper on, you know, spatial neural nets or something, right?' And it would go off and write a five-page research paper that looked like you could submit it straight to ICML. And so people wrote ridiculous research papers, like, you know, they would like write a research paper on running a computer with hot dogs, and it would do it right. It wouldn't push back. And then people would submit it—not submit it to ICML, but they'd submit to like the New York Times or something. It's like, look how dumb the Facebook bot is. And Facebook pulled it down. They were embarrassed. They took it down.

0:57:49.176 --> 0:58:35.312
<v B>And so nobody wanted to release the chatbot. The chatbots kept getting better and better and better. Nobody wanted to press the green button until OpenAI pressed the green button. And when the initial ChatGPT came out, they got in so much there's so much flack for it, right? It's like, 'Oh, this is evil. It's going to teach people how to make bombs.' It's also wrong. It's telling you to put glue on pizza and eat it, right? All these things. And to this day, you know, whenever you go to any of these websites, the first thing it will tell you is, 'You know, Gemini makes mistakes, right? ChatGPT makes mistakes, right? I was driving behind a semi, and it's like, sometimes, you know, the autonomous vehicle makes mistakes.' I'm just kidding about that. Oh, that's terrifying.

0:58:37.152 --> 0:59:28.789
<v B>But we just have come to terms with the fact that these models make mistakes, right? And even if they don't make mistakes again, there's the category error where, you know, it did technically what you wanted, but it didn't follow kind of the spirit of what, you know, a common person would have expected, right? For that question. And so in comes agentic engineering. And the idea is, we know we're not going to get it right every time. So what we're going to do is feed in our answer back in and see if there's more work to do and just keep doing this until we reach some kind of a conclusion. And that's what, you know, Claude Code kind of brought into the mainstream, right? So, so

0:59:33.329 --> 1:01:28.180
<v B>that all works out well. But the question there is, when do you stop? And again, all of the same errors from before are still there. So, so, if you might, you might say something like, 'Hey, get to 90 percent unit test coverage.' And this is, you know, this is about a year ago. It's not really true now because of loops, but you'd say, 'Get to 90 test coverage a year ago,' and Claude Code would write some unit tests and then say, 'Hey, I got up to 34. Isn't that awesome? I'm gonna stop here,' right? And if you wanted 90, you had to tell it to do it again. And there's, I literally about a year ago had a bash loop that asked Claude to get to 90 test coverage in a loop and just ran that for 24 hours to get to 90 test coverage. So, that is extremely primitive agentic loop. That worked. It was successful. And nowadays, if you say something like, 'Get to 90 test coverage,' Claude Code recognizes that you've set a goal and converts your question into a loop. And that's how it's able to run for much longer nowadays. So, sometimes the LLM will do it for you. Oftentimes it won't. And again, even if it does, it might choose a terminating condition that's not sort of in the spirit of what you are thinking of, right? If you say something like, 'I want the—I want the accuracy of this model to go up.' Well, like, what does that mean? Do you want it to get to 90? Do you want it to get to 99.9? You know, if you let the LLM decide that, then you don't really know what you're going to get out of that. So, the rest of the show, we're going to talk about how

1:01:28.180 --> 1:01:34.626
<v B>you can build, how other folks have built these loops, how you can build these kind of loops, and best practices there.

1:01:37.495 --> 1:03:36.020
<v A>So, I think for like a half step back, I think one of the earliest things people were figuring out, and this was popular with things like LangChain and what is that? Like LangGraph. Yeah, yeah, yeah. Where there were, you wanted to, and it's kind of a loop, like, you know, pull watch an email queue, and anytime there's like a customer service question coming in, you want to like label it, tag it, dispense it, you know, whatever, and move it through. And I think for me, this just like turns into sort of like cron jobs, but it's actually a big unlock, which is, you know, 'Hey, if you have a computer system like wake up and ask the LLM every so often if like the price on this, you know, website has changed.' You're like, 'Oh, you can write a scraper for that.' Yeah, try to write a scraper, and then just watch like it not work because they move the stuff and the tags change, you know, versus giving it a screenshot, you know, and having it convert it to text, and then doing this is like a big deal. And so just replying to recurring events or doing the same task, which again, I think is a half step before, you know, the introduction, but this was like one of the earliest places where, you know, we saw like the looping LLM sort of take over. But then to transition to, to more, you know, what Jason said for me, the big one, this loop there was, it was like the Ralph Wiggum loop that, oh yeah, yeah, where they were like, 'Write this special skill or whatever, like do the same thing over and over again.' Like, you know, pick a, you know, bug and and you try to fix that bug. Pick the next bug and try to fix that bug. But the first one to really like, I think go, I'll say viral with it was Andre Carpathy, which feels like he has an act for going viral, or maybe we only a survivorship bias. I'm not sure. I actually don't know how he says otherwise, but he did this thing where he posted something that he

1:03:36.020 --> 1:05:32.799
<v A>titled AutoResearch. I'm not sure if it was from the beginning or he eventually titled it that, but where he took a very small, I think it was NanoGPT, which is like a small GPT on a set training set, and said, 'You know, basically, can you make this run faster? Train faster? And can you try various fixes to improve the the metric, the output performance?' And to Jason's point, the terminating condition wasn't really present, but just this desire to go again and again and try something and then revert, you know, if it didn't work or it made it worse. Now, of course, like it went viral because it was hugely successful, but there are lots of gotchas along the way as well. Like there may be you need two, three, four things combined. So, you know, you take a step back to take two steps forward, you know. Like there are all of these places is you have to be very aware, you know, of what the problem scoping and what the domain is and how much least you're doing it. But I do think there's this, and we talked about a little earlier, like the tension between especially a cloud LLM provider not wanting to be accused of just evaporating your tokens. So, therefore, they don't want loops that aren't going anywhere. And you who may be saying, 'Like, I'm not paying the bill. I want all of it.' And so, you know, you can end up with these tensions. And so specifying something almost external to even the harness or even a lot of these stuff is incredibly useful because then you're really crafting, sculpting, setting, trying it, encouraging whatever you want to do and manipulating, you know, that prompt. And normally you would need a human sitting there, but actually, like you can ask an LLM between runs, 'Should like should we revert that? Does that, you know, make sense? Is there something further along those lines?' You don't need the pre-planned complete trajectory to to go down. And so, I think this has really caught, you know, people's attention. And now, and I think this has been

1:05:32.800 --> 1:06:49.880
<v A>popular before, but now it feels within and reach. Just to kind of like the final maximal extent of this is when these LLMs are if they can reach recursive self-improvement. So the idea is if one of these, you know, major AI providers or a new up-and-comer gets an AI that can improve itself by, you know, 10-15 percent per training cycle, then they can basically just keep doing that without human intervention, and it's just bottlenecked by speed, compute power, whatever. And then they'll just be on a quote-unquote escape velocity. I still think that makes a bunch of assumptions, but you'll hear it, you know, tossed around. You we've heard AGI. It kind of went by the wayside a little. The Artificial General Intelligence, you know, but now you'll have this RSI, this recursive self-improvement where these loops are what is being done to try to say, 'Can the LLM figure out what the LLM needs?' And of course, that the evil laughter one is, you know, 'Hey, we need to make this thing more efficient,' and then the robot decides the humans are the inefficiency and so that annihilates all the humans because they're just consuming needless resources. But yes, I, you know, that's the the the Terminator scenario, I guess.

1:06:51.319 --> 1:08:49.319
<v B>Yeah. Um, yeah, it's it's uh um it definitely lends itself to going off the rails. I mean, I think, like leading up to this was this idea of in-context learning. There's actually a paper that just came out not that long ago where somebody showed that if you add periods to the end of a question or to the end of a prompt, that it actually get better answers. So, and the more periods you add, the better an answer you'll get. And the explanation was, well, you know, every single period requires the model to have to spend more compute, and so that's just more opportunity for the model to think. And so you literally add this graph where it's like it's like, you know, statistically significantly smarter if you just add more periods at the end. And so, so clearly, like, you know, if you were to add instead of periods, but add, you know, useful, you know, auxiliary content or a failed experiment or something like that, then clearly it's going to be, you know, more intelligent of an answer. If periods do it right, then useful information is going to do it even more. And so, and so that's sort of spawned this idea of of, 'Hey, like, you know, let's try something and as long as you document your success or failure, and that's going to result in in a better answer next time.' And, um, um, yeah, and so, you know, then you run into issues around the context limit and compaction and all of that. And so, um, that's a whole other issue is how do you, how do you sort of give the right paper trail to these LLMs? That's maybe even another show, but um, but the first part of this is is kind of setting up, you know, appropriate

1:08:49.319 --> 1:10:48.900
<v B>terminating conditions and an appropriate way to step forward. So if you, if you say, um, you know, hey, build Facebook. All right? If you just go into QuadCode and say, 'Build Facebook,' well, you know that's a very nebulous question. And probably what it's going to do is it's going to, you know, build a front end that looks a lot like Facebook, um, and and and and you know maybe a back end for doing some basic things, uh, like posting messages and receiving them and all of that. But you know, if you wanted, for example, live video, it's probably not going to build that feature, right? At least not in the first prompt. Right now. On the flip side, if you set up a loop and you said, 'You know, build Facebook,' and then also like, you know, search the internet for like the top 100 most useful features in Facebook and, uh, go through all 100 of them and, uh, you know, tell me which one of those has been built and hasn't been built and get get get to 100 out of 100, right? Um, well, that's very different because now the model has an easy way of knowing whether it's completed the task or not. Um, so it'll go to the web. It'll grab 100 features based off, I don't know, Reddit or whatever people people are talking about their favorite Facebook features. Um, and uh, and so the loop will will will know, based on trying out your program, that only 70 of the features are done, and it will continue. And it's at that point it's pretty determined. So, um, you know, there's there's like, uh, I've actually seen it where if it runs for too long, the harness will kill it, um, and things like that. But generally speaking, if you give it a very easily verifiable

1:10:48.900 --> 1:11:38.179
<v B>target, um, you know, it will loop indefinitely to achieve that target. And there's things that you can do to, um, to to make sure that it's it's committed, which which we'll talk about. Um, so so there's kind of two categories of loops, or maybe three categories. One is sort of firing on a trigger. So, you know, a GitHub issue has come in, an email has come in, uh, etc. Um, there's sort of a cron, you know, firing every day, every five minutes or 15 minutes. Um, and then there's this third one where it's almost like a while loop where it's, you know, loop until a certain condition has been met. And so it's kind of like we're reinventing basic all over again, but uh, but we're doing it with like a much more capable instruction set.

1:11:42.240 --> 1:13:24.051
<v A>Yeah, I wonder. I feel chaining a lot of those things together is going to be really interesting, and I think, you know, obviously there's lots of opportunity, but it's tough to build right now because, um, I don't know, in that space, you just don't know what will get scooped, what will get, you know, implemented by the major major providers. But certainly, I think that crafting very targeted directions, um, and also doing some form of, which I know you might have some insight to, but also like sort of space exploration—no, not like outer space, but sort of like exploring design space—is something that I haven't really seen a ton of progress towards, like we talked about earlier. Sort of like, 'Hey, you could please refactor this to use MD.' Right? It's like a very specific thing, but exploring that space in a like sensible way, uh, with, you know, sort of branching and picking up, that's how humans, or at least my brain, ends up working. You kind of like all of these potential things, and you're sort of trying to balance the explore versus exploit in the design space, and that's not something that's something that I still need to provide strongly. But with loops, and this is something that I think in the future, as lower lower smaller models get faster and faster and faster, there becomes a point where you can just, you know, shotgun approach, try all the things in parallel, um, and sort of like, you know, obviously explore very quickly, but then choosing which ones to pick up and continue or not. You know, yeah, I don't know, there are some interesting ways of approaching it.

1:13:24.060 --> 1:15:21.450
<v B>Yeah, I think actually that's a really good point. You know, we should talk about sub-agents. So, so a sub-agent is basically, um, think of it as, yeah, it's basically recursion. Right? So think of it as ClaudeCode spins up another ClaudeCode and asks it to do something. And so the nice thing about that is the sub-agent has its own context. So here's an example. If you are, let's say, you're coding up Facebook. So, I want to build Facebook, and um the UX, the the UI doesn't look quite right. So, you know, it's the the the columns are too wide, and, uh, you know, the heading is too too thick and doesn't quite look like Facebook. Well, so you're going to spend a ton of tokens going back and forth about that, right? You're going to say, 'Well, you know, go to Facebook.com, look at their website, get their columns right.' And it's going to go to Facebook.com and take a screenshot, take a screenshot of your version, and each of those screenshots are going to be hundreds and hundreds of tokens, right? And you're going to hit your context limit comparing all these screenshots, and then it's going to do something called compaction. And what compaction does is it it basically summarizes all of the content up until now, and you know, it's sort of a black box, right? You can't really count on it to do anything, uh, uh, you know, as you would expect. So, so compaction might just delete all those images, which is probably what you want, or it might keep them and like delete all the interesting design work you did before you went into this rabbit hole, which is what you don't want. And you can't count on one or the other. So you could say, you know, spin up a sub-agent and have that sub-agent in a loop, um, um, have that

1:15:23.139 --> 1:17:00.100
<v B>sub-agent compare visually your site and the original Facebook site in a loop and and iterate until it's complete. Um, and so while that sub-agent is off doing that, you could even do other things. But concurrency aside, if nothing else, it manages the context. So, so when that sub-agent returns and it says, 'Okay, I've got it visually, you know, a match,' um when it returns, all of that context is deleted, which is in this case what you want, so that you can move on to the next thing without polluting the main the main context. And so, um, if you if you use Git worktrees or other sort of technology where multiple programs can edit the same code at the same time and basically have a whole Git workflow locally, then you could spin up, you know, you come up with 10 ideas to make my website more flashy, and here's this benchmark, here's this like black box you can run that gives you a flashiness score. So, come up with 10 ideas, have 10 sub-agents do 10 totally different things to make the website flashy, and then, you know, tell me which of those 10 increase the flashiness score, and, um, and then keep those and throw away the others. So, so you can start to get to this like simulated annealing kind of approach where you try a bunch of ideas and keep the ones that are better. Um, so I think we'll start to see a lot of this stuff come to bear more formally, but right now you can build it yourself.

1:17:00.100 --> 1:17:08.340
<v A>Now I'm just thinking about Nubby's number of factories flashiness score.

1:17:08.340 --> 1:17:40.855
<v B>Um, yeah, I wonder if there's a way to quantify, you know, like how engaging something is because that's one thing an LLM, I don't know if it can really, could it look at that game and the ET game on Atari and know that one is better than the other, you know, other than from just popular sense of it, right? Uh, nobody could definitely hire people on Fiverr and do a poll that's true. Um

1:17:42.964 --> 1:19:31.320
<v B>Oh, the another thing that's worth mentioning, we kind of wrap up here, but um loops are early days. And I mean, this is now the third time that I've mentioned this, so it does seem to be kind of like a trope for this episode, but but kind of like 30B models, loops are early days. And so one thing that I've found is if I tell it, let's say, the 90 test coverage case, um sometimes it will just end, like sometimes it won't respect your terminating condition. Sometimes the loop just ends, and you don't know why, and it's not it's not really clear. Um the one loop that the the one loop that seems to be reliable is the cron job, and maybe that makes sense, right? Because it's the least ambiguous. So, you know, if you say run something every five minutes, it will almost certainly run every five minutes indefinitely. So, um, so what I've learned to do is I have something that says, 'Hey, um monitor this run, like train a model, monitor the metrics of the model, and, um, you know, if the model is better, then put it in this cat in this folder full of really great models. If the model is a regression, then abandon it.' Right? And sometimes that loop will work, and sometimes it'll just stop. They'll say, 'Oh yeah, I trained I trained my third model, I'm done.' And it's actually not done, right? So, I've set up another loop which runs in parallel, which basically says, 'You know, wake up every 15 minutes, and if if this other loop has stopped, then just, you know, start it again.' And, uh, and having both of those loops seems to be a way to like keep that first one, you know, from dying.

1:19:32.700 --> 1:19:40.380
<v A>I was gonna crack a joke about us being sub-agents in the loop, but uh

1:19:40.380 --> 1:21:16.860
<v B>My loop got stuck. Apparently, we don't have the other agent that kicks us every two weeks to make an episode. We need a that's the agent that's we're missing. Um, but uh maybe just like a, you know, kind of a call to action here. I mean, I've done so much with loops in the past month. As I said, I've kind of gotten the podcast to transcribe and do all that stuff locally with local LLMs for free. Um, so many other projects, the MaimHub thing where it just goes off and does its thing now. Um, it's a super super super powerful technology. Highly recommend folks learn it and leverage it. Um, but it's also it's just janky. It's just early days. Early days are actually kind of the best days in hindsight, you know, when all of this stuff is solved and kind of frozen and we're all just using it, it becomes a little bit less interesting. I mean, at this point, you have a chance to actually shape um the way that these things end up. So, so definitely if you're not using loops, you should learn it. Um, so people have gone further and done graphs and um basically this whole like, you know, communication protocol between many different agents, and I mean, I think that this is becoming like uh maybe more efficient ways of doing this, um, but you're not really typing that much anyways. So, if you have like three loops, it's probably fine at this point in time. Um, but yeah, definitely, uh, you know, something that you should keep your eye on.

1:21:16.860 --> 1:21:34.979
<v A>This space is moving so fast. I don't know. I feel like there are topics for us to discuss instead of like the backlog, like, 'Oh, someone suggested this a few years ago.' I feel like we're in this stage of like this development happened, we should talk about it.' Yeah, yeah.

1:21:35.603 --> 1:21:46.504
<v B>It's wild. I mean, I definitely think we should cover Pi. I actually have it installed, but I haven't done a whole lot with it. I wrote it on my sticky. I'm gonna go do it. I

1:21:47.027 --> 1:21:48.512
<v A>I gotta get nice and do.

1:21:49.238 --> 1:22:13.080
<v B>Something productive. Yeah. So folks out there, if you are coming across tech, you know, whether it's harnesses or really anything that you feel like we should bring to attention to the audience, just shoot us an email, hit us up on Discord, and as always, thank you so much for all of your support on Patreon and the other platforms, and we will catch you all next time.

1:22:13.080 --> 1:22:32.280
<v A>Music by Eric Barndollar.

1:22:32.280 --> 1:22:53.860
<v B>Programming Throwdown is distributed under a Creative Commons Attribution-ShareAlike 2.0 license. You're free to share, copy, distribute, transmit the work, to remix, adapt the work, but you must provide attribution to Patrick and I, and ShareAlike in kind was.

1:22:53.860 --> 1:22:56.160
<v A>You're free to share.

