Intelligent question answering method and system based on task-aware dual-track instructions

CN122529059APending Publication Date: 2026-08-07HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
Filing Date
2026-04-07
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

然而,现有研究表明,即使经过监督微调和偏好对齐训练的模型,在面对包含3个及以上约束的指令时,约束遵循率普遍不足60%,这严重限制了模型在智能问答场景中的可靠部署,因此亟需一种高效可靠的大语言模型的智能问答方法

Benefits of technology

本发明通过任务感知双轨道错误增强框架(Task-aware Error Augmentationwith Dual-tracks,TEAD)框架构造的负样本,与正样本之间形成了清晰的“形式合规 vs.形式违规”或“理解正确 vs. 理解偏差”的结构化对立关系,为DPO损失函数提供了强判别性的梯度信号,能有效引导大语言模型在复杂多约束场景下的指令遵循能力跃升,进而通过训练完成的大语言模型实现了高效可靠的智能问答,具体的:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122529059A_ABST
    Figure CN122529059A_ABST
Patent Text Reader

Abstract

The application provides a task-aware-based double-track instruction following intelligent question and answer method and system, and belongs to the technical field of intelligent question and answer and large language model processing, the method comprises the following steps: S1, receiving a question input by a user; S2, a large language model after training generates an answer to the question, and the training process of the large language model comprises the following steps: through a task-aware double-track error enhancement framework (TEAD), original instructions derived from an open source data set alpaca are generated into multi-constraint complex instructions through a constraint expansion module, then positive samples are generated, and the positive samples are respectively distributed to special negative sample synthesis tracks for execution bias or understanding bias to generate negative samples, form a high-discriminative preference data set, and perform preference optimization training of the large language model by using the preference data set; and S3, outputting the generated answer to the user. The application can realize efficient and reliable intelligent question and answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent question answering and large language model processing technology, and specifically refers to an intelligent question answering method and system based on task awareness and dual-track instruction following. Background Technology

[0002] The instruction-following ability of Large Language Models (LLMs) is a core metric for measuring their usability, especially in complex instruction scenarios with multi-dimensional constraints (such as formatting specifications, length limits, content scope, and style settings), where the model must simultaneously understand and strictly enforce all constraints. However, existing research shows that even models trained with supervised fine-tuning and preference alignment generally achieve a constraint-following rate of less than 60% when faced with instructions containing three or more constraints. This severely limits the reliable deployment of models in intelligent question-answering scenarios, thus necessitating an efficient and reliable intelligent question-answering method based on large language models. Summary of the Invention

[0003] To address the technical problems existing in the prior art, the present invention provides an intelligent question-answering method and system based on task awareness and dual-track instruction following, the technical solution of which is as follows: On the one hand, a task-aware, dual-track instruction-following intelligent question-answering method is provided, which includes: S1. The problem of receiving user input; S2. The trained large language model generates the answer to the question. The training process of the large language model includes: The Task Aware Dual-Track Error Enhancement Framework (TEAD) takes the original instructions from the open-source dataset alpaca, generates complex instructions with multiple constraints through the constraint extension module, and then generates positive samples. These positive samples are then distributed to dedicated negative sample synthesis tracks for execution bias or comprehension bias to generate negative samples, forming a highly discriminative preference dataset. This preference dataset is then used for preference optimization training of a large language model. S3. Output the generated answer to the user.

[0004] Optionally, the training process of the large language model specifically includes the following steps: S21. Constructing an instruction standardization and classification module: Standardize the format of the original instructions, and guide the large language model through prompt word engineering to classify the instructions into four task types: generation, rewriting, question-and-answer, and classification, and output task category identifiers; S22. Constructing a constraint extension module: Based on a predefined constraint classification system, intelligently add compliant new constraints to the original instructions to generate complex instructions with multiple constraints; S23. Construct a positive sample generation module: For the extended multi-constraint complex instructions, generate high-quality positive samples that fully meet all constraint requirements; S24. Construct a dual-track negative sample synthesis module, including Track A, which adopts a constraint violation strategy, and Track B, which adopts an instruction mutual exclusion strategy. S25. Construct a dynamic routing mechanism: Based on the task type of the instruction, automatically distribute the instruction to the corresponding negative sample synthesis track, generate negative samples, and pair them with positive samples to form a highly discriminative preference dataset; S26. Using the aforementioned preference dataset, train the large language model to improve the model's instruction compliance ability.

[0005] Optionally, S22 specifically includes: S221. Parsing the original instruction: Extracting the core task from the original instructions using a large language model and existing explicit constraint sets ; S222. Generate new constraints: Will , The model takes five pre-defined constraint categories as input, including content, format, style, scenario, and example, and generates the language model using prompt words. The instruction has no logical conflict with the original instruction and covers new constraints in different dimensions. And dynamically set the expansion quantity: for generation-type tasks, set For question-and-answer, classification, and rewriting tasks, set... .

[0006] Optionally, Track A is applicable to both generation and rewriting tasks. These two types of tasks have open output spaces and constraints are mostly formal requirements, which are prone to execution deviations. To address this execution deviation error pattern, the model is guided by prompt words to intentionally violate the format or style constraints in the instructions, generating negative samples that are correct in content but violate the form. Track B: Applicable to question-and-answer and classification tasks. These two types of tasks have clear semantic boundaries and constraints are mostly reflected in the content scope, which are prone to misunderstanding. To address this misunderstanding error pattern, a twin instruction that is mutually exclusive with the original instruction is constructed, and the fully compliant response of the twin instruction is used as a negative sample of the original instruction.

[0007] Optionally, Track A: For generation / rewriting tasks, design rewriting prompts, requiring the model to intentionally violate the format or style constraints in the instructions to generate negative samples while keeping the core content correct, and the prompts explicitly prohibit the output of meta-language declarations to ensure that the negative samples are natural.

[0008] Optionally, Track B: For question-answering / classification tasks, the model is guided to generate twin instructions that are mutually exclusive with the constraints of the original instructions through a few sample prompts. The requirements are: the core task remains unchanged, but the constraints are significantly reversed or replaced. Then, the standard generation module is called to generate a fully compliant response to the twin instructions. This response is directly used as a negative sample of the original instructions. This negative sample is semantically fluent and reasonable, but constitutes a hidden constraint violation of the original instructions, forming a high-difficulty and difficult negative sample.

[0009] Optionally, S26 specifically includes: Using the aforementioned preference dataset, the Direct Preference Optimization (DPO) algorithm is employed to train the large language model. Its core loss function is:

[0010] in, For the current optimized strategy model, As a reference model for freezing parameters, For the question, and They are positive and negative samples, respectively. This refers to temperature hyperparameters. The optimization objective of the loss function is to maximize the positive samples. With negative samples The difference between the log probability ratio of the current model and the reference model enables the model to learn to favor high-quality answers that meet all constraints and suppress erroneous answers that have execution or comprehension biases.

[0011] On the other hand, a task-aware, dual-track instruction-following intelligent question-answering system is provided, the system comprising: The receiving module is used to receive user input questions; A generation module is used to generate an answer to the question from the trained large language model. The training process of the large language model includes: The Task Aware Dual-Track Error Enhancement Framework (TEAD) takes the original instructions from the open-source dataset alpaca, generates complex instructions with multiple constraints through the constraint extension module, and then generates positive samples. These positive samples are then distributed to dedicated negative sample synthesis tracks for execution bias or comprehension bias to generate negative samples, forming a highly discriminative preference dataset. This preference dataset is then used for preference optimization training of a large language model. The output module is used to output the generated answer to the user.

[0012] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the above-described intelligent question-answering method based on task-aware dual-track instruction following.

[0013] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement the above-described intelligent question-answering method based on task-aware dual-track instruction following.

[0014] The beneficial effects of the technical solution provided by this invention include at least the following: This invention constructs negative samples using a Task-aware Error Augmentation with Dual-tracks (TEAD) framework. These negative samples establish a clear structured opposition between themselves and positive samples, representing "formal compliance vs. formal violation" or "correct understanding vs. flawed understanding." This provides a highly discriminative gradient signal for the DPO loss function, effectively guiding the large language model to leap forward in instruction compliance capabilities under complex, multi-constraint scenarios. Ultimately, the trained large language model achieves efficient and reliable intelligent question answering. Specifically: (1) Dual-track dynamic routing mechanism for task awareness: For the first time, error patterns in instruction compliance are distinguished into execution deviation and comprehension deviation, and a mapping relationship between task type (generation / rewriting, question answering / classification) and the two error patterns is established. Through dynamic routing, instructions are automatically distributed to the most suitable negative sample synthesis track, breaking through the design limitation of "single strategy covering all tasks" and realizing accurate error enhancement across task types.

[0015] (2) Track A of the constraint violation strategy (for generation and rewriting tasks, a strategy to generate negative samples with "correct content but violation of form"): For generation and rewriting tasks, design special rewriting prompts. While keeping the core content correct, deliberately violate the format or style constraints in the instructions to generate high-quality negative samples with "correct content but violation of form", effectively solving the execution deviation problem.

[0016] (3) Track B of the instruction mutual exclusion strategy (for question-answering and classification tasks, constructing twin instructions that are mutually exclusive with the original instructions and using their correct responses as negative samples of the original instructions): For question-answering and classification tasks, constructing twin instructions that are mutually exclusive with the original instructions and using the fully compliant responses of the twin instructions as negative samples of the original instructions, forming structured, highly difficult negative samples, forcing the model to learn fine-grained semantic understanding capabilities, and effectively solving the problem of understanding bias.

[0017] (4) Synergistic application of constraint extension module and dual-track strategy: Based on the five major constraint systems, the instruction complexity is intelligently extended to provide multiple constraint inputs for dual-track negative sample synthesis. Combined with preference optimization algorithm training, the instruction compliance capability of the model under complex multi-constraint scenarios is improved. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of an intelligent question-answering method based on task awareness and dual-track instruction following, provided by an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the formation of the preference dataset used for training the large language model provided in this embodiment of the invention; Figure 3 This is a flowchart illustrating the formation of the preference dataset used for training a large language model, as provided in this embodiment of the invention. Figure 4 This is a block diagram of an intelligent question-answering system based on task awareness and dual-track instruction following, provided in an embodiment of the present invention. Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0020] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0021] This invention provides an intelligent question-answering method based on task awareness and dual-track instruction following. This method can be implemented by an electronic device, which can be a terminal or a server. Figure 1 The diagram shown is a flowchart of the method. The processing flow may include the following steps: S1. The problem of receiving user input; S2. The trained large language model generates the answer to the question. The training process of the large language model includes: The Task Aware Dual-Track Error Enhancement Framework (TEAD) takes the original instructions from the open-source dataset alpaca, generates complex instructions with multiple constraints through the constraint extension module, and then generates positive samples. These positive samples are then distributed to dedicated negative sample synthesis tracks for execution bias or comprehension bias to generate negative samples, forming a highly discriminative preference dataset. This preference dataset is then used for preference optimization training of a large language model. S3. Output the generated answer to the user.

[0022] Optionally, the training process of the large language model specifically includes the following steps: S21. Constructing an instruction standardization and classification module: Standardize the format of the original instructions, and guide the large language model through prompt word engineering to classify the instructions into four task types: generation, rewriting, question answering (QA), and classification, and output task category identifiers; S22. Constructing a constraint extension module: Based on a predefined constraint classification system, intelligently add compliant new constraints to the original instructions to generate complex instructions with multiple constraints; S23. Construct a positive sample generation module: For the extended multi-constraint complex instructions, generate high-quality positive samples that fully meet all constraint requirements; S24. Construct a dual-track negative sample synthesis module, including Track A, which adopts a constraint violation strategy, and Track B, which adopts an instruction mutual exclusion strategy. S25. Construct a dynamic routing mechanism: Based on the task type of the instruction, automatically distribute the instruction to the corresponding negative sample synthesis track, generate negative samples, and pair them with positive samples to form a highly discriminative preference dataset, such as... Figure 2 and 3 The above; S26. Using the aforementioned preference dataset, train the large language model to improve the model's instruction compliance ability.

[0023] Optionally, S22 specifically includes: S221. Parsing the original instruction: Extracting the core task from the original instructions using a large language model and existing explicit constraint sets ; S222. Generate new constraints: Will , The model takes five pre-defined constraint categories as input, including content, format, style, scenario, and example, and generates the language model using prompt words. The instruction has no logical conflict with the original instruction and covers new constraints in different dimensions. And dynamically set the expansion quantity: for generation-type tasks, set For question-and-answer, classification, and rewriting tasks, set... .

[0024] For example, the original instruction "Write a poem" could be expanded to "Write a haiku in a formal style that includes seasonal imagery, following a 5-7-5 syllable format, and output it as a code block".

[0025] In the preference learning paradigm, the quality of negative samples directly determines the upper limit of the model's ability to learn constraint compliance. Existing negative sample construction methods mainly rely on random sampling generation by the model itself or heuristic synthesis through high-performance closed-source models (such as GPT-4). Negative samples based on random sampling often have sparse error features, making it difficult to cover subtle constraint traps; solutions relying on external closed-source models are costly and have uncontrollable interfaces. More importantly, current methods generally adopt the design assumption of "a single strategy covering all tasks," lacking differentiated design for constraint violation patterns of different task types, making it difficult to achieve optimal optimization results across task types. For example, generation tasks (such as writing poetry) are prone to "execution bias" (correct content but incorrect format), while question-answering tasks (such as explaining concepts) are prone to "comprehension bias" (misunderstanding constraints leading to irrelevant answers). Existing technologies fail to construct negative samples for these two fundamentally different error patterns separately, resulting in limited generalization ability of the model under complex constraint scenarios.

[0026] To address the problems of poor task adaptability, incomplete error pattern coverage, and low negative sample discrimination in existing preference data synthesis methods during instruction compliance optimization, this invention provides a Task-Aware Dual-Track Error Enhancement Framework (TEAD). TEAD aims to dynamically route to differentiated negative sample synthesis tracks based on task type, constructing high-quality negative samples with clear constraint violation characteristics, thereby significantly improving the model's compliance accuracy and generalization ability under complex multi-constraint instructions.

[0027] Optionally, Track A is applicable to both generation and rewriting tasks. These two types of tasks have open output spaces and constraints are mostly formal requirements, which are prone to execution deviations. To address this execution deviation error pattern, the model is guided by prompt words to intentionally violate the format or style constraints in the instructions, generating negative samples that are correct in content but violate the form. Track B: Applicable to question-and-answer and classification tasks. These two types of tasks have clear semantic boundaries and constraints are mostly reflected in the content scope, which are prone to misunderstanding. To address this misunderstanding error pattern, a twin instruction that is mutually exclusive with the original instruction is constructed, and the fully compliant response of the twin instruction is used as a negative sample of the original instruction.

[0028] Optionally, Track A: For generation / rewriting tasks, design rewriting prompts that require the model to intentionally violate the format or style constraints in the instructions while keeping the core content correct, and generate negative samples (for example, if the instruction requires "output in JSON format", then the negative sample outputs a plain text format reply with correct content), and the prompts explicitly prohibit the output of meta-language statements (such as "I have intentionally violated the format"), to ensure that the negative samples are natural.

[0029] Optionally, Track B: For question-answering / classification tasks, the model is guided to generate twin instructions that are mutually exclusive with the constraints of the original instructions through a few sample prompts. The requirements are: the core task remains unchanged, but the constraints are significantly reversed or replaced (e.g., "brief answer" is reversed to "detailed discussion"). Then, the standard generation module is called to generate a fully compliant response to the twin instructions. This response is directly used as a negative sample of the original instructions. This negative sample is semantically fluent and reasonable, but constitutes a hidden constraint violation of the original instructions, forming a high-difficulty, difficult negative sample.

[0030] Optionally, S26 specifically includes: Using the aforementioned preference dataset, the large language model is trained using the Direct Preference Optimization (DPO) algorithm, with the core loss function being:

[0031] in, For the current optimized strategy model, As a reference model for freezing parameters, For the question, and They are positive and negative samples, respectively. This refers to temperature hyperparameters. The optimization objective of the loss function is to maximize the positive samples. With negative samples The difference between the log probability ratio of the current model and the reference model enables the model to learn to favor high-quality answers that meet all constraints and suppress erroneous answers that have execution or comprehension biases.

[0032] This invention evaluates its method using three authoritative instruction compliance benchmarks (IFEval, CFBench, and Multi-IF), with results shown in Table 1. Experiments demonstrate that the TEAD framework of this invention significantly outperforms the original instruction model, SFT-only training, RLCD, and RLAIF-DPO baseline methods on both the Llama3.1-8B-Instruct and Qwen2.5-1.5B-Instruct base models. In particular, it achieves a 6.2 percentage point improvement in IFEval strict accuracy and best performance in instruction satisfaction rate (ISR) and multi-round compliance rate on CFBench. This proves that this invention effectively improves the model's compliance accuracy with hard constraints such as format and style through task-aware dual-track error enhancement, while simultaneously enhancing its understanding of complex semantic constraints, achieving a performance trade-off between formal compliance and semantic understanding.

[0033] Table 1 Comparison of TEAD's instruction compliance capabilities on different benchmarks

[0034] like Figure 4 As shown, this embodiment of the invention also provides an intelligent question-answering system based on task awareness and dual-track instruction following, the system comprising: Receiver module 410 is used to receive user input questions; The generation module 420 is used to generate the answer to the question using the trained large language model. The training process of the large language model includes: The Task Aware Dual-Track Error Enhancement Framework (TEAD) takes the original instructions from the open-source dataset alpaca, generates complex instructions with multiple constraints through the constraint extension module, and then generates positive samples. These positive samples are then distributed to dedicated negative sample synthesis tracks for execution bias or comprehension bias to generate negative samples, forming a highly discriminative preference dataset. This preference dataset is then used for preference optimization training of a large language model. Output module 430 is used to output the generated answer to the user.

[0035] The intelligent question-answering system based on task awareness and dual-track instruction following provided in this embodiment of the invention has a functional structure that corresponds to the intelligent question-answering method based on task awareness and dual-track instruction following provided in this embodiment of the invention, and will not be described again here.

[0036] Figure 5This is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present invention. The electronic device 500 may vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 501 and one or more memories 502. The memory 302 stores at least one instruction, which is loaded and executed by the processor 501 to implement the steps of the intelligent question-answering method based on task awareness and dual-track instruction following.

[0037] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to complete the aforementioned task-aware, dual-track instruction-following intelligent question-answering method. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device.

[0038] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0039] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A task-aware, dual-track instruction-following intelligent question-answering method, characterized in that, The method includes: S1. The problem of receiving user input; S2. The trained large language model generates the answer to the question. The training process of the large language model includes: The Task Aware Dual-Track Error Enhancement Framework (TEAD) takes the original instructions from the open-source dataset alpaca, generates complex instructions with multiple constraints through the constraint extension module, and then generates positive samples. These positive samples are then distributed to dedicated negative sample synthesis tracks for execution bias or comprehension bias to generate negative samples, forming a highly discriminative preference dataset. This preference dataset is then used for preference optimization training of a large language model. S3. Output the generated answer to the user.

2. The method according to claim 1, characterized in that, The training process of the large language model specifically includes the following steps: S21. Constructing an instruction standardization and classification module: Standardize the format of the original instructions, and guide the large language model through prompt word engineering to classify the instructions into four task types: generation, rewriting, question-and-answer, and classification, and output task category identifiers; S22. Constructing a constraint extension module: Based on a predefined constraint classification system, intelligently add compliant new constraints to the original instructions to generate complex instructions with multiple constraints; S23. Construct a positive sample generation module: For the extended multi-constraint complex instructions, generate high-quality positive samples that fully meet all constraint requirements; S24. Construct a dual-track negative sample synthesis module, including Track A, which adopts a constraint violation strategy, and Track B, which adopts an instruction mutual exclusion strategy. S25. Construct a dynamic routing mechanism: Based on the task type of the instruction, automatically distribute the instruction to the corresponding negative sample synthesis track, generate negative samples, and pair them with positive samples to form a highly discriminative preference dataset; S26. Using the aforementioned preference dataset, train the large language model to improve the model's instruction compliance ability.

3. The method according to claim 2, characterized in that, S22 specifically includes: S221. Parsing the original instruction: Extracting the core task from the original instructions using a large language model and existing explicit constraint sets ; S222. Generate new constraints: Will , The model takes five pre-defined constraint categories as input, including content, format, style, scenario, and example, and generates the language model using prompt words. The instruction has no logical conflict with the original instruction and covers new constraints in different dimensions. And dynamically set the expansion quantity: for generation-type tasks, set For question-and-answer, classification, and rewriting tasks, set... .

4. The method according to claim 2, characterized in that, Track A is applicable to both generation and rewriting tasks. These two types of tasks have open output spaces and constraints are mostly formal requirements, which can easily lead to execution deviations. To address this error pattern, prompts are used to guide the model to intentionally violate the format or style constraints in the instructions, generating negative samples that are correct in content but violate the form. Track B: Applicable to question-and-answer and classification tasks. These two types of tasks have clear semantic boundaries and constraints are mostly reflected in the content scope, which are prone to misunderstanding. To address this misunderstanding error pattern, a twin instruction that is mutually exclusive with the original instruction is constructed, and the fully compliant response of the twin instruction is used as a negative sample of the original instruction.

5. The method according to claim 4, characterized in that, Track A: For generation / rewriting tasks, design rewriting prompts. The model is required to intentionally violate the format or style constraints in the instructions to generate negative samples while keeping the core content correct. The prompts explicitly prohibit the output of meta-language declarations to ensure that the negative samples are natural.

6. The method according to claim 1, characterized in that, Track B: For question-answering / classification tasks, the model is guided to generate twin instructions that are mutually exclusive with the original instructions by using a few sample prompts. The requirements are: the core task remains unchanged, but the constraints are significantly reversed or replaced. Then, the standard generation module is called to generate a fully compliant response to the twin instructions. This response is directly used as a negative sample of the original instructions. This negative sample is semantically fluent and reasonable, but constitutes a hidden constraint violation of the original instructions, forming a high-difficulty and difficult negative sample.

7. The method according to claim 2, characterized in that, S26 specifically includes: Using the aforementioned preference dataset, the Direct Preference Optimization (DPO) algorithm is employed to train the large language model. Its core loss function is: in, For the current optimized strategy model, As a reference model for freezing parameters, For the question, and They are positive and negative samples, respectively. This refers to temperature hyperparameters. The optimization objective of the loss function is to maximize the positive samples. With negative samples The difference between the log probability ratio of the current model and the reference model enables the model to learn to favor high-quality answers that meet all constraints and suppress erroneous answers that have execution or comprehension biases.

8. An intelligent question-answering system based on task awareness and dual-track instruction following, characterized in that, The system includes: The receiving module is used to receive user input questions; A generation module is used to generate an answer to the question from the trained large language model. The training process of the large language model includes: The Task Aware Dual-Track Error Enhancement Framework (TEAD) takes the original instructions from the open-source dataset alpaca, generates complex instructions with multiple constraints through the constraint extension module, and then generates positive samples. These positive samples are then distributed to dedicated negative sample synthesis tracks for execution bias or comprehension bias to generate negative samples, forming a highly discriminative preference dataset. This preference dataset is then used for preference optimization training of a large language model. The output module is used to output the generated answer to the user.

9. An electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, characterized in that, The at least one instruction is loaded and executed by the processor to implement the intelligent question-answering method based on task-aware dual-track instruction following as described in any one of claims 1-7.

10. A computer-readable storage medium storing at least one instruction, characterized in that, The at least one instruction is loaded and executed by the processor to implement the intelligent question-answering method based on task-aware dual-track instruction as described in any one of claims 1-7.