Search

CN-121998068-A - Document generation method, device, equipment, medium and program product

CN121998068ACN 121998068 ACN121998068 ACN 121998068ACN-121998068-A

Abstract

The embodiment of the disclosure provides a document generation method, a device, equipment, a medium and a program product. The method comprises the steps of obtaining object information and text prompt texts of a target object, inputting the object information and the text prompt texts into a text generation model, and obtaining target text output by the text generation model, wherein the text generation model is obtained by fine tuning of a large-scale generation type language model based on training sample pairs, the training sample pairs comprise sample description texts and sample text, the sample description texts comprise sample object information and sample text prompt texts, and the sample text is a recommended text generated by at least two times of dialogue based on the sample object information and at least two sample text prompt texts. The embodiment of the disclosure adopts training sample pairs to conduct supervised fine tuning of a large-scale generation type language model, so as to obtain a small-scale document generation model. The document generation model is adopted to execute the document generation task, so that the time consumption for reasoning can be reduced, and the document generation quality is improved.

Inventors

  • REN HUI

Assignees

  • 北京字跳网络技术有限公司

Dates

Publication Date
20260508
Application Date
20241101

Claims (10)

  1. 1.A document generation method, comprising: acquiring object information of a target object and text prompt texts, wherein the object information represents text information corresponding to multi-mode content of the target object, and the text prompt text table solicit articles is used for generating text description information required by a target text generation model; Inputting the object information and the text prompt text into the text generation model to obtain a target text output by the text generation model, wherein the text generation model is obtained by fine tuning of a large-scale generation type language model based on a training sample pair, the training sample pair comprises a sample description text and a sample text, the sample description text comprises sample object information and sample text prompt text, and the sample text is a recommended text generated through at least two rounds of dialogue based on the sample object information and at least two sample text prompt texts.
  2. 2. The method according to claim 1, wherein the obtaining object information and text prompt text of the target object includes: Acquiring a network address of the target object, acquiring multi-modal content corresponding to the target object according to the network address, and generating the object information according to the multi-modal content, wherein the multi-modal content comprises at least one of image content, text content and audio content; and acquiring a text generation instruction, and determining the text prompt text according to text description information corresponding to the text generation instruction, wherein the text description information comprises at least one of type information, content information and style information.
  3. 3. The method of claim 1, wherein the training mode of the document generation model comprises: Sample object information of a sample object and at least two sample text prompt texts are obtained, wherein the sample text prompt texts are question texts in the dialogue; inputting the sample object information and at least two sample text prompt texts into the large-scale generation type language model, and performing at least two rounds of dialogue through the large-scale generation type language model to generate the sample text; Determining a sample description text according to the sample object information and at least two sample text prompt texts; and forming a training sample pair according to the sample description text and the sample document, and training the large-scale generation type language model based on the training sample pair to obtain the document generation model.
  4. 4. The method of claim 3, wherein the obtaining sample object information for the sample object and at least two sample document hint texts comprises: sample object information of the sample object is obtained according to the object type; Decomposing a document generation task of the large-scale generation type language model to obtain at least two subtasks; And determining at least two types of text description information of the sample text according to the at least two subtasks, and determining at least two sample text prompt texts according to the at least two types of text description information.
  5. 5. The method of claim 4, wherein the determining at least two types of document description information for the sample document according to the at least two sub-tasks, determining at least two sample document hint text according to the at least two types of document description information, comprises: determining at least two types of document description information of the sample document according to the task demand information of the at least two subtasks; generating a corresponding sample document prompt text according to first document description information, wherein the first document description information is used for representing task demand information of a first subtask taking the sample object information as input data; Generating a corresponding sample document prompt text according to second document description information and a task execution result of the first subtask, wherein the second document description information is used for representing task demand information of a second subtask taking the task execution result of the first subtask as input data; and generating a corresponding sample text prompt text according to third type text description information, wherein the third type text description information is used for representing task demand information of a third subtask taking a task execution result of the second subtask as input data.
  6. 6. The method of claim 3, wherein the inputting the sample object information and at least two sample document hint texts into the large generative language model, generating the sample document by at least two rounds of conversations through the large generative language model, comprises: Inputting the sample object information and a first sample text prompt text into the large-scale generated language model, and acquiring selling point content output by the large-scale generated language model, wherein the first sample text prompt text is determined based on selling point content generation requirements; inputting the selling point content and a second text prompt text into the large-scale generation type language model, and obtaining an initial text output by the large-scale generation type language model, wherein the second text prompt text is determined based on text generation requirements; inputting the initial text and a third sample text prompt text into the large-scale generated language model, and obtaining the sample text output by the large-scale generated language model, wherein the third sample text prompt text is determined based on text modification requirements.
  7. 7. A document generating apparatus, comprising: The information acquisition module is used for acquiring object information of a target object and text prompt texts, wherein the object information represents text information corresponding to multi-mode content of the target object, and the text prompt text table solicit articles is used for generating text description information required by a model for generating a target text; The document generation module is used for inputting the object information and the document prompt text into the document generation model to obtain a target document output by the document generation model, wherein the document generation model is obtained by fine tuning of a large-scale generation type language model based on a training sample pair, the training sample pair comprises a sample description text and a sample document, the sample description text comprises sample object information and sample document prompt text, and the sample document is a recommended document generated through at least two rounds of dialogue based on the sample object information and at least two sample document prompt texts.
  8. 8. An electronic device, the electronic device comprising: One or more processors; Storage means for storing one or more programs, The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the document generation method of any of claims 1-6.
  9. 9. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the document generation method of any of claims 1-6.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the document generation method of any of claims 1-6.

Description

Document generation method, device, equipment, medium and program product Technical Field Embodiments of the present disclosure relate to computer technology, and more particularly, to a document generation method, apparatus, device, medium, and program product. Background With the development of computer technology, document generation tools are used by more and more users to generate documents of target objects. Wherein the target object includes a commodity or the like. When the conventional document generation tool executes a document generation task, the reasoning time is long, and the document generation efficiency is affected. In addition, the stability of the document generation tool is uncontrollable, so that the generated document is low in quality and cannot meet the expectations of users. Disclosure of Invention The embodiment of the disclosure provides a document generation method, a device, equipment, a medium and a program product, which can improve the document generation efficiency and the document quality. In a first aspect, an embodiment of the present disclosure provides a document generating method, including: acquiring object information of a target object and text prompt texts, wherein the object information represents text information corresponding to multi-mode content of the target object, and the text prompt text table solicit articles is used for generating text description information required by a target text generation model; Inputting the object information and the text prompt text into the text generation model to obtain a target text output by the text generation model, wherein the text generation model is obtained by fine tuning of a large-scale generation type language model based on a training sample pair, the training sample pair comprises a sample description text and a sample text, the sample description text comprises sample object information and sample text prompt text, and the sample text is a recommended text generated through at least two rounds of dialogue based on the sample object information and at least two sample text prompt texts. In a second aspect, an embodiment of the present disclosure further provides a document generating apparatus, including: The information acquisition module is used for acquiring object information of a target object and text prompt texts, wherein the object information represents text information corresponding to multi-mode content of the target object, and the text prompt text table solicit articles is used for generating text description information required by a model for generating a target text; The document generation module is used for inputting the object information and the document prompt text into the document generation model to obtain a target document output by the document generation model, wherein the document generation model is obtained by fine tuning of a large-scale generation type language model based on a training sample pair, the training sample pair comprises a sample description text and a sample document, the sample description text comprises sample object information and sample document prompt text, and the sample document is a recommended document generated through at least two rounds of dialogue based on the sample object information and at least two sample document prompt texts. In a third aspect, embodiments of the present disclosure further provide an electronic device, including: One or more processors; Storage means for storing one or more programs, The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the document generation method as described in any embodiment of the present disclosure. In a fourth aspect, the presently disclosed embodiments also provide a storage medium containing computer-executable instructions for performing the document generation method of any of the embodiments of the present disclosure when executed by a computer processor. The embodiment of the disclosure provides a document generation method, a device, equipment, a medium and a program product, wherein object information and a document prompt text of a target object are acquired, and are input into a document generation model to obtain a target document output by the document generation model. Because the sample text is generated through the large-scale generation type language model based on sample object information and sample text prompt text in a multi-round dialogue mode, the quality of the sample text can be improved, and the problem that the text quality of the large-scale generation type language model for directly generating the text is not as expected is avoided. And forming a training sample pair by adopting the sample text and the sample description text, and performing supervised fine tuning on a large-scale generated language model by adopting the training sample pair to obtain a small-scale text generation model. The document generation mo