Distance-based vector database retrieval embeds
queries in high-dimensional space and finds similar embedded documents based on
etrieval may produce difference results with subtle changes in query wording
Prompt engineering / tuning is sometimes done to manually address these problems, but can be tedious.
using an LLM to generate multiple queries from different perspectives
for a given user input query
retrieves a set of relevant documents and takes the unique union across all querie
o get a larger set of potentially relevant documents
Specify the LLM to use for query generatio
# Set logging for the queries
Supplying your own promp
supply a prompt along with an output parser
to split the results into a list of queries
Distance-based vector database retrieval embeds (represents) queries in high-dimensional space and finds similar embedded documents based on "distance"
The MultiQueryRetriever automates the process of prompt tuning by using an LLM to generate multiple queries from different perspectives for a given user input query.
the MultiQueryRetriever might be able to overcome some of the limitations of the distance-based retrieval and get a richer set of results.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.