The invention provides a large
language model retrieval enhancement generation method based on adaptive
rewriting selection, and is suitable for the field of
natural language processing and
information retrieval. According to the method, a pre-trained large
language model is introduced to automatically generate diversified
rewriting queries, and a self-supervised
rewriting sequencer is combined to perform correlation evaluation and sequencing on candidate rewriting statements. Through a context multi-arm bandit selector, the optimal rewriting number is dynamically determined according to query
semantics, a high-quality rewriting subset is selected in a self-adaptive mode, and the coverage degree and precision of
information retrieval are effectively improved. And the rewriting-driven
knowledge retrieval module utilizes a plurality of high-quality rewriting, integration and deduplication related knowledge blocks in parallel, and continuously optimizes a Bandit strategy based on a feedback
signal to realize online self-learning. Different from a traditional RAG
system depending on fixed parameters and static rewriting, the method can intelligently adjust the retrieval process for complex or variable queries, and the accuracy and practicability of a retrieval enhancement generation
system in an
open domain and a multi-hop reasoning scene are remarkably improved. According to the method, efficient and flexible
technical support is provided for intelligent
question answering and knowledge discovery in a complex environment, and the application effect and popularization value of the large
language model are greatly enhanced.