Auditing question and answer large model optimization method based on prompt fine tuning
By integrating prior knowledge and mixed tip fine-tuning strategies in the audit question-and-answer model, building a cloze fill-in-the-blank template and using attention mechanism to generate subject vectors, the language bias problem of traditional tip fine-tuning methods in audit scenarios is solved, and the model's reasoning ability and response speed are improved.
Patent Information
- Application Number
- CN202510487523.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-04-18
AI Technical Summary
The traditional tip fine-tuning method has language bias problems in audit scenarios, resulting in the model performing poorly when dealing with multimodal question-and-answer tasks, slow inference speed, and huge computing resources consumption.
The audit question-and-answer model optimization method based on prompt fine-tuning is adopted. By integrating prior knowledge and mixed prompt fine-tuning strategies, a cloze fill-in-the-blank template of the mask pattern is constructed, providing the model with more accurate prompt fine-tuning instructions, and using the attention mechanism and mask mechanism to generate subject vectors.
It improves the model's reasoning ability and response speed, reduces language bias, and improves the performance of Q&A tasks in audit scenarios.
Smart Images

Figure CN120031019A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power auditing, and in particular to a method for optimizing an audit question-answering large model based on prompt fine-tuning. Background Art
[0002] A language model is a model based on statistics, deep learning or other machine learning techniques that is used to process and generate natural language text. Its main tasks are to understand, generate, predict and analyze text data. Modern language models, especially those based on deep learning, are able to process complex language patterns and generate fluent and meaningful text.
[0003] A pre-trained language model is a type of language model that is first pre-trained on large-scale text data, that is, learning the general laws and knowledge of the language, and then fine-tuning it to apply to specific tasks. At present, pre-trained language models have achieved great success in the field of natural language processing, significantly improving the ability of machines to understand and generate text. The basic process of a pre-trained language model usually includes two main stages: pre-training-fine-tuning, where: pre-training is to train the model through massive unlabeled text data to learn the general knowledge and patterns of the language; the goal of pre-training is to enable the model to master the basic language capabilities of the grammatical structure, semantic relations, and contextual dependencies of words; the pre-training stage does not involve specific tasks, so the training goals are usually some general language modeling tasks, such as autoregressive language modeling and autoencoding language modeling.
[0004] Fine-tuning is the process of applying the general knowledge gained in the pre-training phase to specific tasks. The pre-trained model is further trained on the basis of the labeled dataset to adapt to specific downstream tasks. The fine-tuning phase usually requires less data because the pre-training phase has endowed the model with rich language capabilities and knowledge.
[0005] Prompt fine-tuning is to guide the output performance of the model in a specific task by inputting specific prompt words into the pre-trained model. In the application of large-scale pre-trained language models, due to the large number of parameters, the inference speed is slow and the computing resources are consumed greatly. Especially in audit scenarios, the model is required to respond quickly and accurately to complex audit question-and-answer tasks. However, traditional prompt fine-tuning methods often have language bias problems, which leads to poor performance of the model when processing multimodal question-and-answer tasks. Summary of the invention
[0006] In order to solve the technical problems existing in the background technology, the present invention provides an audit question and answer large model optimization method based on prompt fine-tuning, which improves the reasoning ability and response speed of the model by integrating prior knowledge and hybrid prompt fine-tuning strategy.
[0007] The technical solution adopted by the present invention is: A method for optimizing a large audit question-answering model based on prompt fine-tuning, comprising: S1. Collection and storage of audit data: The audit data in the current viewport buffer is cleared before acquisition, and the audit data is separated during acquisition.
[0008] S2. Audit data text analysis: In the encoding layer, the audit data text is processed into a text vector sequence T N ; Introduce hint fine-tuning instructions, from the text vector sequence T N The audit data text body T is obtained from K , Audit data text object O K ; In the decoding layer, the audit data text body T K Get the subject mask sequence ; In the decoding layer, the main mask sequence , combined with the text vector sequence T N Get the main vector sequence ; In the main vector sequence Based on the text vector sequence T N Get the relation-object vector sequence .
[0009] S3, Summary and Release: Take out the middle layer in the encoding layer as the entity sequence label E C Input; Combine the results of text analysis of audit data for summary and publication.
[0010] Furthermore, the prompt fine-tuning instruction includes: the subject vector norm , the object vector norm ; The text vector sequence T N By the principal vector norm Convergence, that is: , thus obtaining the audit data text body T K ; The text vector sequence T N Object vector norm Convergence, that is: , thus obtaining the audit data text object O K .
[0011] Furthermore, the text vector sequence T N for: , The audit data text body T K for: , The audit data text object O K for: ; in: is the text vector sequence T N The component group, The audit data text body T K The weight, Audit data text object O K The weight, T is the transpose of the vector.
[0012] Furthermore, the entity sequence is labeled E C For: text vector sequence T N The single-line formula in .
[0013] Furthermore, the entity sequence is labeled E C =T K ∪O K ) in a single row; The main body of the audit data text T K , audit data text object O K After the union, the correlation between the components is improved.
[0014] Furthermore, the audit data text body T K Padding is performed in the decoding layer to obtain the main mask sequence for: , in: The (1, 2, ..., k) in K represents different subject masks, which are used to distinguish. T is the transpose of the vector.
[0015] Furthermore, the subject mask sequence In the decoding layer, combined with the audit data text body T K Get the main vector sequence for: , in: The (1, 2, ..., k) in K represent different subject vectors, and are used to distinguish them. T is the transpose of the vector; The subject vector sequence In the decoding layer, with the text vector sequence T N Add together to get the relation-object vector sequence for: , in: The (1, 2, ..., k) in K represent different text vectors, and they are used to distinguish them. T is the transpose of the vector.
[0016] Furthermore, a subject pointer network is constructed in the encoding layer to convert the audit data text body T K ,After converting the sequence model from the traditional sequence, the sequence length is kept fixed; The decoding layer constructs a relation-object pointer network to convert the relation-object vector sequence ,After converting the sequence model from the traditional sequence, the sequence length is kept fixed.
[0017] Furthermore, the subject vector sequence To relation-object vector sequence In the process of transformation, except for the text vector sequence T N In addition to basic operations, the position-relationship function is constructed to obtain the intermediate vector sequence P e for: ,in: V i is the main vector sequence The weight, j is the frequency coefficient of the position-relationship function, d is the dimension.
[0018] Furthermore, an object pointer network is constructed in the encoding layer to convert the audit data text object O K , after converting the sequence model from the traditional sequence, the fixed sequence length is maintained; thus determining the audit data text object O K The number of layers; Audit data text body T K Audit data text object O K The relationship between ∝ audit data text object O K The number of layers.
[0019] Beneficial effects of the audit question-answering large model optimization method based on prompt fine-tuning of the present invention: 1. Provide more accurate prompts and fine-tuning instructions for the model by building a mask mode cloze template; 2. Guide the model to understand audit knowledge and answer questions through mask templates and prompt fine-tuning instructions suitable for audit scenarios; 3. A subject vector sequence generation method based on subject mask, which uses attention mechanism and mask mechanism to generate subject vectors.
[0020] 4. Assist entity decoding through entity sequence labeling tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of a process of an example of the present invention; Figure 2 It is a schematic diagram of the encoding and decoding process of an example of the present invention; Figure 3 It is a schematic diagram of the decoding process of an example of the present invention. DETAILED DESCRIPTION
[0022] In order to more clearly and specifically explain the specific implementation purpose and implementation mode of the present invention, the technical solution of the present invention will be fully described below. The described embodiments are part of the embodiments of the present invention, but not all of them. Without making creative work, all other embodiments based on the embodiments described in the present invention belong to the protection scope of the present invention.
[0023] The present invention provides an audit question-answering large model optimization method based on prompt fine-tuning, such as Figure 1 As shown, including: S1. Collection and storage of audit data: The audit data in the current viewport buffer is cleared before acquisition, and the audit data is separated during acquisition.
[0024] S2. Audit data text analysis: S2.1. In the coding layer: Process the audit data text into a text vector sequence T N for: ; Where: is the text vector sequence T N Component group.
[0025] Introduce a hint fine-tuning instruction, the hint fine-tuning instruction includes: the subject vector norm , the object vector norm ; The text vector sequence T N By the principal vector norm Convergence, that is: , thus obtaining the audit data text body T K ; The text vector sequence T N Object vector norm Convergence, that is: , thus obtaining the audit data text object O K ; Prompt fine-tuning instructions can guide the model in audit knowledge understanding and question-answering tasks, making it more suitable for audit scenarios.
[0026] The main body pointer network is constructed in the encoding layer to convert the audit data text body T K , after converting the traditional sequence model, the fixed sequence length is maintained; the audit data text body T K for: ; The object pointer network is constructed in the encoding layer to convert the audit data text object O K , after converting the sequence model from the traditional sequence, the fixed sequence length is maintained; the audit data text object O K for: ; In the above two formulas: The audit data text body T K The weight of Audit data text object O K The amount of O k The k in the table is the audit data text O K The number of layers; T is the transpose of the vector.
[0027] Audit data text body T K Audit data text object O K The relationship between ∝ audit data text object O K The number of layers.
[0028] S2.2, in the decoding layer: Audit data text body T K Fill in the blanks by constructing a mask mode cloze template to provide the model with more accurate prompts and fine-tuning instructions to obtain the main mask sequence for: ; Where: The (1, 2, ..., k) in K represents different subject masks, which are used to distinguish them; T is the transpose of the vector.
[0029] S2.3.1, in the decoding layer: Mask sequence by subject , combined with the text vector sequence T N Get the main vector sequence for: ; Where: The (1, 2, ..., k) in K represent different subject vectors and are used to distinguish them; T is the transpose of the vector.
[0030] S2.3.2, in the decoding layer: In the main vector sequence Based on the text vector sequence T N Add, construct the relation-object pointer network in the decoding layer, and convert the relation-object vector sequence , after converting the sequence model from the traditional sequence, the sequence length is kept fixed; the relationship-object vector sequence for: ; Where: The (1, 2, …, k) in K represent different text vectors and are used to distinguish them; T is the transpose of the vector.
[0031] S2.3.3, in the decoding layer: Principal vector sequence To relation-object vector sequence In the process of transformation, except for the text vector sequence T N In addition to basic operations, the position-relationship function is constructed to obtain the intermediate vector sequence P e for: ; in: V i is the main vector sequence The weight of j is the frequency coefficient of the position-relationship function; d is the dimension.
[0032] S3, Summary and Release: Take out the middle layer in the encoding layer as the entity sequence label E C Input.
[0033] Entity sequence labeling C For: text vector sequence T N In order to improve the main body of the audit data text T K , audit data text object O K The correlation between the various components, from the main body of the audit data text T K Object O with audit data text K Select from the set of unions, that is: entity sequence annotation E C =T K ∪O K) in a single row; annotated by entity sequence E C Subtask of assisting entity decoding.
[0034] Combine the results of text analysis of audit data for summary and publication.
[0035] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Through the above description, relevant staff can make various changes and modifications without departing from the technical concept of the present invention. The technical scope of the present invention is not limited to the contents of the specification. All so-called equal changes and modifications of the shapes, structures, features and spirits described in the scope of the claims of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for optimizing a large audit question-answering model based on prompt fine-tuning, characterized by: S1. Collection and storage of audit data: The audit data in the current viewport buffer is cleared before acquisition, and the audit data is separated during acquisition; S2. Audit data text analysis: In the encoding layer, the audit data text is processed into a text vector sequence T N ; Introduce hint fine-tuning instructions, from the text vector sequence T N The audit data text body T is obtained from K , Audit data text object O K ; In the decoding layer, the audit data text body T K Get the subject mask sequence ; In the decoding layer, the main mask sequence , combined with the text vector sequence T N Get the main vector sequence ; In the main vector sequence Based on the text vector sequence T N Get the relation-object vector sequence ; S3, Summary and Release: Take out the middle layer in the encoding layer as the entity sequence label E C Input; Combine the results of text analysis of audit data for summary and publication.
2. According to claim 1, a method for optimizing an audit question-answering large model based on prompt fine-tuning is characterized by: The prompt fine-tuning instruction includes: the subject vector norm , the object vector norm ; The text vector sequence T N By the principal vector norm Convergence, that is: , thus obtaining the audit data text body T K ; The text vector sequence T N Object vector norm Convergence, that is: , thus obtaining the audit data text object O K .
3. The audit question and answer large model optimization method based on prompt fine-tuning according to claim 1 or 2 is characterized in that: The text vector sequence T N for: , The audit data text body T K for: , The audit data text object O K for: ; in: is the text vector sequence T N The component group, The audit data text body T K The weight, Audit data text object O K The weight, T is the transpose of the vector.
4. According to claim 3, a method for optimizing an audit question-answering large model based on prompt fine-tuning is characterized in that: The entity sequence label E C For: text vector sequence T N The single-line formula in .
5. According to claim 3, the audit question and answer large model optimization method based on prompt fine-tuning is characterized by: The entity sequence label E C =T K ∪O K ) in a single row; The main body of the audit data text T K , audit data text object O K After the union, the correlation between the components is improved.
6. According to claim 3, a method for optimizing an audit question-answering large model based on prompt fine-tuning is characterized in that: The audit data text body T K Padding is performed in the decoding layer to obtain the main mask sequence for: , in: The (1, 2, ..., k) in K represents different subject masks, which are used to distinguish. T is the transpose of the vector.
7. The audit question and answer large model optimization method based on prompt fine-tuning according to claim 6 is characterized by: The subject mask sequence In the decoding layer, combined with the audit data text body T K Get the main vector sequence for: , in: The (1, 2, ..., k) in K represent different subject vectors, and are used to distinguish them. T is the transpose of the vector; The subject vector sequence In the decoding layer, with the text vector sequence T N Add together to get the relation-object vector sequence for: , in: The (1, 2, ..., k) in K represent different text vectors, and they are used to distinguish them. T is the transpose of the vector.
8. The audit question and answer large model optimization method based on prompt fine-tuning according to claim 7 is characterized by: The encoding layer constructs a subject pointer network to convert the audit data text body T K ,After converting the sequence model from the traditional sequence, the sequence length is kept fixed; The decoding layer constructs a relation-object pointer network to convert the relation-object vector sequence ,After converting the sequence model from the traditional sequence, the sequence length is kept fixed.
9. The audit question and answer large model optimization method based on prompt fine-tuning according to claim 7 is characterized by: The subject vector sequence To relation-object vector sequence In the process of transformation, except for the text vector sequence T N In addition to basic operations, the position-relationship function is constructed to obtain the intermediate vector sequence P e for: ,in: V i is the main vector sequence The weight, j is the frequency coefficient of the position-relationship function, d is the dimension.
10. The audit question and answer large model optimization method based on prompt fine-tuning according to claim 8 is characterized by: The object pointer network is constructed in the encoding layer to convert the audit data text object K , after converting the sequence model from the traditional sequence, the fixed sequence length is maintained; thus determining the audit data text object O K The number of layers; Audit data text body T K Audit data text object O K The relationship between ∝ audit data text object O K The number of layers.
Citation Information
Patent Citations
Question and answer library generation method and device based on knowledge graph, electronic equipment and storage medium
CN113590844A
Power audit text classification method and device based on improved BERT model
CN115357719A
Electric power audit text entity recognition method, device and equipment and storage medium
CN116245107A
Sensitive text detection method for social platform
CN116561318A
Case filing pre-auditing system of intelligent governance platform
CN119027052A