RAG Self-Querying Technique

From GM-RKB
(Redirected from Self-querying)
Jump to navigation Jump to search

A RAG Self-Querying Technique is a RAG algorithm technique that ...



References

2023

  • Claude 2
    • QUOTE: Self-querying is a RAG technique that uses an additional LLM to interpret the original user query and transform it into a structured query format. For example, the self-querying LLM could convert a natural language question into an SQL query. This structured query can then pull specific information from databases and other systems, rather than relying solely on unstructured text retrieval. The self-querying LLM acts as an interpreter between the user's intent and a more optimized database query. This allows the capabilities of the retrieval system to be expanded through structured data lookup. Overall, self-querying adds more flexibility to RAG architectures by enabling LLM-powered query conversion to leverage both unstructured text and structured databases for context retrieval.

2023

  • https://python.langchain.com/docs/modules/data_connection/retrievers/self_query/
    • QUOTE: A self-querying retriever is one that, as the name suggests, has the ability to query itself. Specifically, given any natural language query, the retriever uses a query-constructing LLM chain to write a structured query and then applies that structured query to its underlying VectorStore. This allows the retriever to not only use the user-input query for semantic similarity comparison with the contents of stored documents but to also extract filters from the user query on the metadata of stored documents and to execute those filters.