Document writing method, system and equipment based on large language model

Through the document writing method based on the large language model, the outline content and automatic text filling are adjusted in real time, the problems of consistency and accuracy of document writing in the existing technology are solved, and high-quality documents are generated to meet the needs of different industries.

CN119026576APending Publication Date: 2024-11-26SHANDONG ZHIYANG SHANGSHUI INFORMATION TECH CO LTD
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202411091098.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing large language model lacks the ability to generate and correct users' dynamic interaction with users in terms of professional document writing, especially scientific research and technical documents, and is difficult to maintain the consistency and accuracy of content, and lacks in-depth understanding of terms and concepts in specific fields. .

Method used

Using a document writing method based on a large language model, generate an initial outline by receiving document topics and writing requirements, adjusting outline content in real time based on user feedback, setting chapter weights and adjusting functions, combining network search to obtain external knowledge, ensuring outline consistency, and automatically Fill and format text for improved accuracy and personalization.

Benefits of technology

It significantly improves the accuracy and personalization of documents, improves the efficiency and quality of document writing, and meets the needs of different industries for high-quality documents, especially in complex documents and real-time user feedback adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026576A_ABST
    Figure CN119026576A_ABST
Patent Text Reader

Abstract

The invention provides a document writing method, system and equipment based on a large language model, and the method comprises the following steps: receiving a document theme and a document writing demand, and generating a document initial outline by using the large language model; receiving feedback suggestions of the initial outline of the document, and modifying outline contents of subsequent versions in real time by utilizing the feedback suggestions; judging whether the user and the assistant achieve consistency on the outline of the subsequent version or not, and when the consistency is achieved, obtaining a final document outline; and automatically filling specific chapters and sections according to the final document outline to generate a final text with logic coherence and correct grammar. And formatting and retouching the generated final text to ensure the accuracy and consistency of the final text. Based on the method, the invention further provides a document writing system and device based on the large language model. According to the method, the accuracy and personalization of the document can be remarkably improved, and the requirements of different industries for high-quality document writing are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent document writing, and in particular relates to a document writing method, system and device based on a large language model. Background Art

[0002] With the rapid development of information technology and artificial intelligence, natural language processing (NLP) has become one of the key technologies for solving complex language data processing problems. In particular, large language models (LLMs) such as GPT have been widely used in various text-related tasks, including chatbots, automatic document generation, and content summarization, due to their powerful language understanding and generation capabilities.

[0003] However, despite the excellent performance of existing large language models in text generation, they still face some challenges in professional document writing, especially scientific research and technical documents. These challenges mainly include: 1) lack of ability to interact with users to dynamically generate and modify document outlines; 2) often unable to maintain content consistency and accuracy when generating long texts; 3) prone to hallucinations and lack of in-depth understanding of domain-specific terms and concepts. In addition, although traditional document writing tools such as word processing software are powerful, they usually lack intelligent support, such as automatic content generation and structure optimization, which makes users spend a lot of time and energy when writing documents involving complex structures and technical depth. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes a document writing method, system and device based on a large language model, which can significantly improve the accuracy and personalization of documents and meet the needs of different industries for high-quality document writing.

[0005] To achieve the above object, the present invention adopts the following technical solutions:

[0006] A document writing method based on a large language model comprises the following steps:

[0007] Receiving a document topic and document writing requirements, and generating an initial document outline using a large prediction model; and receiving feedback on the initial document outline, and using the feedback to modify the outline content of subsequent versions in real time;

[0008] Determine whether the user and the assistant have reached a consensus on the outline of the subsequent version, and when consensus is reached, obtain the final document outline; the assistant is responsible for determining whether the outline is generated;

[0009] Automatically fill in specific chapters based on the final document outline to generate a logically coherent and grammatically correct final text.

[0010] Furthermore, the method also includes formatting and polishing the generated final text to ensure the accuracy and consistency of the final text.

[0011] Furthermore, the initial outline of the document includes various titles, descriptions corresponding to the content under each title, and subtitles corresponding to each title.

[0012] Furthermore, the specific process of using the feedback to adjust the outline content of the subsequent version includes:

[0013] Set different weights for each outline chapter, and adjust the outline content of subsequent versions based on the chapter weights and specific feedback on the current chapter; the specific adjustment formula is:

[0014]

[0015] Among them, Outline n is the outline of the nth iteration; ω i is the weight of the ith sub-chapter in the outline; Δ i is an adjustment function for the ith sub-chapter; Feedback n,i is the feedback provided by the user for the i-th subsection in the n-th iteration; Outline n,i is the content of the ith subchapter in the nth iteration.

[0016] Furthermore, the receiving of feedback on the initial outline of the document and adjusting the outline content of subsequent versions using the feedback specifically includes:

[0017] Search questions are generated according to the current outline and feedback on the current outline; the current outline is a running outline that is adjusted using feedback on the initial outline.

[0018] Use the generated search questions to query the browser webpage and summarize the answers; get a question-answer pair dictionary for each question, and finally merge the question-answer pair dictionaries to get an external knowledge dictionary;

[0019] Based on the current outline, modify the current outline by following the feedback from the current outline and referring to the external reference knowledge obtained through online search until the final output outline meets the requirements.

[0020] Furthermore, the judging whether the user and the assistant have reached a consensus on the outline of the subsequent version specifically includes: judging whether the user and the assistant have reached a consensus on the outline of the subsequent version based on the user's reply and reference to the historical conversation; if the judgment is inconsistent, re-modifying the outline content.

[0021] Furthermore, the specific process of automatically filling in specific chapters according to the final document outline to generate a logically coherent and grammatically correct final text includes:

[0022] Split the final document outline into its parts and generate a writing task for each subheading’s title and description;

[0023] According to each writing task, generating online search questions according to the outline and general description corresponding to the writing task;

[0024] According to the generated online search question, the browser webpage is queried and the answers are summarized, and the summarized answers are organized into a dictionary format to obtain a knowledge dictionary;

[0025] Write the final text based on the subheadings, general descriptions, and knowledge dictionary.

[0026] Furthermore, formatting and polishing the generated final text to ensure the accuracy and consistency of the final text specifically includes: organizing the document content with reference to the outline content, correcting any grammatical, spelling or punctuation errors, and maintaining consistency in the style and tone of the text.

[0027] The present invention proposes a document writing system based on a large language model, including an outline generation module, a judgment module and a text generation module;

[0028] The outline generation module is used to receive the document subject and document writing requirements, and use the big prediction model to generate an initial document outline; and receive feedback on the initial document outline, and use the feedback to modify the outline content of subsequent versions in real time;

[0029] The judgment module is used to judge whether the user and the assistant have reached a consistency in the outline of the subsequent version, and when the consistency is reached, the final document outline is obtained; the assistant is responsible for judging whether the outline is generated;

[0030] The text generation module is used to automatically fill in specific chapters according to the final document outline to generate a final text that is logically coherent and grammatically correct.

[0031] The present invention also proposes a document writing device based on a large language model, comprising:

[0032] Memory for storing computer programs;

[0033] A processor is used to implement the method steps described when executing the computer program.

[0034] The effects provided in the content of the invention are only the effects of the embodiments, not all the effects of the invention. One of the above technical solutions has the following advantages or beneficial effects:

[0035] The present invention proposes a document writing method, system and device based on a large language model, the method comprising the following steps: receiving a document subject and a document writing requirement, generating an initial document outline using a large prediction model; and receiving feedback on the initial document outline, using the feedback to modify the outline content of subsequent versions in real time; judging whether the user and the assistant reach a consistency in the outline of the subsequent versions, and obtaining the final document outline when the consistency is reached; the assistant is responsible for judging whether the outline is generated; automatically filling in specific chapters according to the final document outline to generate a logically coherent and grammatically correct final text. The generated final text is formatted and polished to ensure the accuracy and consistency of the final text. Based on a document writing method based on a large language model, a document writing system and device based on a large language model are also proposed. The present invention aims to improve the efficiency and quality of document writing through intelligent text generation and interactive editing functions, especially in processing complex documents, automatic content generation and real-time user feedback adjustment. The present invention can significantly improve the accuracy and personalization of documents and meet the needs of different industries for high-quality document writing. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A flow chart of a document writing method based on a large language model provided in Example 1 of the present invention;

[0037] Figure 2 A flow chart of a document writing method based on a large language model provided in Example 1 of the present invention;

[0038] Figure 3 A schematic diagram of a document writing system based on a large language model provided in Example 2 of the present invention;

[0039] Figure 4 A schematic diagram of a document writing device based on a large language model provided in Example 4 of the present invention. DETAILED DESCRIPTION

[0040] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. In addition, the present invention may repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed. It should be noted that the components illustrated in the accompanying drawings are not necessarily drawn to scale. The present invention omits the description of known components and processing techniques and processes to avoid unnecessary limitations on the present invention.

[0041] Example 1

[0042] Embodiment 1 of the present invention provides a document writing method based on a large language model, which is used to solve the problems existing in document writing in the prior art. The present invention aims to improve the efficiency and quality of document writing through intelligent text generation and interactive editing functions, especially in processing complex documents, automatic content generation and real-time user feedback adjustment. The present invention can significantly improve the accuracy and personalization of documents and meet the needs of different industries for high-quality document writing.

[0043] Embodiment 1 of the present invention provides a document writing method based on a large language model, including:

[0044] Receiving a document topic and document writing requirements, and generating an initial document outline using a large prediction model; and receiving feedback on the initial document outline, and using the feedback to modify the outline content of subsequent versions in real time;

[0045] Determine whether the user and the assistant have reached a consensus on the outline of the subsequent version, and when consensus is reached, obtain the final document outline; the assistant is responsible for determining whether the outline is generated;

[0046] Automatically fill in specific chapters based on the final document outline to generate a logically coherent and grammatically correct final text;

[0047] Format and polish the resulting final text to ensure accuracy and consistency.

[0048] Figure 1 A flow chart of a document writing method based on a large language model provided in Example 1 of the present invention;

[0049] In step S100, a document subject and document writing requirements are received.

[0050] Receive document writing request input by user, including subject, type and other related parameters;

[0051] For example, if you input: "I want to generate a background technology introduction document on image dehazing", the system calls LLM and makes it follow the instructions and use its internal knowledge to generate an initial outline.

[0052] In step S101, the large prediction model is used to generate an initial outline of the document, which includes various titles, descriptions corresponding to the content under each title, and subtitles corresponding to each title.

[0053] The prompt words used in this step are: "<Instruction> You are an intelligent assistant, responsible for generating an introduction to a background technology or an outline of a technology development process based on the user's needs. After the generation, ask the user whether he is satisfied.

[0054] Each outline should include the following structure:

[0055] 1. Subject: The subject of the research report.

[0056] 2. Outline: It contains multiple parts, and each part should include:

[0057] - Title: The title of this part.

[0058] - Description: A brief description of the content of this part.

[0059] - Subtitle (optional): If the content of this part has more subdivided topics, each subtopic should also include a title and a description.

[0060] Please generate an outline based on the topic and discussion provided by the user and return the result in JSON format.

[0061] User input: {{user requirement}}< / instruction>

[0062] In step S102, determine whether the outline meets the consistency requirements. If it does, execute step S105; otherwise, execute step S103.

[0063] In step S103, conduct an online search.

[0064] In step S104, iteratively modify the outline. In the present invention, user feedback plays a crucial role. The present invention designs a feedback mechanism that allows users to provide modification opinions after each generated outline. These feedbacks are parsed by the system and used to adjust the content of subsequent versions of the outline. Each feedback is regarded as an evaluation of the current output of the system, guiding the content adjustment of the next step.

[0065] In this application, different weights are set for each outline chapter, and the content of the subsequent version of the outline is adjusted according to the weight of the chapter and the specific feedback on the current chapter; the specific adjustment formula is:

[0066]

[0067] where Outline n is the outline of the nth iteration;

[0068] ω i is the weight of the ith sub-chapter in the outline;

[0069] Δ i is an adjustment function for the ith sub-chapter;

[0070] Feedback n,i is the feedback provided by the user for the ith sub-chapter in the nth iteration;

[0071] Outline n,i It is the content of the $i$-th sub-chapter in the $n$-th iteration.

[0072] The outline is optimized through the implicit expectation function above. Each round of user feedback is regarded as a real-time evaluation of the expectation function. In this way, the system continuously approaches the final report structure expected by the user. This method efficiently converts the user's intuitive feedback into guidance for algorithm adjustment, thereby iteratively improving the accuracy and satisfaction of the outline.

[0073] Automatically generate specific search questions based on the outline and modification suggestions to ensure obtaining the most relevant information, thereby reducing the possibility of the model having hallucinations by leveraging external knowledge. In this step, the system needs to call the LLM, and the prompt used is:

[0074] "<Instruction>You are an intelligent assistant responsible for generating multiple corresponding search questions based on the current research outline and modification suggestions provided by the user, in order to obtain knowledge from external reliable sources through a browser.

[0075] Current outline: {{Research Outline}}

[0076] Modification suggestions: {{Modification Suggestions}}< / Instruction>"

[0077] Query the browser web pages according to the generated search questions and summarize the answers. In this step, the system needs to call the LLM, and the prompt used is:

[0078] "<Instruction>You are an intelligent assistant responsible for summarizing the answers based on the questions and relevant web page content, and organizing the results in dictionary format.

[0079] Question: {{Question}}

[0080] Web page content: {{Web Page Content}}< / Instruction>"

[0081] For each question, obtain a question-answer pair dictionary, and finally merge the dictionaries to obtain the external knowledge dictionary

[0082] Based on the current outline as a benchmark, follow the modification suggestions, and refer to the external reference knowledge obtained from the online search to modify the current outline. In this step, the system needs to call the LLM, and the prompt used is:

[0083] "<Instruction>You are an intelligent assistant responsible for modifying the outline according to the current research outline and modification suggestions provided by the user, referring to the external knowledge. The modified outline should maintain the same organizational format as the original outline.

[0084] Current outline: {{Research Outline}}

[0085] Modification suggestions: {{Modification Suggestions}}

[0086] External knowledge: {{External knowledge dictionary}}< / instruction>”

[0087] Ask the user whether the outline meets the requirements and whether further modification and improvement are needed.

[0088] In step S105, generate the content of each subheading.

[0089] Based on the user's reply and referring to the historical conversation, judge whether the user and the assistant reach an agreement on the outline of the subsequent version; if the judgment is inconsistent, modify the outline content again. If the judgment is consistent, generate the content of each subheading.

[0090] “<instruction>You are an assistant responsible for judging whether the outline has been generated. Your task is to determine whether an agreement has been reached on the research outline based on the most recent conversation between the user and the assistant. Only when the user clearly indicates that it has been determined, output True, otherwise output False, and do not output additional analysis. Pay attention to the user's language and expression when reviewing the chat history to determine whether a consensus has been reached.

[0091] The following is the chat record: {{Historical messages}}< / instruction>”

[0092] When generating the content of each subheading, the system splits the determined outline and generates a writing task for the title and description of each subheading.

[0093] In step S106, for each writing task, the system will automatically generate specific online retrieval questions based on the outline and general description of this part. In this step, the system needs to call the LLM, and the prompt words used are:

[0094] “<instruction>You are an intelligent assistant responsible for generating multiple corresponding search questions based on the paragraph title and general description provided by the user, so as to obtain knowledge from reliable external sources through the browser.

[0095] Paragraph title: {{Subheading}}

[0096] General description: {{Subheading description}}< / instruction>”

[0097] Return to step S105 again, query the browser web page according to the generated questions and summarize the answers. In this step, the system needs to call the LLM, and the prompt words used are:

[0098] “<instruction>You are an intelligent assistant responsible for summarizing the answers based on the questions and relevant web page content and organizing the results in dictionary format.

[0099] Question: {{Question}}

[0100] Web content: {{Web content}}< / instruction>”

[0101] For each question, obtain a dictionary of question-answer pairs, and finally merge the dictionaries to obtain an external knowledge dictionary.

[0102] Write the content of this part according to the subheading, general description, and external knowledge dictionary. In this step, the system needs to call the LLM, and the prompt used is:

[0103] “<instruction>You are an intelligent assistant responsible for writing a certain part of a research report.

[0104] The theme is: {Theme}

[0105] The full-text outline is as follows: {Full-text outline}

[0106] The part that needs to be written currently is: {Subheading}

[0107] Please write according to the following description and reference knowledge:

[0108] Description: {Subheading description}

[0109] Reference knowledge: {External knowledge dictionary}< / instruction>”

[0110] Repeat the content steps for each subheading until the full-text draft is completed.

[0111] In step S107, format and polish the generated final text to ensure the accuracy and consistency of the final text.

[0112] The system formats and polishes according to the full-text draft and outline to ensure that the headings are organized according to the outline structure, and polish sentences and paragraphs with non-standard cultivation. In this step, the system needs to call the LLM, and the prompt used is:

[0113] “<instruction>You are a copywriting master, and your task is to format, polish, and optimize the user-input document.

[0114] Polishing requirements:

[0115] 1. Organize the document content with reference to the outline content.

[0116] 2. Correct any grammar, spelling, or punctuation errors.

[0117] 3. Keep the style and tone of the text consistent.

[0118] Reference outline: {{Outline content}}

[0119] User input: {{Draft content}}< / instruction>”

[0120] After polishing, the final document is output.

[0121] In step S108, the article is completed.

[0122] Figure 2 A flow chart of a document writing method based on a large language model provided in Example 1 of the present invention; the present invention covers the entire process from outline generation, outline interactive modification, outline consistency judgment, document segmentation writing to document polishing and formatting.

[0123] Embodiment 1 of the present invention provides a document writing method based on a large language model, aiming to improve the efficiency and quality of document writing through intelligent text generation and interactive editing functions, especially in processing complex documents, automatic content generation and real-time user feedback adjustment.

[0124] Embodiment 1 of the present invention provides a document writing method based on a large language model, which can significantly improve the accuracy and personalization of documents and meet the needs of different industries for high-quality document writing.

[0125] Example 2

[0126] Based on the document writing method based on a large language model proposed in Example 1 of the present invention, Example 2 of the present invention further provides a document writing system based on a large language model provided in Example 1 of the present invention, Figure 2 A flow chart of a document writing method based on a large language model provided in Example 1 of the present invention; the system comprises: an outline generation module, a judgment module and a text generation module;

[0127] The outline generation module is used to receive the document subject and document writing requirements, and use the big prediction model to generate an initial document outline; and receive feedback on the initial document outline, and use the feedback to modify the outline content of subsequent versions in real time;

[0128] The judgment module is used to judge whether the user and the assistant reach a consistency on the outline of the subsequent version, and when the consistency is reached, the final document outline is obtained; the assistant is responsible for judging whether the outline is generated;

[0129] The text generation module is used to automatically fill in specific chapters based on the final document outline and generate a final text that is logically coherent and grammatically correct.

[0130] In the outline generation module of this application, the initial document outline includes each title, the description corresponding to the content under each title, and the subtitles corresponding to each title.

[0131] The specific process of adjusting the outline content of subsequent versions using the feedback includes: setting different weights for each outline chapter, and adjusting the outline content of subsequent versions according to the weight of the chapter and the specific feedback on the current chapter; the specific adjustment formula is:

[0132]

[0133] Among them, Outline n is the outline of the nth iteration; ω i is the weight of the ith sub-chapter in the outline; Δ i is an adjustment function for the ith sub-chapter; Feedback n,i is the feedback provided by the user for the i-th subsection in the n-th iteration; Outline n,i is the content of the ith subchapter in the nth iteration.

[0134] Receiving feedback on the initial outline of the document and adjusting the outline content of subsequent versions using the feedback specifically includes: generating search questions based on the current outline and the feedback on the current outline; the current outline is the running outline adjusted using the feedback on the initial outline. Using the generated search questions to query the browser web page and summarize the answers; obtaining a question-answer pair dictionary for each question, and finally merging the question-answer pair dictionaries to obtain an external knowledge dictionary; taking the current outline as a benchmark, following the feedback on the current outline and referring to the external reference knowledge obtained through online search to modify the current outline; until the final output outline meets the requirements.

[0135] In the judgment module, whether the user and the assistant have reached a consensus on the subsequent version of the outline is judged. Specifically, the following is done: based on the user's reply and reference to the historical conversation, whether the user and the assistant have reached a consensus on the subsequent version of the outline is judged; if the judgment is inconsistent, the outline content is modified again.

[0136] In the text generation module, the specific process of automatically filling in specific chapters according to the final document outline and generating a final text with logical coherence and correct grammar includes: splitting the final document outline, generating a writing task for the title and description of each subheading; generating an online search question according to each writing task and the outline and general description corresponding to the writing task; querying the browser web page and summarizing the answers according to the generated online search questions, and organizing the summarized answers into a dictionary format to obtain a knowledge dictionary; and writing the final text according to the subheadings, general descriptions and knowledge dictionary.

[0137] The system also includes a polishing module, which is used to format and polish the generated final text to ensure the accuracy and consistency of the final text. Formatting and polishing the generated final text to ensure the accuracy and consistency of the final text specifically includes: organizing the document content with reference to the outline content, correcting any grammar, spelling or punctuation errors, and maintaining the style and tone of the text.

[0138] Embodiment 2 of the present invention provides a document writing system based on a large language model, which aims to improve the efficiency and quality of document writing through intelligent text generation and interactive editing functions, especially in processing complex documents, automatic content generation and real-time user feedback adjustment.

[0139] Embodiment 2 of the present invention provides a document writing system based on a large language model, which can significantly improve the accuracy and personalization of documents and meet the needs of different industries for high-quality document writing.

[0140] Example 3

[0141] The present invention also proposes a document writing device based on a large language model. Figure 4 A schematic diagram of a document writing device based on a large language model provided in Embodiment 4 of the present invention includes:

[0142] Memory for storing computer programs;

[0143] The processor is used to implement the following method steps when executing the computer program:

[0144] In step S100, a document subject and document writing requirements are received.

[0145] In step S101, the large prediction model is used to generate an initial outline of the document, which includes various titles, descriptions corresponding to the content under each title, and subtitles corresponding to each title.

[0146] In step S102, it is determined whether the outline meets the consistency requirement. If so, step S105 is executed; otherwise, step S103 is executed.

[0147] In step S103, an online search is performed.

[0148] In step S104, the outline is modified iteratively.

[0149] In step S105, the content of each subtitle is generated.

[0150] In step S106, for each writing task, the system automatically generates specific online search questions based on the partial outline and general description.

[0151] Return to step S105, query the browser web page according to the generated questions and summarize the answers; obtain a question-answer pair dictionary for each question, and finally merge the dictionaries to obtain an external knowledge dictionary; loop through the content steps of each sub-title until the full draft is completed.

[0152] In step S107, the generated final text is formatted and polished to ensure the accuracy and consistency of the final text.

[0153] In step S108, the article is completed.

[0154] Embodiment 3 of the present invention provides a document writing device based on a large language model, which aims to improve the efficiency and quality of document writing through intelligent text generation and interactive editing functions, especially in processing complex documents, automatic content generation and real-time user feedback adjustment.

[0155] Embodiment 3 of the present invention provides a document writing device based on a large language model, which can significantly improve the accuracy and personalization of documents and meet the needs of different industries for high-quality document writing.

[0156] It should be noted that the technical solution of the present invention also provides an electronic device, including: a communication interface, which can exchange information with other devices such as network devices; a processor, connected to the communication interface to realize information interaction with other devices, and used to execute a document writing method based on a large language model provided by one or more of the above technical solutions when running a computer program, and the computer program is stored in a memory. Of course, in actual application, the various components in the electronic device are coupled together through a bus system. It can be understood that the bus system is used to realize the connection and communication between these components. In addition to the data bus, the bus system also includes a power bus, a control bus and a status signal bus. The memory in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of these data include: any computer program for operating on an electronic device. It can be understood that the memory can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache.By way of exemplary but not limiting explanation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The memory described in the embodiment of the present application is intended to include but is not limited to these and any other suitable types of memory. The method disclosed in the above embodiment of the present application can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The above processor can be a general-purpose processor, a DSP (Digital Signal Processing, which refers to a chip that can implement digital signal processing technology), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In conjunction with the steps of the method disclosed in the embodiments of the present application, it can be directly embodied as a hardware decoding processor to perform, or it can be performed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the program in the memory and completes the steps of the above method in combination with its hardware. When the processor executes the program, the corresponding process in each method of the embodiment of the present application is implemented, and for the sake of brevity, it is not repeated here.

[0157] For the description of the relevant parts of a document writing system and device based on a large language model provided in Examples 2 and 3 of the present application, please refer to the detailed description of the corresponding parts of a document writing method based on a large language model provided in Example 1 of the present application, which will not be repeated here.

[0158] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment that includes a series of elements are inherent to the elements. In the absence of more restrictions, the elements limited by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or equipment that includes the elements. In addition, the above-mentioned technical solution provided in the embodiment of the present application is consistent with the corresponding technical solution in the prior art in principle, and the part is not described in detail, so as not to repeat too much.

[0159] Although the above describes the specific implementation of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. For those skilled in the art, other different forms of modifications or deformations can be made on the basis of the above description. It is not necessary and impossible to list all the implementation methods here. On the basis of the technical solution of the present invention, various modifications or deformations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.

Claims

1. A document writing method based on a large language model, characterized in that: The following steps are involved: Receiving a document topic and document writing requirements, and generating an initial document outline using a large prediction model; and receiving feedback on the initial document outline, and using the feedback to modify the outline content of subsequent versions in real time; Determine whether the user and the assistant have reached a consensus on the outline of the subsequent version, and when consensus is reached, obtain the final document outline; the assistant is responsible for determining whether the outline is generated; Automatically fill in specific chapters based on the final document outline to generate a logically coherent and grammatically correct final text.

2. A document writing method based on a large language model according to claim 1, characterized in that: The method also includes formatting and polishing the generated final text to ensure the accuracy and consistency of the final text.

3. The document writing method based on a large language model according to claim 1, characterized in that: The document initial outline includes various titles, descriptions corresponding to the contents under each title, and subtitles corresponding to each title.

4. The document writing method based on a large language model according to claim 1, characterized in that: The specific process of using the feedback to adjust the outline content of the subsequent version includes: Set different weights for each outline chapter, and adjust the outline content of subsequent versions based on the chapter weights and specific feedback on the current chapter; the specific adjustment formula is: Among them, Outline n is the outline of the nth iteration; ω i is the weight of the ith sub-chapter in the outline; Δ i is an adjustment function for the i-th sub-chapter; Feedback n,i is the feedback provided by the user for the i-th subsection in the n-th iteration; Outline n,i is the content of the ith subchapter in the nth iteration.

5. A document writing method based on a large language model according to claim 4, characterized in that: The receiving feedback on the initial outline of the document and adjusting the outline content of subsequent versions using the feedback specifically includes: Search questions are generated according to the current outline and feedback on the current outline; the current outline is a running outline that is adjusted using feedback on the initial outline. Use the generated search questions to query the browser web page and summarize the answers; get a question-answer pair dictionary for each question, and finally merge the question-answer pair dictionaries to get an external knowledge dictionary; Based on the current outline, modify the current outline according to the feedback from the current outline and the external reference knowledge obtained through online search, until the final output outline meets the requirements.

6. The document writing method based on a large language model according to claim 1, characterized in that: The judging whether the user and the assistant have reached a consensus on the outline of the subsequent version specifically includes: judging whether the user and the assistant have reached a consensus on the outline of the subsequent version based on the user's reply and reference to the historical conversation; if the judgment is inconsistent, re-modifying the outline content.

7. The document writing method based on a large language model according to claim 1, characterized in that: The specific process of automatically filling in specific chapters according to the final document outline to generate a logically coherent and grammatically correct final text includes: Split the final document outline into its parts and generate a writing task for each subheading’s title and description; According to each writing task, generating online search questions according to the outline and general description corresponding to the writing task; According to the generated online search question, the browser webpage is queried and the answers are summarized, and the summarized answers are organized into a dictionary format to obtain a knowledge dictionary; Write the final text based on the subheadings, general descriptions, and knowledge dictionary.

8. The document writing method based on a large language model according to claim 2, characterized in that: The formatting and polishing of the generated final text to ensure the accuracy and consistency of the final text specifically includes: organizing the document content with reference to the outline content, correcting any grammatical, spelling or punctuation errors, and maintaining consistency in the style and tone of the text.

9. A document writing system based on a large language model, characterized in that: It includes outline generation module, judgment module and text generation module; The outline generation module is used to receive the document subject and document writing requirements, and use the big prediction model to generate an initial document outline; and receive feedback on the initial document outline, and use the feedback to modify the outline content of subsequent versions in real time; The judgment module is used to judge whether the user and the assistant have reached a consistency in the outline of the subsequent version, and when the consistency is reached, the final document outline is obtained; the assistant is responsible for judging whether the outline is generated; The text generation module is used to automatically fill in specific chapters according to the final document outline to generate a final text that is logically coherent and grammatically correct.

10. A document writing device based on a large language model, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method steps according to any one of claims 1 to 8 when executing the computer program.

Citation Information

Cited By

  • Design document generation method and device, medium and electronic equipment

    CN119849446A

  • Novel generation method and device based on reverse cue word, electronic equipment and medium

    CN120277225A

  • Novel Generation Method, Device, Electronic Device and Medium Based on Reverse Prompt Words

    CN120277225B

  • Information generation method and device based on large model, intelligent agent, equipment, medium and product

    CN120762565A

  • LLM-based medical beauty institution introduction manuscript automatic generation method and system

    CN121092708A