The application discloses a
syntax robustness reinforcement training method for large
language model sequence knowledge reasoning, comprising the following steps: firstly, sequence
knowledge question and answer samples are acquired, and question samples with different
syntax structures but
semantic equivalence are constructed for the same sequence
knowledge unit to form training data containing original questions, synonymous rewritten questions and standard answers; secondly, the large
language model is trained in the first stage based on the training data, the direct answering ability of the original question to the standard answer is learned through multi-task supervision
fine tuning, and a small amount of synonymous rewritten auxiliary samples are used to make the model preliminarily adapt to the compound output structure of "synonymous
rewriting-answer"; thirdly, a group relative strategy optimization
algorithm is used in the second stage, and a composite reward function composed of answer
correctness reward, semantic maintenance reward and format reward is combined to optimize the "synonymous
rewriting-answer" track generated by the model through
reinforcement learning; finally, a lightweight direct answer interface alignment is performed to make the model converge to the final answering interface of "input original question-direct output answer". The application is suitable for sequence
knowledge question and answer,
time sequence question and answer, process reasoning, hierarchical relationship judgment, education question and answer and enterprise knowledge service scenes, and can improve the answering accuracy and consistency of the large
language model under the condition of multiple
syntax variants.