CN-121998663-A - Document generation quality optimization method, device, equipment and storage medium
Abstract
The application belongs to the technical field of artificial intelligence, and relates to a document generation quality optimization method, a device, equipment and a storage medium, wherein a generated document is obtained; inputting the generated document into a document generation quality evaluation model, acquiring an evaluation result, carrying out optimization processing on the generated document when the evaluation result does not meet the requirement condition to obtain an optimized document, repeatedly executing document generation quality evaluation and optimization operation by replacing the generated document with the optimized document until the latest evaluation result meets the preset requirement condition, and outputting a final document. By carrying out the generation quality evaluation and optimization operation on the generated document, the high-quality rapid optimization on the generated document is ensured, so that the output final document meets the corresponding requirement condition. The document generation quality optimization method is applied to a financial business scene, can assist in quality audit during financial contract document generation, and can assist in speech document generation quality audit when applied to a customer service speech document generation scene.
Inventors
- FENG XINJIE
Assignees
- 中国平安财产保险股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260113
Claims (10)
- 1. A document generation quality optimization method, comprising the steps of: acquiring a generated document output by a preset document generation model; inputting the generated document into a pre-trained document generation quality assessment model; acquiring an evaluation result output by the document generation quality evaluation model; judging whether the evaluation result meets a preset requirement condition or not; If the preset requirement condition is not met, carrying out optimization processing on the generated document according to a preset generation quality optimization strategy and the evaluation result to obtain an optimized document, and repeatedly executing document generation quality evaluation and optimization operation by replacing the generated document with the optimized document; and outputting a final document until the latest evaluation result meets the preset requirement condition.
- 2. The document generation quality optimization method of claim 1, wherein prior to performing the step of inputting the generated document into a pre-trained document generation quality assessment model, the method further comprises: Acquiring a training document set, wherein each document in the training document set is labeled with a document division structure in advance, and a document classification theme, a document classification similarity theme and a quality score corresponding to each division structure; Inputting the training document set into a document generation quality evaluation model formed by N quality evaluation agents, wherein the N quality evaluation agents comprise 1 master agent and N-1 slave agents, and N is a positive integer greater than 1; Based on a document division structure pre-marked by each document in the training document set, a document classification theme corresponding to each division structure and a document classification similar theme, carrying out structural division and classification processing on the documents in the training document set by adopting the main intelligent agent to obtain a main intelligent agent with the structural division and classification processing learning completed; distributing the classification processing results to different secondary agents according to different document classification subjects; in the slave agent, sorting the quality of the classification processing results under the corresponding subject according to the quality score corresponding to each division structure; obtaining a mapping relation between a document classification subject and the slave intelligent agent, and obtaining a quality sorting result corresponding to each slave intelligent agent and quality scores corresponding to all division structures in each slave intelligent agent respectively; And performing reinforcement learning training on the document generation quality evaluation model according to the mapping relation between the document classification subjects and the slave intelligent agents, the quality sorting result corresponding to each slave intelligent agent, the quality scores corresponding to all the division structures in each slave intelligent agent respectively, and the document classification subjects and the document classification similar subjects corresponding to each division structure, so as to obtain a pre-trained document generation quality evaluation model.
- 3. The document generation quality optimization method according to claim 2, wherein the step of structurally classifying and categorizing the documents in the training document set by using the main agent based on the document division structure pre-labeled by each document in the training document set, the document classification subject corresponding to each division structure, and the document classification similar subject, comprises: According to a document division structure pre-marked by each document in the training document set, carrying out structural division on all documents to obtain structural document fragments corresponding to each document; Classifying the structural document fragments according to different document classification topics by combining the document classification topics corresponding to each division structure to obtain structural document fragment sets respectively corresponding to different document classification topics; performing association marking processing on a structural document fragment set corresponding to the document classification similar subject; And taking the association mark processing results between the structural document fragment sets corresponding to different document classification topics and the structural document fragment sets corresponding to the document classification similar topics as classification processing results.
- 4. The method for optimizing document generation quality according to claim 2, wherein the step of performing reinforcement learning training on the document generation quality evaluation model according to the mapping relationship between the document classification subject and the slave agents, the quality sorting result corresponding to each slave agent, the quality scores corresponding to all the division structures in each slave agent, and the document classification subject and the document classification similarity subject corresponding to each division structure, to obtain the pre-trained document generation quality evaluation model comprises the steps of: generating a quality scoring component for each slave agent learning and training document according to the quality scores respectively corresponding to all the dividing structures in each slave agent; Fitting a first-order optimization strategy for preliminary optimization of the document generation quality based on the mapping relation between the document classification subjects and the slave agents, the document classification subjects corresponding to each division structure and the document classification similarity subjects, wherein the first-order optimization strategy comprises the step of carrying out document generation quality optimization on the slave agents corresponding to the same or similar document classification subjects by utilizing an online reinforcement learning algorithm and combining the document generation quality scoring component; Fitting a second-order optimization strategy for optimizing the document generation quality on the basis of the first-order optimization strategy according to the quality sorting result corresponding to each slave agent and the quality scores corresponding to all the division structures in each slave agent, wherein the second-order optimization strategy comprises an optimization mode of adopting an offline reinforcement learning algorithm, so that the division documents with the highest scores in the screening quality sorting result are learned by the slave agent to perform document generation quality optimization; And deploying the first-order optimization strategy and the second-order optimization strategy together as a preset generation quality optimization strategy into the document generation quality evaluation model to obtain the pre-trained document generation quality evaluation model.
- 5. The document generation quality optimization method according to claim 1, wherein before the step of obtaining the evaluation result output by the document generation quality evaluation model is performed, the method further comprises: carrying out structural division and classification processing on the generated document by utilizing a main agent in the document generation quality evaluation model to obtain a structural division result included in the generated document and a document classification subject corresponding to each division part; according to the document classification subject corresponding to each division part, transmitting all the division parts in the structural division result to corresponding slave intelligent agents one by one; Generating quality scoring components are used for scoring the generating quality of all the dividing parts through each document generating quality scoring component obtained through learning training in the intelligent agent, and generating quality scores corresponding to all the dividing parts respectively are obtained; And sorting the generated quality scores corresponding to all the dividing parts respectively as the evaluation result.
- 6. The document generation quality optimization method according to claim 5, wherein the step of optimizing the generated document according to a preset generation quality optimization strategy and the evaluation result to obtain an optimized document comprises the steps of: identifying the document classification subjects and the generated quality scores corresponding to all the division parts respectively according to the evaluation result; on the basis of the document classification subjects corresponding to all the division parts respectively, adopting a first-order optimization strategy in the preset generation quality optimization strategy to determine the slave agent corresponding to the same or similar document classification subjects on line as a target slave agent; Based on a quality sequencing result of the target from the intelligent agent, adopting a second-order optimization strategy in the preset generated quality optimization strategy, and offline screening from the target to generate a partition document with the highest quality score to replace a target partition part; And obtaining the document after the replacement is completed as the optimized document.
- 7. The document generation quality optimization method according to claim 5, wherein the step of outputting the final document until the latest evaluation result satisfies a preset requirement condition comprises: If the generated quality scores corresponding to all the dividing parts respectively exceed the corresponding generated quality score thresholds, acquiring a document which is finally input into the pre-trained document generated quality evaluation model; and outputting the document as the final document.
- 8. A document generation quality optimizing apparatus, comprising: The generated document acquisition module is used for acquiring a generated document output by the preset document generation model; The evaluation model input module is used for inputting the generated document into a pre-trained document generation quality evaluation model; the evaluation result acquisition module is used for acquiring an evaluation result output by the document generation quality evaluation model; the requirement condition judging module is used for judging whether the evaluation result meets a preset requirement condition; The document repetition optimization module is used for carrying out optimization processing on the generated document according to a preset generation quality optimization strategy and the evaluation result if the preset requirement condition is not met, so as to obtain an optimized document, and repeatedly executing document generation quality evaluation and optimization operation by replacing the generated document with the optimized document; and the final document output module is used for outputting a final document until the latest evaluation result meets the preset requirement condition.
- 9. A computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the document generation quality optimization method of any of claims 1 to 7.
- 10. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the document generation quality optimization method of any of claims 1 to 7.
Description
Document generation quality optimization method, device, equipment and storage medium Technical Field The application relates to the technical field of artificial intelligence, and relates to a document generation quality optimization method, device, equipment and storage medium, which are applied to scenes of generating quality evaluation and optimization of a generated target document. Background With the breakthrough progress of artificial intelligence technology, financial business document automatic generation based on large language model has entered a practical stage. However, there is still a significantly short board in terms of the content quality assessment and feedback optimization mechanisms that generate documents, which directly constrains the final generated document content quality. The existing evaluation optimization system mainly comprises a similarity algorithm based on n-gram, a deep learning semantic matching model, an intelligent evaluation system based on a large model and a traditional manual evaluation mode. However, in the current evaluation optimization methods, when the generation quality optimization is performed on the target generated document, the defects of insufficient understanding capacity of the text subject and limited optimization speed of the text content exist, so that the document quality optimization process is slower, and the optimization result is not ideal. Disclosure of Invention The embodiment of the application aims to provide a document generation quality optimization method, device, equipment and storage medium, so as to realize high-quality quick optimization of a generated document, and enable an output final document to meet corresponding requirement conditions. In a first aspect, an embodiment of the present application provides a document generation quality optimization method, which adopts the following technical scheme: a document generation quality optimization method comprising the steps of: acquiring a generated document output by a preset document generation model; inputting the generated document into a pre-trained document generation quality assessment model; acquiring an evaluation result output by the document generation quality evaluation model; judging whether the evaluation result meets a preset requirement condition or not; If the preset requirement condition is not met, carrying out optimization processing on the generated document according to a preset generation quality optimization strategy and the evaluation result to obtain an optimized document, and repeatedly executing document generation quality evaluation and optimization operation by replacing the generated document with the optimized document; and outputting a final document until the latest evaluation result meets the preset requirement condition. In a second aspect, an embodiment of the present application further provides a document generation quality optimization apparatus, which adopts the following technical scheme: A document generation quality optimization apparatus comprising: The generated document acquisition module is used for acquiring a generated document output by the preset document generation model; The evaluation model input module is used for inputting the generated document into a pre-trained document generation quality evaluation model; the evaluation result acquisition module is used for acquiring an evaluation result output by the document generation quality evaluation model; the requirement condition judging module is used for judging whether the evaluation result meets a preset requirement condition; The document repetition optimization module is used for carrying out optimization processing on the generated document according to a preset generation quality optimization strategy and the evaluation result if the preset requirement condition is not met, so as to obtain an optimized document, and repeatedly executing document generation quality evaluation and optimization operation by replacing the generated document with the optimized document; and the final document output module is used for outputting a final document until the latest evaluation result meets the preset requirement condition. In a third aspect, an embodiment of the present application further provides a computer device, which adopts the following technical scheme: A computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the document generation quality optimization method described above. In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which adopts the following technical solutions: A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of a document generation quality optimization method as described above. Compared with the prior art, the emb