• Home
  • Explore

MultiQueryRetriever | πŸ¦œοΈπŸ”— Langchain

python.langchain.com/docs/modules/data_connection/retrievers/MultiQueryRetriever

2 Users

0 Comments

19 Highlights

0 Notes

Tags

Top Highlights

  • Distance-based vector database retrieval embeds

  • queries in high-dimensional space and finds similar embedded documents based on

  • distance

  • 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.

  • MultiQueryRetriever

  • 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

  • Simple usage

  • 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.

Ready to highlight and find good content?

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.

AboutPrivacyTerms

Β© 2023 Glasp Inc. All rights reserved.