Latest / Agentic Conversations (formally mlops.community) / The Real E2E RAG Stack // Sam Bean, Rewind AI // #217
Transcript
- 0:00I'm Sam Bean. I work at Rewind AI and Applied
- 0:05AI and take my coffee black with a lot of caffeine in it.
- 0:11What is up? Good people of the Internet,
- 0:14welcome back to the ML OPS Community Podcast.
- 0:16I am your host Dimitri Ose and today what a conversation with
- 0:22Sam. Wow, coming away from this
- 0:25having goosebumps. I don't say this all the time,
- 0:28but when I do say it, hopefully you take me seriously.
- 0:32This is a conversation that I would recommend to everyone.
- 0:37Sam has had experience dealing with LM's since before they were
- 0:42cool and building systems insearch and with LMS since
- 0:49before the whole chat debt craze.
- 0:51And he talked about some of his huge learnings, this collection
- 0:55of learnings that he's had. And oftentimes what he mentioned
- 0:59is there are simple things that you can do to help you progress
- 1:06your LLM systems. He worked at U Com, he's now
- 1:10working at Rewind. We get into all of that.
- 1:13But really, I think the key mode of the key factor that I'm going
- 1:19to take away from this is when he talked about overcomplicating
- 1:24your LLM systems for no good reason and how we can all fall
- 1:30into that trap for some reason or another.
- 1:33And then you don't recognise what metrics are crucial and you
- 1:39don't know how to read your metrics if your system is too
- 1:42complicated from the get go. So he walked us through how to
- 1:47build from 1:00 piece of the puzzle to the next and make sure
- 1:54that you're able to get those metrics and understand and
- 1:58interpret those metrics very well before you decide to add
- 2:04any new pieces to your system. I think this is a little
- 2:08different than the talk that I've been hearing.
- 2:13Quite a bit of it. It's very easy to say, OK, we
- 2:16need everything. Now we need to make this the
- 2:20most robust system possible because these LM could go off
- 2:24the rails and we got to make sure that we are following the
- 2:29most up to date system design that I've seen on LinkedIn or on
- 2:35Twitter. And Sam is not about that at
- 2:38all. He is very pragmatic in the way
- 2:42that he does things and he is down to the metrics, making sure
- 2:46that before you do anything, exhaust the simple stuff,
- 2:53exhaust your ability to get very far with what you have and
- 2:59really crush the metrics that you have.
- 3:01And once you can't go any further with those metrics, then
- 3:04bring on more. Seems simple.
- 3:08For some reason it's not so easy to do in practise.
- 3:13We like to over engineer things and that's just I think in our
- 3:17nature. So enjoy this conversation with
- 3:20Sam and if you liked it, as always would mean the world to
- 3:25me. If you tell one friend or leave
- 3:28us a review, leave us some stars.
- 3:31We've got almost 120 stars now on Spotify.
- 3:35That's incredible to see. I am appreciative of every
- 3:41single one of you that are listening and I thought I would
- 3:43say it before we get into this conversation. only one place
- 3:54that we can start, and that is with the story behind your
- 3:59competitive pinball playing. Ohh, yes, of course.
- 4:04You want to start there? So yeah.
- 4:08So people don't know I'm a competitive pinball player,
- 4:10actually in my weekly league tonight I'm gonna go competing.
- 4:13I'm playing for a trophy. I'd a friend of mine, Jack, who
- 4:19I went to computer science university with at University of
- 4:23Michigan, and out of out of school he went and he went and
- 4:27programmed pinball machines. He wrote game code for Stern
- 4:31Pinball, which is one of the manufacturing companies out of
- 4:34Chicago. And he wrote game code for, I
- 4:37think the likes of Mustang World Poker Tour and some stuff on the
- 4:41Game of Thrones. And you know, he was, you know,
- 4:45playing coding. He was like living and breathing
- 4:48this stuff. And it just kind of like got
- 4:50into our friend group was like, hey, this is something we can
- 4:52kind of go do. And I'm a competitor.
- 4:55And so it went from fun thing to do with my friends to
- 4:58competitive thing that I can find people to, you know, go
- 5:02play against. And if I ever find something
- 5:04like that, I I can't help myself.
- 5:07What does it mean to code Pinball?
- 5:10Because I thought it was just the ball goes and bounces off of
- 5:14shit. Is it that you're deciding how
- 5:17many points you get when it bounces off of things?
- 5:20Yeah. So I think it's it's it's easy
- 5:22to think of it as kind of like a strips down traditional game,
- 5:27similar game mechanics. Like it's mostly like a state
- 5:30management system that's like, hey this is the current state,
- 5:34this is the next input switch. The ball is mostly rolling over
- 5:39switches or heading targets and that like creates more inputs
- 5:43for the basically state machine to figure out which state to go
- 5:47to next. The only interesting thing is
- 5:49that the inputs are physical. It's a ball rolling over a
- 5:53switch, or it's hitting a target or a pop bumper or something
- 5:58like that versus virtual inputs or inputs from like a PS5
- 6:04controller. The inputs are coming from a
- 6:07ball rolling around on a wooden field.
- 6:08It's it's interesting, but past that, the input source, it's
- 6:12mostly like your traditional game engine.
- 6:17So where do you find these pinball arcades?
- 6:20Or did you buy your own? Or did your buddy vision?
- 6:24Yeah, so I've got a few that I practise on.
- 6:26Those are the ones that if you want to have a bad time playing
- 6:29pinball and come play in my basement throughout the Dojo, My
- 6:33machines are set up to make you a better pinball player.
- 6:36And they are not so much set up to have fun playing.
- 6:39So they're mostly set up to not have fun playing.
- 6:43They're they're extremely difficult.
- 6:44They're very fast. You can lose the ball very
- 6:48easily because of the way that I've removed certain physical
- 6:51objects that usually would impede the ball leaving the
- 6:54playfield. Those posts are all gone.
- 6:57It's brutal, but if you wanna get a pen ball, I got I got the
- 7:03collection for you. Yep, that is it.
- 7:06This is a really cool hobby, and this is a first that I'm hearing
- 7:09anybody on this podcast talk about, so I like digging into
- 7:12it. I had to when I saw that that
- 7:14was possibility there and so you've had quite the experiences
- 7:22dealing with ML OPS and particularly LLM's.
- 7:26And I want to go through your journey a bit because you've
- 7:30worked at u.com, you are currently working at rewind, and
- 7:35I think there's something interesting in and about this
- 7:38space of dealing with search and dealing with large language
- 7:43models that it feels like interests you and maybe you can
- 7:47breakdown what gets you excited and why.
- 7:51How did you decide to start working on these MLM's at such a
- 7:57time where it was like before the hype almost?
- 8:00Yeah, yeah. So.
- 8:02My journey with ML OPS I think really starts at really starts
- 8:07at stock X doing things like simple drift detection,
- 8:11retraining routines based on performance degradation like
- 8:16you're like standard initial MVP.
- 8:20I'm all up setup. I think that going from like a
- 8:25forecasting problem domain, which is a pretty simple just
- 8:30you know each point has a feature set and then you're
- 8:35mostly just creating cross features or better feature
- 8:38representations and then you're putting that through a big, you
- 8:41know decision tree. I think the complexity with
- 8:46observing these systems increases a lot when you move to
- 8:50search. I think that there's a lot of
- 8:52different failure modes for search.
- 8:55And also search is one of those really, really special problems
- 8:58where you're never actually going.
- 9:01There's going to be questions that there are no right answers
- 9:04to in the world, right? That's impossible to get right
- 9:07because it's either someone's asking something that doesn't
- 9:09exist, it doesn't make sense, or a variety of other reasons.
- 9:14And then there's questions where there could be millions of right
- 9:18answers. Any of a million web pages could
- 9:20be served to this user and any of them will solve their query.
- 9:23And then there's a tonne that is in the middle.
- 9:26Most of it's in the middle. And so search is one of those
- 9:28problems where you're never really quite 100% sure if you're
- 9:33doing it right without the behavioural data.
- 9:36And behavioural data is so expensive to go out and get via
- 9:40AB testing or, you know, user surveys or however you're going
- 9:45to go. Get real people's feedback on
- 9:48your software that is just so expensive to get.
- 9:52And so it feels like the machine learning operations just
- 9:58paradigm and that tool set, the importance is amplified in
- 10:02search and in looms, I think because of the ambiguity that is
- 10:09just inherent to those systems. I think that they can handle
- 10:12more ambiguous problems and inputs and can do more for the
- 10:15user. But because of that ambiguity
- 10:18and because of those capabilities, I think they're
- 10:20more challenging to monitor and to create like really robust
- 10:24life cycles around those systems.
- 10:27So it made sense to like, take those skills and level them up
- 10:29in the search. Spaceandyou.com was like the
- 10:31perfect place to do that. And so it went from being at
- 10:36stock X, working on more, as you mentioned, more traditional mill
- 10:41we could say. And that's not without its
- 10:44problems. That's not without its
- 10:45difficulties, right. And then you jump into search
- 10:48and there's so many more neurons as you're mentioning.
- 10:52Just thinking about how many right answers there can be for
- 10:56certain questions or how there could be no answer for certain
- 11:00questions, and how you make sure that when you're serving up
- 11:04these results they're hitting on the most relevant topics is such
- 11:10a fascinating problem and it almost is like.
- 11:13I think one thing for me with search, which is really hard to
- 11:17think about, is like most of the time when we think about search,
- 11:24nine times out of 10 it's like, ohh, but that's a solved
- 11:27problem, right? That was like the 90s with
- 11:30Google. Didn't they figure that out
- 11:32already? You know the that's all done.
- 11:35How is it still a difficult problem?
- 11:37And I imagine you were in the weeds figuring out day in day
- 11:41out what you're doing with search.
- 11:43But then also adding LM's to the mix makes it even more fun.
- 11:48It does. I think it actually, yeah.
- 11:52I think it actually makes the problem simpler and harder at
- 11:56the same time. It's one of those kind of you
- 11:59have another. The thing about search is there
- 12:02isn't like a model, you know, like I've got my search model.
- 12:05Search systems are usually comprised of multiple models,
- 12:07right? You have an intent detection
- 12:09model, a query rewriting model, You have your actual like
- 12:13retrieval models. If you're using semantic search,
- 12:15you have ranking models. You may have filtering models to
- 12:18remove irrelevant result, like you're talking about 5 to 10
- 12:23models to run a search system and then you add on top of that
- 12:27and LM and those are have their nuances and subtleties around
- 12:33around training and deploying. But what they kind of do is they
- 12:37kind of give you a lens to how the user is going to use these
- 12:43search results. And so while it might be really,
- 12:47really hard to figure out the right or wrong answer for a
- 12:50search query, it's actually significantly easier to figure
- 12:55out the right or wrong answer for just a question answer pair
- 12:57out of your traditional Squad V2 hotpot.
- 13:01Because they come with the right answer.
- 13:03And there is a you can guess this right, you can guess it
- 13:06wrong, there might be different versions of right or wrong, and
- 13:09we can totally get into all of that.
- 13:11But if you have this kind of end to end question answering set up
- 13:16at the very end of your pipeline and you have metrics for that,
- 13:19like how how many of these questions can I actually answer
- 13:22correctly with by Reg setup. Then you can actually start to
- 13:26work your way backwards towards the more dot dot dot sub models
- 13:33or subsystems within your search.
- 13:35And then you can figure out like, hey, if I tweak this a
- 13:37little bit, can I answer more? Does my LLM actually answer more
- 13:41questions right or wrong? That's a very easy thing to
- 13:44understand as a human being and to actually track your progress.
- 13:47And so yes, you have this new model, and yes, it has its own
- 13:51kind of special latency requirements, and it has
- 13:54streaming tokens, which is a different kind of paradigm than
- 13:57maybe some request response servers were equipped to handle.
- 14:02But at the same time, again, there's this lens that's exposed
- 14:06that kind of gives you this insight into the kind of the
- 14:10motivation of your search system, which I think is really
- 14:12powerful. And for people who aren't trying
- 14:16to tie those dots together, I think you're really missing out
- 14:20on an ability to give yourself a really good vantage point to
- 14:23kind of see get some some customer, some customer sympathy
- 14:30because you're actually like seeing the end result of what
- 14:33your search system is going to do.
- 14:35Will this actually help a person if it can help an answer
- 14:39questions better? You would expect it to be able
- 14:41to help a person answer questions better.
- 14:42And that's a really like being able to make progress on that is
- 14:45really rewarding and it kind of gives you a really good
- 14:48grounding to borrow that term from MLMS of how you're going to
- 14:53measure your progress. Very clean, very clear, easy to
- 14:58communicate. Yeah, that that I found to work
- 15:02really, really well. It's like if this information
- 15:06that I'm gathering is helping me understand my question, nine
- 15:11times out of 10, it's going to help the LM that you're feeding
- 15:14it to. Yeah, that that's a great
- 15:16insight. So the other thing that you've
- 15:19mentioned, and I don't want to skip over it too much before
- 15:22moving on, is how expensive it is to get human feedback and get
- 15:27like human. Almost like evaluation on this
- 15:32or just humans telling you anything.
- 15:36I know from a survey that we conduct in the Mill OPS
- 15:41community, there's thousands of people in the Mill OPS community
- 15:45ecosystem. You know, like I think we
- 15:47tallied it up and there's over like 6070 thousand people that
- 15:50have in one way shape or form interacted with the ML OPS
- 15:53community For the survey that we do, we get like 150 responses
- 15:59and I'm stoked. And so you're talking about how
- 16:03expensive it is and how like resource intensive it is to get
- 16:07that kind of information back from your users.
- 16:11O What are some workarounds that you've found that you don't have
- 16:15to almost lean on the goodwill of the users, so that you can
- 16:20still make sure that you're doing the right thing, but
- 16:23without having to ask for that goodwill?
- 16:27Yeah, I think it's a really. I think it's a really good
- 16:30question. I I don't know if there is a
- 16:35shortcut to get your first batch.
- 16:38I think the first batch of feedback is I don't think
- 16:44there's shortcuts around going and sourcing it from people
- 16:47rolling your sleeves up, talking to your users, talking to your
- 16:50customers and trying to put different answers in front of
- 16:57them for for the questions that they're trying to solve in their
- 17:00day-to-day lives. And just collecting, just
- 17:04directly collecting it, to your point, it's extremely expensive.
- 17:08And So what I think the methodology that I found worked
- 17:10really well is, is that you create this like it's, I almost
- 17:15think of how like a planet, your core is your human labelled
- 17:20data. That's like what's powering
- 17:21everything else. And again, there's no shortcuts
- 17:25around that. I will go into a spreadsheet and
- 17:28I will label my data. And so for some like this, the
- 17:32sad truth that people may or may not be trying to avoid is that
- 17:36you just gotta go start and talking about how like you can,
- 17:41you can kind of spin yourself out a little bit and talk
- 17:44yourself out of going and getting feedback.
- 17:47Because there's all this stuff around synthetic data, there's
- 17:50all these bootstrapping kind of self improving systems that are
- 17:54coming out. But I think going and getting an
- 17:58actual labelled data set for yourself, we can use like an
- 18:02intent detection system for as an example, just go in and
- 18:07getting 100 queries, 200 queries and then hand labelling them.
- 18:13And then you sort of use that as your bootstrap set to either
- 18:17align another model, maybe a small model or you just use it
- 18:24to prompt like a a larger Oracle model to generate more things
- 18:28that are of this ilk. And so I think that you begin to
- 18:32insulate your core of your your planet with some synthetic data.
- 18:36And then depending on if the synthetic data are hurts or
- 18:39helps that'll kind of tell you whether or not you have a
- 18:42sufficient amount of your actual real golden data to get started.
- 18:48And if you don't, then you can go and you can increase that
- 18:51initial set a little bit until you start to see that your
- 18:54synthetic data is close enough in distribution such that using
- 18:58it to train a model is still improving you, improving your
- 19:02eval scores, whatever you're using, if one, or perplexity or
- 19:07whatever. And so I think that you you
- 19:11really there's no way around getting hand labelled table.
- 19:14Nothing beats it. Nothing's ever going to beat a
- 19:18human being coming and saying what the right answer is.
- 19:24But you can use that to create much more sophisticated and much
- 19:29more close to distributions, synthetic data.
- 19:31Once you have that starting point and then as you start to
- 19:34see that you can create smaller and smaller models using more
- 19:37and more data, then you can kind of go on this trajectory where
- 19:41you start off with this very big Oracle model and this very small
- 19:44amount of hand labelled data. And then as you kind of train
- 19:48smaller and smaller models, your data is increasing and
- 19:51increasing and so you kind of you you have this kind of like
- 19:55trade off, whereas your data increases, you can get away with
- 19:58smaller models which means you can create more synthetic data,
- 20:01which means you can use even more smaller models.
- 20:03But you have to make sure that as you're generating more and
- 20:06more of that data that you're not generating a bunch of stuff
- 20:08that's out of distribution. This is the less is more
- 20:11alignment paper right? And paper is not about.
- 20:15Data set size. That paper is about data set
- 20:18quality and I think that that's something that's largely
- 20:21overlooked. Ohh, you only need 100 examples.
- 20:23We'll know you need a hundred really good examples.
- 20:27And if you have 100 really good examples, you shouldn't show
- 20:29your LLM anything else because that's enough to align it.
- 20:33But what I've seen is that once you've aligned that it's really,
- 20:37it gets a lot better at synthesising new data, which you
- 20:40can then make an even smaller model good at capturing that
- 20:44distribution. So that's I think the journey
- 20:47that I've seen be really successful.
- 20:49I wish I had better news for the people who were like I am never
- 20:53going to hand label data, but I think that's just kind of like
- 20:56it comes with the territory. If you want to work in machine
- 20:58learning, you want to be a professional machine learning
- 21:00engineer, you're going to label some data.
- 21:01Sometimes it's just comes with the.
- 21:03Gig. Aren't you that you say that
- 21:04too? Because one of our first virtual
- 21:07meetups that we had back in 2021 of the guests talked about how
- 21:12they would have labelling parties at work.
- 21:16So like at 5:00 on a Thursday, instead of everybody going and
- 21:21having a beer, they would have the party at the office, they
- 21:25would have their beers or whatever it was their social
- 21:27hour at the office. But they would all be labelling
- 21:29data. And so they would get the power
- 21:33of numbers and just be like all right here's how we're going to
- 21:36label data and and everyone from the receptionist to the ML
- 21:40engineer was labelling the data and I thought that was an
- 21:45interesting way of going about it because you you make it fun
- 21:49and you also get the power of numbers to.
- 21:52So now one person doesn't have to label 100 things maybe they
- 21:55just have to label 20 while they're chatting with friends
- 21:58and I don't know how the quality is on these.
- 22:01If you're like the you might want to check as the night goes
- 22:05on what the label data turns into.
- 22:08But that was one. And then on the other thing that
- 22:11I wanted to just mention was that it feels like what you're
- 22:14talking about reminds me of the supply and demand curve.
- 22:17And you know, like the price. It's just right there in the
- 22:20middle where like supply equals demand.
- 22:22It's like what you're showing is, yeah, in the beginning
- 22:25you're gonna have a lot of, you're gonna have this big model
- 22:28and a little bit of data. But then eventually it can
- 22:31switch and you can have a lot of data in a smaller model and you
- 22:36can just kind of like watch as one goes down and the other goes
- 22:39up in a way. It's it's funny because I I our
- 22:42initial intent model at u.com was this you know distilled Burt
- 22:47standard transformer model, 100 million parameters, nothing to
- 22:51write home about. But as soon as we started trying
- 22:55large language models, we were able to beat that model just
- 23:00with a few shot prompt and 10 lines of Python.
- 23:04I was like OK, well there it goes that six months that we
- 23:08built that fully featured intense training pipeline and
- 23:12deployment and stuff. But then we were like OK, but
- 23:16now we can actually make this model, this large language
- 23:19model, this few shotted model much smaller because now we're
- 23:24going to use that to label data. But if you think about that
- 23:28towards its logical conclusion, you're going to converge back to
- 23:32the distil Burt model that we started with.
- 23:36Like the logical end of that is that you're going to end up back
- 23:39where you started almost, but you're probably going to have a
- 23:43large amount of synthetic data that you've created and that's
- 23:46going to allow you to hopefully capture that same performance
- 23:49that you've got with a few shot, few shot in the Oracle model
- 23:54with the model that you were originally using.
- 23:56So hopefully you end up ahead still, but you're still like
- 24:01it's this very strange kind of acrobatics that that we ended up
- 24:06doing. Interesting times.
- 24:09Did you ever hear that like paradigm where I remember it
- 24:13was, it was like, OK, if you have like the finish line and
- 24:17then the car, each time that you move the car, you just like half
- 24:22its distance to the finish line. And then you never actually go
- 24:28across the finish line, right? Because you're just having the
- 24:32distance to the finish line, so you can never fully go through
- 24:36it. And it reminds me of that in
- 24:37some way. I think there's like a, there's
- 24:41like a a Greek fable about that. It's like Archimedes arrow or
- 24:46something like that. One of those philosophers is
- 24:48like, if I shoot this arrow, it's never going to hit someone.
- 24:50That's it always has to go half the distance.
- 24:53Surprise. It'll hit the guy and it'll
- 24:56hurt. But yeah, it's umm.
- 24:59It is one of those things where it feels like the yeah, the
- 25:04finish line is um, the official line ends up being where we
- 25:09started. Almost like a like a like a
- 25:11loop. But it was an interesting
- 25:14journey and I think it illustrates kind of just the
- 25:17type of step function that we were seeing at the end of of
- 25:202022. Going into 2023, things had just
- 25:24fundamentally changed in a way that, you know, I still don't,
- 25:28I'm still not confident that we are appreciate how much things
- 25:31are going to be different in five to 10 years.
- 25:34But you know what? We should all enjoy this time
- 25:36because it's probably gonna look back on and be like that was a
- 25:38really special time to be in machine learning like that was
- 25:41pretty sweet. So anyone out there listening?
- 25:44It's just find ways to enjoy this time and history, cuz
- 25:48you're never gonna get it back, right?
- 25:50Umm, so talk to me a bit about Rewind and what you're doing
- 25:55there, because I think there's a lot of stuff that we can dig
- 25:58into with how you are now leveraging AI and also how
- 26:08you've built rag systems. I know that we wanted to like
- 26:11fully dive into production rag and how that's very different
- 26:15than what we see on all the social media networks and how we
- 26:20have to be very aware of some caveats before jumping into like
- 26:25creating these production rag systems.
- 26:27So let's just start with like Rewind.
- 26:30I know what it is, but it's probably worth telling people
- 26:33out there what it is. Yeah, sure.
- 26:36So Rewind is fundamentally a a company that is focusing on
- 26:44giving people superpowers via augmenting memory.
- 26:48What this means in practise is it's an extremely powerful data
- 26:52collection platform for those people who are willing to, you
- 26:57know, fork over a lot of their data, a lot of their everything
- 27:03they see and hear. We have full microphone audio
- 27:06capture. We have full OCR on top of your
- 27:09screen capture and we convert everything to text and we index
- 27:13all of that and try and put it to use for people.
- 27:17And I think for those out there who are in the camp that they're
- 27:22just like take all my data, I don't care, just make me, if you
- 27:28can give me like 30 minutes back, like an hour back, just
- 27:32take the data, I don't care. I just want the time back for
- 27:36those people and there they are out there.
- 27:38There's a good amount of them. We are offering a solution where
- 27:43we're going to try and make all everything you see and hear
- 27:47accessible by an LM. We're going to try and create,
- 27:51you know, these proactive flows that are going to one day
- 27:55hopefully even interrupt your flow and be like, hey, you know,
- 27:59I did some work over here and this is what I think about the
- 28:02thing you're working on and maybe even give you like just
- 28:05someone to kind of look over your shoulder and check your
- 28:07math. And very similar in spirit I
- 28:11think to what I expect out of like a pair programmer.
- 28:14You know, someone to go look things up for me while I'm while
- 28:18I'm typing code and and maybe talk things through with me, go
- 28:22do some research, maybe go write some tests, exploratory code.
- 28:26Those are the types of things that I traditionally think of as
- 28:29like a passenger. If you're thinking of driver,
- 28:32passenger and pair programming and being able to create
- 28:36something like that, that is never gets tired, never has to
- 28:40go, like take a bio is just like they're with you until the end
- 28:45of the night. It's gonna be a really powerful
- 28:49experience. I think for people who are used
- 28:53to working collaboratively with humans, and especially if you're
- 28:57getting used to working collaboratively with an AI in
- 28:59your day-to-day kind of workflows, this is going to be
- 29:03something that is going to, I think, really be a step function
- 29:05in productivity for you. And so right now it's taking
- 29:09everything that you're doing and taking everything that comes in
- 29:14or you interact with out on the Internet or that you speak with
- 29:18whatever it may be, whatever form you interact with your
- 29:22device and it's able to index the index that so the search is
- 29:27on point and then it's also able to give you back answers.
- 29:30And so your like, First off, I think the burning question on my
- 29:39mind is multimodal rag. Are you all doing that already?
- 29:44Because that's like the buzzword of the year, right.
- 29:46And tell me about it. What is going on there?
- 29:50Ohh, I think that I think that I I can't say too much but I if
- 29:56you were, we're talking about logical conclusions before.
- 30:00I think the the logical conclusion of a OCR and ASR on
- 30:04top of you know those mediums and then converting it all to
- 30:09text and then having some text model that operates on those as
- 30:14kind of a proxy. I think most people could see
- 30:16that any that a model that can operate directly on speech and
- 30:20directly on images, instead of having these two models have to
- 30:24kind of translate for the text model, is going to be a more
- 30:29performance system because you don't have that extra
- 30:32translation layer in there. You're operating directly on the
- 30:35input signals and therefore you can fit features directly to
- 30:39them instead of these like proxy features on top of the text.
- 30:43So if you're keeping track at home, I think it's pretty clear
- 30:47that a multimodal approach is going to be really beneficial
- 30:51for the likes of rewind. Can't say where we are in
- 30:53development, but I think it makes a lot of sense for us to
- 30:57invest in that technology, yeah. All right, real quick, some
- 31:01words from our sponsors, Ellis, and then we'll be right back
- 31:03into the programme. Are you struggling with building
- 31:07your retrieval augmented generation, AKA RAG
- 31:10applications? You are not alone.
- 31:13We all know tracking unstructured data conversion and
- 31:17retrieval is no small feat. But there's a solution available
- 31:21now. Introducing zelizer Cloud
- 31:24pipelines from the team behind the open source vector database
- 31:28mill this This robust tool transforms unstructured data
- 31:32into searchable vectors in an easy manner.
- 31:36It's designed for performance. Zellis Cloud Platforms Pipelines
- 31:42Zelis Cloud pipelines also offer scalability and reliability.
- 31:47They simplify your workflow, eliminating the need for complex
- 31:51customizations or infrastructure changes.
- 31:54Elevate your rag with high quality vector pipelines.
- 31:58Try Zelis Cloud Pipelines for free at soliz.com.
- 32:03You can find the link into the description.
- 32:05Let's get back into this podcast.
- 32:07Yeah, yeah, 100%. And so again, like today, you
- 32:10get to take in all of this information.
- 32:12You get to index it and be able to search it really easy.
- 32:16And I know, I think the thing that I loved when whenever I
- 32:20look at rewind, it's like, ohh, remember that time that I was
- 32:25reading that thing that had that stuff in there?
- 32:28Like, I remember this emoji that was in it, but I don't remember
- 32:32anything else. And I remember vaguely that it
- 32:35was like, about this. And I can just give all that
- 32:38information to rewind. Or ideally one day, as you're
- 32:42mentioning, rewind will be able to ask me like, yeah, so tell me
- 32:46more about it. And what else was it?
- 32:49Something along these lines. And this happened to me just the
- 32:52other day because I was been quoting this paper from these
- 32:57folks from the University of Prague on how the, the data that
- 33:03you send to an LM, it inadvertently leaks that data.
- 33:07And so these folks that at Rogue did this whole paper and they
- 33:13put it out and I was like, cool, I need to really, like
- 33:15synthesise this paper and understand what's going on here
- 33:18because I'm quoting it a bunch, but I don't really know what is
- 33:21going on. And so I tried to like, find
- 33:26that paper again, impossible. Impossible.
- 33:29And I remember it had leaks in the word and it had an emoji.
- 33:33But I was like, was it a leak emoji?
- 33:35So I'm going back and like looking for this leak emoji.
- 33:38There is no leak emoji. First of all, it was like, it's
- 33:41either cabbage or broccoli. So I'm looking through my Google
- 33:45search history for like, cabbage or broccoli trying to philtre.
- 33:49I spent way too long doing this dude, literally way too long.
- 33:52And then I'm searching like archive for like University of
- 33:56Prague papers leak in the title and and then I'm like is it LEK
- 34:01or is it LEAK disaster? I can't find that damn paper for
- 34:05the life of me. If I had rewind I assume that
- 34:09would be much easier. And if I could just ask rewind
- 34:13the questions directly like so. What was this paper about?
- 34:17Yeah, data leakage. Yeah, I think that creating
- 34:20those linkages automatically is somewhere where we're gonna
- 34:26start to really shine. And it's it's it's not all there
- 34:31yet. But if you imagine even having
- 34:34this conversation, imagine being able to have this conversation
- 34:38at the paper that you forgot and describing it.
- 34:40And having it be able to go into your memory, your virtual
- 34:45augmented memory, and be like this is the paper.
- 34:49And then automatically create a linkage through time for you
- 34:53that will actually create this ability to trace your steps back
- 34:58through time and your thought process.
- 35:01Those are the types of things that today human beings just
- 35:03forget, right? Like there's no tool that's
- 35:06going to actually tell you unless you have really great
- 35:09note taking, which I mean not many of us do anymore.
- 35:14We just were gonna forget and it's just gonna be like ohh you
- 35:17know how many times on the day you're like what was that?
- 35:19I must not have been important. Well imagine if every single
- 35:22time rewind was able to go back in time and find those things
- 35:26for you and be like and then that actually related to this
- 35:29thing even further in the past. It's related to these two or
- 35:32three events which creates this like lineage of almost thinking
- 35:35and cognition for you, which is I think for people who have a
- 35:40lot of knowledge work to do and they are trying to keep a lot of
- 35:43stuff in between their ears. That type of like, you know,
- 35:49read only memory so to speak is gonna be really, really valuable
- 35:53to them because there's just too much for us to to to remember
- 35:57every single day you know this you run the MLS podcast.
- 36:02How about this stuff comes out every single day about machine
- 36:04learning nowadays. Dude, seriously?
- 36:07And just thinking about all the people that I interact with on
- 36:12the Internet itself too. And so many times, it's like
- 36:15somebody was just telling me about that.
- 36:17And I feel kind of bad sometimes these days because I'm like, who
- 36:22just told me about that? I swear.
- 36:24Ah, and it's it's gone like you're saying.
- 36:27And so to be able to get that back is at least a win for
- 36:32attribution. So I don't go around
- 36:34plagiarising other people's thoughts as much as I am now.
- 36:38But one thing that I was also wondering with is like, are you
- 36:41looking at signals behind the scenes as far as I've had this
- 36:47tab open? Like for example, this paper
- 36:51that I wanted to read never got around to reading it for some
- 36:54reason. I updated Chrome or something
- 36:57and then it didn't come back up and then I lost it forever,
- 37:00right? Are you also looking at signals
- 37:02as far as, like this paper has been open as a tab for five days
- 37:07or 10 days and so that gives you a bigger window or it gives you
- 37:11a higher weight on things breakdown like how that looks
- 37:16too. Are there those types of
- 37:17features that you're taking into account?
- 37:20So I think that in an in effect I think we are because we do
- 37:27have ways to kind of handle time specific queries.
- 37:35But I think that if you're asking like hey, are we using
- 37:39like behavioural signals for like re ranking results and
- 37:42we're going to use like are we actively like using metadata
- 37:47about tab life cycle or whatever as features.
- 37:53I don't think we're quite there yet.
- 37:55I think that there's a lot to master in text and and one of
- 37:59the things that I see as a as a mistake.
- 38:04Um, in industry today is like trying to convince yourself that
- 38:09you don't have to master text for XYZ reasons.
- 38:13There's lots of companies with a vested financial interests and
- 38:15convincing us of that. But I think that at the end of
- 38:20the day that is something that you really want to master via
- 38:26the text medium. And I think that trying to go
- 38:32straight towards, we're going to use text and we're going to mix
- 38:35in these behavioural signals as well and we're going to create
- 38:37this composite semantic and behavioural feature set.
- 38:42I think that if you're doing that and you've got a team of
- 38:45people, big team of people, go for it.
- 38:48I think for most people, if you are not comfortable that you've
- 38:53mastered text, that's what you should be doing.
- 38:55Master Text get really good at that.
- 38:58And once you feel like you've mastered that and you can train
- 39:01and deploy your own text models, then I think you start to create
- 39:05your ensemble models, right. But I wouldn't start with an
- 39:09ensemble until life mastered the the models that make up the
- 39:13ensemble first. Otherwise, it's going to be
- 39:15tough to explain it's you're going to end up with something
- 39:18that isn't quite what you're looking for.
- 39:20It doesn't do quite what you're looking for if you don't
- 39:22understand how the ensemble is actually compositing those
- 39:26predictions. Yeah.
- 39:28In other words, it's like the content inside of the document
- 39:34is more important than the metadata around that document.
- 39:39In a way, like, I don't care if you've looked at it five times
- 39:42in the last days, is it relevant to the question that you're
- 39:45asking me right now? Is the actual content relevant?
- 39:50And then later, if I can, without a shadow of a doubt,
- 39:55figured that out, then I can start adding in these features
- 39:59where it's like, OK, cool, it's. The question that you're asking,
- 40:06this document has relevance, and it's what you most recently have
- 40:10been viewing, so that's probably where you're going with this
- 40:12question. And I think that it's going to
- 40:15be different for people who are operating in small domain search
- 40:19versus web domain search for EU dot coms and the Googles and
- 40:24things of the world. Once you're operating at web
- 40:27scale search, there are popularity signals.
- 40:31You know, domains that in the top 100 cloud flare collect
- 40:35less. Things like that are extremely
- 40:38important because you search for the word attention and you can
- 40:41get stuff from a variety of different subjects.
- 40:44There's different ways to use the word attention nowadays.
- 40:47And then I think if you're bringing in like behavioural
- 40:49signals and even personalization signals like, hey, Dimitrios is
- 40:54a machine learning person, you probably means attention
- 40:57mechanisms. Yeah, that's when I think that
- 41:00those types of signals, the the behavioural signals really come
- 41:04in and start to shine. But if you do not have 10s of
- 41:07billions of documents you're searching over, you probably
- 41:10don't have the problems that warrant bringing those signals
- 41:14in unless you're really good at them and you have really clean
- 41:17signals. But then you're probably at a
- 41:19point where you don't even need a machine learning model.
- 41:21You could probably put business logic on top of that
- 41:23representation of the data and beyond your way, right?
- 41:27No, Yeah, it's it's like trying to over engineer it.
- 41:32And that's what you see all around the industry.
- 41:35It's everything is so complicated.
- 41:37Everything is you know, requires 5 different systems and it's
- 41:43it's become really hard to figure out what an MVP LLM
- 41:47system looks like nowadays because if you naively look
- 41:50around you're like wow, that's I need like 10,000 lines of code
- 41:54to run one of these and that's like it.
- 41:55It's so diverges from the true like spirit of the LM from late
- 42:022022 to early 2023, which was ohh my gosh, you have to do so
- 42:07vanishingly little work to get these things to work.
- 42:11Like the whole point of the anecdote around the intent model
- 42:16was, you know, ohh my gosh, we spent six months on this fully
- 42:20featured NLP training system and then we really just blow it away
- 42:25with 10 lines of Python And a prompt.
- 42:27Oops. If you are creating more work
- 42:33for yourself that you are saving using an LLM, then you're
- 42:35probably using it wrong. Like LMS are supposed to make
- 42:38things simpler. They're supposed to lower the
- 42:40barrier of entry and they're supposed to short circuit U to
- 42:42being able to solve more complicated problems.
- 42:45You are not getting those benefits then you are not
- 42:49getting what you are legitimately paying for, and
- 42:51they are not very cheap things to pay for.
- 42:54So, like, make sure you're getting what you like.
- 42:57Make sure you're getting what you're paying for, and what
- 43:00you're paying for is not a huge, convoluted milot system that's
- 43:06required to operate these things.
- 43:08Start simple, start getting business value with it, and then
- 43:12you'll start to figure out where your life cycle breaks down and
- 43:16where maintenance and operations are going to start to seep in
- 43:19and require you know some thinking.
- 43:22Well, let's let's go into this because I know that you had
- 43:25spoken to me about this very thing before we hit record,
- 43:29which is like optionality around when you're doing evaluation.
- 43:34When you're doing search, you don't necessarily need to chase
- 43:38the height and you don't. Just because one design pattern
- 43:43is using looms as a judge these days doesn't mean by any means
- 43:49that you should feel like you have to do that and you're not
- 43:54going to be able to get business value out of your application if
- 43:58you're not doing that. Or the same goes for LIKE using
- 44:02neural networks for search, right?
- 44:04And so give me the, like, give me your take on this, because I
- 44:10think there's some really interesting facts here that
- 44:13you're bringing up. Yeah, I I think that if you are.
- 44:19One thing I think is that if you are ever in a situation where
- 44:23someone is trying to make the case that add this neural
- 44:25network to your stack, it'll make things so much simpler.
- 44:28Like they are selling you something, you are being sold a
- 44:32bill of goods at that point. Um and there might be, there
- 44:36might be heat to that smoke and there might not.
- 44:38You know I would take all of that with a grain of salt.
- 44:43I think that your your tried and true kind of counting algorithms
- 44:47or where I would start with any of these things.
- 44:50You know, word frequencies, They can get you pretty far in
- 44:53search. TFIDF get you pretty far
- 44:57standing up like a standard single node opens, or like open
- 45:01search or elastic search, like one database, and then using
- 45:05that instead of a neural network and delegating everything into
- 45:09BM25 inside of the scene. That'll get you really far.
- 45:14It's also simpler than operating your own neural network.
- 45:17And I think the same goes for evaluation.
- 45:20It's the same thing, right? Add this neural network, it'll
- 45:22make evals easier. Well, it's is it going to
- 45:26really? Is it going to be simpler than
- 45:28me just converting both the predicted answer and the ground
- 45:33truth answer into a bag of words and then just counting the
- 45:36number of words? Similar.
- 45:38Probably not. I think that I've largely gotten
- 45:41pushback on those approaches because of, you know, it's not
- 45:46quite what you're looking for or it's going to be a floor on the
- 45:50performance because you're technically actually penalising
- 45:52the models for certain failure modes that they like an LLM may
- 45:56do better at. But I think that that's OK.
- 46:00Like as long as you have a floor and you don't have a lane, like
- 46:03you're not like overestimating your performance.
- 46:05As long as you're underestimating your
- 46:07performance, you're OK. And I think that if you're in a
- 46:10situation where it's like I should use this neural network,
- 46:12or I should use this very simple counting algorithm that will
- 46:15give me a lower bound on my performance, just start with the
- 46:19simple thing. Start with a lower bound.
- 46:21You can make progress on a lower bound you don't need.
- 46:23An exact thing is, if your lower bound is increasing your F1
- 46:27scores, the number of words that you're getting correct is
- 46:31increasing that you're probably making progress.
- 46:34It may not be progress on the perfect metric, but you don't
- 46:38need the perfect metric. You need a metric, something
- 46:41that you can understand and that you can actually synthesise a
- 46:45technical strategy around. And if you have a very
- 46:47complicated evaluation system, it becomes challenging to
- 46:52synthesise a technical strategy and be like, well, this says
- 46:54that this is unfactual. And this is like there's these
- 46:58metrics that are kind of human understandable but also like
- 47:01they don't quite like correlate across data points, if you know
- 47:07what I mean. Like the factuality of a 10 here
- 47:10might be an 8 here, when in reality they're both pretty much
- 47:13totally correct. And I think that getting away
- 47:17from these very simple baselines is where I see most people going
- 47:22wrong. Your first baseline should be
- 47:25super easy to beat because it should be very simple.
- 47:28That's why it should be your first baseline.
- 47:30You can go get a little dopamine hit.
- 47:31You're going to beat your baseline, but at least you know
- 47:34you're making progress and at least you have some metrics and
- 47:36some guardrails to tell you that.
- 47:38Like this is, this is what progress looks like.
- 47:42And I think that if you aren't starting there, then you are
- 47:47running the risk of ending up with a system that kind of
- 47:52escapes your ability to understand because of the
- 47:55complexity that you're adding on piece by piece versus just
- 48:01having a very, very simple system that when you can't make
- 48:04progress anymore, Then you may be in a position where your
- 48:08metrics need a little bit more of a nuanced definition that you
- 48:11may need to find more other metrics to measure besides a
- 48:17simple word counting. You know, intersection over
- 48:20union counts, but you should do that then, not at the beginning
- 48:28that that. That would be my main takeaway
- 48:31if you could, if I was starting today.
- 48:35Well, if I'm understanding this correctly, and I think this is
- 48:38fascinating because basically you're saying like, we can get
- 48:45so caught up in trying to make the system robust that because
- 48:52of that goal of having a very robust system, we get lost and
- 48:58we can't debug and we don't know where things are going wrong or
- 49:02we can't really even interpret what is going on.
- 49:05So start with simple metrics, Push those to the limits.
- 49:09Once we feel like we've gotten to the natural limit on that,
- 49:12it's like, great. This is our very clear, very
- 49:15understandable metric that we can go off of.
- 49:19And now let's find, let's add a new piece to the puzzle of this
- 49:24system that we're creating, and let's figure out more metrics
- 49:28that we can go off of. And each step along the way,
- 49:31you're adding that robustness to it and you're adding the
- 49:34complexity. But you're adding in the
- 49:36complexity in a way that you can understand.
- 49:39So when you're building this big Lego base, you know which piece
- 49:47is which and what it does and what metrics it's it's tied to.
- 49:51And you can always, in effect, rollback if you need to, as
- 49:57opposed to like we build this gigantic system and now we gotta
- 50:02debug it, but we're not really sure what is causing the problem
- 50:05and how do you rollback from there It it's like if you go
- 50:08from zero to 100 then you can only roll back to zero, as
- 50:11opposed to going from zero to 1010 to 20, then 20 to 50, that
- 50:17type of thing. I I couldn't.
- 50:18I could never have put it better myself.
- 50:21I think that motivation is a really keyword here.
- 50:24If you're actually making those changes in a stepwise manner,
- 50:28you have the motivation, you understand the context of adding
- 50:31them, You know what it's actually doing for your system
- 50:34and what the capabilities are added in.
- 50:36If you're just adding all that stuff from the beginning, I
- 50:39think what you're fundamentally lacking is the motivation for a
- 50:42bunch of that complexity. And so you may end up with
- 50:45things that you don't entirely understand their purpose or what
- 50:48their place is. Because you don't.
- 50:50You didn't have a real motivational thrust to add it.
- 50:55Your motivational thrust was Twitter, and that's not where
- 50:59you should be getting your motivation for adding complexity
- 51:01to your software. I don't know if I'm bursting any
- 51:05bubbles here, but sorry. Yeah, it's like Ohh, I heard I
- 51:12would be able to get my next job if I just add this gigantic
- 51:15system in there and. I love vector stores.
- 51:19Can I get a job now? It's like, yeah, no, solve real
- 51:22problems with natural language processing and you will get a
- 51:25job, no problem. But it's really hard to solve
- 51:29those real problems if you don't understand what you're building.
- 51:32Yeah, yeah, it's that understand the Oh my God, I don't even
- 51:37think that's a word. Understandability is where I was
- 51:39going to say. But just the understanding of
- 51:42what you're building is so crucial because you're starting
- 51:46with that foundation and you're making sure that you are clear
- 51:50on that foundation and from there everything else can be
- 51:54built just like we say this a tonne like you can't have ML OPS
- 51:58without a very strong data culture.
- 52:02You you can't like just jump straight from having nothing to
- 52:06like, OK, now we're gonna do AI and think that you're going to
- 52:10have success and so you want to have that, you want to have
- 52:13strong data and then you can build your ML on top of it and
- 52:17then you'll see that success after.
- 52:21But this is very much in that vein of you want to make sure
- 52:27that your foundations are strong before branching out and
- 52:31complicating things and dare we say, over engineering it.
- 52:36There, I say, yeah, and I to be fair, I'm a very simplistic
- 52:41engineer. I'm a simple guy.
- 52:43I like simple systems. And so this is obviously my
- 52:46bias. You can take it all with a grain
- 52:47of salt, but I don't think that most people will tell you that
- 52:52they've gone wrong in their career from being too simple and
- 52:56simplifying problems too much. I think people probably will
- 52:59tell you the opposite quite a bit, but I don't know.
- 53:02A lot of engineers would be like, ah, I just made it too
- 53:04simple. Dang it.
- 53:06It was just too easy to understand, debug, Gosh, you
- 53:12know, I don't hear that a lot. And I think it's really
- 53:15seductive to do it and machine learning because it's so hot.
- 53:19But if you keep it simple, I think that people will have more
- 53:22success in real life. And I think that that will
- 53:25translate to success in their careers because that's what
- 53:28companies are looking for. They're not looking for someone
- 53:31who can be really smart and say all of the smart AI things that
- 53:36are looking for people who can solve real user problems.
- 53:41And now talk to me about like production rags.
- 53:45In this same vein of trying to make it as simple as possible.
- 53:50I imagine you've seen on the socials that there are new terms
- 53:55coming out of like naive rag. And that's like where it's just
- 53:59ohh, it's naive because it's only these three steps and you
- 54:04get your embeddings, you have your vector database, you throw
- 54:07it at the LM and then you're good and.
- 54:11I. On one hand, I see the point of
- 54:15saying that's cool and all, but that's not really production
- 54:19ready. Like, that's not exactly you can
- 54:23go places with it, but if you're trying to go and set up a really
- 54:27productionized system, you have a few places where that can fall
- 54:32flat. And so I'm wondering from your
- 54:35experience building rags, how do you see this?
- 54:39And like, how does it all fit in with?
- 54:41OK, the ethos is start simple, then go complex step by step.
- 54:47So naive rag is a great place to start.
- 54:50Even though I imagine with that name, nobody wants to start with
- 54:56a naive rag. Now it's like we just killed it.
- 54:58Nobody wants to say that they're doing naive rag.
- 55:00I'm doing like most advanced complex rag you can think of.
- 55:04But then how do how do rags look in your eyes?
- 55:08And what are some gotchas that you found over the years?
- 55:13Yeah, I think. I think that, umm, you you you
- 55:18kinda you took the words right out of my head.
- 55:21That or right out of my mouth. You know, I think that it it
- 55:25goes back to that motivation thing, right?
- 55:29I think that a naive solution, you can call it naive.
- 55:32I think a naive solution is a perfectly good place to start.
- 55:36And I think again, you want to. If you're going to add
- 55:39complexity, you really want to have that motivation.
- 55:42And the way that you get motivation is by having metrics
- 55:46and benchmarks that could actually create that motivation
- 55:49for you. And so again, we used this
- 55:52example of trying to make progress on very simple metrics.
- 55:55I think that you can kind of translate that even to
- 55:57architectures. I think that if you have a RAG
- 56:01system and then you have a more advanced RAG system, if you
- 56:05cannot be very demonstrable with what the improvements are
- 56:10outside of cherry picking, And I know it's so tempting to cherry
- 56:14pick, but they are they. Those are selected examples that
- 56:19you're seeing regularly. You you need to have set up and
- 56:26your setup could like you're naive RAD could be generate
- 56:30random text and that's your that's your generate function,
- 56:34right? Just output random text.
- 56:36It's gonna be a really easy baseline to be with a naive for
- 56:39access to because you're competing against random texts
- 56:42like you're competing against. Noise is in effect.
- 56:46And so I think that it's perfectly reasonable to move up
- 56:50the complexity and add you know knowledge graphs, add these very
- 56:54complicated trees and graphs of thought and all of those agentic
- 56:58search systems. I mean I've built systems where
- 57:01you know I had agents and those agents had actually access to my
- 57:04individual indices inside my database.
- 57:07And it would be like I'm going to search this index, I'm going
- 57:09to take the results, I'm going to feed those into this and
- 57:12build multi hop reasoning agents.
- 57:14Like you could get truly complex.
- 57:19But I think that if you aren't motivating those examples and
- 57:23you aren't actually able to show, these are my metrics
- 57:27before and after. And here are a really good
- 57:30representative bunch of queries that we were really bad at, but
- 57:35now we're actually really good at.
- 57:37And luxury doesn't actually degrade performance in these
- 57:40other spots. I think then you can motivate
- 57:44your more advanced techniques and then I think you can
- 57:46actually go and figure out which of them.
- 57:49The really nice thing about them is it becomes very easy to vet
- 57:53what smoke and what's fire, because the things that are fire
- 57:57will make your metrics move. And they're like, ah, that's
- 57:59actually legit. Let's keep that.
- 58:01And then you'll add this other thing you like that didn't do
- 58:04anything. We'll delete those 100 lines of
- 58:06code, right? All of this needs to be
- 58:08motivated. And I think that if your
- 58:10motivation is the name of the system, then I mean that's one
- 58:14way to do it. But don't you don't even need
- 58:18rag to begin with as your first system is is my only points.
- 58:21Like have something you can make progress on and have something
- 58:25that's easy to beat to begin with and then motivate your
- 58:28changes in your additional complexities through that.
- 58:31You may find that you end up at a system that is not represented
- 58:36at all on social media or anything because you actually
- 58:40did the work to create a system that solves your businesses
- 58:43problems and only your businesses problems because
- 58:45you're using your businesses data to actually judge your
- 58:48systems and improve your systems.
- 58:51And if you do that, then you're going to build models that are
- 58:54very special for your for your business, that solve your
- 58:57businesses problems better than anyone else's models.
- 59:01And you're going to have the simplest system that does it,
- 59:03and you're not going to have any craft.
- 59:06And then you're going to be our, like, everyone's gonna love you.
- 59:08People would be like, Oh my gosh, give me your autograph.
- 59:12Trust me, they'll love it. Then when you organise your
- 59:16labelling parties in the office, people will show up.
- 59:19Yeah, that is how people show up.
- 59:21They sure will. They will understand the beauty
- 59:24of it and that will make total sense.
- 59:27Yeah, it going back to the motivation, it's just like be
- 59:32very clear at why you're doing things.
- 59:34Don't just do it for the sake of doing it.
- 59:36Or, as you were, as one friend Flavio put it.
- 59:41He called it a resume driven development.
- 59:44And so that one. Yeah, just because I need to
- 59:48make sure that my next job is going to be a step up.
- 59:53I'm going to implement this crazy in depth system here and
- 59:56then I'm going to go and talk about it.
- 59:58Maybe I'll submit a paper or something so that I can show off
- 1:00:02how badass I am. So I I can see that for sure.
- 1:00:05I wanted to switch gears a little bit and talk about your
- 1:00:09work with. I know you've contributed to
- 1:00:11DSP. Or as I like to call it, Dipsy
- 1:00:15and what what are your thoughts on that?
- 1:00:18It seems like you've had a few of your contributions actually
- 1:00:22like merged. You've done some cool stuff with
- 1:00:26them. We've had Omar on here.
- 1:00:28I am huge fan of what he's building actually it's been
- 1:00:34really cool to see how much attention it's been getting
- 1:00:37lately and but but I also know that you've done stuff with Lang
- 1:00:41chain too. So I just kind of like want to
- 1:00:44set the groundwork with that. You done a little bit of, I
- 1:00:50guess you could say you've played around with both and
- 1:00:54you're familiarised with both and I want to get your feel on
- 1:00:59and your take on these different tools that are out there.
- 1:01:02Yeah, I think the thing that caught my eye about DS Pie or
- 1:01:07Dispy was that I I felt that lying chain and llama index and
- 1:01:14some of those abstractions, while they were useful I think,
- 1:01:19for organising people's thoughts and organising the discourse
- 1:01:25around alms really, really well. Um, I always felt that despite
- 1:01:32brought a little bit more to the table in terms of what I was
- 1:01:35trying to accomplish. I think that and that I think is
- 1:01:39by design in some respects. I think that Lang chain is
- 1:01:43fundamentally about representing these processes in a way that is
- 1:01:48you don't understand and very translatable and makes it so
- 1:01:53that we can build a community around this and increase mind
- 1:01:55share, which is like a very, very important thing to do in
- 1:01:58this field. I think DSP is motivation is
- 1:02:03slightly different. I think that the motivation
- 1:02:05around self improving systems is what really caught my eye and
- 1:02:11there are these even these these kind of self improving RAG
- 1:02:16search agents that you know deep mind has put out papers on in
- 1:02:20the in the very recently DSPI really came and said hey I have
- 1:02:26an opinion on what a self improving LLM is.
- 1:02:29My opinion is, is that we're going to create these student
- 1:02:32teacher models and we're going to try and like create a
- 1:02:36framework for this distillation process.
- 1:02:39And that distillation process is I think something that is
- 1:02:42actually very challenging to understand and challenging to
- 1:02:51represent. I guess any DSP does a really
- 1:02:54good job of giving you code sort of as a blueprint for what a
- 1:03:00system would look like that could.
- 1:03:03Can you take a very large model and automatically search through
- 1:03:07prompt space to optimise that in the few shot setting?
- 1:03:11Can I use that to actually synthesise data?
- 1:03:14Can I use that data to then actually train a smaller model
- 1:03:17that can do that very similar things to what we were talking
- 1:03:21about before, Things that I had actually seen work for a company
- 1:03:25this this distillation and really taking a shot at creating
- 1:03:30a very rigorous way of representing that and
- 1:03:34orchestrating it. And that was, I think, what I
- 1:03:38saw as the future. These systems eventually will
- 1:03:43require very little input data. You know, we have our core at
- 1:03:48the centre of our planet that's heating everything.
- 1:03:51We start with that and then we basically create frameworks for
- 1:03:55these systems to self improve and there isn't much work that
- 1:03:59the human does after that. This work that we're doing to
- 1:04:01systematically create more and more data sets with smaller and
- 1:04:04smaller models, that kind of supply demand curve that we were
- 1:04:08going over, that will all just be orchestrated by a system,
- 1:04:12right? Like that whole process which
- 1:04:14was done by a human being will be done by a programme and that
- 1:04:17programme, one of them could be DSP I.
- 1:04:21Ohh. Fascinating.
- 1:04:23Yeah. And that's one thing that I
- 1:04:25liked about Omari's vision for this was talking about, like
- 1:04:30from prompts to pipelines. And it's almost like you're
- 1:04:33echoing that in different words, like saying, hey, it's not just
- 1:04:38the prompts that we're fucking with here.
- 1:04:40We're trying to create the system so that we can put a
- 1:04:44little bit of data in on one side and get our distilled model
- 1:04:47out on the other side. And that whole pipeline is done
- 1:04:51in a way that we have confidence that it's optimised.
- 1:04:56Yeah I think that's that's a lot of what I've seen be really
- 1:05:01really powerful and and when I was experimenting with it I I my
- 1:05:06state-of-the-art numbers were came from DSP I.
- 1:05:10And so I saw again this is one of those things where if you
- 1:05:14have a really good metrics, you know what smoke and you know
- 1:05:17what's fire because this system gave me a state-of-the-art
- 1:05:21performance and this other one did it and so on.
- 1:05:25That's a cop out answer. But you know when you have
- 1:05:29metrics, they're all cop out answers, aren't they?
- 1:05:31Because you're just like do the numbers told me to I I I'm
- 1:05:35really easy to be peer pressured by data.
- 1:05:38Made it better, dude. Well, yeah, That brings me to
- 1:05:41the next probably the biggest question that I've heard people
- 1:05:45talk about when bringing up DSPI is do you know anyone using it
- 1:05:51in production? I don't know anyone myself.
- 1:05:57The work that I had been doing was still in R&D.
- 1:06:02Well, I was still at Ucom, so I don't, I think that there are
- 1:06:08maybe a few more ergonomic things that are stopping that.
- 1:06:12I don't think that it's anything to do with them.
- 1:06:16I don't think it's anything to do with the the paradigm.
- 1:06:20There is some things that are difficult to do right now, like
- 1:06:25deep speed distributed training. There's a branch on DS Pie which
- 1:06:30kind of does deep speed, but you also would have to be running
- 1:06:34that DPI on like array cluster or some sort of torch cluster
- 1:06:39that's actually running that and can run the deep speed plugin.
- 1:06:44And so I think that there's a, there's a little bit of a
- 1:06:48disconnect there from where I was.
- 1:06:50I was able to get DSI working very, very well all on kind of
- 1:06:54third party alms, but then it was time to move in house and
- 1:06:58actually train our own. And I think if for people who
- 1:07:02are on that journey, they're going to find that distributed
- 1:07:07training is going to be their larger upfront blocker to being
- 1:07:11able to do what they want to do, especially if they're trying to
- 1:07:14train very large context length models.
- 1:07:16If you're trying to actually train on 8K tokens of context,
- 1:07:20you're probably only going to fit one example per GPU, even if
- 1:07:24you're using not the biggest model in the world.
- 1:07:28And so that's all to say that I think that for people who are on
- 1:07:30that journey I would figure out your your data and your
- 1:07:34infrastructure first. And once you have those set up
- 1:07:39that's when I think you can bring something like a DSP I and
- 1:07:42to really supercharge those efforts and give you a framework
- 1:07:45to kind of couch all of your discussions and and it just
- 1:07:49gives you this really, really good lens of of looking through
- 1:07:52optimising looms. But there's just that little
- 1:07:56ergonomic kind of hole there and and Shadow Omar he built some
- 1:08:01really amazing things. I think that the the vision he
- 1:08:04brings to bear is really, really differentiating.
- 1:08:09And in the yellow kind of like framework space, like he's got
- 1:08:13ideas and they're good. So that that's probably how I
- 1:08:17would do things. Um Tata Omar.
- 1:08:21Yes, that is very, very well said, dude.
- 1:08:26Sam, thanks so much, man. From this is Paul.
- 1:08:30You're humble beginnings of this podcast talking about your
- 1:08:34pinball health that you have at home.
- 1:08:38And if anyone wants to go through the equivalent of the
- 1:08:42Navy Seal's Hell Week and pinball, I guess it is hit up
- 1:08:45Sam and you can talk more about how to become the pinball
- 1:08:50champion of the world. Dude, I had so many great
- 1:08:53insights from this. I think the biggest thing
- 1:08:56though, walking away is just like an all be parroting this
- 1:09:00back and I'll probably be saying this.
- 1:09:02So I'm going to just tell you right now, I will steal it.
- 1:09:06Hopefully it's OK with you. I'll plagiarise it, try and give
- 1:09:09you credit as much as possible, but the motivation factor like
- 1:09:14no. Why you are creating each line
- 1:09:17of code. Know why you are creating each
- 1:09:20extra building block and what motivates that is so crucial.
- 1:09:26Code is baggage, right? Code is where bugs live, so you
- 1:09:30want less code. It's one of the things that like
- 1:09:33as you go from junior to senior, like I don't want more code, I
- 1:09:36want no code. How do I do this job with no
- 1:09:40code? And that's like the journey that
- 1:09:42you go on, I feel like. So if there's anyone out there
- 1:09:45who I've Cavanaugh, I'll push and they're going to maybe get
- 1:09:50to the the simple way of thinking and keeping it simple
- 1:09:54then I'm gonna be a happy I'm gonna be happy.
- 1:09:56So I appreciate you preaching the good word.