Latest / Agentic Conversations (formally mlops.community) / Information Retrieval & Relevance // Daniel Svonava // #214
Transcript
- 0:00So I'm Daniel Sonara. I'm one of the cofounders and
- 0:04the CEO of Superlink and Blake. No sugar, nothing straight like.
- 0:13Hey yo, we are back with another MLB's Community podcast.
- 0:18What a doozy. This one was talking to Daniel.
- 0:20I gotta say before we go anywhere, thank you Daniel for
- 0:25being so patient with me. Thank you so much because he
- 0:29explained it to me like I was five.
- 0:32I felt like I was inside that Reddit subreddit community and I
- 0:36had to ask him and re ask him because I really wanted to make
- 0:40sure that I understand what exactly he is talking about when
- 0:44he mentions vector compute and how it can enhance these
- 0:51different systems that are using vectors and embeddings.
- 0:54And so he broke it down for us and it was a little bit
- 0:58reminiscent of DSP I when I talked to Omar, the creator of
- 1:02DSP I. Which by the way, has anybody
- 1:05else noticed that? That feels like it's absolutely
- 1:07blown up. If you are using DSL in
- 1:10production, hit me up because I would love to hear about your
- 1:13story and what you're doing. I don't know anybody using it in
- 1:15production, but I feel like it's soon.
- 1:17It's coming and with all the attention that it's getting, it
- 1:20should be happening. But who knows, especially
- 1:24because the creators and maintainers are university
- 1:27students. So I'm not sure if anyone feels
- 1:29comfortable using it in production yet.
- 1:31But if you are tell me okay side note, little tangent over Let's
- 1:36get back to Daniel and the Vector Compute.
- 1:40This is something that I felt like I needed a metaphor before
- 1:45I understood it, and he broke down the metaphor very nicely.
- 1:48He said. You know what?
- 1:50Think about when you are shooting photos with a DSLR and
- 1:54you get a RAW file. That file is not the most
- 2:00beautiful image, but what it has is all of the information
- 2:04contained in that image. O What you're able to do when it
- 2:09comes to tweaking that image is bring out the pieces that you
- 2:15think are best in that image. And the metaphor there is that
- 2:20when it comes to embeddings, throwing them into your vector
- 2:25database with the vector compute, he wants all of the
- 2:31embeddings to be flattened and he wants the vector compute to
- 2:36be that is. That allows you to bring out
- 2:41what is most important when it comes to your use case and what
- 2:46you're optimising for and what you want to show people.
- 2:49O In the case of a recommender system that you want to show
- 2:53people some for you page type stuff, you're going to reference
- 2:58certain features and certain parts certain embeddings more
- 3:03than others. And when it comes to a rag
- 3:06system, you're going to reference different embeddings.
- 3:12Now if that ain't a good metaphor, I don't know what it
- 3:17is. I'll let him explain it more.
- 3:19Hopefully. You all aren't thrilling things
- 3:23at your screen or phone. Whatever you're listening to is
- 3:27on because it took me so long to understand what the hell was
- 3:31going on and hopefully after this you two are able to
- 3:36understand what is going on. If you end up using Super
- 3:39Linked, let me know. I would love to hear what your
- 3:41experiences is with it. If you have strong opinions
- 3:45about why or why you shouldn't use it, I would also love to
- 3:48know that. I know there are opinionated
- 3:49people in the community and so that's cool too there This
- 3:54episode I wanna preference this with.
- 3:56It is not sponsored. I just love Daniel and what he's
- 3:59doing and wish him the best. Go check out superlink.com if
- 4:03you get the chance. And also he is creating Vector
- 4:07Hub. So that's a way for you to
- 4:10compare all of the different vector databases and what their
- 4:14features are. O.
- 4:16That's cool because it's basically like nonbiased third
- 4:18party able to look at all the different vector databases.
- 4:23Not just the specific vector databases that are only vector
- 4:28databases, but everything. I mean everything from the
- 4:31Vector database that is something like a Cassandra that
- 4:35bolts on a vector database to like a quadrant which is only
- 4:39for Vector database or vectors. Ohh, I said Vector database way
- 4:44too many times in that last sentence.
- 4:47So let's get into the conversation with Daniel.
- 4:50Check it out superlinked.vectorhubithinkiswhathesaid.com
- 4:55and we'll leave it all links in the description for you anyway.
- 4:58And if you enjoy this, if you think that it is worth talking
- 5:03about it more, hit me up or share it with a friend.
- 5:06Let's get into the conversation and I hope you enjoy my new song
- 5:11prompt templates, which you can stream anywhere, especially on
- 5:14Spotify right you went from being a recommender system,
- 5:28Basically, what was the V1 idea? And then how did you realise
- 5:35that you needed to pivot? Yeah, it was a, it was a
- 5:39journey. I would call it kind of
- 5:41incremental steps to success, not not like full periods had
- 5:47many, many years ago. We wanted to build a social
- 5:51graph across the Internet, right, Kind of social login
- 5:56basically there's those kind of COVID was just kicking off and
- 6:02everybody was online wanting to connect scattered across
- 6:05communities. So we built various apps for
- 6:08professional communities with the eye towards shared login and
- 6:14kind of shared user pressurised model under the hood, right.
- 6:18I have been at in the YouTube ads for six years.
- 6:21So user modelling is kind of the particular hammer I have to hit
- 6:26every nail. So, OK, so that that was the
- 6:31plan. And then we realised that, OK,
- 6:34all kinds of other products want to build personalised
- 6:39experiences, right? Understand what the user wants,
- 6:42give it to them quick, right. You know, around the time TikTok
- 6:47also came out with the Monolith paper where they kind of
- 6:51cemented, you know some of their ideas into real time
- 6:55personalization and our system was kind of structured quite
- 6:59similarly. So that was like the initial
- 7:02validation and we kind of opened up the platform and started to
- 7:07onboard people beyond social like jobs marketplace and and an
- 7:13ecommerce company and and so on. And then you know we we we
- 7:20raised some memory and the second time we tried to do that
- 7:24and really was like ohh recommend the system as a
- 7:27service. We see that you know five times
- 7:29a year what's so special about this one.
- 7:32And we had some ideas for how not to be stacked into like a
- 7:38software consultancy mode, building ranking models, nuance
- 7:42for each client because they typically have those companies
- 7:45go right you kind of speech people on KPI list and then you
- 7:49go building these ranking models based on the behaviour of those
- 7:54specific users in that specific context.
- 7:56We didn't want to do that. We wanted the product and so we
- 8:00we basically said, OK, in this whole recommender system stack,
- 8:04you typically have retrieval and ranking, right?
- 8:06And our goal was to basically reduce the need for ranking as
- 8:13much as possible and do it by making the retrieval smarter,
- 8:16right. And we did that by, you know,
- 8:20carefully constructing these complicated vector embeddings of
- 8:23both the users and the the recommended items, and then
- 8:28having our own query language into the vector search vector
- 8:32retrieval. That would allow you to express
- 8:35all these different objectives that you have when you do
- 8:38recommender systems and even add the behavioural feedback loops
- 8:42on top without building this kind of monstrous ranking model.
- 8:48So I'm just wondering the basically the Rexus as a service
- 8:55feels like when you say it, Ohh yeah everybody needs recommender
- 8:58systems and it should be something that is important to
- 9:03people. But none of it took off because
- 9:06of this consultancy angle or this basically white gloved
- 9:10angle that you have to take and you realised, OK, if we're gonna
- 9:16have to make custom models for everyone or if we're going to
- 9:20try not to make custom models for everyone, then what can we
- 9:25do to make this easier for us? And presumably that's where you
- 9:29came up with the idea. Ohh, wait, there's other pieces
- 9:33to the puzzle that are harder problems that maybe we can go.
- 9:37It's like you're going a little bit lower down the stack, right?
- 9:40Exactly. You know, by kind of asking
- 9:43ourselves the question of can we make the underlying retrievers
- 9:48retrieval smarter, right? We spend a lot of work in the
- 9:54vector embedding calculation for these complex data objects and
- 9:59then they realised that just that alone is is an interesting
- 10:04problem to solve that repeats across many different use cases.
- 10:08And that's where we basically a couple years ago started to
- 10:11build the vector computer, right?
- 10:15You know, kind of as productized as possible way to turn complex
- 10:19data into vector embeddings. For her.
- 10:23And and you told me about this before, but basically it's like
- 10:31in software, especially recently we have vector, well we have
- 10:37compute and storage. And one thing that has been
- 10:41very, very popular and it's been almost like a a boon to software
- 10:46developers is decoupling compute and storage.
- 10:49And right now with vectors, we have vector storage, but we
- 10:55didn't really have anybody that was thinking about vector
- 10:57compute, and judging by how hot the vector space is, it seems
- 11:05like it's ripe for compute now. Why?
- 11:10I guess, Why is it different than just like regular compute,
- 11:15right? That's probably like the first
- 11:17question that you got asked by every VC that you tried to raise
- 11:20from on this second time around. Right, right, right.
- 11:24So, so as you're saying you know the there is the, there is the
- 11:28storage part and you know I would also add to the the
- 11:34problem of organisation, right. So building the vector index,
- 11:37doing all the things the database has to do, sharding,
- 11:41reliability, access controls, right.
- 11:45So there is a bunch of people working on that And then how is
- 11:50the compute different? At the end of the day you are
- 11:54spending, you're burning the same electricity running on the
- 11:57same hardware. So at the end of the day, the
- 12:00the underlying operations are the same and the name of the
- 12:04game is always about how do you control this thing, right?
- 12:08Do you have, are you building models on strategy in charge?
- 12:13Are you running data pipelines in ARK?
- 12:17Right? Are you using these kind of
- 12:18completely generalised computing models to solve the problem or
- 12:24is it the worse thinking about a an abstraction that's specific
- 12:29to turning data into vectors, right.
- 12:31And and if you basically say OK, how would that move right?
- 12:34Like what would be the properties that you want out of
- 12:37such abstraction? Then?
- 12:39That's when you start to think about kind of the data
- 12:42engineering problems. How?
- 12:43How do you keep things synchronised?
- 12:45How do you do backfills? You think about the machine
- 12:47learning problems. How do I, for complicated data
- 12:52object with million different properties of different types?
- 12:55How do I somehow boil this together and make the vector
- 12:58right? What's the?
- 12:59What's the highest level abstraction that allows me to do
- 13:03that but still gives me control, right?
- 13:06So it's not like I just turn everything into string and then
- 13:09send it to a language model, because there's literally the
- 13:12opposite of control, right? So how do we do this?
- 13:16How do we put that one to? Help me tell me more about this,
- 13:21turning it into a string because I feel like you're talking
- 13:26directly to me. That seems like something that a
- 13:29lot of people do, and then what? The big biggest problem there is
- 13:33that we can't wait this string in any way shape or form.
- 13:37Right, right. So, so basically, you know,
- 13:40let's take an example, right? You have, let's say, a movie
- 13:44database and you know all kinds of things about your movies,
- 13:48right? The movie names and the
- 13:51categories and the descriptions. That's the easy stuff.
- 13:55And then you know things like viewership, popularity, right?
- 14:01You know specific click patterns of your users if they interact
- 14:06with these movies, right? These are all the different
- 14:09signals that you have about the movie.
- 14:12Maybe the lounge date? When was it released?
- 14:15Right now when people do rag and they do recommend the systems
- 14:19and and and kind of retrieval unless they train their own you
- 14:23know, 2 tower reckless model which often still doesn't eat
- 14:28all the data because some of it is just difficult to eat.
- 14:32Basically the the kind of language model first approach
- 14:36here right is to stringify the whole movie right?
- 14:40So you literally concatenate all the different properties and and
- 14:45then you take embedding and the embedding is like God knows what
- 14:49right? Thousand floating point numbers
- 14:52right. And and then you know some
- 14:55movies kind of get clustered and and some movies are near each
- 14:59other that that that really shouldn't like you look at it as
- 15:02the you just eyeball right. You didn't get to quantitative
- 15:05test you just eyeball this thing and there is something weird.
- 15:09Every once in a while something gets slotted somewhere where it
- 15:12doesn't make sense and then you'll notice that ohh it's
- 15:15picking up on something in the description that sort of like
- 15:17makes it think that is related to this other thing but but
- 15:21really shouldn't. And that's where prompt
- 15:23engineering something, which is my both most and least favourite
- 15:27part of this because because people literally start to say
- 15:31like, you know movie name column, movie name, comma and
- 15:37then like here's the description, but it's not so
- 15:39important. But you know, FYI Callum and
- 15:42then the description, right. And then they're like just kind
- 15:45of tweak just how you know that's for heavy-handed.
- 15:51They should be about processing the description and there's just
- 15:55not a way to build an actual system, right?
- 15:59Yeah. Right.
- 16:01So, so it's any time, either way to kind of put the constraint
- 16:05over it, like how do you want to create this pressure to for
- 16:08certain things to be close together and certain things to
- 16:11be far apart in a way that makes sense to your specific problem,
- 16:15right. So maybe you Add all about like
- 16:18freshness, right, recent news, right.
- 16:21And so then you would want to kind of really boost the, the
- 16:24aspect of how long has the news been out, right and and you know
- 16:29popularity and relevance to your query, whatever it is, right.
- 16:33So we spend a lot of time thinking about ways to express
- 16:37these different, often competing objectives and then have the
- 16:43underlying system kind of navigate the trade off which you
- 16:46know like OK in amongst engineers which means basically
- 16:52you know you're putting all these things to the embedding,
- 16:54right. Then you are constructing the
- 16:55search vector to tap into all those different properties of
- 16:58your movie and it had. It helps if the video index is
- 17:03kind of unit normalised, it's not biassed to any of those
- 17:06signals. And then when you search you can
- 17:08create the biases or awaits different ways to different
- 17:13aspects of the vector space. Basically, so I like this.
- 17:18I think the idea here of you saying this is how you can get
- 17:24more control when it comes to dealing with vectors and
- 17:29especially on things like recommender systems or rags
- 17:32where you have all of this data but you don't necessarily know
- 17:36which data is important. Or you do know which data is
- 17:40important, but you don't have a way to explain to the model how
- 17:45ohh, this data is more important except for through prompt
- 17:48engineering and you never really know if that is working or not.
- 17:52And so now you're saying, If I'm understanding this correctly,
- 17:56with the vector compute, you're able to take all of the
- 18:01different things that the vector or the item is made out of.
- 18:12So it is made of a photo and some description and some
- 18:18features about how long people watch the video and the
- 18:22popularity score. Whatever, there's metadata,
- 18:26there's the actual title and there's the images.
- 18:30So you have all these different pieces of the puzzle, and what
- 18:35are you doing with all that information?
- 18:38Exactly. Exactly.
- 18:39How are you tapping into, you know, expressing your desires?
- 18:44Yeah, in in, in the language of those different properties,
- 18:48right. And how are you sort of doing it
- 18:52in a way that everything has a type you know, so there is no
- 18:57random Python lambdas flying around and you have a very clear
- 19:03path from whatever you cook up in your notebook, right, to
- 19:08actually launching stuff. Because yeah I I think that's
- 19:12going to be sort of important this year is to already talks
- 19:17about getting things to production and not everybody is
- 19:21very clear on what that means. You know that's the
- 19:24responsibility of the vendor kind of stop at you being able
- 19:27to build a docker container or is it sort of reasonable to
- 19:32expect that you will get help setting up all the resources in
- 19:38your in your cloud for example which I believe it is.
- 19:42You know if I give you a docker container, you still have to
- 19:45figure out all the serving issues right back feels.
- 19:50How do you like shared the workflow?
- 19:54How are you connecting this to the destinations?
- 19:56Because you know as as we kind of established, there is the
- 19:59compute and the indexing or management of the vectors,
- 20:03right? And so that means we work with
- 20:07the vector databases to make the overall offering better, right?
- 20:11And so now it also has to reflect all the sort of
- 20:14production implications of what the vector database wants out of
- 20:20the workflow, right? Like are you dropping a million
- 20:22vectors in it all at once? And have it, you know, is there
- 20:27an indexing parallelized like all of those considerations,
- 20:30there are part of the part of the problem and then you have,
- 20:34you know, you have the batch and you have the real time kind of
- 20:37use cases, right? Yeah, So, so, yeah, but there is
- 20:41a, there is a lot around it all kind of starting the notebook
- 20:46and then get it to production, the get it to production people
- 20:49kind of gloss over it, but it's, it's a lot of work, right.
- 20:54Yeah. We know that, definitely know
- 20:57that. So what does it actually look
- 20:59like in practise when you're setting up a system, how do how
- 21:03do you have like a vector compute deal or communicate with
- 21:07a vector database and all the other pieces like the embedding
- 21:11model and then the LLM and everything else?
- 21:14If you're doing some kind of RAG.
- 21:16If it's a Rexus, I can imagine it's a little bit different of a
- 21:20system design, so maybe you can break down those two and how you
- 21:23see the vector compute or the vector engine.
- 21:27What are you calling it? I don't even know.
- 21:29Is it a vector engine? Is it a vector compute engine?
- 21:32Is there a word yet? So we call it the vector
- 21:35computer and we kind of take it to the computer place just to
- 21:40illustrate that there'll be electricity spent on the CPU
- 21:46files, GPU type situation. And.
- 21:52Yeah, right. So, so in terms of kind of how
- 21:54does this look when you just want to solve the problem, just
- 21:57build the right system that actually returns reasonable
- 22:01results, right? This is what everybody wants.
- 22:04And you know the the sort of the end goal here should be
- 22:08something like, you know, you go to your cloud provider, anyone
- 22:13you choose and these people have marketplaces, right?
- 22:17And that's where you already probably provisioned your vector
- 22:21database. Unless you have one of the
- 22:23managed solutions, which is also fine, right?
- 22:25But for many people, they go to their cloud, they provision
- 22:30their whatever, XYZ database and and then it's just running
- 22:37there. You know you kind of pay through
- 22:39the same billing account and and then the the same way you should
- 22:43be getting your vector compute sort of system ray.
- 22:49You should be pointing it on one hand at the vector database for
- 22:53all the vector keeping vector indexing needs right?
- 22:57And you should be pointing it as where the data comes from right?
- 23:00Because as we said, right, if you, let's say you are a
- 23:05marketplace with houses, you know all kinds of things about
- 23:08those houses, right? And those these data lives in
- 23:13different systems, right. So you know their data
- 23:17warehouses, their databases that is kind of the BLOB storage
- 23:22where you might have other types of features that you compute
- 23:25with some other system. Typically.
- 23:29You know there is kind of I like to separate this computer
- 23:32problem from ETL. So I like to think about it as
- 23:37kind of ETL is getting the data from outside of your system to
- 23:42your system, right. So you pull it from your mail
- 23:45teams and from your CRM and all of those million different
- 23:51places. I think the modern data stack
- 23:54kind of movement last couple of years pushed forward the idea
- 23:58that OK, you should somehow like pull from all these different
- 24:01tools and centralise it and somehow organise it in your core
- 24:06infrastructure. And it could still mean a few
- 24:08databases, but you know, it's like something sane and and then
- 24:13you know, compute problems, any kind of machine learning
- 24:16workload should kind of start from those core pieces of the
- 24:20infrared and take it from there, right.
- 24:22So that's why I usually say kind of ETL is kind of the step one
- 24:27and then any kind of pipelines, model training, all of that work
- 24:32is kind of on top of it. And then you mentioned one also
- 24:35important thing which is kind of the model inference.
- 24:39So normally you have this kind of train, infer loop, right.
- 24:43And with the language models now maybe that should be renamed
- 24:46signed to infer, right. So there is usually kind of Sam,
- 24:52Sam, some Sage Loop. And yeah, like you have to
- 24:58figure out when you are building your own, you know, vector
- 25:02computer, you have to figure out, OK, we're not winning the
- 25:06models and how are we making those, let's say inference
- 25:09services accessible from our pipelines, right.
- 25:13This is the kind of these were that advertised basically,
- 25:16right. We have some Kafka Streams
- 25:19coming in. We have some Spark pipelines
- 25:23shovelling data around and somehow from those pipelines and
- 25:27all of those workers and those pipelines we have to either run
- 25:31the models on the same nodes or we have to create an inference
- 25:37service that we call from those pipelines.
- 25:39And then kissing and not embedding things multiple times
- 25:44or actually re embedding things when the model version changes.
- 25:48I do this kind of then the intersection of data
- 25:51engineering, machine learning, engineering, right.
- 25:54So those are some of the things you need to think about when you
- 25:57build vector compute. I gotta tell you man, because
- 26:05I'm not sure how I feel about the vector computer name, but
- 26:11you said so many incredible things in the last five minutes.
- 26:14I'm gonna let it slide alright, but the vector computer, we're
- 26:17gonna have to think about a different because I'm not sure
- 26:22it has that that spiciness, that touch that I'm looking for.
- 26:26But whatever. Who am I to tell you how to do
- 26:28your thing? So the marketing guy you know,
- 26:30you tell me I I'm just an engineer trying to you.
- 26:33Know. Yeah.
- 26:35Goodbye. There's so much incredible stuff
- 26:38that it's doing. I wish the name could encompass
- 26:41that more than Computer Vector Computer, but we'll figure that
- 26:46out. Maybe by the time this airs
- 26:47we'll have a different name for it and I'll put it in the
- 26:50beginning as like an A dumb addendum, however you pronounce
- 26:53that word. So OK, there's.
- 26:55There's a lot to unpack there though, when it comes to
- 26:58everything that you just said. And I'm gonna try and just goes
- 27:02through it in my head where it's like, right.
- 27:04Yeah, you have the ETL that comes through where you're
- 27:07grabbing all this data from outside.
- 27:09You're throwing it into whatever your S3 buckets, your data
- 27:12warehouses, all that fun stuff. There's nothing new there when
- 27:14it comes to ETL. I think everybody's fairly
- 27:17familiar with that. Then you have the data in your
- 27:22ecosystem, and from there you're going to be taking that data and
- 27:28throwing it at the vector computer so that the vector
- 27:32computer can create different and.
- 27:35And you're not creating embeddings from this like the
- 27:40embedding piece is a whole different area.
- 27:43You're taking the data and you're creating embeddings in a
- 27:47different route, like. Can you breakdown how does this
- 27:49work with embedding models and all that fun stuff?
- 27:52Yeah, so you are taking everything you know about the
- 27:57entity that you want to process, right?
- 28:00So if it's your user, then it's all their behavioural data, all
- 28:03their metadata, everything you know, right?
- 28:08And you are somehow either training a custom embedding
- 28:14model that can eat all of those different types of data that you
- 28:17have about your user and produce the perfect vector that encodes
- 28:22everything you know about them, right?
- 28:25So you either do a custom model and then you bring out your
- 28:29Pythor to create all the layers that can process feature
- 28:33engineer. Because some of these inputs
- 28:36will be like variable length click sequences and whatever,
- 28:39right? So you you either build a custom
- 28:42model and then you give it some sort of objective for a
- 28:47downstream task and then kind of back propagate the error and the
- 28:50typical kind of machine learning work that we all do.
- 28:54Or you find, let's say on the opposite extreme, you have your
- 28:58language model serving in some entrance service in your own
- 29:03cloud, or use one of the, you know, providers that can help
- 29:06you serve open source model, let's say, and that they'll
- 29:10have. Fortunately, people stringify
- 29:13everything they know about the user and send it to the language
- 29:16model and make the vector that way, right?
- 29:18Those prompt and blitz, yeah. So I think in an ideal scenario,
- 29:25you have figured out the way to reconcile those two worlds,
- 29:28right? Because there will be some bits
- 29:31of text that you have on your user, right?
- 29:34And so for those using some sort of language encoder, is is is a
- 29:41good idea right? Because this has been trained on
- 29:44a lot of data, it's good, right? So, So for those isolated bits
- 29:49and pieces of text, if you have some way to put some framework
- 29:52around it that doesn't require you to first flatten all the
- 29:56string bits together but somehow keep it separate, it's a good
- 30:01idea to use a language model, right?
- 30:03But for for some of the other stuff, yeah, you might need an
- 30:07image embedding, you might need the GRASS embedding, you might
- 30:10need the time series embedding. Maybe you just want to encode
- 30:14the timestamp, but then do it in a way that when you do cosine
- 30:17similarity afterwards, it's like a time delta calculation, which
- 30:21is like another kind of math puzzle so, so you know.
- 30:26Long story short, you are collecting from your internal
- 30:31data infrastructure everything you know about an entity.
- 30:35And you want to have some process that runs through all of
- 30:38the instances of that entity and turns them into vectors that
- 30:43describe that encode and compress all your organisational
- 30:48knowledge. Because then when you do
- 30:50retrieval on top of that thing, or when you do any kind of
- 30:53modelling on top of it, the input will be as rich as
- 30:56possible, right? You have the highest chance to
- 30:59actually make this thing to to work, so that's one of the goal.
- 31:04So I'm starting to wrap my head around it and excuse me for
- 31:08taking a little bit longer than expected on this because I was
- 31:13too caught up with the name and I wasn't focusing on the actual
- 31:16important part. But the idea here then if I'm
- 31:20understanding it as you're saying, being able to fine tune
- 31:25and embedding model is a superpower and it's very
- 31:29important when it comes to Rags. So let's just take Rags as an
- 31:31example, right. And so you want to make sure
- 31:35that that fine-tuned model is as accurate as possible.
- 31:39The way that you can make it more accurate is by creating the
- 31:43right pipelines with the data coming from.
- 31:46So it gets ETL, then it's in your data warehouse or S3
- 31:50bucket, whatever. Then you're going to create a
- 31:53pipeline. It's going to go through the
- 31:56vector compute and it's going to be used because the vector
- 32:00compute is able to weigh what's important, what's not, and then
- 32:03you're able to fine TuneIn an embedding model off the back of
- 32:07that in the pipeline, kind of looking at it sequentially.
- 32:13I mean, that's like we're getting there, we're getting
- 32:15there. Keep it going, then.
- 32:19Keeping yeah. Tell me where I'm wrong.
- 32:21Tell me what else? So it was all correct except
- 32:24when one aspect, which is when you make this vector for every
- 32:29user. Think about it as a problem of
- 32:32just kind of collecting all the available information but not
- 32:36yet putting in the biases. So you want kind of raw vector,
- 32:41you want you want the vector that encodes everything you know
- 32:44about the user, but kind of normalises the components so
- 32:48that at the inference time or at the, you know, when you actually
- 32:53do the querying. For example, right here in first
- 32:56time is partly because is it the inference of the embedding model
- 32:58in the English timeline or is it the inference when you actually
- 33:02query and you want to have your access to answer the question,
- 33:06right. So when when we talk about this
- 33:09sort of like end inference, right, so we are training a
- 33:11model on top of the vector, we are doing retrieval on top of
- 33:15the vector. That's the time when you want to
- 33:18start playing those biases, right?
- 33:20Because then you can abit as you can be kind of fast and nimble.
- 33:24You can converge to biases that now you know hit the sweet spot
- 33:29for your different for example, screens where you display the
- 33:32recommendations, all of that stuff, right?
- 33:34So that you want that to happen as late as possible that there
- 33:38and then in terms of the vector formation, you know, how do I
- 33:41make thousand float numbers that encode everything I know about
- 33:44my user or my document chunk or house or whatever.
- 33:51You want to index these vectors into your vector database, but
- 33:55you want to make them not opinionated at all, right?
- 33:59So somehow you want to normalise the strength to which all these
- 34:04different parts contribute, right?
- 34:06Do you care about freshness or do you care about relevance?
- 34:09Well, 5050, that's the index, right?
- 34:12And then and then when it comes time to OK, we have the new
- 34:16page. OK, so there we want to boost
- 34:19freshness, right? We have the 4U age, OK, little
- 34:23bit more relevance, right. This is a concern that happens
- 34:26kind of at the final moment of just pulling the data together
- 34:31and putting it in front of the user or clustering your machines
- 34:35and manufacturing like, OK, in this moment, in this context,
- 34:39which machines will break, right.
- 34:41And and that's the time to put in the the biases all the way up
- 34:45to them. You just want to take everything
- 34:47about your machine and boil it down to the vector to just
- 34:52encode all your observations in kind of impartial way, let's
- 34:57say. OK.
- 34:59And so then the vector computer comes in in that last moment to
- 35:04make sure that it weighs out everything properly.
- 35:08Both in the ingestion and in the last moment.
- 35:10So basically our component basically works with the vector
- 35:15database both for the industry and for the retrieval and and
- 35:23you know then for the using the vectors as the feature vectors.
- 35:29So you are training another model on top of the output of
- 35:31the vector computer. That model can learn its own set
- 35:36of biases, right? So in that workflow, the
- 35:41workflow you you, you don't necessarily need the vector
- 35:44computer anymore. But what will happen is that the
- 35:46model that uses the vector as an input instead of click sequences
- 35:52for users will be much simpler, right?
- 35:55So now you have. Now we have this model that you
- 35:57are training on labels and vectors, and you know like a
- 36:01floating point vector is, you know it's.
- 36:03For a language model, it's That's exactly what it wants to
- 36:08eat, right? OK.
- 36:10So then if I'm understanding this again, I'm just going to
- 36:13keep like throwing it back at you to make sure I understand
- 36:16because I really want to wrap my head around it and I think I'm
- 36:19there, but I'm not sure if I'm fully there, so feel free to
- 36:23correct me. Again, the reason you're
- 36:24flattening it out is because you want the vector computer to do
- 36:29all the heavy lifting. You want all of this to be as
- 36:32flat as possible, so that later you can add in some kind of
- 36:36logic and the vector computer and let that give you the
- 36:39control that you were talking about before.
- 36:42Yes, yes. Alright.
- 36:44If it's maybe like you take A roll photo, right.
- 36:48That's like a bit kind of greyish, right?
- 36:50Like underexposed or whatever they say raise.
- 36:52Like, yeah, you know, it kind of looks boring, but it preserves
- 36:56the most information, right. It preserves the most
- 36:59information about the scene. And then.
- 37:02And then it depends. OK, do I want this for wedding?
- 37:05Do I want this for social? Right.
- 37:06You like, push the curves this way, that way.
- 37:10And that's kind of the ingestion and the OK, I'll leave this, I
- 37:14mean rap for my. There we go.
- 37:18That is perfect because now I understand.
- 37:20It's like I want to capture as much information as possible and
- 37:25then I want to be able to do what I will with it.
- 37:28However, I like to show that information to people.
- 37:32I should be able to turn the knobs in the way that I want to
- 37:35turn the knobs and then it gets outputted in something that I'm
- 37:40happy. With.
- 37:41Yeah, yeah. That's that's exactly right.
- 37:44OK, All right. So now it's starting to come
- 37:47together for me where I'm seeing, yes, this is giving you
- 37:52more control because you're making the decisions with the
- 37:57vector compute as opposed to what you would traditionally see
- 38:02in the RAG pipelines or even Rexus.
- 38:05And it's like just going straight from the vector
- 38:08database and maybe you've got your embedding model that throws
- 38:12the embeddings into the vector database and then the retrieval
- 38:15and it goes to the LM. And maybe what goes to the LM is
- 38:19right, maybe it's not. And you've also got your prompt
- 38:22templates. And.
- 38:23So now what you're saying is before the embeddings go to the
- 38:30LLM, they're hitting the vector compute, and then the vector
- 38:33compute is turning the knobs to say this is more important, this
- 38:37is less important, and we feed it to the LM in the way that we
- 38:42want. It's like our secret recipe now.
- 38:44Yeah, exactly. And very importantly in that
- 38:49sort of progression that you mentioned, when you add the
- 38:53query time, you are for example learning or or AB testing,
- 38:57what's actually important use case, you don't just use that to
- 39:02reorder the candidates that you already retrieved, right.
- 39:07This is, this is the one of the problems that exist in the space
- 39:10is that people do that initial retrieval kind of them kind of
- 39:13heuristic, right. Throw in a sub hybrid search, do
- 39:17just kind of like simple embedding of the query and just
- 39:21kind of see what gives them the text embeddings that come back
- 39:26And then they try to be clever about, OK, let's reorder this
- 39:30thing to match whatever objective we have.
- 39:33But now you are reordering oh point 1% of your database,
- 39:37right? You have retrieved a small
- 39:40fraction of all the stuff you have and now you are trying to
- 39:43be smart on top of that. The obvious problem with that is
- 39:47that there is all these other stuff in your index that maybe
- 39:50you didn't even surface right. And so when you edit the query,
- 39:54time when you are deciding okay, freshness is this important,
- 39:58popularity this important, relevance this important.
- 40:02It's important to express them in a way that it informs the
- 40:04underlying retrieval, not just I'll retrieve thousand things
- 40:09and then I'll have my sort of kind of linear combination
- 40:13little model that figures out the preferences and then I'll
- 40:16reorder because that misses kind of the point.
- 40:20So you know this kind of retrieval time vector computer
- 40:26objective is to express these different goals and then
- 40:30formulate the search vector such that when you go and do the
- 40:33nearest neighbour search in the vector database, you are already
- 40:37in the sort of step boosting certain aspects and so on.
- 40:40And finding the globally optimal set of items that have the right
- 40:45trade off between how far is the house, how big is the house you
- 40:49know is the like price history similar to how is that clicked
- 40:54on before right like you need to be able to express.
- 40:57This the add yeah? Yeah, and send it to the index,
- 41:02right? And then the index should be
- 41:04globally finding you the 10 houses that already kind of
- 41:09fulfilled that combination of objectives and then you just
- 41:13returned it to the user, right. So at the start of this
- 41:16conversation, we talked about how our objective for a couple
- 41:19of years was to eliminate the need for the re ranking by
- 41:24making the underlying search smarter.
- 41:26So while this is how that works, right, that you kind of express
- 41:30the objective, we construct the third vector in a way that's
- 41:35where the boosting happens, so that when you send it to the
- 41:39nearest neighbour index in the in the vector database, it's
- 41:43it's already doing that kind of opinionated combination of
- 41:47factors, right? And the underlying service,
- 41:50cosine similarity we don't have. I don't think you need something
- 41:53like special scoring functions in the index itself, because
- 41:58that's slow, right? You have to be building an index
- 42:01without user defined functions. That really goes well.
- 42:05And so you need some way to do this with like vanilla nearest
- 42:11neighbour search with cosine or dot product or something.
- 42:15And yeah, it's possible. Like we have been discussing
- 42:20like a hypothetical system so far but but you know like the
- 42:26the the company is is is building so super linked is is
- 42:31building this this this vector computer actually by the time
- 42:36this goes live we might have sort of done the initial kind of
- 42:41public relief already so. There we go.
- 42:45Just the thing that. Everybody go to
- 42:47whatsuperlink.aior.com. Right.
- 42:54Everybody just listening. He just gave me the biggest mean
- 42:58mug ever, first saying dot AI? No, no.
- 43:02Well, we we have AI as well I think, but but the Ohh even
- 43:07better. So you can go to superlink dot
- 43:09AI and get redirected to superlink.com.
- 43:12OK, cool. OK, yeah, so for anyone there
- 43:14after the recording, but. OK, we'll cut it out if you
- 43:18don't. People should go to
- 43:22superlength.com and learn. You know, learn about other ways
- 43:28of building vector computers, but I think this will be like a
- 43:33whole another field, right? So you should also kind of, you
- 43:37know, hopefully we kind of covered between ideas for how
- 43:41you can build a vector computer of your own.
- 43:45And I think for some people that definitely might make sense,
- 43:50have been thinking about this for a while and you know we're
- 43:52happy to to chat and kind of share what we learned and maybe
- 43:58just sort of like as we come up on the on the wrap up.
- 44:04I mean, wait, don't go anywhere. Yeah, I still got so many
- 44:06questions for you. Do you have a hard stop?
- 44:09You do. I can go.
- 44:10I can go a little bit overtime. OK.
- 44:12I can give them 10 minutes. Ohh.
- 44:15Man. Alright then, speak fast, man.
- 44:17You talked about speed. Yeah.
- 44:19Yeah, How does the, what have you seen when it comes to speed?
- 44:23Like, does this speed things up? Does this slow things down
- 44:26because it's one more step? Is it negligible?
- 44:31You have to do this step anyway. You have to turn your data into
- 44:34vectors and typically the language model which is kind of
- 44:39taking the brand of these workloads right now is the
- 44:43biggest possible model that you can be using to turn data into
- 44:46vectors. There's for different types of
- 44:49data, there are specialised models that do it much more
- 44:52efficient. Play long train, let's say graph
- 44:56embedding for for the graph nodes to encode the structure.
- 45:01It is much smaller model than the language model.
- 45:04So actually kind of, you know, only using language model where
- 45:11you absolutely have to and then using specialised models is kind
- 45:14of one of the themes of how you make all these systems more
- 45:16efficient. So it's definitely there is
- 45:19there is a part of that being reasonable around the
- 45:23infrastructure, how you organise the pipelines, Is the model
- 45:27collocated with the pipeline workers or is it a separate
- 45:29service, You know, you know, you need people thinking about that,
- 45:32that type of stuff when you build this yourself.
- 45:36That's where the games come from, right.
- 45:40So yeah, I think for, for like if you have a scale of kind of
- 45:45single millions or maybe low 10s of millions of data points, your
- 45:50main problem will be how do we experiment, right?
- 45:54How do we sort of try different ingestion policies and and query
- 46:01policies in some environment where we can eyeball or throw
- 46:04things in front of the user? Quickly iterate right step one
- 46:09and then step two? Yeah, like how do we end the
- 46:11back field? How do we get the service to be
- 46:14reliably running in our in our cloud?
- 46:17And how do we manage the lifecycle of the underlying
- 46:19vector database? The.
- 46:22These are kind of like basic concerns, but there is a bunch
- 46:25of moving pieces right? And and then and you don't
- 46:30really care that much about OK for everyone model ran, you know
- 46:37how many milliseconds per vector does it take, right.
- 46:41It's more the just kind of covering all the bases of the
- 46:44process and and just kind of getting good at launching things
- 46:48and then when it goes to sort of like 100 million plus data
- 46:52points that's where you really start to care about OK, are we
- 46:57serving this model as efficiently as we can, right.
- 47:01And you know, each cloud now has some managed language model
- 47:04serving offerings or their third parties and so then it starts to
- 47:10make sense. But you know, just to give you
- 47:13some like specific number A-100, for reasonably small chunks of
- 47:18text with reasonable embedding model can make thousands of
- 47:22vectors per second. So did you lose the belief?
- 47:30And it's not gonna be with the GT4 or with like Lama 2, but
- 47:35but, you know, everybody knows the massive embedding table and
- 47:39on that table you can find models that have one or 200
- 47:44megabytes basically. And then yeah, those are those
- 47:48are fast. Sweet.
- 47:49So there is something else that I wanted to call out which I
- 47:52think is worth everyone that is listening.
- 47:54Go and check out some of the great work that you're doing.
- 47:57Vector Hub too, if they haven't seen it already.
- 48:00If anyone wants to compare vector databases, you've done a
- 48:04great job because you have no dog in the fight basically.
- 48:08I really like that you're a vector compute, so you don't
- 48:12have to worry about the vector databases.
- 48:14You're compatible with all vector databases, I imagine.
- 48:17And that gives you a nice position to be like, OK, here's
- 48:21what each vector database does and doesn't do, and here's a
- 48:25table so that if anyone wants to see what vector databases do
- 48:32what, then they can go to vector hub dot a icom.
- 48:37Superlink. No, no, it's it's Hab.
- 48:40Ohh God, I got it so wrong. We'll leave it in the show
- 48:43notes. Have have looked superlength.com
- 48:46is or the maker have where we have basically contributor
- 48:53provided deep dives on Information Retrieval
- 48:57reflectors. So Rex is Semantic search rag to
- 49:02do this stuff in browser introduction we try to be quite
- 49:07practical and little bit advanced, right?
- 49:11Not your totally basic thing, a little bit more advanced tricks
- 49:15and tips and so that's the vector have have got
- 49:19superlink.com and then yeah we have basically partnered with
- 49:25the different vendors in the vector database space to try and
- 49:29map out the different offerings, right.
- 49:35For this is one of the problems that we hear when we chat with
- 49:38new folks coming into the space is they're trying to wrap their
- 49:41head out. OK.
- 49:41When do I use what right? Which one is good for?
- 49:46If I have many small indices or few big indices or how does the
- 49:51pricing work with that? Or is it running bundled with my
- 49:56own app or is there a managed offering or which hybrid search
- 49:59features, right. So we have basically for 36 or
- 50:02so different vendors, we have a list of something like 30
- 50:09different features. And then what we tried to do
- 50:12with the with the vendors is not just say, OK, the database
- 50:15supports the feature or partially supports it, but also
- 50:19link to the documentation for that specific feature, right.
- 50:24So when you are kind of learning about the space and you are you
- 50:27clear about certain things, it's very easy to go and see OK,
- 50:31which database supports the functionality I need and then go
- 50:34to the documentation to kind of double check does this actually
- 50:37mean what I think it means. And and you know the the vendors
- 50:42kind of send us it's it's backed by GitHub, so it's GitHub repo
- 50:46with Jason files for each for each vendor and the vendors send
- 50:50us pull requests to keep the data up to date.
- 50:53So this has been working quite well and it gave us a way to
- 50:58kind of chat with all these people and you know, build that
- 51:01relationship as well. So as you said, you know we
- 51:03don't have a horse in the race. It's just that we need databases
- 51:09that that work well and that people, you know a kind of
- 51:13comfortable with and for us that made total sense to kind of put
- 51:17together the data set and just help everybody understand this a
- 51:20bit better. So lucky for you, you get to
- 51:23benefit from the hundreds of millions of dollars that have
- 51:27been invested into vector databases in the last year
- 51:30because you can partner with all of them.
- 51:32So just jump on the hose marketing trends and get after
- 51:38it. Yeah, exactly.
- 51:39And and in some way help them deliver on that kind of
- 51:43overarching promise, right. So just basically everybody is
- 51:50excited about deep learning based retrieval and feature
- 51:54engineering work, right? This is the top of mind for
- 51:59people, and a lot of the sort of materials out there make it look
- 52:04super easy, right? So you can just you know then
- 52:09something through open the eye and retrieval quality will
- 52:13happen and then in practise folks get into this project and
- 52:19it takes quarters to get something like really, really
- 52:23working and we want to sort of remove the disappointment,
- 52:27right. So like everybody is excited and
- 52:30we want to keep the happy train going and people out existence.
- 52:34I think, yeah, it's going to take both of those pieces of the
- 52:38compute and the the the vector indexing and manage and those
- 52:44pirates have to work together basically.
- 52:46So that's that's what we want to do.
- 52:49Well, I love what you're doing. I also want to call out that
- 52:53it's not just for rags, right? Like I think we made it pretty
- 52:57clear, but just to reiterate that anyone doing anything that
- 53:01deals with embeddings, which of course recommender systems are
- 53:05huge when it comes to that. And that is more of a
- 53:08traditional ML type of system as opposed to the LM type system.
- 53:15Vince, Vector Compute feels like it is also really interesting
- 53:20for that and it can help your system perform better.
- 53:24Yeah. And then another kind of big one
- 53:26that we didn't really discuss that much analytics, you know
- 53:30you want to find customers that behave similarly.
- 53:33You want to find the your your machines in a factory that will
- 53:38break at the same time. So doing kind of clustering on
- 53:42top of these vectors or training other models or just doing OK,
- 53:45show me similar products that sell similarly things like that.
- 53:52You know, I think by the end of this year, you know if we do a
- 53:56good job on partnerships, people will be doing these kind of
- 54:00queries in their business intelligence and they will not
- 54:03necessarily know that actually they ran a kind of super linked
- 54:07workload under the good. But they will be tapping into
- 54:11the this kind of dream of deep learning based retrieval, right.
- 54:17That's the goal is to kind of make it accessible to as many
- 54:20people as possible when they ordered the work today, right.
- 54:24So the hype is awesome, but you know, I I really love to work
- 54:29with folks who have the ordinary problems and they just want to
- 54:33get their job done and kind of meeting them there, right?
- 54:37Yeah. Ohh man, that's so cool.
- 54:39I'm getting goosebumps just thinking about it.
- 54:42I love what you are working on. I appreciate you coming on here
- 54:46and explaining it to me like I'm five.
- 54:48I know it took a little bit longer to get it, especially
- 54:51because this is like the second or third time that I've talked
- 54:53to you about it then which I didn't want to mention that
- 54:56while we were talking about it. I should know by now, but I was
- 54:59just, you know, going a little slower so that all the listeners
- 55:04out there could go stay with me and.
- 55:06Hopefully everybody along exact. I wish it was like that, man.
- 55:12I have a bit of a baseball moment for me, but.
- 55:16I will say we go, there we go. There.
- 55:18Yeah, exactly. Well, hopefully I I do have a
- 55:21better understanding. I will encourage everyone that
- 55:24is listening to this. If you're interested in it, go
- 55:27to superlink.com. Also, if you want to partner
- 55:30with Daniel and the Superlink team, get after it and make sure
- 55:34that you hit him up now because dude, I think you all are going
- 55:37to blow up. I will say that right now I'm
- 55:39going to call it and I I really hope so.
- 55:43Alright, thanks a lot for having me and it's been a pleasure to
- 55:47dive into this esoteric topics of vector embeddings.
- 55:52And yes, around in the community and on the upcoming event.
- 55:58There we go.