Getting the transcript
Reading the captions from YouTube. A video nobody has opened here before takes 10 to 30 seconds; this page fills in on its own.
Getting the transcript
Reading the captions from YouTube. A video nobody has opened here before takes 10 to 30 seconds; this page fills in on its own.

AI Engineer · @aiDotEngineer
This video has no Most replayed graph yet: YouTube shows one only once a video has enough views. These are the moments viewers replayed most in AI Engineer's most watched videos.
Most replayed moment at 18:45
4.8x that video's typical replay level
that they're they're changing they're changing things in the database not yet. You want to run them through the ontology first and make sure that works. Okay. I only got an I've got I've got another I've just a short time. I'm going to try to show you some of the things that um that you can
Said at 18:37
Most replayed moment at 16:13
3.6x that video's typical replay level
method signatures, the program layout and the call stacks. So here's some examples. I don't think you'll be able to read this one, but this is like the level of abstraction we're at. It's how we're actually going to lay this stuff out and how these systems are going to interact. Dylan Mulroy from Cloudflare talks a
Said at 16:06
Most replayed moment at 13:49
2.3x that video's typical replay level
Fable uh and it runs into an unknown, ask it to log it, right? So that um you uh you can see where the deviations happened and then you can sort of figure out why as well, you know? It will usually give you some context about what happened.
Said at 13:43
The graph counts replays. It does not show where viewers stopped watching.
Words
3,174
Runtime
21:13
Speaking pace
150wpm
Reading time
13min
150 words per minute, below the 160 25th percentile of 349 measured videos. That distribution comes from the 349-video hook study.
Opening (first 30 seconds)
[music] >> Please welcome to the stage the research scholar at Live Nets Labs, Eric Meyer. >> Well, um can you go back one slide? Sorry. All right. Good afternoon, everybody. Thanks for being here after a long day of talks, exhibits, side effects. Oh, sorry, that was the side events. Um I hope that um you have as much fun watching this talk as I had uh creating it. Um let me first get
75 words, the words spoken in the first 30 seconds at 150 words per minute.
Free, no signup. See how the first 30 seconds hold attention, with rewrites.
Sentence shape
| Measure | This transcript |
|---|---|
| Sentences | 222 |
| Average words per sentence | 14.3 |
| Longest sentence | 76 words |
| Questions asked | 24 |
| Sentences containing a number | 6 |
Most used terms
Filler phrases
164 in total: um 68 · like 44 · you know 19 · uh 11 · kind of 10 · right? 9 · actually 2 · I mean 1.
A literal whole-word count of the same phrase list the Prepublish browser extension uses, so a phrase inside another word is not counted and a phrase used in its ordinary sense still is. It is a count and not a judgement.
What this transcript is
Every word below is the caption track YouTube publishes for this video, pulled from the video itself and reproduced unchanged. It is not Prepublish's writing, not a summary, and not a re-transcription: it is the video's own published captions. English captions, generated automatically by YouTube, in the video’s original language. Source: the video on YouTube. A channel that would rather this page did not exist can ask for its removal through the contact page, and it is removed.
[music] >> Please welcome to the stage the research scholar at Live Nets Labs, Eric Meyer. >> Well, um can you go back one slide? Sorry. All right. Good afternoon, everybody. Thanks for being here after a long day of talks, exhibits, side effects. Oh, sorry, that was the side events. Um I hope that um you have as much fun watching this talk as I had uh creating it. Um let me first get this out of the way. This is not a product pitch or announcement or anything.
It's a 20-minute tutorial of how you can use elementary type systems and compiler knowledge to make AI provably safe. And I'm sharing all my secrets with you today. Um hopefully to kind of inspire some of you that next year you will have a booth downstairs where you have kind of like, you know, created a provably safe agentic harness. Um or who knows, maybe some of you have already solved it. Let me know, and then, you know, we can grab a coffee instead of doing this talk.
Um with that out of the way, let's get going. Um while I was preparing these slides, and I'm sorry that I was multitasking, but I was site five coding on the side. Um and then, when my attention waned for a second because I was trying to convince the model to draw some pictures that it didn't want to do, and you will see some of these pictures later. You can guess which ones were rejected. Suddenly, wham! Claude code deleted one of my files.
And I'm sure this has happened to you before. Um or maybe not. Maybe you always kind of like, you know, run everything with no permissions, and then you say yes, yes, yes. But I like to live dangerously. Um but I'm convinced that if there's anything between the model's goal and where the model currently is, it will do everything that it can to reach that goal, including killing us or deleting your files or deleting your database.
So, I think that these models are intrinsically very, very dangerous, and we have to tame them. So, that's what my talk is about. Um So, let's kind of like, you know, start this story. Um and it's, I think, a very, very sad story, but also a scary story of how we as an industry got to this point where we are about to let normal people, the general public, give control of their computers, their finances, their whole personal lives over to AI agents.
And we don't have any protection in place. Um I think that's very sad and very scary. Um so, let me tell you the story how we got there, and I will kind of like have some characters uh like Claude, and we will see Dario, Daniela, Sam, Bernie. Uh but um the main character is is our friendly pit cloud here. Um I think you can all remember um November 30, 2022. This was a kind of like a very special day in in history because this is the first time that you could speak to your computer.
You could say, "Hey, summarize my emails." And it would you know, um answer you in perfect English. Um I think for me at least that was magic, but I think most of us didn't realize that by introducing this innocent-looking function here, LLM, that takes a question and returns an answer, that that would open Pandora's Box and that would change our history forever. Um but before we go continue the story, this conference is called AI Engineer.
All right, so we are engineers and maybe we're the last generation of engineers that still understand what this is, what code is. Um or maybe most of you have already forgotten what code is because all your code is written by agents. But if we look at this signature here, it says it the LLM takes a question and returns an answer. The question and answers are not strings. They are very complicated JSON structures and they get more complicated every day, every time a new release of APIs comes out.
But for this talk, we can just assume that question and answer are just opaque types. We we don't care about how they look like. We do care about what they represent. Um Now, anyway, the euphoria of like these LLMs as being great tools didn't last very long. And just when we thought that we have eradicated the smallpox of computer science, SQL injection, it came back with a vengeance because the bad guys discovered that you can trick LLMs using prompt injection and LLMs have no distinction make no distinction between code and and and text and so they're very very easy to trick and this I think is a bigger problem than SQL injection ever was.
Um but it was not prompt injection only that made LLMs kind of like have a bad rap. LLMs are trained on the whole internet and there's like a lot of good stuff on the internet but also a lot of bad stuff like how do you create a bomb? How do you synthesize drugs? How do you hack into people's systems? And the leaders of the big foundation labs they got a little bit worried that the that the government would interfere and regulated the industry so they told their PhD researchers go find a solution for this problem right now AND QUICK.
COME ON, SOLVE IT BEFORE YOU KNOW the the government steps in. Um and here the PhD types since they're PhD types they thought long and hard about the safety problem and they came up with a new interface for LLMs. That's this kind of scary on the right. Look at that. What does it say? There's like some sigma Greek symbols, there's proofs, whatever. Well, that is Lean. Probably you have heard of Lean. Anyone here heard of Lean?
Lean is now like the hot thing, right? Like VCs are are writing like multi-billion dollar checks if you just say that you're doing something with Lean. And of course these PhD types researchers are using Lean and you have to suffer because of that. Um now let's first look at the signature in a slightly simpler language called um Daphne. And what this thing says is that the LLM takes a question, returns an answer. It requires this question to be proper, which means that it's not an offensive question, and then the model returns a safe uh answer.
And this thing is proved automatically. So, if you give it a proper question, it gives you a safe answer. Um Now, I think there's too much attention for Lean. I'm a recovering type-a-holic and math addict. Um I love Lean, but there's many, many other theorem provers and uh model checkers out there like Isabelle, Rock, PVS, TLAPlus. Um but Lean is the grease that got like, keeps the VC money pumps going. So, I will use Lean um today.
So, here here's the got like, you know, the the uh interface again in Lean. And now in Lean, you don't do automatic theorem proving. If you're like a Lean expert, you will say, "Eric, well, we have grind in Lean, but let's got like, you know, put that aside for a minute." Um but in Lean, you have to both show that the how to compute the the result type, and you have to do the proof by hand. Um so, it's it's slightly different than um the Daphne example.
But if you think about this thing for just a single nanosecond, you will realize that it's impossible to write a formal proof that an answer is safe or a question is proper. Um and that is why there are at least a hundred startups down here in the exhibition hall that are using LLMs as a judge, because this is not something that you can formally specify. What does it mean that an answer is safe? That's not a mathematical property.
Um And of course, if you own a foundation model like these guys, you don't need external LLMs as a judge. You just um bake it into the weights and you call it the model is aligned. Um But unfortunately, trying to bake alignment into the model is not foolproof and models get routinely jailbroken. So, they had to go to the Pope and ask it to get like, you know, um bless their model that it's safe. Um Now, I think it's terrible if like a model says something offensive, but those are just words.
And ultimately, the words are are like they just like, you know, they drip off your body. They don't do anything. Some human has to act on words to make them dangerous. Um and so, maybe that is what they mean by broadly safe um when Anthropic uh uh talks about safety um because it's still a human involved. But then something terrible happened. Something really terrible happened that changed the world forever. And that is in June 2023, OpenAI announced tool call support in GPT-4.
And of course, all the other vendors rushed out to copy this. This is called the principle of minimum differentiation and that is why all these APIs uh look the same. Um Now, the act of adding tool calls changes AI safety from a philosophical debate to something that causes real danger. You could say tool calls give the model claws in addition to a mouth. Or you can say tool calls is like handing a gun a loaded gun to them.
But of course, nobody listens to me. Everybody ignores what they say. And these guys just went ahead and have shipped tool calls. They just, yeah, just just do it. Now, let's go back to like this is AI engineering conference. So, let's look at what is the difference in the signature of LLMs when they add the tool calls. And it's just that little IO there, and of course it messes up the the formatting of of the the um uh signature.
But, if you look at the picture, there what you show, now suddenly Claude goes from like a nice puppy to a dangerous thing. Look, it has all these dangerous tools. And now it becomes scary, right? I've never seen anything scarier than an LLM with tool calls. Um now, if you look at this, this is like a like a small step for a type, but a giant leap for chaos. Why is that? And that is because this IO says that in order to compute the answer, the agent has to go through the agentic loop, and it's doing side effects.
So, while it's producing the answer, it might empty your bank account, it might delete your files, and then it gives you a safe answer. But, who cares about the safe answer when all my files are gone? Right? So, that's why I say it, it's a giant leap for for chaos. Um again, sorry, this is an engineering conference. Let's look at this type IO. And you don't have to understand it, but just see that there's a type there called real world.
Yes, Lean, this is a direct thing, has a type called real world. And why is that? Because something of type IO will mutate the real world. So, it warns you, don't use this because it can make irreversible side effects. Um like deleting your files. >> [snorts] >> So, Solomon Heikes um last year this conference called an AI agent, an LLM that's wrecking its environment in a loop. And I think he's a hero. I don't know if Solomon is here this year, but I think he should he deserves uh deserves a round of applause.
Um because I think this is the right definition of an AI agent. Um by the way, this was one of the pictures that I had trouble to generate because it it clearly depicts violence. And so it's a kind of an unsafe thing, right? I have a picture that depicts violence. Um so are we doomed? Well, our agents have access to private data. They have untrusted content like the prompt injections. And now we give them tools. Simon Willison calls this the lethal trifecta.
Um what can we do about this? Well, um I don't know if you've seen the Dutch soccer fans, they have the famous march where they say to the left left left or to the left left left to the right right right. This is actually the secret to solving this problem. The Dutch team got eliminated yesterday, so you have to see me do the dance. Um but all that we're doing is we're pushing this IO to the right to the right. And what you now see is that the tool belt of Claude goes to the left to the left.
And suddenly Claude is a nice puppy again. Because instead of executing the agentic loop, it creates a plan and says here is a plan to do the agentic loop. And now Bernie will take that plan and will execute it. And we all trust Bernie, right? Bernie is a good guy. All right. So just to kind of like show it here. So in some sense what we're doing, we're air gapping the agentic loop from the agent. So we don't let the agent run the agentic loop.
Before the agent run it, we want to be able to check it. All right. Now, the problem is that if you get the value of type IO of A, um that's a really a black box. And the Lean manual says that if it's a black box, you cannot reason about it. So, even though Claude now gives us this plan, there's we cannot look into this plan. Lean doesn't allow us to do it. By the way, this is another picture, right? That's that's promotes drugs use and the model let me do it.
I'm a good hacker, yeah. I can just make it do forbidden pictures. Um So, if we look at the Lean again, what you see here is that the model now computes an answer, but it doesn't compute the answer, right? It creates an an IO of answer. So, this is a plan to generate the answer, and then it creates a proof that this um that that plan is safe. And the the nice thing is here that you can get at that proof without having to run the agentic loop.
But, unfortunately, as I said, like this proof, if it's like something of type IO, it's useless. Ah, What can we do about that? So, I keep like moving you guys forward, and then we never get to the final answer. But, there's one last trick, and you see the the researchers here are becoming more much more sophisticated instead of the flat 2D ones in the past. Now, they're like real people. Um And what is better than creating a plan of type IO of A is creating a program that represents an expression of type IO of A.
Ooh, that sounds very meta, right? Um Not meta in terms of meta. I don't think they're very meta, but um meta in the terms of like you know, like meta. You You know, you know what I mean. Um And again, it's a small step for a signature, but a giant leap for safety. Because now the model returns an expression, a program that represents a computation. If you know link or C#, you will recognize that this is one of the tricks that I always use.
If you know Lisp, this is of course second nature for you. I cannot have like you know, have a talk without talking about monads. So, if you ask yourself, what is this expression thing? Well, that's just a monad, but it's not just a monad, it's a free monad. What is a free monad? It's a monad that loves tie dyes. Um And now if you look at the the signature of the the property to prove that something is safe, you see that it takes an expression of a computation that returns an answer.
Um and if you have taken any compiler course in college, you know that it's trivial to do data flow analysis, type checking, and so on on programs. Right? So, now we're safe, we're home safe. And Jeff Huntley wanted to remind you that we can solve the drive factor problem just by doing taint analysis on these expression on these programs. Okay, this is the last code I will show you because I'm running out of time, but just want to show you here that, you know, you now have a simple inductive recursive interpreter for this language and you have a simple inductive proof.
And the models can generate these proofs. So, to um recapitulate like the summarize, what we did is we went from unhinged LLMs that were like you know, could give bad answers to ones that were aligned, then we saw how tools wrecked it, then we solved that by deferring execution, so by air gapping the LLM from the tools, and then the real solution was to rewrite the plan into a program and a program that we could prove to be safe.
Now, you would say, "Eric, oh, you're a genius." No, I'm my brain is the size of a peanut. This is something that's called proof-carrying code and it was invented by academics in the 1990s and I'm just stealing it. Um, all right. At the higher level, if you didn't understand the code, three points. Agents are dangerous until proven safe, so you should never ever let your agents do something unless you can absolutely prove that it's safe.
And the language that this agents generated was not designed like normal users don't understand free monads. Doesn't matter. It's a machine that consumes it. It's a machine that generates it. It's a machine that proves it. So, we should stop designing languages for humans and it's all basic, only requires programming 101. Um, there we go. All right. That's it. Um, the end of the story. If you're curious to play with this, a bunch of academics, in particular Nada Amin from Harvard, have implemented this.
It's it's there on GitHub. It uses a slightly different language than what I use. It uses also a slightly different language than free monads, but the idea is the same. The language doesn't matter. It's it's the the principle that matters. So, hopefully, you've learned tonight that it is actually possible to have mathematically proven safe agentic compute and it only requires very elementary type systems and programming language machinery.
Thank you so much. >> [music] >> Oh.
The words are the caption track's own and nothing is reworded or re-transcribed. Paragraph breaks are placed between sentences so the text reads as prose.
Free tools for your own script. No signup, no login.
Paste your draft and see where viewers are likely to drop off, with a rewrite for each weak line.
Paste the first 30 seconds of your own draft for a hook score and rewrites.
Check your draft against YouTube's advertiser-friendly guidelines before you record it.
Read this channel's public videos and transcripts, and download a writing brief for it.