Transcript
This transcript was autogenerated. To make changes, submit a PR.
Hello, everybody.
My name is Shannon Lau.
I'm the head of engineering here at Design Strike.
Today, I'm going to be giving a talk about hybrid image search, and
really what I'm talking about is searching for image descriptions.
Okay, so I'm just going to give a quick intro about myself.
I'm going to talk about the project and design straight.
And then I'm really going to talk about, the 3 elements types of searches of
text vector search and hybrid search and then really talk about where we are
and things that we're still working on because we don't have a perfect and not
necessarily getting all the results we want to the things that you can do and
look at on your side moving forward.
Okay, so again, as I'm Shannon, CTO, or head of engineering here at Design
Strike, my previous background, I've been in the software engineering field
for 20 plus years, worked at companies like RBC, so those of you abroad, RBC is
Canada's largest bank, and before that I was working at, initially as a startup
called Microsigns, I got acquired by a company called InView, so I was their
head of engineering there for a while.
and I was overseeing it for about five years or so.
we're not a design stripe.
Our front end is Next.
js, React.
next.
js.
mostly some Python, but we do have some TypeScript stuff in the back.
We do use a little bit of Lang chain in a couple areas, and then obviously
predominantly our back end database is Mongo, and we do have GCS for
storing our physical assets, And then just a little bit more about me.
I'm married.
I'm the father of a 10 year old son.
And, most of the parents will get this, but I'm also an unpaid Uber
driver where I take my son around to all of those different activities.
most of the weekends are basically me chauffeuring from one activity to another.
Okay, so I'm just going to give a quick little demo about design straight,
not to plug or just to understand the context and really for people understand
that, what we're trying to solve here.
before I do that, there is 1 thing I forgot to introduce is to say, I'll
include a link to my LinkedIn profile.
It has all my contact information on here as well.
You feel free during the presentation of his questions to
pick me ask questions afterwards.
I know this is a kind of a virtual thing and you're watching this after the fact.
So if you see anything, you have questions about stuff.
By all means, just ping me directly and then we'll get
on a call and we'll step out.
yeah, so again, DesignStripe is a smart design platform, like a
combination of Canva and ChatTBD.
It creates ready to publish social media right now for your brand and business.
So let me just demo this off and talk a little bit about
what exactly that means here.
So, the workflow of what we do, and I don't want to give
everybody a full demo right now.
I just want to focus in on how the image piece fits into this.
but just at a high level, what we do is that we built our own kind of scraper
that takes in a website URL, scrapes all the text, gets the industry, the tone,
and identifies the fonts by looking at what are the fonts on your website.
Gets different colors, we identify the language, and then we get logos.
And with this, we call this our brand DNA.
So this detailed summary of information here is what allows us to build
contextual layouts for your business and meet your business needs.
So not only do we have an understanding of your business, the language, the industry,
and the tone, we also have colors of logos that allows us to build out assets that
are in line with your business needs.
Expected colors, bright colors and logos.
So the general workflow is this is that you can see we built out a series of.
Topics that we think are maybe relevant to you.
So these topics are not, they're obviously, you can see here, the
rise of AI generate illustrations and their impact on design.
So these are tailored for this particular customer, right?
So we use, tips for using effective using SVG illustrations
in web development, right?
So this is specifically for draw kit, which is like a, an
illustration assets, right?
So these are all generated on the fly for the user based
on their company information.
So if I grab this one right now, It's a point click.
You pick one, one button and then boom, you're given a whole series of customized,
ready to go, social media posts.
So I'm just going to wrap up here just quickly on this side.
I do want to just highlight a couple of quick things here.
So let me go here.
When we talk about, social media posts, it normally in our space
consists of three different elements.
One is the layout.
So like the visual placement of elements on the page and like little graphics and
things like this, the way the logo be.
Second thing is the.
Text, right?
So what's the copyright in the design space?
They call this the copyright.
Where is it?
Copyright going from here, right?
So this is, behind the scenes using an LLM.
We have a couple of ones again, throbbing open AI and Gemini that kind
of used to generate this text based on the brand and everything around that.
And then there's an image, right?
right now, what we have is a stock image photography that we have access to.
We also have access to a couple of the third parties ones where we can.
Yeah.
Yeah.
Get, send search queries down to get, relevant images on this.
Okay.
now, okay, let me just, I want to highlight one last thing.
the goal of what this is, where we're trying to do is that these images are.
Based on our stock photography or a third party stock photography that we have
access to We're scraping on customers website and ideally especially for
things like e commerce where or where they have lots of product and services
It may be really useful to be able to pull those images in and load them into
our product right now So it would be a great power for people to be like,
hey, we scraped your Candle business and then we pull in an actual physical
Images of your candles into these assets.
I think that is really where the direction we're trying to go to.
We also have access in a product is a image generator, which allows
you to connect up to a third parties APIs to generate right now.
So it'd be also useful to be able to generate images and have
those images automatically be pulled into these assets as well.
So being able to have Hey, I just generated four or five images about
let's say candles or illustrations and have them automatically
pulled in here and get images if they're relevant about this topic.
So that's a key thing that we're trying to look at here.
Okay, so before I go too far in here, I'm going to talk a little bit about
the tech stack that we're working with.
And then I'm going to, and then we'll get into, but I want to
highlight a couple of things.
So just a general workflow where we are.
So our front end is Vercel.
we have, I've really simplified everything down at this point.
This is our infrastructure is a little bit more complex than this, but I just want
to highlight the main areas right now.
So when we do with uploading of an image, what we do is
we load the image to our GCS.
And then, you'll notice before we're actually saving the Mongo,
we then take the description that was used to generate the image.
And then we send this down to a vector embedding.
And so we get a vector of that string.
if you come over here, a group of kids playing hockey on a pond.
So that string was sent to OpenAI and calling the vector embedding API, which
then comes back with a long string, right?
A long series of numbers.
And then we store that with the description of the image that was used
generated where the image or asset are stored, the user, a bunch of other
metadata dates and times and things.
And the vector embedding gets stored.
in one location on in Mongo as part of the same collection, and then all
this is stored on, JKE for communities.
Okay I am going to highlight right now one of the things when I was doing this
presentation is that I was starting to have like blocks of code of Python
code and it was getting in a bit I was trying to do show you how to configure
the ORM to run the aggregations, but I really decided just to simplify
down the flow just because I felt that it was becoming a tutorial on
FastAPI and Mongo connections and the aggregations and a bunch of other things.
And I really just wanted to narrow it down because these are virtual
talks and, I think it was going to lose a lot of its focus right now.
And I really just wanted to narrow in on just the implementation
of the hybrid search from Mongo.
again, within a Python environment.
And if afterwards you have any questions about this or confusion,
By all means, just like I said, you've got my contact information,
ping me and we can get on a call.
Okay.
Just give me a second.
I'm going to set up my demo here.
Okay, let me just get this to text.
Just, I'm using this here because it's, I'm, just so you're clear.
What I did is I modified this UI here just so that for the purposes of this
demo, you can see in here that I've got the text, the vector and the hybrid.
So I had to throw something together quickly, which is not in production.
and that's why I just I'm running that here locally, is just so that I
can have that control for the demo.
So I don't have to keep toggling and changing the back end.
So I had to do some modification to the code and that's why
it's just done like this.
So in this environment, just to keep things simple and confusion, I've got
a couple of images here of some just different topics in them, but there are
two in here that have similar topics.
This is a picture of a black Porsche, and then you've got a picture of a
red Ferrari sports car right now.
So this is what I'm doing is your traditional.
Text search on how all this works.
So let me just walk through, actually I'll do the demo of this and then
I'm going to go do the, I'll show through the, index set up in the
aggregation for this in here.
If I come over here and I type in car, let's give it a second.
I'm going to see the red Ferrari.
So the descriptions, I made a mistake when I was testing this out here.
locally, I'm not including descriptions in that search results, you'll notice that.
A picture of a red Ferrari sports car is in the description here,
which is perfect, is what we said.
But why did this car not come up?
Why did the Porsche not come up?
if we look at the text description, there's nothing in there about a car.
basically, the way that the text is working is looking for keyword searches,
and it didn't see car anywhere in here.
And so basically getting the results that come up in there.
And so if I come back to this one and I go automobile,
I get no results.
So even though I have two automobiles in here, I'm getting
no results back from them.
And the reason is that there is no, keywords.
Automobile is not in this description here and is not in this description.
And so this is the route of where we're trying to solve, right?
And so if we go back to my previous demo, if somebody is trying to build
a social media about that thing about simplify your SVG usage, this may be a
picture of a woman working on a computer.
But how do you know, like, how do you, how do the association that this is?
Linked, right?
Because this description may not have anything about SVGs or
illustration builders in there.
It may just be a picture of a woman with a dog working at her desk Doing
creative work or something like that how do you link that to and so
this type of an image would not come through in the search results on this
Okay, so let me go through just how this was set up and then we'll keep
working through And go from there.
So just In my document, in my slides that I'll be sharing with you guys, I have
links to the Mongo site and some other links that really give a good example.
These were the links in the documentation that I used to
get up to speed on this stuff.
I didn't want to just copy it over and paste it over here and I also,
it's just a lot of text right now.
And I just, what I'm going to do is highlight the key things
and then in my slide you can find links to the documentation.
Again, if you have questions, just ping me on LinkedIn or you got
my email and contact information.
We can find some time to do this.
Okay.
So the 2 steps process is you need to create a search index.
And then you need to create an aggregation, right?
So the search index is you're setting up an index on Mongo collection And here, you
know i'm putting in I want to make sure that deleted is an index Description is
auto complete and then i'm using user id.
These images are per user So it's not like a large image catalog that's shared by
everybody It is what we're trying to do is filtering for a user So these searches
have to be on users and maybe additional other people The filter criteria,
and that's what I'm highlighting.
So this is the search index, and then this is your traditional search aggregation.
And in here, I'm doing the criteria of filtering my user ID.
I will highlight this, I had mentioned to you at the beginning that there is,
we do have a bit of TypeScript and that's why you're seeing a bit of a camel case,
is that some of these fields were built with camel case in some of them right now.
So it's just one of the things as a team that we need to address.
Just give me a second.
Alrighty, let me go on to the next one.
Alright, so I'm going to just talk a little bit about Vector
embeddings, I'm going to show a link to the page here right now.
And in my slides here, again, vector embeddings is on its own topic.
there are a huge enormous of YouTube videos that you can get up to speed too.
there are very good, the open AI docs on this are very good.
I, this is how I learned, I went through and played around with it as well.
I don't want to just go and give a five minute speech on vector embeddings.
I think if you're not up to speed on this stuff, I highly recommend just
maybe watching a quick YouTube video.
I'll give a quick overview of what this is, but I'm mainly providing links to how
this is all going to work for you guys.
Okay, so just to highlight from OpenAI, vector embedding.
A vector embedding is a vector list of floating point numbers.
The distance between vectors measures their relatedness.
Small distances suggest high relatedness, and large distances suggest low.
So what is it really doing?
Why are we using vectors?
The key thing is trying to get semantic between how do you, if you have two
sentences, a red automobile, a red car driving up the street versus, a
automobile driving down the laneway.
Like, how do you measure those similar?
The keywords aren't really lining up because there's different words,
but they do have very close meaning.
And so this is what, one of the things that we're trying to solve
with vector embeddings is that how do you measure semantic meaning?
How do you measure the meaning of those sentences and not
just looking at the keywords?
And that's, is the core of what embeddings are trying to do is measure the.
the meaning and it's between those two sentences by not just looking at the
key words, let alone those sentences.
So that is at a high level, the steps for creating an, a vector embedding.
I, again, I'll point you to this.
It's very detailed.
This is exactly how I'm doing it right now, but you're open AI has them.
There's a lot of other, LLM providers who have a different model that you
can connect to, but basically you send a string, your query string,
or your description of your image.
To open AI, if you use an open AI or whatever provider, it will
come generate a vector embedding and then you can save it in there.
And then when you want to do a match, you, if you're looking for, the automobile,
you would send that up to open AI would generate a quick embedding, and then you
can do your singularity match on that.
And again, I just mentioned why we're doing vector embeddings is to do the.
similarity search or semantic search between two different
strings or in a database.
Okay, so now I'm going to talk a bit about, I'm going to shift in and
I'm going to go back to the demo.
I think I'll be consistent here.
Let me just pause here because I'm going to get my stuff ready.
So in our text search, we did this, right?
We did our search for automobile using text and we got nothing back, right?
So now what I'm going to do is I'm going to flip this to
vector and I'm going to do.
So now I'm getting two results back.
Okay, so now I'm doing a different vector embedding search, but I'm
getting two results back right now.
So when I did just a straight up text search, I got no results back because,
none of these descriptions in here mention anything about automobiles in
their straight just text right now.
However, when I put in the word automobile, I'm doing a vector
embedding on the phrase automobile, and I'm trying to find comparing
which are the results that have the most closest match to automobile, and
these are the ones that are coming up.
And so this is a bit of the power of vector embeddings is that now
it can look beyond, the vector search and maybe a text search and
can be more of a meeting search.
So it can understand that automobile is very similar to a sports car
or is very similar to a Porsche.
These have similar meanings.
Therefore, they have higher results.
We should return these results back to the user.
So this is normally a point where I would pause and ask for questions.
But again, if you reiterate, I'll probably keep saying this, but if you
have any questions, don't hesitate to ping me afterwards or and, we
can book some time to review this.
I'm just going to talk a little bit more about the setup of the vector embedding
and how it works and then go from there.
Okay.
Again, this is very similar to what we've done before in the text search.
Now we're doing a vector search demo.
You've got the two pieces, you've got a search index,
and you've got an aggregation.
in the search index, you're creating a vector search index.
I, this is not Everything you need to do it.
I have a lot of links in the notes for you on how to, on where I set this up.
I'm just highlighting some of the key things that I
wanted to do in my dimensions.
key things here is the number of dimensions.
So how big is it?
So this is, 512 is a bit of a smaller dimension.
you can get to things like 1024, I believe, and even bigger
dimensions if you want to.
Bigger dimensions come at a cost in the sense of your data
storage is going to increase.
So you're going to be storing lots and lots of images or
lots of just vector embeddings.
If you're using a very large dimension for each one of them, it could,
slow things down and just take up a bit of the data space storage.
But the bigger the dimensions tend to be, you get better results.
The path, right?
So I mentioned to you that we have restoring the text prompt
and the vector and bronze.
They're separate, right?
So we put the vector embeddings in one column effectively in the collection and
then just the text in another column.
that's why it's description values, right?
So it's not the description.
It's description values are stored separately.
It's still within the same collection, same document, but separately.
Then you can choose your, obviously the type is vector, but you can choose
your similarity, and there's really three types of similarities you can
use cosine, dot product, and Euclidean.
And again, you want to play around with those values a bit when you're doing
your setup, just to see the difference.
You'll see a lot of people start defaulting to cosine,
that's what we did as well.
We've played around with a couple of them, and cosine seems to
be working and getting results.
And the last thing I wanted to show is just including filter
path, which you can do in there.
As I mentioned, we are looking for user based images, not just a mix
of searching of everybody's images.
Okay, so now we're getting into the aggregation.
So how do you set up and run the aggregation?
So you've got your index name, the path is whatever you pass in the embedding.
So when you're doing your search, when you get automobile, we would
send that up to OpenAI, get it quick.
That's normally sub one second, maybe even faster to get an embedding on,
on a string, and then, you can limit and add some limits and number of
candidates, and then you can apply it.
And then this will basically return a set of results that
will include the similarity scores for each of these as well.
All right.
So this is going through this demo here.
So this is working well right now, but there's a challenge in
it right now that when I asked for automobile, what happens if I wanted
to give more weight to keywords?
So like, why did the red one come up versus, the black Porsche, right?
So how do I control, let's say I wanted to do a black automobile to
make sure I start to favor keywords versus on the automobile, because
you might be dropping some results, even though the keywords are there.
So how do you find that right balance?
And that really is what we're talking about in hybrid search.
And what hybrid search is really saying, okay, the text search is really good.
It's great for the keyword matching.
The vector search is really good for semantic matching.
But what happened?
Do I combine those 2 together into 1?
And that's really what we're talking about in a hybrid search.
So I'm going to come back over here and I'll go through
the setup of the aggregate.
Hybrid search and then I'll give you a demo and then I'm going to talk about
some optimization techniques that we can do and then show some final
wrap it up with some next steps in terms of things that you can look at.
Okay, so I'm just going to first start off with just a setup, that we're going to do.
again, it's really the same setup in terms of your previous,
your indexes haven't changed for both your text and your search.
So I'm not, I've already showed that in the previous one.
It's really a two step process in terms of your aggregation.
as I mentioned before, I wasn't going to go through the whole setup of Mongo,
just it would have been a lot more slides and a lot more information.
And I just want to keep this high level and really focus on a particular topic.
Just I found the focusing on the aggregation side.
I thought would be more valuable for you for the people viewing this.
So aggregation part one.
So the vector search.
So in here I'm including the index name, the description values.
This is very similar to what we had before.
So this, what you're doing at the first stage of your aggregation is
you're running the vector search.
So this is exactly what I did before, which is a traditional, it's the same.
you then add an additional stage after this.
Which is you do a union with and so what you're doing a union
with you're specifying a column.
So I'm still running this is union which is allowed would allow you to do I think
searches across multiple collections, but I'm doing it within the same collection.
I'm then creating a separate pipeline and now I'm doing a text search.
So this is within one aggregation pipeline.
I can do two sets of searches.
So here I'm doing in a text search.
Here's the index.
I'm now doing compound.
I'm searching the description.
So now I'm doing a text search and then I'm applying my filter part two.
So both of these things, it's allowing me to combine those results
and get them into, both within one kind of query to the database.
I'm running my tech search, I'm vector search.
I'm then bringing in the tech search I'm, and then I'm mixing
and matching those ones together.
Okay.
So if I come over here now I'm on hybrid and do black automobile.
So now, right now, so it's going and looking at the keywords and I'm gonna
talk a bit about how you can play around with this, but now I'm getting the
black automobile because I'm introducing the keyword black in that sentence.
And it's getting in there right now.
It's giving them more of a favorable rank and getting better results.
And so again, I would normally stop here and just see if
there's any questions in it.
So that's the gist of it, right?
So now we're talking about combining these two together to get both
your text and your, And your vector search combined together.
So this looks great.
But the question is, how do I get priority order, order the results?
what can I do to like, make sure all I've got is two sets of data
to merge them together and you're just dumping them out there.
How do I organize and sort those results and make them more relevant?
And I'm going to talk about two different things that we've done.
the first one is reciprocal rank.
Again, in the notes here, I'm referencing to a document on Mongo.
I'm going to summarize the key attributes in there.
But again, I followed their documentation pretty much to the T and was able
to implement that and get it up and running for my application as well.
I'm going to go through the highlighted points that I think are relevant, but I
would recommend either reaching out to me afterwards, but also looking at the
documentation from Mongo for this as well.
So aggregation, same as before.
I've got my vector in here, but you'll see that I've done
something a little bit different.
So now what I'm doing is I'm taking out something called the vector score,
and I'm adding a reciprocal rank.
So a reciprocal rank will do is you take your results, and however they're
sorted, it will give them a number in, starting from the first one.
It gives them like a ranking number where they're divided by 60 here.
And this is a technique that allows you to compare different
sets of results together.
So here I'm applying a reciprocal rank.
And giving them like a uniform number where they rank based on their,
order in the list, not their search score, but their order in the list.
And that's your key for another reciprocal rank.
So I'm applying this, giving me a uniform number to work with on
the vector side, and then same thing on the aggregation side.
So now I have a reciprocal rank here where I can do this on the text score.
now it's looking at giving me a uniform sort of number across.
Again, based on how they return back in the results right now.
And then lastly, you can do a final combine and merge these things,
insert them by those combines.
So it'll match them together, looking at what was the vector score search in
the reciprocal rank for Say the Porsche.
What was that one?
And then merge them together and then sort them into the order as well at the end.
Again, I refer you to the docs here on how they did it.
They give a pretty good walkthrough and a good demo that you can do.
And again, don't hesitate to ping me if you have any questions on this.
perfect.
Great.
But there's an issue there.
If we go back to some of the results, the way that vector search is going to
do is it will return back your results.
And give you a search index score in terms of how good those results are.
So you will actually get this hockey scene coming back in your results.
So the challenge with it is that.
I look for black automobile.
Why am I getting the hockey scene and my results?
And the reason is that it's giving you a similarity search, and so
in the reciprocal rank, when I was doing this, you could get some
of these scores are like, what's the hockey score seen back for?
What's this one back for?
And what you need to do is what we ended up doing was saying, I want
to actually put some thresholds.
In these numbers to see and say, only return me back results
where the similarity score is above 60 percent or 70%.
And let's say, similar to the text where you can only show me text
results where, the similar search, the text search score is above, say, 0.
6 or whatever the number you want to play with.
so if we take that to the next stage, this is what we're
looking at here is combining now.
So now what I'm doing here is I'm sending some filter criterias in the aggregation
to say, before you do your reciprocal rank, I need you to filter out everything
that is below this score right now.
So again, I'm showing bits and pieces, not the full pieces.
but what I did is that I put in a minimum text score and
then a minimum vector score.
And so I attended a stage, which I did before this, but I was running
out of space here where I would do a match before I would actually do the
reciprocal score to filter out and say, okay, anything where the men, the
minimum vector score is below say 0.
6, you ignore.
Or same thing for the tech score as well.
And so I can put those criteria in and then now I know that of the results that
are return, return with the reciprocal rank, I'm also not getting anything where
that is below certain threshold values.
And then that improves, my score as well.
Okay.
One last thing I'm gonna talk about and then I'll go through the next
steps so you can also in this, When you're combining this in there, and
when you look at the document for reciprocal rank, you can, they will
give you an example on text weight.
So you can see in here, and this is all from a lot of this is
following from the documentation.
So again, I was trying to paste this in here and not have 30 or
40 different slides for you guys.
I wanted to keep it short and sweet.
But, In their documentation, you'll see that they apply text weights on.
So if you want to say, I want to reference, I want to give more favoritism
to the text results versus the search results versus the vector results.
You can play with those numbers and say, Actually, I'm going to give more weight
to text versus more weight to the vector search, and then you can do that with
applying some weights over here as well.
Okay, so now we're at the point where we're going to wrap it up.
This is normally when my presentations, I would turn it to the audience
and ask for any questions.
I'll say, and I'll keep repeating myself on this one.
Please, if you have any questions, you're not sure about this stuff.
Don't hesitate to ping me.
We can find some time.
I would gladly love to get on the talk.
And, it's great.
It's great to give these presentations, but I get a lot of sort of enjoyment of
actually being able to talk to people about this and see the passionate.
so just where are we at right now on this stuff?
So we're still working our way through some of these results.
there's a couple of challenges that we're running into.
our data sets that we're working with, because they're user generated
images, can sometimes be a bit small.
And we did, I did talk to the folks from Mongo about this, and they said that
their vector search is really designed to optimize for larger data sets.
So when you give it like four or five results, it doesn't tend to
always give you the best search results back, which is one.
So we're still working around with that.
We are playing around with things like maybe, the number of Words, do we start
to maybe if there's a lot of words in that search string, do we start
to give more weight to the vector?
Because maybe more of the meeting is important versus keywords.
So we're playing around with that as well.
And just seeing how can do that.
But this is really the hardest part of it is the setting this
up is actually relatively easy.
Once you get the hang of it, it's actually.
You're going to be spending most of your time in the indexing space of how
do I get the results to be really good.
The next thing I would be looking at is playing around with the large vectors.
So you can play with the different vector size and the number of dimensions.
in the open, in the vector embedding side here, you can
specify the number of embeddings.
That you can do, I can tell you, we were originally on the Ada model, which is one
of their months, a year and a half ago.
They've since in that launched out, say, the text embedding to be small
and text embedding to be large.
And the results we get from search are a lot better, but they're much
bigger in vector embeddings as well.
But you can specify the number of dimensions.
I'm just trying to make sure in here when you're creating your vector embedding,
say, this is what I'm looking for.
again, this is another thing that you can look at and play around with, which is
like, how many results to have, what's the dimensions and see, am I getting
better results with one versus the other.
The other thing you can look at is you can start to play with sort of the
traditional boost scores for text search.
And, if you look at the, on the Mongo site, there's lots of different techniques
on how you can play with boosting, different text search scores to get
better results, improving, get more favoritism weights to, depending if the
keywords are at the beginning or not.
So that's just one other thing that you can play with as well.
And then lastly, this is one of the things we were doing on this path
we're really trying to optimize this.
And we stopped there a little bit, because I was talking to a colleague
of mine and he gave me a different idea and what some other people are
looking at is that this adds a bit of costs and it adds a bit of latency.
But what we're trying to do is like.
We're running the query on the aggregation we're trying to basically figure
out of the, say, 20 results that are returned, which are the most relevant?
And can you filter out the ones that are no longer relevant?
And so having to do that is like playing with, the weights and things.
It's a little bit, you're really trying to get that semantic meaning.
one thing that we, I've heard about, and I'm going to start looking
at is, can you do final stage?
Okay.
you do your vector aggregation, you do your text aggregation, you combine
the results and let's see, you look for 20 before you return them back to
the user, take that and just run that up and do an additional call to open
AI and then just do a general get the LLM to do a comparison for you and just
like filter some of the results out.
So ask it a problem and say, this is the original search screen.
Here's 20 results.
Can you order them by a relevancy and discard any of them that
you think are not relevant?
This will add a cost, obviously, and it will add a bit of latency.
but you will tend to get much better search results because you're doing
like a final pass through an LLM.
And you're basically objecting and saying, I'm looking for X. Please sort
these 10, 20 different results based on X, and please discard anything that
you think doesn't really match as well.
again, we're still in the early stages of playing with this, and I'm more than
welcome to share our progress, but it is something that I've heard and I've
been talking to other people about.
This is saying a lot of these tweaking with these engines is really
trying to find the most natural, meaningful Results and, this is what
I know around is really good at.
Okay.
I'm going to wrap it up there.
I've already gotten close to about 35 minutes.
I want to 1st, thank you again for taking the time and hopefully you got
to this part of the presentation again.
I've shared out on my LinkedIn page.
I've got all my contact information there.
So if you have any questions, any concerns, you want to jump on a
quick call, just chat or whatever.
Pick my brain or you want to go through some code and look at this.
I'm always available.
Just drop me a line.
I'd love to chat about this stuff.
And I hope you enjoy the rest of your presentation.
And I want to be a big thanks to all your organizers for this.
And, thank you very much.
Appreciate it.