Hi everyone, I’ve been a bit haunted over the last week - maybe it was Halloween - with an idea that popped into my head for tackling the hallucination problem in large language models. In computer science, the term “hallucinate” may be evocative, but at the core, “hallucinations” are just errors. As humans, we favor technologies that (a) have low error rates for a given application and (b) produce errors that are manageable, not catastrophic. One error in ten thousand might be tolerable if you lose ten cents on a widget. But if it starts a nuclear war, we want that rate as close to zero as possible. The approach I outline in this brief audio clip builds on my Ph.D. work, and I’m looking to form a small team to explore a proof of concept. If you’re interested in contributing to this project, including investing in it, please reach out. Let’s see where we can take this. Erik J. Larson This is a public episode. If you'd like to discuss this with other subscribers or get access to bonus episodes, visit erikjlarson.substack.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00Okay. I actually recorded this to originally to a colleague and then uploaded it, not realizing there was some personal stuff on there. So I have to redo this late at night. So I'll try, I'll try to stay awake. No, I mean, I'm, I'm very motivated to do it. I just hope I could get, uh, get it, uh, done quickly uh again with no um incriminating personal stuff on it so yeah so let
SPEAKER_00me get this out of my head this is really important i hope people really listen this is very this is very dear near and dear to me and it's a really really crucial um problem that we're all working on in you know the world writ large with the adoption of this new ai and it's it's spread everywhere Um, so here's the thing newsflash, when you're working with a language model, you have this error rate and it can be pretty low, but, um, pretty impactful, right? Like, so you could have one error in 10,000,
SPEAKER_00but it brings down wall street, or you could have five errors every hundred, but it doesn't really matter. Um, the errors that you, you do encounter, um, it's just, it's contextual, whether they have a significant impact on the, on your organization. Um, I'm looking at this in a more in terms of adoption by organizations, because actually, I think this is an approach that actually has a promise for getting implemented and getting funded and so on.
SPEAKER_00But it applies as well to individuals that are using this. You can make errors that are really trivial and they don't matter, or you can write your paper and fail to recognize something that's just damning to your thesis and you can get kicked out of your PhD program or whatever it is. But this is sort of more geared towards organizations. And so the thing with errors is you just have them. It's baked into the fact that you're using probabilities to approximate truth, right?
SPEAKER_00So you're just always going to have some level of error. You're going to have an error rate on these. And by the way, another newsflash, I don't mean to sound sarcastic when I say newsflash, but all engineering systems it's, you know, have an error rate, right? I mean, bridges collapse one and whatever airplanes fall out of the sky one and whatever chance, right? So everything has a fail rate and an error rate. Error and fail rates aren't the same thing. I'm trying to simplify this as much as I can. But but the when you're using specifically using a probabilistic model to
SPEAKER_00approximate truth, you're going to have a known problem with errors, right? You're going to you know, you're going to have this problem. where occasionally it's going to talk nonsense. And that's exactly what we see. So what the industry is doing is right now they're taking another language model, another LLM, and they're using it to kind of cross-check or sanity check the first, the output from the first, the response from the first. And, you know, there's a long history of doing this. There's nothing wrong with this. You know, we've used ensemble methods and machine learning, and that's basically just a binary ensemble method where you just,
SPEAKER_00ensemble methods are where you say like, okay, like, let's, like, we have a guess from this classifier. Let's let N classifiers where N equals five or 10 or a million all guess. And then let's see if we can approximate the truth. And those methods are widely used and there's nothing wrong with using them, but they typically aren't perfect. You just get some bump in performance, right? So, um, and they're into the industry is using, you know, Google and the main players that are in this space right now are also using,
SPEAKER_00um, you know, they're using fine tuning and they're using, you know, you know, prompt engineering and so on to try to reduce error rates. But the, the, the one thing they're really doing is trying to use this kind of binary ensemble method, um, to, to reduce errors. And it might not be binary, it might be tertiary or what have you. So, um, Okay, so the problem is, A, that's extremely compute intensive to use two of the very largest,
SPEAKER_00most computationally expensive models you can to try to reduce the error on one to use yet another one, right? So you're hitting that model just to try to quell or mitigate the errors on the other model. It's not 100% effective. In fact, with this kind of approach, you're using probabilities to combat probabilities and there's no concept of truth between them. You actually can introduce new unexpected errors, try to reduce the errors from the first. You don't have any guarantee that you're going to get a great result.
SPEAKER_00It's not a principled and systematic way of addressing the problem, frankly. It just isn't. That's what all the king's horses and all the king's men right now are doing that's what google's doing that's what open ai is doing that's you know all the research that's going out about error reduction is using this with a combination of the other stuff i mentioned so suffice it to say there is no real framework in place for dealing with errors and we desperately need one as we have such a high adoption rate right so here's how this relates to me
SPEAKER_00When I did my PhD in 2009, we were working on this problem with conversation or what we call dialogue, you know, which is back and forth. You have a monologue, you have a dialogue and so on. And we were working on this problem and we had a pretty good dialogue. way of analyzing it. And I'm going to simplify this because I don't want to lose everyone in technical details. I don't think that makes me sound smart. I want you to understand, and I'm not exactly sure how to condense all this, but let me try.
SPEAKER_00So we use something called, there are these pragmatic theories of language, and we use something called rhetorical structure theory, or actually the one I worked with was called segmented discourse representation theory, or SDRT, which is quite a mouthful. But it's basically, to simplify it, it's basically like putting metadata on a conversation. So you say, okay, here's the question. What type of answer is this, right? Is this an elaboration on the narrative? Is this a contradiction? Is this a contrast?
SPEAKER_00How is this? How is what's going on between the two interlocutors? What's the question? And in our case, the L to the LLM and what's the LLM's response? And how does how does that connect? Do we have yes, no questions? Are we expanding on something? Is that right? And it gets very complicated how you represent all this stuff, but it's been done already. And you can really, really get a visibility into what's going on if you have this metadata. So, yeah. So like I said, you basically put these metadata tags on and that enables you to basically analyze
SPEAKER_00and see errors like you couldn't before. And so you basically, you have an error filtering mechanism if you have them in place, conditional on them being in place, right? And so here's the basic problem, right? Okay, let me give you a really quick example. I didn't spend a lot of time on use cases to just do this initial plug. And I'm also a little sensitive to the fact that I could be just telling everybody here,
SPEAKER_00go do this and make all this money. And frankly, that's not how this game works. So there's stuff I can say and stuff I can't say, but I need to at least communicate the value of the approach so we can get on with the discussion. But, you know, like it's common to, you know, execute a query to an LLM where you're looking for a recipe. Maybe it's a programming snippet. That's a recipe. Do this, do this, do this. Right. Or it's how do I make banana bread?
SPEAKER_00Right. That's a recipe. Like, make sure that you, you know, have the eggs at warm temperature before you and so on. So if you don't have if you're at the level of text and you're trying to figure out, did I get the recipe right? Right. you don't really, it's going to be really hard when things are out of sequence because you're not dealing with sequences, you're dealing with text. But if you have the metadata, you're actually saying this follows this, follows this, follows this. And so if it's out of order, it's a pretty small code snippet to tell that something's wrong. You don't need the entire internet in a 75 trillion parameter, right?
SPEAKER_00So there's a hybrid approach that just is going to work really well, conditional on the metadata being there. Right. Okay. So that's behind door number one. Let's go to door number two. Where is behind, what is behind door number two? Okay. So, right. So what I was doing, so here's the, here's the thing that I realized I had this aha moment and I've been sort of really, really excited about it ever since. And I didn't know if I wanted to say something about it, but I think I'm going to now clearly.
SPEAKER_00When I was clearly what I was, when I was at UT I, We were doing this, but the thing was that I recognize this looking back on it. We didn't have any way of doing it automatically. It's not that we didn't have the representation. It's not that we didn't have the ideas. It's not that what we were doing wouldn't work. We had no way of tagging 10,000 documents in five minutes, right? Let alone five seconds, right? So it didn't matter for computer science. Like, okay, it's a brilliant approach, but until we get
SPEAKER_00Quantum computing, there was just no way. It wasn't just speed. We didn't have an intelligent way to tag conversations in terms of what's called a span, which could be a sentence or a clause, but it's a unit of meaning. And we just didn't know how to do that reliably. So to reduce the error, we have to introduce a huge error. We actually have to introduce this very, very error prone and not reliable,
SPEAKER_00some system to actually insert the errors in the first place. So, you know, we knew if we could get the tags on the conversations that we would have all this power to interpret what was going on. But we couldn't get the tags on automatically because we didn't have the technology. And so, you know, that was a hard stop. And so, you know, that's where a lot of AI kind of, like, there was a bifurcation in AI where people said, like, we're just going to do knowledge representation and reasoning and concluding pragmatics, which is what I'm talking about. And then everybody else started doing the token level stuff,
SPEAKER_00which is like the machine learning stuff, you know. And so but when we get to, you know, 2024, And you look at LLMs, I had this moment, the moment is, wait, I can just add those tags. I can literally just tell the LLM, here's the structure I want you to use. It's in this Word document, add these tags, right? And so the problem that was keeping us from moving ahead has now been effectively eliminated. And so the other part of this is that an LLM can,
SPEAKER_00with really high probability, insert those tags so that you're not actually reproducing errors or just pushing errors along a bigger pipeline. So you're going to have a very high probability. It could be human level or even potentially better than human level at getting that kind of metadata inserted. um into your into your dialogue or your conversation and so and then conditional on that right so now you have this really hey we haven't made a lot of errors yet if any now we have this error reduction thing in place where we can look at that
SPEAKER_00those tags and we can use actually simple symbolic systems that are designed to check whether something makes sense given something else and so on. And we've reduced the complexity and we've reduced the error in a way that the big guys aren't really doing yet. OK, so right. So that's the idea. If the accuracy of inserting the tags is almost 100 percent, you know, and it's going to be extremely high probability, it's not a difficult task for an LLM to do that.
SPEAKER_00And by the way, I actually already did this. I already tested this. So I already know it works. So it's like I'm basically just I'm not making an argument. I'm actually reporting on something. So it's pretty exciting stuff. And here's how the bottom line is. When you look at AI adoption, basically the number one thing for an organization is if we get these errors and we can't find them in real time or when we need to, and they have a huge impact on our bottom line, that technology is extremely costly.
SPEAKER_00It might actually end up losing our license. It might cost us billions of dollars in legal fees. It might cost us untold dollars in productivity losses because people are getting... de-skilled and errors are slipping through. And so, you know, we're going backwards in every way. It's like a nightmare, right? You know, scenario. And so, you know, organizations are justifiably, understandably, extremely worried about taking on a high power technology with a high impact error problem, right?
SPEAKER_00And so the flip side of that coin is if you reduce those errors and you can show systematically how you reduce those errors, you're going to save that company a lot of bottom line dollars immediately. Right. So the trend. So the translation of the success of the error problem into the adoption problem and the amount of money that is spent trying to get the value from that versus mitigating, mitigating the, you know, the damage. Right.
SPEAKER_00Like. That's going to translate directly into savings for any organization. If you reduce the errors and we have two facets here, you have the impact and then the number. Right. But I'm going to leave that. That's it for the next masterclass, as it were. I'm not saying this is I'm just saying, like, I'm going to leave that for now. Let's just look at it like in terms of errors, the less the better. That's generally true. And so, you know, but like if you can say like, hey, we reduce the errors by 5%, that saves the company $10 million or whatever it is automatically.
SPEAKER_00There's a direct causal connection between those two with this technology. So that's where you need to focus. That's what you need to do if you want to talk about this question of LLMs and, you know, how we're going to work with them and use them moving forward. Thank you very much. I hope everyone got a lot out of this and I would like to hear from people. I want to actually bring this into the world. I'm looking for people who are interested in terms of angel funding and people who
SPEAKER_00are interested in terms of actually helping do this. I think we should. I think it's a big deal and I hope people will step forward. I'm looking forward to hearing. Thank you.
Hi everyone, On this podcast I interview Mike Rizkalla, founder of the creative AI company Snorble. Mike is an original thinker who once toured the world as a musician in a Canadian punk rock band, and now brings a...
Hi everyone, This one gets a bit technical, but I hope it sheds light on what AI engineers really do - and why I remain skeptical about AGI being a real concern. I hope you’ll give it a listen. And to the DoD, I have no...