The invention relates to the technical field of
natural language processing and
artificial intelligence, and particularly discloses a generation and retrieval collaborative optimization method and
system for a ReGenSearch task. The
system comprises a reflection module, a
query rewriting module, a retrieval and generation collaborative optimization module, a
reinforcement learning and reward mechanism module and an answer optimization and generation module. The method comprises the following steps: analyzing problems and expanding backgrounds through a reflection module, generating an optimized retrieval query through a
query rewriting module, dynamically selecting a generation or retrieval strategy by a retrieval and generation collaborative optimization module, and judging whether iteration is carried out by combining a self-commenting mechanism; a joint strategy is optimized through a DAPO
algorithm, and feedback is evaluated through a layered reward mechanism; and finally, comparing the candidate answers by using a DPO
algorithm, and selecting an optimal reasoning path for outputting. The method does not need
cold start or
fine tuning in the specific field, can directly run based on the pre-trained large
language model, adapts to multi-step reasoning and long thinking chain tasks, realizes deep fusion of generation and retrieval, and remarkably improves the accuracy, stability and generalization ability of complex
questions and answers.