Multi-dimensional extended aviation field large model instruction set generation method
Through the multi-dimensionally expanded method of aviation field big model instruction set generation, using aviation research literature and big model technology to generate high-quality instruction sets, solving the problems of low efficiency and difficult to control quality in the existing technology, and realizing the generation of instruction sets that meet the needs of complex tasks.
Patent Information
- Application Number
- CN202411637124.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-15
AI Technical Summary
The existing large-model instruction set generation technology in the aviation field is difficult to meet the needs of complex tasks. The template conversion method is inefficient, and the automatic generation method is difficult to ensure the quality of the instruction set, and it is necessary to fully cover the details of the aviation field.
The multi-dimensionally extended instruction set generation method in the aviation field is adopted. By generating input statements and output statements based on aviation research literature, the large model is used to generate multi-dimensionally extended instruction sets, and the optimal instruction statement is selected through multi-level optimization and diversity scores. Combining multi-model cross-validation and dynamic stop conditions, a high-quality instruction set is generated.
It realizes efficient, accurate and comprehensive instruction generation, can quickly respond to diverse aviation application needs, improves the practicality and adaptability of instruction data, and ensures the quality and coverage of instruction sets.
Smart Images

Figure CN119537546A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of aviation instruction set generation, and in particular to a method for generating a large-model instruction set in the aviation field with multi-dimensional expansion. Background Art
[0002] In recent years, with the rapid development of artificial intelligence technology, the application of large models has swept across all walks of life and has shown great potential in the aviation field. Fine-tuning large models in the aviation field has become an important means to improve the level of intelligence. Through targeted fine-tuning of specific tasks or data sets, large models can better adapt to complex aviation application scenarios and optimize functions such as decision support, fault diagnosis, and flight control. In this process, high-quality instruction set construction is crucial to the effect of fine-tuning training.
[0003] In the application scenario of instruction set generation in the aviation field, users hope to generate high-quality instruction sets corresponding to specific task requirements by inputting them. This process not only involves natural language understanding, but also needs to consider the professional terminology and knowledge system unique to the aviation field to ensure the accuracy and practicality of the generated instruction set. Each instance in a common instruction set consists of three elements: instruction statements, optional inputs that provide supplementary information for the context, and expected outputs based on the instructions and inputs. There are two ways to construct instruction sets: one is to manually construct from annotated natural language datasets. In this method, text label pairs can be converted into instruction sets by using templates and other methods. The other is to automatically generate instruction sets using large models. The template-based conversion method relies on annotated domain data. The advantage of this method is that it is simple and fast to implement, but the task source is fixed and it is difficult to adapt to complex task requirements. The method of automatic generation of large models has better adaptability.
[0004] In summary, in the aviation field, the current large model instruction set generation technology faces the following challenges:
[0005] (1) Template transformation-based methods often fail to cope with complex or irregular tasks and cannot meet the personalized needs of users;
[0006] (2) The automatic generation method based on large models is difficult to ensure the quality of instruction set generation, and it is necessary to rely on instruction set screening methods to obtain high-quality instruction sets.
[0007] (3) The aviation field is highly professional and involves a wide range of knowledge. The generated instruction set must fully cover the details of the relevant field. Summary of the invention
[0008] In order to address the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide a multi-dimensionally expanded large-model instruction set generation method for the aviation field, aiming to achieve efficient, accurate and comprehensive instruction generation to meet the ever-changing aviation application needs.
[0009] Specifically, the present invention provides a method for generating a large model instruction set in the aviation field with multi-dimensional expansion, which comprises the following steps:
[0010] S1. Generate input statements and output statements of instructions based on aviation scientific research literature;
[0011] S2. Generate a multi-dimensionally extended aviation domain instruction set, specifically including the following sub-steps:
[0012] S21, generating an input statement and an output statement of an instruction for each task, and obtaining a plurality of sets of input and output pairs of a few samples of instructions;
[0013] S22, the instruction statement generated based on the multi-level optimization specifically includes the following sub-steps:
[0014] S221, mixing the above-mentioned plurality of few-sample instruction input and output pair sets, for one of the few-sample input and output pair sets The number of input and output pairs in the set is γ. The missing instruction statement ρ is generated by the large model based on the input statement and the output statement, so that the instruction statement ρ can be found in the given input X i Under the condition of i The most matching output;
[0015] S222, minimizing the semantic deviation of the instruction statement ρ;
[0016] S223, introducing a domain correlation constraint optimization objective function to optimize the instruction statement ρ;
[0017] S224, determine the optimal instruction statement and the suboptimal instruction statement:
[0018] Execute the above steps, and sort the candidate instruction statements in descending order for each set of few-sample instruction input and output. After descending order, the instruction statement ranked first is taken as the optimal instruction statement, that is, the one that satisfies the following formula
[0019]
[0020] Later, the diversity score was introduced Select suboptimal instruction statement
[0021]
[0022] Among them, S(ρ,X i ,Y i ) is the similarity of the instruction statements, is the diversity of instruction statements, and λ is a tuning parameter used to adjust the weight between similarity and diversity;
[0023] S225, after obtaining the optimal instruction statement and the suboptimal instruction statement, for each set of few-sample instruction input and output pairs, randomly select the optimal instruction statement or the suboptimal instruction statement as the instruction statement; for all sets of few-sample instruction input and output pairs, continuously repeat the above steps until each instruction contains the complete three parts of {instruction statement, input statement, output statement};
[0024] S226, randomly extracting an instruction from each task as a seed instruction {ρ0, X0, Y0} and setting a large model for extending the prompt words of the instruction;
[0025] S23, multi-model instruction expansion and cross-validation, specifically includes the following sub-steps:
[0026] S231, expand new instructions: use two large models to expand the original task instructions in depth and breadth, and generate new instructions {ρ new1 ,X new1 ,Y new1} and {ρ new2 ,X new2 ,Y new2}, calculate the similarity between each generated instruction statement and the seed instruction statement, and based on the similarity value, select multiple instructions with low similarity as backup instructions. new ,ρ0) is calculated as:
[0027]
[0028] Where V ρnew is the vector representation of the newly generated instruction, V ρ0 is the vector representation of the seed instruction,
[0029] {ρ new1 ,X new1 ,Y new1} is the instruction generated for the first large model, {ρ new2 ,X new2 ,Y new2}Generated instructions for the second model;
[0030] S232, multi-model cross-validation: cross-validate the backup instructions generated by different models and eliminate duplicate content;
[0031] S233, setting dynamic stop and generation termination conditions, terminating the generation of new instructions after the dynamic stop and generation termination conditions are met, and mixing the expanded instructions with all original instructions to obtain an aviation field instruction set;
[0032] S3. Screening high-quality aviation instruction sets, including the following sub-steps:
[0033] S31. Preliminary screening of high-quality aviation instruction sets: Score each instruction in the expanded aviation instruction set, sort the comprehensive scoring results, retain the instruction data with the highest rankings, remove instructions with too low scores or inconsistent rankings, and finally form a preliminary instruction set;
[0034] S32. Detailed screening of high-quality aviation field instruction sets. Data screening of preliminary instruction sets is performed through two indicators: quality assessment and knowledge coverage, to obtain the final high-quality aviation field instruction set.
[0035] Preferably, step S32 specifically includes the following sub-steps:
[0036] S321, quality assessment based on reward model: first, the instruction statement, input and output are spliced to form a complete instruction expression, and then the spliced instruction set is sent to the reward model for scoring. When the score exceeds the scoring threshold, the data quality is considered to meet the standard;
[0037] S322, screening based on coverage, specifically includes the following sub-steps:
[0038] S3221. Define the semantic embedding representation V of the instruction dataset (ρ,X,Y) , each instruction triple (ρ, X, Y) is represented as its embedding vector;
[0039] S3222. Use the K-Center-Greedy algorithm to gradually select the instruction triplets with the greatest diversity from the data set that has passed the quality assessment until the preset coverage is met or the size of the data set is minimized, complete the data screening, and obtain the final high-quality aviation field instruction set.
[0040] Preferably, step S3222 specifically includes the following sub-steps:
[0041] First, randomly select a point from the data set as the center v c ;
[0042] Second, for each unselected data point v i , calculate the data point v i Minimum distance to a set of selected center points:
[0043] d min (vi )=min(v i ,v c )·u(v i ,v c )
[0044] Among them, u(v i ,v c ) is the penalty factor, and the formula is as follows:
[0045]
[0046] Among them, C is a normalization constant used to approximate the maximum nearest neighbor distance;
[0047] Finally, select the point with the largest distance from the center point set As the instruction triple with the greatest diversity:
[0048]
[0049] This process is repeated until the preset coverage is met or the size of the dataset is minimized.
[0050] Preferably, step S21 specifically includes the following sub-steps:
[0051] S211, extract and filter key features of the input statement and output statement of each instruction:
[0052] Use the pre-trained model BERT to semantically represent the input and output:
[0053]
[0054] Among them, X i For command input, Y i is the expected instruction output, is the semantic representation of the instruction input, The semantic representation of the instruction output;
[0055] S212, vector representation QX of the input statement and output statement of each instruction in the aviation knowledge question answering task i ,QY i , calculate the semantic similarity S(QX i ,QY i ):
[0056]
[0057] S213, set a similarity threshold θ, and filter out high-correlation input sentences and output sentences that meet the conditions. The formula is as follows:
[0058] Zfiltered ={(QX i ,QY i )|S(QX i ,QY i )>θ,i=1,2,..,N}
[0059] Among them, N is the number of aviation knowledge question-answering task instructions extracted, and θ is the similarity threshold;
[0060] S214, introduce a feature grouping strategy based on the K-Means clustering algorithm for each task; the semantic representation of the input and output pairs Perform vector concatenation to obtain a joint vector representation For all vectors V i Perform K-Means clustering:
[0061] C k = {v i |Cluster(v i )=k,i=1,2,..,N}
[0062] Among them, C k represents the kth cluster, and through K-Means clustering, the input and output pairs are divided into different topic clusters;
[0063] S215. Each task generates a large number of clusters, each of which contains instruction input and output pairs, and ultimately obtains a large number of sets of few-sample instruction input and output pairs.
[0064] Preferably, after mixing in step S221, the following is obtained:
[0065]
[0066] Where T is the number of subject / domain clusters, R is a task, R∈{aviation knowledge question answering, document abstract generation, keyword generation, document catalog generation, paragraph generation, paragraph optimization, paragraph continuation}, and the number of all sets of few-sample instruction input and output pairs is T i represents the number of subject / domain clusters in the i-th task, is the number of input and output pairs under the jth topic / domain cluster of the nth task;
[0067] In step S222, the similarity S(ρ, X i ,Y i ) based on the instruction ρ for the input X i Generate Y i The similarity score quantifies the similarity between the generated output and the expected output:
[0068]
[0069] in, The instruction ρ is the input X i A vector representation of the generated output;
[0070] The optimization objective function L2(ρ) in step S223 is:
[0071]
[0072] Among them, w i is the weight of the task priority, which is used to reflect the relevance or importance of different tasks. The weight w i Dynamically adjust according to the actual needs of the task.
[0073] Preferably, in step S11, scientific research papers related to the aviation field are first retrieved from an open paper title query interface as input data for constructing an aviation field instruction set, and then the aviation field instruction set tasks are defined based on the acquired aviation scientific research literature data and common tasks constructed by the instruction set.
[0074] Preferably, step S233 is specifically as follows: to avoid generating too many similar instructions, a generation termination condition is set, and after each round of generation, the overall similarity S of the newly generated instruction, input and output instances with the existing set is calculated. overall , the calculation formula is as follows:
[0075]
[0076] Where D is the existing set, D new is a newly generated set, when S overall When it remains high for multiple times in a row, generation stops, forming the final instruction set.
[0077] Preferably, step S31 specifically includes the following sub-steps:
[0078] S311. Use model M1 and model M2 to score each instruction in terms of accuracy, completeness, clarity, etc. The scoring formula is:
[0079] Score(ρ)=min(35,A(ρ))+min(35,C(ρ))+min(30,Q(ρ))
[0080] Among them, A(ρ) refers to accuracy, C(ρ) refers to completeness, and Q(ρ) refers to clarity;
[0081] S312. Based on the scoring results of the two models, a weighted average is performed on each instruction to obtain a comprehensive scoring result. The calculation formula for the comprehensive scoring result is as follows:
[0082]
[0083] in, is the scoring result of model M1, is the scoring result of model M2, α and β are the weight coefficients of model M1 and model M2, respectively, which are usually set equal;
[0084] S313, sorting the final scoring results, retaining the instruction data with the highest rankings, removing the instructions with too low scores or inconsistent rankings, and finally forming a preliminary instruction set.
[0085] Preferably, step S1 specifically includes the following sub-steps:
[0086] S11. Define the tasks of aviation scientific research literature data acquisition and instruction set. The instruction set tasks include aviation knowledge question answering, literature abstract generation, keyword generation, literature catalog generation, paragraph generation, paragraph optimization, and paragraph continuation.
[0087] S12. Generate input statements and output statements for the aviation scientific research literature instruction set: generate input statements and output statements for the instruction set tasks respectively.
[0088] Preferably, on the other hand, the present invention also provides a multi-dimensionally extended aviation field large model instruction set generation system, which includes an instruction set input statement and output statement generation unit, an aviation field instruction set generation unit and a screening unit, wherein the instruction set input statement and output statement generation unit is used to generate instruction set input statements and output statements based on aviation scientific research literature; the aviation field instruction set generation unit is used to generate a multi-dimensionally extended aviation field instruction set; the screening unit is used to screen high-quality aviation field instruction sets and output the final instruction set.
[0089] Compared with the prior art, the present invention has the following beneficial effects:
[0090] (1) The present invention solves the problem of low efficiency of traditional instruction data generation methods by utilizing a large model to automatically construct inputs and outputs in instruction sets for different tasks in the aviation field, thereby reducing the need for manual intervention and quickly responding to diverse task requirements.
[0091] (2) The present invention utilizes a large model to automatically construct instructions in instruction data and expand multi-dimensional instructions to generate a rich and diverse instruction set to meet the needs of various application scenarios, solve the problems of insufficient instruction diversity and insufficient instruction set dimensions, and improve the practicality and adaptability of instruction data.
[0092] (3) The present invention constructs a set of high-quality automatic screening methods for instruction data to effectively filter and evaluate the quality and coverage of generated instructions, thereby ensuring the accuracy and practicality of the final instruction set and solving the problem of difficulty in controlling the quality of automatically generated instruction sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 It is a schematic diagram of the process of the present invention;
[0094] Figure 2 It is a schematic diagram of the overall process of the present invention;
[0095] Figure 3 The figure is a schematic block diagram of the system structure of the present invention. DETAILED DESCRIPTION
[0096] Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0097] Specifically, the present invention provides a method for generating a large model instruction set in the aviation field with multi-dimensional expansion, such as Figure 1 and Figure 2 As shown, it includes the following steps:
[0098] S1. Generate instruction set input statements and output statements based on aviation scientific research literature, including the following sub-steps:
[0099] S11. Define the tasks of obtaining aviation scientific research literature data and instruction set. The instruction set tasks include aviation knowledge question answering, literature abstract generation, keyword generation, literature catalog generation, paragraph generation, paragraph optimization, and paragraph continuation. The specific task definitions are as follows:
[0100] Aviation Knowledge Question and Answer: Through the analysis of the content of scientific research literature in the aviation field, question and answer instruction pairs are formed. Question types can cover basic knowledge, cutting-edge technology, experimental data, etc.
[0101] Literature abstract generation: Generate concise and comprehensive abstracts based on given literature titles, helping researchers quickly obtain the core content of the literature.
[0102] Keyword generation: Based on the given document title and document abstract (document abstract is optional), generate keywords that are highly relevant to the document content to facilitate document retrieval and classification.
[0103] Bibliographic catalog generation: Generate a catalog of documents based on the given document title and abstract (abstract is optional) to help researchers quickly browse the organization and main content of the document.
[0104] Paragraph Generation: Generate high-quality paragraphs based on given paragraph headings, helping researchers to do preliminary writing or content expansion on specific topics.
[0105] Paragraph optimization: Optimize existing scientific research document paragraphs to make their expressions clearer and their logic more rigorous, thus improving the overall text quality.
[0106] Paragraph continuation: Generate subsequent content based on the opening paragraph of a given aviation scientific research document to help researchers expand the writing of the document.
[0107] S12. Generate input statements and output statements for the instruction set of aviation scientific research documents: Generate input statements and output statements for the instruction set tasks. Specifically, the aviation knowledge question-answering task is to segment each aviation scientific research document according to a fixed number of characters, and send them to a large model such as GPT-4 in sequence, so that the large model can automatically extract 0 or 1 knowledge question-answer pairs from them, and the question forms must be diverse, including imperative sentences, interrogative sentences, etc. If they cannot be extracted, they can be omitted. Extracted instruction input and output examples:
[0108] Input: Please explain the effect of supersonic airflow on aircraft structures.
[0109] Output: The impact of supersonic airflow on aircraft structure is mainly manifested in high heat and high pressure effects, which may cause material fatigue and structural damage.
[0110] The task of document abstract generation is to directly extract the title and abstract of each scientific research document. The command input is the title, and the command output is the corresponding abstract.
[0111] The keyword generation task is to directly extract the title and abstract of each scientific research document. The command input is the title and abstract, or it can be just the title, and the command output is the corresponding keywords.
[0112] The task of generating a bibliography is to directly extract the title and abstract of each scientific research document. The command input is the title and abstract, or it can be just the title, and the command output is the corresponding catalog.
[0113] The paragraph generation task is to directly extract the title and corresponding content of a part of the paragraphs in a part of scientific research literature. The command input is the title, and the command output is the corresponding content.
[0114] The paragraph optimization task is to directly extract the titles and corresponding contents of some paragraphs in a part of scientific research literature. The corresponding contents are used as the optimized paragraphs. For the paragraphs before optimization, a relatively poor version is generated by a large model such as GPT-4. Therefore, the instruction input is the paragraph title plus the poor version generated by the large model, and the instruction output is the original paragraph in the literature.
[0115] The task of paragraph continuation is to extract the title and corresponding content of a part of the paragraphs in a part of scientific research literature. The corresponding content is used as the continued paragraph. For the paragraph before continuation, it is obtained by truncating the beginning of the original paragraph. Therefore, the instruction input is the paragraph after the beginning is truncated, and the instruction output is the original paragraph in the literature.
[0116] S2. Generate a multi-dimensionally extended aviation domain instruction set, specifically including the following sub-steps:
[0117] S21. Generate command input and output based on aviation scientific research literature for each task, and obtain multiple sets of few-sample command input and output pairs, specifically:
[0118] S211, extract and filter key features of the input statement and output statement of each instruction:
[0119] Use the pre-trained model BERT to semantically represent the input and output:
[0120]
[0121] Among them, X i For command input, Y i is the expected instruction output, is the semantic representation of the instruction input, The semantic representation of the instruction output.
[0122] S212, vector representation of the input statement and output statement of each instruction in the aviation knowledge question answering task (QX i ,QY i ), calculate the semantic similarity S(QX i ,QY i ):
[0123]
[0124] S213, setting a similarity threshold θ, screening out high-correlation input sentences and output sentences that meet the conditions,
[0125] Z filtered ={(QX i ,QY i )|S(QX i ,QY i )>θ,i=1,2,..,N}
[0126] Wherein, N is the number of aviation knowledge question-answering task instructions extracted.
[0127] S214, for each task, introduce a feature grouping strategy based on the K-Means clustering algorithm; i ,Y i ) Perform vector concatenation to obtain a joint representation For all vectors V i Perform K-Means clustering:
[0128] C k = {v i|Cluster(v i )=k,i=1,2,..,N}
[0129] Among them, C k Represents the kth cluster, and through K-Means clustering, the input and output pairs are divided into different topic clusters.
[0130] S215. Finally, each task generates a large number of sets of few-sample instruction input and output pairs.
[0131] S22, generating instruction statements based on multi-level optimization, specifically including the following sub-steps:
[0132] S221, Task Description: Without distinguishing tasks, the above-mentioned multiple few-sample instruction input and output pairs are mixed to obtain:
[0133]
[0134] Where T is the number of subject / domain clusters, R is a task, R∈{aviation knowledge question answering, document abstract generation, keyword generation, document catalog generation, paragraph generation, paragraph optimization, paragraph continuation}, and the number of all sets of few-sample instruction input and output pairs is T i represents the number of subject / domain clusters in the i-th task, is the number of input and output pairs under the jth topic / domain cluster of the nth task.
[0135] For one of the few sample input and output pairs The number of input and output pairs in the set is γ, where X i For command input, Y i For the expected instruction output, generate the missing instruction ρ according to the instruction input and instruction output, so that the instruction ρ can be given input X i Under the condition of i The output that best matches.
[0136] This step generates a set of candidate instruction statements {ρ1, ρ2, ..., ρ n}, and perform a two-step optimization on the generation problem to ensure that the generated instruction statements match the input-output pairs, while improving their usability and adaptability in actual tasks.
[0137] S222. Minimize the semantic deviation of instruction statements.
[0138] By maximizing the similarity S(ρ,X i ,Y i ) based on the instruction ρ for the input X i Generate Yi The similarity score quantifies the similarity between the generated output and the expected output:
[0139]
[0140] in, The instruction ρ is the input X i A vector representation of the generated output.
[0141] The optimization objective function L1(ρ) for maximizing similarity is specifically:
[0142]
[0143] S223. Introduce domain correlation constraint optimization objective function: The optimization objective function L2(ρ) is:
[0144]
[0145] Among them, w i is the weight of the field priority, which is used to reflect the relevance or importance of different fields. The weight w i Dynamically adjust according to the actual needs of the field.
[0146] After completing the first step of optimization, in order to enhance the actual application effect of the instruction statements, a domain priority weight mechanism is introduced in the optimization process. The domain priority is scored by weighted similarity, so that the generated instruction statements not only meet the semantic matching in theory, but also have higher practicality in actual task scenarios.
[0147] S224. Determine the optimal instruction statement and the suboptimal instruction statement.
[0148] By performing the above steps, each set of input and output of the few-sample instruction can be calculated according to S(ρ,X i ,Y i ) Sort the candidate instruction statements in descending order, and take the instruction statement ranked first after descending order as the optimal instruction statement, that is, the one that satisfies the following formula
[0149]
[0150] Later, the diversity score was introduced Select suboptimal instruction statement
[0151]
[0152] Determined based on Euclidean distance, the larger the distance, the greater the difference in instructions:
[0153]
[0154] At the same time, in order to balance the similarity and diversity of instruction statements, an adjustment parameter λ is introduced. This parameter determines the diversity and similarity S(ρ,X i ,Y i ) is the weight relationship when selecting suboptimal instruction statements. When λ is large, it is more inclined to select instruction statements that match the input and output; when λ is small, it pays more attention to the diversity of instruction statements.
[0155] S225, after obtaining the optimal instruction statement and the suboptimal instruction statement, for each instruction input and output pair of the few sample instruction set, the optimal instruction statement or the suboptimal instruction statement is randomly selected as its instruction statement, thereby increasing the diversity of instruction data. For all the few sample instruction sets, the above steps are repeated until each instruction contains the complete three parts of {instruction statement, input, output}.
[0156] The above steps not only ensure that the generated instructions have a high degree of match with the input-output pairs, but also generate a variety of instruction statements to cover a variety of different application scenarios.
[0157] S226, seed instruction extraction and instruction multi-dimensional prompt word setting
[0158] For each of the seven tasks, an instruction statement ρ0 and an input and output instance (X0, Y0) are extracted as seed instructions to guide the expansion of subsequent instructions.
[0159] In this stage, two instruction statements ρ1 and ρ2 are first sampled from the seed instruction set, and input and output instances (X1, Y1) and (X2, Y2) are specified for them respectively. Initially, both instruction statements come from the seed instruction set of the seven tasks, and in subsequent iterations, one of the two instruction statements comes from the large model generation. The instruction generation process is described by the following formula, where Model represents the large model. In the embodiment of the present invention, the large model generally selects GPT-4 to generate new instruction statements:
[0160] {ρ new ,X new ,Y new}=Model({ρ i ,X i ,Y i}),i=1,2
[0161] When generating new instructions, there are the following prompt word requirements:
[0162] Diversified sentence types: The generated command sentences should include a variety of sentence types, such as open-ended imperative sentences, interrogative sentences, etc. At the same time, the generated input and output sentences must also be diverse. For some special tasks, only output without input is also supported.
[0163] Instruction extension dimension: instructions are expanded in two directions: depth extension and breadth extension.
[0164] Deep extension: Deep extension is to complicate and refine the instruction statements, input statements, and output statements within the existing task framework. For example, based on the existing instructions, constraints are expanded or multi-step reasoning is introduced. A simple example is:
[0165] Before deep expansion:
[0166] Command Input: How to check the engine performance of an aircraft?
[0167] Command output: Perform engine performance test and check thrust, fuel consumption and temperature data.
[0168] After deep expansion:
[0169] Command Input: How to check the aircraft's engine performance during different flight phases and environmental conditions?
[0170] Command output:
[0171] During takeoff: Monitor thrust, throttle settings and temperature to ensure thrust is within specification.
[0172] During the cruise phase: check fuel consumption, engine speed and temperature, and record various data to evaluate efficiency.
[0173] During the landing phase: monitoring reverse thrust and temperature changes to ensure safe engine deceleration...
[0174] Breadth expansion: Breadth expansion emphasizes that the generated instructions should belong to the aviation field, but not belong to the seven tasks or question forms mentioned above. For example, generate instruction statements in the form of multiple-choice questions:
[0175] Command Entry: During the pre-flight check, which one is not part of standard procedure?
[0176] A. Check the aircraft's fuel level
[0177] B. Verify the accuracy of flight plans
[0178] C. Conduct a pilot mental health assessment
[0179] D. Confirm that the onboard equipment is functioning properly
[0180] Command output: C. Conduct a pilot mental health assessment.
[0181] S23, multi-model generation instructions and cross-validation, specifically including the following sub-steps:
[0182] S231, generate new instructions: generate new instruction statements and their corresponding input and output instances {ρ new1 ,X new1 ,Y new1} and {ρ new2 ,X new2 ,Y new2}, respectively calculate the vector representation of the concatenation of the instruction statement, input statement and output statement Calculate the similarity of each generated instruction to the seed instruction:
[0183]
[0184] In this embodiment, in step S231, two large models GPT-4 and Qwen are used to generate new instruction statements and their corresponding input and output statements.
[0185] S232. Multi-model cross-validation: Cross-validate the instruction statements, input and output statements generated by different models, eliminate duplicate content, and retain unique instruction statements, input and output instances that do not appear in different models.
[0186] S233, setting dynamic stop and generation termination conditions, and terminating the generation of new instructions after the dynamic stop and generation termination conditions are met.
[0187] Step S233 is as follows: To avoid generating too many similar instructions, a generation termination condition is set. After each round of generation, the overall similarity S between the newly generated instruction statement, input and output instances and the existing set is calculated. overall , the calculation formula is as follows:
[0188]
[0189] Where D is the existing set, D new is a newly generated set, when S overall When the value remains high for many times in a row, the generation stops. The expanded instructions are mixed with all the original instructions to obtain the final aviation field instruction set.
[0190] S3. Screening high-quality aviation instruction sets, including the following sub-steps:
[0191] S31. Conduct preliminary screening of high-quality aviation field instruction sets, score each instruction in the aviation field instruction set, sort the comprehensive scoring results, retain instruction data with high rankings, remove instructions with too low scores or inconsistent rankings, and finally form a preliminary instruction set.
[0192] Through similarity calculation, we filter out instructions, input and output instances with too high similarity, and retain combinations with similarity below a certain threshold, ensuring that the generated content has a high diversity.
[0193] Preferably, step S31 specifically includes the following sub-steps:
[0194] S311. Use model M1 and model M2 to score each instruction in terms of accuracy, completeness, clarity, etc. The scoring formula is:
[0195] Score(ρ)=min(35,A(ρ))+min(35,C(ρ))+min(30,Q(ρ))
[0196] Among them, A(ρ) refers to accuracy, C(ρ) refers to completeness, and Q(ρ) refers to clarity.
[0197] Accuracy A(ρ) refers to evaluating whether the instruction generation is consistent with the input and output task requirements to ensure the correctness of the generated instructions.
[0198] Completeness C(ρ) means ensuring that the instruction output (i.e., the answer part) covers all the key points of the problem and guarantees the integrity of the generated results.
[0199] Clarity Q(ρ) refers to evaluating whether the instruction statement structure is clear and logically coherent, ensuring the readability and orderliness of the instructions.
[0200] S312. Based on the scoring results of the two models, a weighted average is performed on each instruction to obtain a comprehensive scoring result. The calculation formula for the comprehensive scoring result is as follows:
[0201] Score(ρ)=α×Score M1 (ρ)+β×Score M2 (ρ)
[0202] Among them, Score M1 (ρ) is the scoring result of model M1, Score M2 (ρ) is the scoring result of model M2, α and β are the weight coefficients of model M1 and model M2 respectively, which are usually set equal.
[0203] S313, sorting the final scoring results, retaining the instruction data with the highest rankings, removing the instructions with too low scores or inconsistent rankings, and finally forming a preliminary instruction set.
[0204] S32. Detailed screening of high-quality aviation field instruction sets. Data screening of preliminary instruction sets is performed through two indicators: quality assessment and knowledge coverage, to obtain the final high-quality aviation field instruction set.
[0205] Preferably, step S32 specifically includes the following sub-steps:
[0206] S321. Quality assessment based on reward model: First, the instruction statement, input instance and output instance are concatenated to form a complete instruction expression. Then the concatenated instruction set is sent to the reward model for scoring. When the score exceeds the scoring threshold, the data quality is considered to meet the standard. In this embodiment, the reward model is the reward-model-debertav3-large-v2 reward model.
[0207] S322, screening based on coverage, specifically includes the following sub-steps:
[0208] S3221. Define the semantic embedding representation V of the instruction dataset (ρ,X,Y) , each instruction triplet (ρ,X,Y) is represented as its embedding vector.
[0209] S3222, use the K-Center-Greedy algorithm to gradually select the instruction triples with the largest diversity from the data set that has passed the quality assessment, and use the distance function d(v a ,v b )Maximize the coverage of selected data:
[0210] d(v a ,v b )=||v a -v b ||2
[0211] Among them, v a and v b are the embedding vectors of instructions a and b, and ||||2 represents the Euclidean distance.
[0212] In this embodiment, step S3222 uses the K-Center-Greedy algorithm to gradually select instruction triples with the greatest diversity from the data set that has passed the quality assessment, and specifically includes the following sub-steps:
[0213] First, randomly select a point from the data set as the center v c .
[0214] Second, for each unselected data point v i , and calculate its minimum distance from the set of selected center points:
[0215] dmin (v i )=min(v i ,v c )·u(v i ,v c )
[0216] Among them, u(v i ,v c ) is a penalty factor that is adaptively adjusted according to data density, which is used to expand the selection probability of sparse areas and help the K-Center-Greedy algorithm better cover the entire data space, especially those areas with low density. Specifically, using v i The average distance between its nearest k neighbors is used to adjust u(v i ,v c ) value. If v i The average distance to other points is large, indicating that v i In the sparse region, u(v i ,v c ) should be larger. The formula is as follows:
[0217]
[0218] Where C is a normalization constant used to approximate the maximum nearest neighbor distance.
[0219] Finally, select the point with the largest distance from the set of center points:
[0220]
[0221] This process is repeated until the preset coverage is met or the size of the dataset is minimized.
[0222] On the other hand, the present invention also provides a multi-dimensionally expanded large model instruction set generation system for the aviation field, such as Figure 3 As shown, it includes an instruction set input statement and output statement generating unit 1, an aviation field instruction set generating unit 2 and a screening unit 3. The instruction set input statement and output statement generating unit 1 is used to generate instruction set input statements and output statements based on aviation scientific research literature; the aviation field instruction set generating unit 2 is used to generate a multi-dimensionally extended aviation field instruction set; the screening unit 3 is used to screen high-quality aviation field instruction sets and output the final instruction set.
[0223] In summary, the present invention automatically constructs the inputs and outputs of different mission instruction sets in the aviation field by utilizing commonly used large models, thereby reducing the need for manual intervention and being able to quickly respond to diverse mission requirements, thereby solving the problem of inefficiency of traditional instruction data generation methods and ensuring the accuracy of instruction generation.
[0224] The embodiments described above are only descriptions of the preferred implementation modes of the present invention, and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for generating a large model instruction set in the aviation field with multi-dimensional expansion, characterized by: It includes the following steps: S1. Generate input statements and output statements of instructions based on aviation scientific research literature; S2. Generate a multi-dimensionally extended aviation domain instruction set, specifically including the following sub-steps: S21, generating an input statement and an output statement of an instruction for each task, and obtaining a plurality of sets of input and output pairs of a few samples of instructions; S22, the instruction statement generated based on the multi-level optimization specifically includes the following sub-steps: S221, mixing the above-mentioned plurality of few-sample instruction input and output pair sets, for one of the few-sample input and output pair sets The number of input and output pairs in the set is γ. The missing instruction statement ρ is generated by the large model based on the input statement and the output statement, so that the instruction statement ρ can be found in the given input X i Under the condition of i The most matching output; S222, minimizing the semantic deviation of the instruction statement ρ; S223, introducing a domain correlation constraint optimization objective function to optimize the instruction statement ρ; S224, determine the optimal instruction statement and the suboptimal instruction statement: Execute the above steps, and sort the candidate instruction statements in descending order for each set of few-sample instruction input and output pairs. After descending order, the instruction statement ranked first is taken as the optimal instruction statement, that is, the one that satisfies the following formula Later, the diversity score was introduced Select suboptimal instruction statement Among them, S(ρ,X i ,Y i ) is the similarity of the instruction statements, is the diversity of instruction statements, and λ is a tuning parameter used to adjust the weight between similarity and diversity; S225, after obtaining the optimal instruction statement and the suboptimal instruction statement, for each set of few-sample instruction input and output pairs, randomly select the optimal instruction statement or the suboptimal instruction statement as the instruction statement; for all sets of few-sample instruction input and output pairs, continuously repeat the above steps until each instruction contains the complete three parts of {instruction statement, input statement, output statement}; S226, randomly extracting an instruction from each task as a seed instruction {ρ0, X0, Y0} and setting a large model for extending the prompt words of the instruction; S23, multi-model instruction expansion and cross-validation, specifically includes the following sub-steps: S231, expand new instructions: use two large models to expand the original task instructions in depth and breadth respectively, and use the seed instructions as the initial instructions to iteratively generate new instructions {ρ new1 ,X new1 ,Y new1 } and {ρ new2 ,X new2 ,Y new2 }, calculate the similarity between each generated instruction statement and the seed instruction statement, and based on the similarity value, select multiple instructions with low similarity as backup instructions. new ,ρ0) is calculated as: In the formula, is the vector representation of the newly generated instruction, is the vector representation of the seed instruction, {ρ new1 ,X new1 ,Y new1 } is the instruction generated for the first large model, {ρ new2 ,X new2 ,Y new2 }Generated instructions for the second model; S232, multi-model cross-validation: cross-validate the backup instructions generated by different models and eliminate duplicate content; S233, setting dynamic stop and generation termination conditions, terminating the generation of new instructions after the dynamic stop and generation termination conditions are met, and mixing the expanded instructions with all original instructions to obtain an aviation field instruction set; S3. Screening high-quality aviation instruction sets, including the following sub-steps: S31. Preliminary screening of high-quality aviation instruction sets: Score each instruction in the expanded aviation instruction set, sort the comprehensive scoring results, retain the instructions with the highest rankings, remove the instructions with low scores or inconsistent rankings, and finally form a preliminary instruction set; S32. Detailed screening of high-quality aviation field instruction sets. Data screening of preliminary instruction sets is performed through two indicators: quality assessment and knowledge coverage, to obtain the final high-quality aviation field instruction set.
2. The method for generating a large model instruction set for a multi-dimensionally expanded aviation field according to claim 1, characterized in that: Step S32 specifically includes the following sub-steps: S321, quality assessment based on reward model: first, the instruction statement, input statement and output statement of each instruction are spliced to form a complete instruction expression, and then the spliced instruction set is sent to the reward model for scoring. When the score exceeds the scoring threshold, the data quality is considered to meet the standard; S322, screening based on coverage, specifically includes the following sub-steps: S3221. Define the semantic embedding representation V of the instruction dataset (ρ,X,Y) , each instruction triple (ρ, X, Y) is represented as its embedding vector; S3222. Use the K-Center-Greedy algorithm to gradually select the instruction triplets with the greatest diversity from the data set that has passed the quality assessment until the preset coverage is met or the size of the data set is minimized, complete the data screening, and obtain the final high-quality aviation field instruction set.
3. The method for generating a large model instruction set for a multi-dimensionally expanded aviation field according to claim 1, characterized in that: Step S3222 specifically includes the following sub-steps: First, randomly select a point from the data set as the center v c ; Second, for each unselected data point v i , calculate the data point v i Minimum distance to a set of selected center points: d min (v i )=min(v i ,v c )·u(v i ,v c ) Among them, u(v i ,v c ) is the penalty factor, and the formula is as follows: Among them, C is a normalization constant used to approximate the maximum nearest neighbor distance; Finally, select the point with the largest distance from the center point set As the instruction triple with the greatest diversity: This process is repeated until the preset coverage is met or the size of the dataset is minimized.
4. The method for generating a large model instruction set for a multi-dimensionally expanded aviation field according to claim 1, characterized in that: Step S21 specifically includes the following sub-steps: S211, extract and filter key features of the input statement and output statement of each instruction: Use the pre-trained model BERT to semantically represent the input and output: Among them, X i For command input, Y i is the expected instruction output, is the semantic representation of the instruction input, The semantic representation of the instruction output; S212, vector representation QX of the input statement and output statement of each instruction in the aviation knowledge question answering task i , QYi, calculate the semantic similarity S(QX i , QYi): S213, set a similarity threshold θ, and filter out high-correlation input sentences and output sentences that meet the conditions. The formula is as follows: Z filtered ={(QX i ,QY i )|S(QX i ,QY i )>θ,i=1,2,..,N} Among them, N is the number of aviation knowledge question-answering task instructions extracted, and θ is the similarity threshold; S214, introduce a feature grouping strategy based on the K-Means clustering algorithm for each task; the semantic representation of the input and output pairs Perform vector concatenation to obtain a joint vector representation For all vectors V i Perform K-Means clustering: C k ={v i |Cluster(v i )=k,i=1,2,..,N} Among them, C k represents the kth cluster, and through K-Means clustering, the input and output pairs are divided into different topic clusters; S215. Each task generates a large number of clusters, each of which contains instruction input and output pairs, and ultimately obtains a large number of sets of few-sample instruction input and output pairs.
5. The method for generating a large model instruction set for a multi-dimensionally expanded aviation field according to claim 1, characterized in that: After mixing in step S221, the following is obtained: Where T is the number of subject / domain clusters, R is a task, R∈{aviation knowledge question answering, document abstract generation, keyword generation, document catalog generation, paragraph generation, paragraph optimization, paragraph continuation}, and the number of all sets of few-sample instruction input and output pairs is T i represents the number of subject / domain clusters in the i-th task, is the number of input and output pairs under the jth topic / domain cluster of the nth task; In step S222, the similarity S(ρ, X i ,Y i ) for the input X based on the instruction statement ρ i Generate Y i The similarity score quantifies the similarity between the generated output and the expected output: in, is the instruction statement ρ for the input statement X i A vector representation of the generated output; The optimization objective function L2(ρ) in step S223 is: Among them, w i is the weight of the task priority, which is used to reflect the relevance or importance of different tasks. The weight w i Dynamically adjust according to the actual needs of the task.
6. The method for generating a large model instruction set for a multi-dimensionally expanded aviation field according to claim 1, characterized in that: In step S11, scientific research papers related to the aviation field are first retrieved from the open paper title query interface as input data for constructing the aviation field instruction set, and then the aviation field instruction set tasks are defined based on the acquired aviation scientific research literature data and common tasks constructed by the instruction set.
7. The method for generating a large model instruction set for a multi-dimensionally expanded aviation field according to claim 1, characterized in that: Step S233 is as follows: To avoid generating too many similar instructions, a generation termination condition is set. After each round of generation, the overall similarity S between the newly generated instructions and the existing set is calculated. overall , the calculation formula is as follows: Where D is the existing set, D new is a newly generated set, when S overall When it remains high for many consecutive times, the generation is stopped, and the expanded instructions are mixed with all the original instructions to obtain the aviation field instruction set.
8. The method for generating a large model instruction set for a multi-dimensionally expanded aviation field according to claim 1, characterized in that: Step S31 specifically includes the following sub-steps: S311. Use model M1 and model M2 to score each instruction in terms of accuracy, completeness, and clarity. The scoring formula is: Score(ρ)=min(35,A(ρ))+min(35,C(ρ))+min(30,Q(ρ)) Among them, A(ρ) refers to accuracy, C(ρ) refers to completeness, and Q(ρ) refers to clarity; S312. Based on the scoring results of the two models, a weighted average is performed on each instruction to obtain a comprehensive scoring result. The calculation formula for the comprehensive scoring result is as follows: in, is the scoring result of model M1, is the scoring result of model M2, α and β are the weight coefficients of model M1 and model M2, respectively, which are usually set equal; S313, sorting the final scoring results, retaining the instruction data with the highest rankings, removing the instructions with too low scores or inconsistent rankings, and finally forming a preliminary instruction set.
9. The method for generating a large model instruction set for a multi-dimensionally expanded aviation field according to claim 1, characterized in that: Step S1 specifically includes the following sub-steps: S11. Define the tasks of aviation scientific research literature data acquisition and instruction set. The instruction set tasks include aviation knowledge question answering, literature abstract generation, keyword generation, literature catalog generation, paragraph generation, paragraph optimization, and paragraph continuation. S12. Generate input statements and output statements for the aviation scientific research literature instruction set: generate input statements and output statements for the instruction set tasks respectively.
10. An instruction set generation system for the multi-dimensionally expanded aviation field large model instruction set generation method according to claim 1, characterized in that: It includes an instruction set input statement and output statement generating unit, an aviation field instruction set generating unit and a screening unit. The instruction set input statement and output statement generating unit is used to generate instruction set input statements and output statements based on aviation scientific research literature; the aviation field instruction set generating unit is used to generate a multi-dimensionally extended aviation field instruction set; the screening unit is used to screen high-quality aviation field instruction sets and output a final instruction set.
Citation Information
Patent Citations
Session recommendation system fusing sparse graph and multi-hop attention
CN114817508A
Aviation literature keyword similarity judgment method fused with multi-modal semantic association map
CN116362221A
System and Method for Recommending Semantically Relevant Content
US20220108175A1