3 ms·
1. it's using "semantic" search. so if the embeddings understand that "inline subquery" and "lateral joins" are more closely related than say cross joins or som
by sharemywin 3y ago
1. it's using "semantic" search. so if the embeddings understand that "inline subquery" and "lateral joins" are more closely related than say cross joins or something then that doc segment will get returned.
2. the use cases for this would be you want shorter answers then a collection of document snippets and or you had follow up questions that might not be in the same document. and/or you prefer conversing with a chatobot over reading lots of extra text.
3. you can attach a source column to the embeddings and snippet in the vector database.
Here's an explanation of pgvector using supabase
https://supabase.com/docs/guides/database/extensions/pgvector https://supabase.com/docs/guides/database/extensions/pgvecto...
it's basically just a special kind of index to use on an embeddings column.
- czue 3y agoGreat answers. The only thing I'll add to number 3 is that you can also get the LLM to cite which source it used within the matching snippets. A simple example with OpenAI functions-style declarations looks something like this: https://gist.github.com/czue/81eea58cb718e67be7c57c224800e304 https://gist.github.com/czue/81eea58cb718e67be7c57c224800e30... If you do this you can pare down the citation from everything that returned from embedding search to what the bot actually used to generate its answer.
- andrenotgiant 3y agoIs there something (besides the convenience of being already in the proper vector formats) unique about the combination of semantic search and LLM's that makes it a better fit? I guess I'm surprised that the approach is to use semantic search here, where in regular search, completely different algorithms (Lucene?) have "won".
- lmeyerov 3y agoKeyword search won for commodity bc semantic search was weaker and more complicated. More sophisticated orgs like Google switched to semantic/hybrid for years as both problems got addressed. Now that opensearch/elasticsearch have vector indexes, and high quality text embedding is a lot easier...
- petra 3y agoIs the search in such systems simple and intuitive, or are there tricks to get better results from such systems ,as a user?