Skip to content
Full-stack approach for effective AI agents episode artwork

May 15, 2024 47 min

Full-stack approach for effective AI agents

from Practical AI Hosted by Daniel Whitenack and Chris Benson

There’s a lot of hype about AI agents right now, but developing robust agents isn’t yet a reality in general. Imbue is leading the way towards more robust agents by taking a full-stack approach; from hardware innovations through to user interface. In this episode, Josh, Imbue’s CTO, tell us more about their approach and some of what they have learned along the way. Sponsors: Neo4j – Is your code getting dragged down by JOINs and long query times? The problem might be your database…Try simplifying the complex with graphs. Stop asking relational databases to do more than they were made for. Graphs work well for use cases with lots of data connections like supply chain, fraud detection, real-time analytics, and genAI. With Neo4j, you can code in your favorite programming language and against any driver. Plus, it’s easy to integrate into your tech stack. Fly.io – The home of Changelog.com — Deploy your apps and databases close to your users. In minutes you can run your Ruby, Go, Node, Deno, Python, or Elixir app (and databases!) all over the world. No ops required. Learn more at fly.io/changelog and check out the speedrun in their docs. Featuring: Josh Albrecht – LinkedIn, X Chris Benson – Website, GitHub, LinkedIn, X Daniel Whitenack – Website, GitHub, X Show Notes: CARBS (Imbue’s cost-aware hyperparameter optimizer) Imbue paper on the stepwise nature of self-supervised learning A paper on initialization/feature learning co-authored by Jamie Simon, a member of Imbue’s technical team Imbue Upcoming Events: Register for upcoming webinars here!

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

Full-stack approach for effective AI agents

0:00 47:02

Chapters

  1. 0:00 Welcome to Practical AI
  2. 0:43 Josh Albrecht from Imbue
  3. 4:49 Categorizing agents
  4. 8:28 Making agents work
  5. 11:47 Usecases for agents
  6. 13:55 Full stack approach
  7. 18:10 Research first
  8. 20:54 Focusing on environments
  9. 24:11 Fundamental laws to deep learning
  10. 28:54 Sponsor: Neo4j
  11. 30:01 Engineering trust
  12. 33:10 New interfaces
  13. 35:07 Reviewable outputs
  14. 36:58 Day to day coding with an agent
  15. 40:38 Language context shifting
  16. 43:41 Things to come
  17. 45:49 Thanks for joining us!
  18. 46:15 Outro
of matches

Transcript Auto-generated, may contain errors

Welcome to Practical AI. If you work in artificial intelligence, aspire to, or are curious how AI-related tech is changing the world, this is the show for you. Thank you to our partners at Fly.io, the home of changelog.com. Fly transforms containers into micro VMs that run on their hardware in 30-plus regions on six continents, so you can launch your app near your users. Learn more at Fly.io.

Welcome to another episode of Practical AI. This is Daniel Whitenack. I am the CEO and founder at Prediction Guard, and I'm joined as always by my co-host, Chris Benson, who is a principal AI research engineer at Lockheed Martin. How are you doing, Chris? I'm doing very well today, Daniel. I'm hoping that we can kind of imbue today's show with a sense of wonder and exploration. Yes. Well, thankfully, we have an agent on the show with us that's going to be very helpful in that. Today, we have Josh Albrecht, who is CTO and co-founder at Imbue. Welcome, Josh. Thanks. It's great to be here.

Yeah, yeah. Well, we sort of in a not very funny way, teed up a couple of things to talk about there as related to agents. But could you give us a little bit of background? You talk with Imbue about the dream of personal computing, the dream of agents doing work for us in the real world, kind of your approach to that. But we'll dig into a lot of those things. But could you give us just a little bit of background in terms of how you as founders of Imbue came to these problems around agents and accomplishing more kind of complete or complicated tasks with agents?

Yeah, I mean, AI is definitely something that I've always been interested in and excited by. I remember a long time ago, my friend read some book in middle school, I think, like maybe Ray Kurzweil's The Singularity Is Near. It's like, oh, wow, there's AI. Wow, so exciting. And, you know, did all that come true? I don't know necessarily, but it seemed like an interesting thing. And I was always interested in thinking and logic and AI and neuroscience. And when I went to school, I was originally going to do cognitive neuroscience, but the professor was a little bit too boring. So I did AI research instead. And so ever since then, I kind of, you know, I published a bunch of papers and things, but it felt like it wasn't going to have a big impact on the world.

So I went off to do startups. But all the time that I was in startups, I was always looking back and looking and saying, oh, is now the time to get back into more fundamental AI research? Does this stuff work yet? And eventually it came a point where I was like, yep, this stuff is working. What I've always wanted to do with AI systems is make better tools for us. There's so much work that we have to do in the real world that is just not that fun, not that interesting, and not really moving things forward. And so all my time at startups and the things that I've been working on, they've all been very practical, very applied versions of machine learning. And so I've always wanted to, we are an AI research company, but it's not AI research for AI research sake. It's AI research to actually make tools that are useful.

And so what we're doing at MPU is we're trying to make tools, you know, at least even just starting for ourselves. Like, can we make robust coding agents for ourselves that can really help accelerate us and help kind of take over some of the boring tasks that we don't necessarily want to do. And that's what sort of gets into agents. It's like agents are AI systems that are acting on your behalf. Tools like, you know, chatbots, et cetera, are really cool. It's great to be able to answer questions. It's great to be able to generate text. But if I have to copy and paste that text every time over into some other thing and like do all the work myself, it can only save you so much time, right? It's like a better version of Google at the end of the day or a better version of like search engine or something like that or a book. And so I think the real promise of AI is in systems that actually take actions. But in order to get that to work, we still have a lot of work

on the capability side. When you're talking about taking actions in the real world, there's a lot more risks, a lot more downsides that come from that. And you need to be careful about, you don't want to empty the user's bank account. That's going to be a really bad product experience. So how do you make systems that the user can actually trust, systems that are robust, systems that you can know are actually correct, and that flag for you, like, hey, I'm not really sure about this. So this is why we always talk about coding and reasoning, is we're talking about the ability to understand the outputs that are actually being created and understand, is this correct? Is this actually going to be useful for people? And really thinking it through more like a person instead of just, hey, here's a generation. Good luck.

So that's kind of how we got to agents is like, we want to make practical systems. We care about, you know, making these systems actually robust and useful for people. And that's what a lot of our research is focused around. When it comes to agents and sort of where we're at with them now. So we're recording this in May of 2024. For those that are that are listening back, how would you kind of categorize in your mind? Because, you know, you can download Blanchain, you can like create what is a agent, you know, maybe for this purpose or that purpose that searches the web or does this thing or that thing. And there's certainly even in my own experience, a lot of fun to be had in that, for sure. But there's a lot of challenges.

making this sort of at least in the enterprise setting making this a reality for solving problems much less than sort of my those random times in my personal life where i need to do things so how do you categorize like as of now the state that we're now of course everything's changing the sort of main sets of challenges that where people are hitting blockers when they're trying to create these agents yeah that's something that we actually played around with a lot last year we interviewed a whole bunch of founders of different agent companies both you know like on our podcast and our thursday nights and ai events and also just in person kind of off the record up to friends friends of friends people starting companies really trying to understand like what are the problems that people are running into when they're trying to make agents. And the thing that we kept coming back to is, you know, there are all these tools like lane chain and all these other bits of infrastructure out there or ways of testing things like scorecard AI or all these different like libraries. But the problem that people really had was like, what you really want as a software developer is, but does it actually work? Like, does it actually answer the question correctly? And can I get these things to do what I want as a product designer or as an engineer without having to specify all of the like details myself? Like that's sort of the promise of AI. And right now they're really great for getting like a first pass version of the system working where it's like, oh, cool. Like you ask it a thing and like,

60, 70% of the time it's right. That's great. That's so amazing. Wow, it's like getting this really complicated question right some of the time. But 60, 70, 80% isn't really enough for like deploying this. And going from that 80 to 90 to 95 to 99 to 99.99, like that's actually a lot of work. And so people have made all sorts of techniques, you know, for RAG or for kind of other types of ways of conditioning the answers to kind of make them better and better. But the things that work today are kind of the more constrained versions where you're sort of, you know, you're asking like a very simple question or you're in a very narrow domain. And so the programmers, the product designers can like make sure that like everything works out within these rails once you are in the more like general assistant kind of category.

It's like a lot, lot harder. I think we've seen a lot more stuff be successful there. But I think in terms of categories and like in terms of kind of the problems that people are running into, I would say the main one I would summarize is robustness, like correctness. Like, can you actually get these things to be robust all the time? I think that's what really distinguishes agents. Like if you think about agents in the real world, like a dog is an agent. I'm an agent. A robot's an agent. Like a dog is actually extremely good at not dying for a really long time, right? It's not that 90% of the time when it walks across the road, it doesn't get hit by a car. Like 100%, almost 100%. Most of the time, you know, it's like pretty safe. Like it's usually like as agents, we're being very, very conservative, very cautious.

correct actions. And there's a lot of heuristics and intelligence that goes into being conservative, being risk averse, being able to take a long chain of actions without going wrong, without something else horribly going wrong. And our agents don't have that kind of common sense and that kind of reasoning right now. I think if they did, it would make it a lot easier for people that are building agents. As we were kind of going through the last couple of questions, talking about kind of the problems that people are run into when they're trying to make agents work and, you know, what can they do to ensure that it has a good outcome? I also run into people all the time who I think really struggle to understand, you know, within the context of this, you know, all the hype and the boom of generative AI, what can you use an agent for productively in enterprises in 2024? You know, they're used to going to these web interfaces that are, you know, becoming ubiquitous for us all. But the notion of saying, OK, I'm going to going back to what you said earlier on, kind of getting it out of that web interface. Can you kind of paint a picture about how people out there who are trying to bring this productively into their organization?

as an agent versus a web interface, how they might even conceive of how to approach problems that they might want to solve with the technology? There's a lot more work to be done today to make agents work for a system. I think if you approach it as a more holistic system, then it's more likely to work. So if you think like, okay, where are the places that it could go wrong? What's the confidence that I'm getting back from the system?

Can I flag that for human reviewers? Can I have a bunch of different checks in place that are both in-domain for programming? Does it pass a linter? Or does it pass this style guide? Or does it at least type check? Or is the syntax correct? There's a lot of checks that you can do in-domain. There's different industries as well. And then you can use the LLM to score this and ask, is this particular thing wrong? Is that particular thing wrong with it? So as you start to build up more safeguards and guardrails around these, then you can start to get them to a level of robustness where maybe for the easy cases, it's OK for your application for it to fail. And you know where that failure rate is, and you don't want to work to understand how much can we tolerate.

One of the things that we've done a lot internally is working on our own evaluations. This is a really critical thing for anyone who's trying to build real systems. You have to get really into the weeds of what does it mean for the system to be right. We've actually taken all of the open source NLP benchmarks and made our own internal versions of these systems to make sure that they're not contaminated by the training data and to make sure that the questions are actually correct. So one of the things that we'll have coming out in not too distant future actually is I think hopefully being able to contribute back some of that evaluation work that we've done of cleaning up these existing benchmarks. But we also have a bunch of our own internal ones as well. And I think it's kind of critical for anyone making these systems to make them yourself by hand, at least like 100.

look at them is this the right answer okay what did it get okay is that right like getting to a place where as humans you agree on this you're getting a machine system to calibrate well to this then you're checking like okay are the things that we're getting as inputs in production like are they from the same distribution like does this test actually make sense for this they're not drifting like if you have adversarial systems like fraud or something much much more typical if you have something where you're getting the same kind of a query every time then it can be possible to get something where you can trust it enough to say like oh okay cool this is getting us 99 that's acceptable we have some you know guardrails here we can check how well it's doing over time we have people looking at these auditing some of them that's kind of the way to make this really useful as you have to be really getting into the weeds and into the details of how do we evaluate this, what does success look like, et cetera. And for the use cases out there, the most successful use cases that you've seen, I don't know if you have good examples of those either internally or externally, but when you think of those, I like what you're saying about digging into the details. I'm wondering also how much sort of specific domain expertise is actually factoring into how you handle those details. So if you're building an agent to help people.

process data in a healthcare scenario or data in a financial services scenario or in a coding assistance scenario. There's kind of this view, like if I just download Langchain, if I go and kind of have the zero shot approach, right, where this agent might be expected to do anything. My impression is that the most successful agentic type of workflows out there so far have been very much driven by people with high degrees of domain expertise in an area that are able to work through those details. Is that impression correct? Do you have any thoughts on that? Yeah, that seems pretty much right. I think there's...

There's this promise of AI that someday you'll be able to just ask it to do anything. And the interface sort of affords that. It looks like, oh, there's this text box. I can just ask it to do whatever. And it will give me back a response. And wow, it even sounds so confident and so correct. Wow, that's great. This can do anything. Maybe it even succeeded at that case. One example that I love from a little while ago was we were trying to see how well existing LLMs would do at detecting bugs. And so we had asked. The first thing that I did was I looked, OK, is there a bug on this line? I found a function that had a bug. I was asked. I was like, yes, there's a bug on this line. It's like, oh, wow, that's so good at this. I was like, wait a second.

How about this other line that definitely does not have a bug? Oh, yeah, there's a bug on this line. This doesn't work. Wait, wait, wait. You're just always saying yes. Like, this is not quite right. So yeah, it seems to like promise that. But you have to really dig into the detail, use few shot examples and retrieval and all these other kinds of techniques to kind of like get into the weeds. And the more domain expertise that you can bring to bear, the dramatically better I think the outcome is going to be. So Josh, I'm really intrigued by sort of the statement on what you put online in terms of Imbuse thinking about building robust foundation for AI agents as being a full stack approach. I like that because it sort of reminds me, I don't know, Chris, if you remember.

quite a while ago when we were still talking about data science. I guess data science is still a thing, but we were talking about it a lot more years ago. And there was this, I think it came up a few times, like this discussion about being a full stack data scientist. And oftentimes those are the most productive where you have an understanding of how data pre-processing happens and building your application, how the model is embedded in software and deployed and all of this stuff. And so I love that sort of thinking in that respect. And I'm wondering from MBU's perspective, how you think about taking a full stack approach when it comes to agents.

Yeah, we take it, I think, to a slightly more extreme degree than most people in that we do everything from setting up our own hardware, building our own infrastructure, pre-training, fine-tuning, RL, evaluations, data generation, cleaning, UI, user experience, the whole thing. And the thinking there is that at each one of these places, you can tweak some things to make the overall thing work better together. So you can change the training data that you've used in your system in order to make it more like the kind of thing that you actually need for your product. And then in RL, you can set objectives that are related to the things your user actually cares about. And then on the UI, you can use the capabilities you have to help highlight places where this particular system fails.

Right. So I think we're really interested in kind of the full stack approach and the ability to like tweak things at each one of these levels. And for us, it comes from our like history as a research company. One thing that we've always really focused on is being able to like deeply understand the technologies that we're working with us. So for us, you know, pre-training, fine tuning, doing RL, it's not just a black box. Like we want to open these things up and understand like what's actually happening inside of there. We have a paper club, you know, every Friday where we're looking at like the state of the art stuff that's coming out, reading through this and trying to like really understand what are neural networks really learning? Like how is this language model actually learning? Where does it fail? There are really interesting papers, you know, that show.

particular logic puzzles where this thing doesn't work. And it's like, oh, okay, it's not really doing logic. It's not really doing addition. It's doing this other thing. But if you, you know, if you tweak it in this way, like, oh, now you can get it to learn like a simpler form of addition that is more general. Oh, okay. That's really interesting. Right. So what is a transformer really good at learning? Like what things in the data actually matter and how do you evaluate these things as well as another thing that, uh, you know, we've also thought about a lot, like one of the things that we set up that has been super useful is looking at the.

not just the accuracy of our systems but the perplexity on multiple choice question answering data sets specifically not perplexity over all the tokens but perplexity specifically for the multiple choice question answering things this gives you a much more fine-grained uh understanding of like is this actually being right or not gives you a really precise metric for this and this idea came from a paper which was about you know i think something like um our emergent properties of language models and mirage or something like that was the title of the paper their point was like you know a year or two ago people were like oh look like these language models have these like emergent behaviors like they're suddenly learning to reason or whatever it's like oh wow they're like suddenly getting so smart but when you really dig into it it turns out And if you look at their performance on a log scale, it's linear. So what was really happening is just our metric was not very good, right? We weren't really asking the right questions. We weren't deeply understanding what was happening. It was just always in a log scale, just always getting better. And you just couldn't see it in the metric. And so for us, this is a good example. You want to deeply understand what's going on here. We don't want to just treat these as magical entities, but rather they're just technologies. They're just really bags of features at the end of the day that we can use to do actual work in the real world. And so I think that's kind of our approach is to take the full stack approach, understand everything from like, OK, how does the InfiniBand network work? How does that fit into our performance optimizations? How does the data work? How does the network work? How are all these things adding up?

to give us some final error, some final user experience. That's really good. You're kind of really fascinating me with that statement. So many people do take kind of that black box approach and they don't necessarily have that kind of research first orientation that you're describing. As a company, as a business, how does that research orientation where you are rejecting the black box perspective and saying, we're going to open it up, we're going to tinker, we're going to understand the specifics of how small changes affect that. How does that affect how you approach this compared to whoever you would perceive as your competition or something? What does it mean for you as a company to take that kind of research first approach?

Yeah, I think there are trade-offs to it. One trade-off is that, you know, it takes a little bit more time and effort to do this, to like really deeply understand things rather than just like hack it together and throw it out there. But I think the benefit is in the long term, like when we do really deeply understand these systems, it makes it a lot easier to make modifications and to make changes and to know how to improve things. These systems are very expensive to train. Like there's a lot of effort that goes into this and it can be very expensive to like just try a whole bunch of things and like if you don't really know what you're doing, it's easy to waste a lot of time.

And so I think for us, we would rather take a step back and say, okay, what's actually going on here? Can we make robust systems? Can we make robust baselines? Can we get this working in a way that we can trust our results, that we can understand what's going on and build on top of those? Another thing that we've built internally that has been really useful along these lines is carbs, is cost-aware Pareto region Bayesian search or something like that. But basically, it's a hyperparameter tuner that is cost-aware. So we can take any system that we have and say, hey, you have all these 10 or 20 different hyperparameters, these different knobs you can fiddle. I have a system that works, but how do I make it way better?

We can take this, just throw it in there, come back the next day. And it's tried hundreds of experiments at different scales. So it tries at a really small scale and it's like, okay, for a really small scale, like this is the best way to do it. And as we get higher and higher and spend more and more time and resources and money on it, like this is kind of how these hyper parameters change, how things change as we scale. And just understanding that like there are these scaling laws, there are scaling laws for different parameters. Like how can you back those out and learn for any given architecture, any given problem, having an automated system to do this allows us to kind of like quickly develop this and took some time to make the system, right? But it like really pays off to have that kind of deep understanding of the systems that we're working with. So I think for us, it's kind of like taking a long-term view. I think in the long term, it's much better to actually understand what's going on.

And it does take a little bit of upfront work. That's why we don't necessarily have a product yet. We're working on it. I think we'll get there. And I have confidence that we'll get something really cool, but it does take a little bit longer. And that's okay. I think we'll end up with something much cooler as a result. As someone who's working both on the, like all the way up the stack, even up to interfaces and all of that, but you're also training these foundation models, certainly the sort of...

both the market and the technology and the options around foundation models have just sort of blossomed and these have proliferated over the past year, especially. What's it been like internally? We've had a couple of people on the show and I find this interesting, like from the perspective of someone inside a company that is training their own foundation models, how do you... go about maintaining focus within this sort of environment where eventually you're going to have to spend a significant amount of time, you know, investing in a model, specific model architecture, specific data sets, that sort of thing. But, you know, things are shifting all the time. You mentioned reading, you know, papers and trying to keep up. But yeah, how do you maintain that focus? And what's sort of life like in the midst of being a foundation model builder in May of 2024?

Yeah, I would not necessarily characterize this as a foundation model builder. And that part of what we do is train models. But that's not the only thing that we do. Yeah. And the reason that we do it is not necessarily to make, you know, the biggest, bestest foundation model ever. Like, I think there's, you know, a lot of money going into other companies spending huge amounts on these. And general purpose. On general purpose versions of these systems. And I think for us, the more interesting thing is, can we make them more specialized ones? Can we take these? Can we adapt them? Can we make them more specialized? Can we find ways to have them work together, to pull different things together and make a model that's kind of better at doing that, that sort of synthesis and kind of like.

pulling these things together, and better at the particular tasks that we care about. We've seen really good results from this. We'll have some blog posts in the next few weeks about this. But I think we've seen some really good results on much, much smaller models. And so I think if you look at DeepSeek Coder, for example, I think that model still significantly outperforms Lama, a model that's the same size, and even of much larger models. And this is because it's really trained on a lot of code. And so to generate code is something it's very familiar with, as opposed to being a pretty small part of its distribution, right?

I think, again, this comes back to the fundamental understanding part. Because we know these are just bags of features, yes, having a bigger bag of features is definitely better, but then your inference time goes up as well. And if you want better bags of features, you need to give a good data. The really important thing here is the quality of data that you're giving it, less so the absolutely massive size, I think, for practical uses. So our focus is, can we make these really specialized and very useful for ourselves for our own purposes? I think we're pretty happy to see people out there competing, making better technologies, driving the cost of these things down, making huge context windows.

giving them away for free in many cases, you know, that's great. Like we're happy to see more competition there because I think that part that we're more interested in is how do we actually use these things at the end of the day and put it all together to be really useful. I love that you mentioned DeepSeq. That's a favorite of ours as well at PredictionGuard and generating SQL to do data analysis and code and in our chat interface. Yeah, we love that. And so, yeah, I totally agree. There's a lot that can be done with that sort of thinking. You also mentioned you're in your work kind of more of that. And I do want to get to kind of more of the front end interface side. But before we get there, you mentioned kind of pursuing.

fundamental laws behind deep learning in order to, again, understand and create this foundation for the agents that you're building. What have been some of the things that you pursued in that area as kind of theoretical underpinnings for this progression towards robust agents? There's a bunch of things that are still in progress that I can't speak to directly, but we're definitely interested in, say, how do you initialize things properly? Like the UP work by Greg Yang, et cetera. We have one of our researchers collaborated with his and working on kind of understanding exactly.

what the right way is to parameterize these language models in a theoretical sense but for a practical reason so if theoretically like this is the right way to parameterize them then the practical implication is like you no longer need to tune the learning rate as you scale them up this is super helpful because that's like one of the key factors and so to remove some of these hyper parameters makes it much more efficient to kind of explore the space right so that's like an example a very concrete simple example of like a place where sort of the theoretical understanding can help you other places where this can help are not as easy to point at like the exact theory and sort of more informed by that or more like physics like physics didn't start with like perfect theories of everything right we sort of like kind of did some experiments and had a more experimental understanding of the world before we had perfect theory about why everything worked i think we're at that phase with machine learning as well and so there's some interesting work by one of our researchers uh jamie simon who on kind of like what's actually happening in the fundamentals like when we're when we're learning things like there's this notion from one of his papers about learnability like a network of a fixed size can only learn so many things and it's like very precise or we've had another paper about like self-supervised learning where you can see like oh there's this sort of like stepwise nature as it learns like each piece of the thing so each of these little like theoretical things is telling you something about how they work we don't have a full picture and the real ones are like quite complicated and a little bit more complicated than these smaller examples but each piece is giving you like

a sense for what's going on and allowing you to like operate in this space without having to like guess and check quite so much it's not as much of a black box it's more like a machine where you don't know the exact internals but you know like don't make it too hot or it'll explode right like don't make your learning rate too high it's not going to work right so you can see not just learning rate but other sorts of precursors earlier like you can look at various like norms or other quantities to understand like is this like you know getting too large is this growing large over time is this something that's actually too small like we want to you know we can actually up the learning rate later or do we need to apply more regularization of a particular type like you can kind of get a sense for these things even if we don't have kind of perfect laws yet We also get some laws out of, like, the CARB hyperparameter optimizer that I mentioned before. We can see things like, how do these parameters change with a scale? And understand, like, you know, not just how do the learning rate and data and parameters change, but how do very specific hyperparameters change? Like, what is the depth versus width that you should have? Like, for this particular type of regularization, like, how much exactly should you have? And how is that changing? And that goes back and kind of informs, like, okay, like, what is actually happening under here? Like, it's weird that, like, this particular trend holds over scale. Like, it seems like it needs less and less of this. Like, that's kind of interesting. Why is that? And sometimes we'll see a paper that's like, oh, that fits in. I see what's going on there. That's nice.

So we're getting more and more. I think collectively, as a machine learning community, we're also starting to understand these things a lot more. I think when people point at neural networks or language models as like BlackBots, it's like, oh, nobody understands. I think that's quite a mischaracterization of it. There are a lot of people that have a lot of very good ideas about how these things work. And nobody on this call probably knows exactly how a car works. And I don't think you can make a car from scratch. I certainly couldn't. There are especially modern cars that are quite complicated. But we can use cars to go wherever we need. And we roughly know how they work. So it would be weird to say, oh, we don't know how cars work. I think machine learning and neural networks are a lot more like that than most people kind of put us credit for.

What's up friends? Is your code getting dragged down by joins and long query times? The problem might be your database. Try simplifying the complex with graphs. A graph database lets you model data the way it looks in the real world instead of forcing it into rows and columns. Stop asking relational databases to do more than what they were made for. Graphs work well for use cases with lots of data connections like supply chain, fraud detection, real-time analytics, and generative AI. With Neo4j, you can code in your favorite programming language and against any driver. Plus, it's easy to integrate into your tech stack. People are solving some of the world's biggest problems with graphs. Now it's your turn. Visit Neo4j.com slash developer to get started. Again, Neo4j.com slash developer. That's N-E-

So Josh, going into the break, you had a really good analogy there about the fact that, you know, the sophistication of cars, it means that while we all use them all the time, we may not understand every aspect of them. And I wanted to go back for a moment because I've been kind of percolating on some of the things that you said earlier. And you've been talking about kind of the trust and robust systems and all. But I was wondering, I know in my own life, I'm very involved in the trustworthiness of models. And you talked a bit about, you know, getting good outcomes and being able to detect that.

Do you have any guidance on what it means to engineer trust into model training? So many organizations that I've seen kind of tag the trustworthiness of models on at the end as though, oh yes, we have to do that too. And you have such an insightful and deep way of approaching the engineering, rejecting the black box approach. Any guidance you have on how you engineer trust in it from up front so that as you get through the training life cycle, you come out with something that kind of you have a high degree of confidence is what you're intending it to be. I think a lot of people are trying to do this and there is good work to be done there and you can do things to improve the models and make them more trustworthy and during training. And that's great. But I think by far the largest place that we should be focusing is actually after training. We don't trust people because like, oh, I looked at their schooling and like, you know, they seem real trustworthy up to this point. Like I'm gonna give them my credit card and I'm gonna give them my bank account. Like, no, you know, we're gonna be like looking like, what is this person doing? You know, okay, we're gonna be checking things afterwards. Like, you know, there's a lot of other stuff that needs to happen post training and in deployment where we can actually trust things. So I think for me, it's actually a lot more about like what is happening.

when you're actually using the model, like what kind of auditing or real-time verification or user interaction or other sorts of checks or things that you have. Can you have other systems that are checking the behavior of this? Like for an agent, maybe you'd want to predict, like, is this action potentially going to have a negative consequences? Or is this going to be potentially dangerous? Or will this be something that the user might not want? And those seem like good things to have as totally separate systems that are completely unrelated to the development of your original model. You would not want the original model to be responsible or connected to this at all. You'd want to have a totally separate thing that's looking at this, right? And so I think trust is better thought of as like a set of different types of data that can give you confidence that things are...

going well that have gone well and will continue to go well. And so you can only get so much trust up ahead by kind of designing the system in a particular way. And you have to understand, like, what is that model good at? What distribution was it trained on? Have we shifted from that distribution? Have we shifted from the task that it's good at? How well has it done over time? Is it likely to go wrong in this new example? So I think it's more of a post-training, more of a practical kind of a problem. And the idea that we could solve this all by making safer, trustworthy models is a little bit, it's going to be difficult to succeed at that task.

Maybe this ties into the trust element, certainly the kind of collaborative approach with agents, but you do talk also a lot about some of the thinking that you're doing around interfaces as well. And it sounds like you've also been utilizing or trying to utilize some of what you're developing internally for coding and other things. So what are you thinking about in terms of interfaces and kind of how are you dogfooding some of those things internally to kind of learn about interfaces beyond the kind of AI chat interfaces that we're all familiar with? Yeah. So I think.

The learning internally from using our own kind of prototypes and internal, you know, products and demos has been, there's been quite a lot of that. Like, without actually using it, it's hard to kind of get this learning about like, okay, you know, is this trustworthy or not? Or like, does this actually work? Like, what UI do I want to use for this? I think when I, you know, I made some prototype, it generates a bunch of code. And very quickly, I started to realize like, hmm, that's great. But like, it's really annoying to review this much code, right? I see a lot of products out there that are like, oh, look, it'll like make a PR for you. Yeah, I mean, how fun is it to review a PR of, you know, a few hundred lines if there's like a few lines that are wrong? You have to like search through for this bug. It doesn't really tell you anything about where it is. Like, this is just a really awful user experience.

And so I think instead, if we approach it from the perspective of like, okay, what do I want as the user here? What I want is for this to be pretty interactive and for this to tell me like, okay, maybe there is a bug here. Or yeah, you asked me to make this PR, but like your ask was like kind of ambiguous and I needed to make some assumptions. Here's the assumptions I made. Like here's how confident I am. Do you want to change them? Yes, I do. Okay. Like once it's more interactive, once you're going back and forth with the user and trying to flag places of ambiguity, uncertainty, risk, et cetera, to the extent that you can be correct about those, it can make the user experience feel a lot better.

Any anecdotes from your own sort of internal experiences with these or things that you've tried either on the positive or negative side? One thing that I really like about Copilot, just as an example, is that it keeps it short, right? So it's easy to review. I think when Copilot style things make these huge like generations, that's why they normally don't because it's kind of hard to review it and to trust it and to like do that. But I'm imagining that people are probably going to get to a world where they realize like, oh, okay, this is kind of annoying. Maybe you could point out, you know, places where there are potential bugs. Like, can you just tell me what lines like seem like the most suspect? So we, for example, made some, you know, like internal error checkers and linters that will sort of highlight like.

okay yeah you know this thing's not even important like your editor does this for you right you can also highlight things like hey this spec doesn't look like it was actually properly implemented here or this function specification is like kind of ambiguous for these edge cases like do you want to take a look at that a lot of the work that we've done uh for our evaluations is related to this as well so when we look at evaluation data most of the time when systems fail it's actually from like under specification and not from oh the model like messing it up fundamentally it's more like as a user i didn't really decide what i wanted i think one thing that's really interesting to me is that coding is not really about like pure correctness in this abstract mathematical form where there's a perfectly correct version of this. The version of the function that you want and that I want are actually subtly different. And what I want in a moment might change from moment to moment as well. And so the user really needs to be connected to that. And as it happens, I also learn about things where I'm like, hmm, yes, you did exactly what I wanted. But that turned out to be not a good idea. And so I think the user needs to be there and able to learn and refine what they even want and what's even possible in the world.

You pick my interest in there. As a coder myself who makes all sorts of errors in my code constantly, as you're doing that and you're kind of changing the workflow over time of how the coder is spending their time and then ultimately potentially how they're thinking about coding as they adjust to the new approach that your tools are doing, how does that look for the coder going forward in terms of how does it change their day-to-day experience of coding? Are you able to rescue me from spending 90% of my time coding errors and forever trying to get myself back out of that hole? That's really the vision for MBU and for the company and for the work that we're doing is can we get to a place where people, not just coders, but other even non-technical people can effectively write higher level pseudocode or code or intent and actually have this translated into real code, into something that actually makes your computer do what you want. That's why when we're talking about making a new personal computer, et cetera, we're really, at the end of the day, the thing that is missing is the ability to robustly write the software. And we can, as software engineers, get down to the details and get everything there. We spend a lot of time fixing our own bugs, et cetera. And our goal is to make it so that...

As a user, you can keep working at a higher and higher level abstraction and feel confident in that. Right now, you can work at a super high level abstraction to say, like, make this whole thing for me. It doesn't work. And so it's not very fun because it's busted. And now you, like, how do you get into the details, et cetera. So how can you make it robust enough so that you can work at a higher level abstraction and trust that this part was actually correct and be able to have that dialogue back and forth when, like, OK, maybe it's not quite working like I wanted or maybe it's not possible to do this thing or not as easy to do it in the way that I wanted to do it, et cetera. So how do you have a dialogue and help educate the person about what is possible, what isn't working, what might not be working, where they should begin? So it changes the workflow. And I think we're interested in how you change this workflow in a slightly more incremental way.

You could just say, oh, we're going to have the AI system do everything for you and magically try and figure it out. But I think from our previous experience, we don't think that these types of products are nearly as good to use as a user experience. Trying to fully automate something is disempowering to people and also results in a worse experience and a worse product. So we're more interested in this interactive dialogue tool that as a person, I'm trying. Maybe you can just write a line of pseudocode. You get a big block out. It tells you one line that is potentially problematic for you to look at. Or maybe it just gets it right. OK, great. You move on to the next one. So that's one way that you can think about writing code is writing a pseudocode. But there's other ways you could write it. You might also write a command like,

you know, change the file to add lots of block statements. Or you might also, you know, say, like, make this function more robust. Or there's, like, lots of different ways that you can interact with this. And how can we give people more tools, more, like, paintbrushes for being able to change code and ultimately, like, make their computer do what they want? I think the thing that's really exciting about this is that when you can robustly write software, what you're really doing is being able to create agents that can do a huge swath of tasks. If you're not able to write robust software, then the only way your agent can interact with your computer is with things that we have already programmed as actions. Like, okay, we programmed it to go to a website and, like, click a button, that's it.

But if I can write software, now I can do some huge set of things and even things that you never intended or programmed in the first place. So for us, like agents and writing code and reasoning are all like intimately connected. I have one more tiny follow up to that. It's a personal thing I run into all the time and having someone with your expertise, I want to throw it at you. Does it make a difference? Is most software developers, including people in the AI space doing models and stuff, you know, they write in Python, they write in usually a variety of different languages. And as I shift from one to the other, I find that.

some of the capabilities that are currently out there, they're great on Python because everyone on the planet's writing Python. But if I'm writing on something that's slightly more obscure, maybe even something big like Rust, it struggles to do the exact same thing that it can do flawlessly on the Python side. Do you anticipate a time where that context shifting no longer applies very well and that they're all high fidelity in terms of what they can do? Are we always going to... be dogged a bit with the obscurity issue of certain languages. It might go the other way. It might be that because it's so much more robust in Python, we should only ever write in Python. And so what we do is we just write in Python and we make a Python to Rust converter or we make a thing that assembles Python to assembly or whatever. It might be that it's sort of better to double down on a really small set of things that we've made tons of data for and works really robustly because you get a better user experience. One of the things that a lot of these models struggle with now is you have different versions of NumPy or Python or Ubuntu or whatever.

Things are different. How is it supposed to know what version you're using, right? And so there's this combinatoric explosion of complexity that comes from all these different possibilities. And so an alternative way to do this would be to say, you know what? Let's not do that. Let's just say you got a 22204. You got this library version. You got that one. If you do this, I think it might work a lot better. So it could go actually in the other direction. Instead of it making it more robust on all these niche things, we might say, you know what? Just all work at that level. Let's not worry about what language it writes. Maybe we only write at this higher level. We never even look at that code anymore. So we don't care if it's in Rust or Python. I think once that happens, once we sort of abstract it up a level, then you might be able to come back and say, why are we writing this in Python? This is not a type-safe language. This is really slow

why don't we change it to like be a language that fits better for language models? And that might be an even better future thing, but that will require generating a ton of data to make this actually work. So I see that as like a, maybe probably a future thing, not a thing to focus on right now, but that's my guess as to how it'll evolve. But also an alternative world would be, you know what, it gets really cheap to just generate all this data. So we just make a converter from all of our Python pre-training data to just make it do it in JavaScript and Rust and Elixir and whatever all the time anyway. So fine. We just like training to be good on all these. I don't know. We'll see which way it goes. Yeah, well.

Chris will be happy if anything stays in REST, I'm sure. I wasn't saying that. You'll be happy. We just started working on our official REST client for PredictionGuard, Chris, so you can be a beta user. There you go. It's been great to talk through. Again, I love this concept of the sort of full stack approach that you're taking.

and triggering things in my own mind to think through in my own work. But as you look forward, either you personally or you at Imbue look forward to kind of the things that are happening this year, either in the community as a whole or at Imbue, what's kind of most exciting for you that you see as a possibility kind of coming into the future, whether that be multimodal stuff or new types of agents or products or directions that the community is going or the research is going? What kind of stands out to you about that as you look to the future? I think. The thing that is going to be most exciting over the next year or two, at least for us internally and probably for other providers externally, I think we're going to make really good progress on what we have been talking about today on actually reasoning, on robustness. Like I think once you can get to a place where you ask this question and you get back an answer that is really correct and like robust and grounded, it's not just, oh, it said yes, but like it has all the right reasons. And it kind of like understands the nuance of like, okay, yeah, it's like yes-ish, but like there's like a little bit of complexity here. You can ask follow-up questions and those are also right and robust. Like that ability to robustly...

reason and answer questions is going to unlock some huge amount of work that I think people are not really anticipating. Like once we really have the ability to robustly reason through scenarios, now we're talking about a lot more like labor displacement and disruption than we were before. There's a lot of jobs that like all of us like can pretty easily put together like, well, first I do this, then I do that, then I think about this. Like, okay, it only takes like one person to do that when you have these tools that are that powerful. So I think there's going to be a lot more change in this area than people are really expecting right now. You know, it's not to say that all jobs disappear or something, but the nature of work might change pretty dramatically and we might have like much more powerful tools than I think people are anticipating.

Great. Yeah, well, we're really happy that Imbue is thinking deeply about those things as we look to the future and at a really practical and useful way as we look forward. So thank you for doing that. Thank you for your research and for taking time to join us. This has been great. Yeah, it's been great. Thanks a bunch, guys.

All right, that is Practical AI for this week. Subscribe now. If you haven't already, head to practicalai.fm for all the ways. And join our free Slack team where you can hang out with Daniel, Chris, and the entire Changelog community. Sign up today at practicalai.fm slash community. Thanks again to our partners at fly.io, to our Beat Freaking residents, Breakmaster Cylinder, and to you for listening. We appreciate you spending time with us. That's all for now. We'll talk to you again next time.

Frequently asked questions

How long is this episode of Practical AI?

This episode is 47 minutes long.

When was this Practical AI episode published?

This episode was published on May 15, 2024.

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this Practical AI episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.