Text factual proofreading method and system based on large language model

By building a large-scale language model prompt word framework and three-way parallel judgment verification, the existing intelligent fact proofreading methods are solved in a variety of steps and knowledge base maintenance problems, and high-precision and high-reality text fact proofreading is achieved.

CN119149720AActive Publication Date: 2024-12-17CHENGDU POTENTIAL ARTIFICIAL INTELLIGENCE TECH CO LTD

Patent Information

Application Number
CN202411666741.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2024-12-17
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

There are many steps for existing intelligent fact proofreading methods, which can easily cause error accumulation, and require maintenance of a large knowledge base, which is time-consuming and labor-intensive, and cannot effectively utilize the powerful capabilities of large language models, and cannot update dynamic knowledge in real time.

Method used

Build a large-scale language model prompt word framework that adapts to task, generates prompt word templates through text decomposition and entity extraction, establishes a local knowledge base and trusted URL library, and uses the trained model to perform three-way parallel judgment verification to reduce sub- The dependence of task model improves proofreading accuracy and real-time.

Benefits of technology

It realizes high-precision text fact proofreading, reduces error accumulation, supports dynamic updates of multiple knowledge bases, ensures high accuracy and high real-timeness of facts, and avoids delays in local knowledge base updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149720A_ABST
    Figure CN119149720A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of text processing, and relates to a text factual proofreading method and system based on a large language model. The method comprises the following steps: constructing a task-adaptive large language model cue word framework; decomposing the text into a plurality of independent simplified fact expression texts; generating a fact query statement; establishing a local own knowledge base and a trusted website library; performing fine tuning training to obtain a trained large language model; performing three-way parallel judgment verification by using the trained large language model; and outputting a judgment verification result and an information source. According to the method, the powerful text analysis processing capacity of a large language model is fully utilized, error accumulation is reduced, and higher-precision proofreading is achieved; according to the method, multiple knowledge bases are supported, knowledge bases dynamically changing along with time can be obtained, a specially-assigned person does not need to be assigned to carry out real-time maintenance and custom fact texts, high precision and high real-time performance of facts are ensured, factuality verification is carried out, and the situation that correction is delayed due to delay caused by updating waiting of the local knowledge bases is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of text processing, and in particular, relates to a method and system for factual proofreading of text based on a large language model. Background Art

[0002] At present, explicit text correction for word errors, grammatical errors, etc. in texts is relatively mature, with many methods and tools. However, there is still a big deficiency in intelligent proofreading for factual or knowledge errors in text manuscripts. It often requires editors with certain professional knowledge to perform manual proofreading, which is time-consuming and laborious. There is a need in the fields of news, self-media, and blogs to ensure that the texts sent to the public do not contain factual errors, such as the capital of a country is a certain place, an item is made of a certain material, the date of a certain event, who is the current president of a country, and the current job title of a leader.

[0003] Most of the commonly used intelligent fact proofreading methods currently require maintaining a knowledge base containing a lot of knowledge and facts. This knowledge base may be an unstructured text document library or a structured knowledge graph. However, knowledge is infinite. For a single company or organization, the established knowledge base cannot be fully listed. These methods usually also need to explicitly perform some classical natural language processing subtasks, such as word segmentation tasks, entity recognition tasks, and sentence word vectorization. The subtasks are performed through a series of sub-models, and then combined, and then a large language model is used to judge the entity relationship and further correct errors. These methods have many steps and involve multiple models, such as word segmentation models, entity recognition models, vectorization models, and large language models. Many models and steps are prone to error accumulation, and most of them do not fully utilize the powerful capabilities of current large language models. In addition, in order to ensure the real-time and comprehensiveness of knowledge, the existing methods need to maintain and update the knowledge base in real time, which is time-consuming and labor-intensive. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a text factual proofreading method and system based on a large language model.

[0005] In a first aspect, the present invention provides a method for factual proofreading of text based on a large language model, comprising: A task-adaptive large-scale language model prompt word framework is constructed, including a task goal and description unit, a task workflow unit, a task constraint unit, a task example unit and a task output format setting unit; the task goal and description unit is used to define the task goal of the prompt word and describe the expected output of the large-scale language model prompt word framework; the task workflow unit is used to define the workflow to be followed to complete the task; the task constraint unit is used to set task constraints to guide the large-scale language model prompt word framework to perform tasks under specified conditions; the task example unit is used to add task examples to the prompt word; the task output format setting unit is used to specify the expected large-scale language model prompt word framework reply format; Construct a text decomposition prompt word template based on a large language model prompt word framework. For texts containing factual knowledge, use the text decomposition prompt word template to decompose the text into several independent and concise factual expression texts. Based on the large language model prompt word framework, a prompt word template for entity extraction and fact query statement generation is constructed, and the simplified fact expression text is filled into the prompt word template for entity extraction and fact query statement generation, and the key entities of the simplified fact expression text are extracted to generate fact query statements; Establish a local proprietary knowledge base and a trusted URL base; the local proprietary knowledge base includes fixed common sense, factual texts obtained from a dynamically changing knowledge base, and custom-defined factual texts; Synthesize fact verification instruction data based on the large language model prompt word framework, and use the synthesized fact verification instruction data to fine-tune the large language model prompt word framework to obtain a trained large language model; The trained large language model is used to perform three-way parallel judgment verification, including: constructing a prompt word template, inputting the original text into the trained large language model to directly judge and verify the fact expression text; constructing a text verification prompt word template, using key entities to use fact query statements to search the local proprietary knowledge base, filling the searched knowledge text and the original text into the text verification prompt word template, and using the trained large language model to perform judgment verification based on the content filled into the text verification prompt word template; using fact query statements to search the Internet, using information sources in a trusted URL library, filling the retrieved content and the original text into the text verification prompt word template to construct verification prompt words, and using the trained large language model to perform judgment verification; Output judgment verification results and information sources.

[0006] In a second aspect, the present invention provides a text factual proofreading system based on a large language model, comprising a first construction unit, a second construction unit, an extraction and generation unit, a library establishment unit, a training unit, a judgment and verification unit, and an output unit; The first construction unit is used to construct a task-adaptive large-scale language model prompt word framework, including a task goal and description unit, a task workflow unit, a task constraint unit, a task example unit and a task output format setting unit; the task goal and description unit is used to define the task goal of the prompt word and describe the expected output of the large-scale language model prompt word framework; the task workflow unit is used to define the workflow to be followed to complete the task; the task constraint unit is used to set task constraints to guide the large-scale language model prompt word framework to perform tasks under specified conditions; the task example unit is used to add task examples to the prompt word; the task output format setting unit is used to specify the expected large-scale language model prompt word framework reply format; The second construction unit is used to construct a text decomposition prompt word template based on the large language model prompt word framework, and for a text containing factual knowledge, the text decomposition prompt word template is used to decompose the text into a plurality of independent simplified fact expression texts; An extraction and generation unit, which is used to construct a prompt word template for entity extraction and fact query statement generation based on a large language model prompt word framework, fill the simplified fact expression text into the prompt word template for entity extraction and fact query statement generation, extract key entities of the simplified fact expression text, and generate a fact query statement; A library establishment unit is used to establish a local proprietary knowledge base and a trusted URL library; the local proprietary knowledge base includes fixed common sense, factual texts obtained from a dynamically changing knowledge base, and custom-defined factual texts; A training unit, used to synthesize fact verification instruction data based on the large language model prompt word framework, and use the synthesized fact verification instruction data to fine-tune the large language model prompt word framework to obtain a trained large language model; The judgment and verification unit is used to use the trained large language model to perform three-way parallel judgment and verification, including: constructing a prompt word template, inputting the original text into the trained large language model to directly judge and verify the fact expression text; constructing a text verification prompt word template, using the key entity to use the fact query statement to search the local proprietary knowledge base, filling the searched knowledge text and the original text into the text verification prompt word template, and using the trained large language model to perform judgment and verification according to the content filled into the text verification prompt word template; using the fact query statement to search the Internet, using the information source in the trusted website library, filling the retrieved content and the original text into the text verification prompt word template to construct the verification prompt word, and using the trained large language model to perform judgment and verification; The output unit is used to output the judgment verification result and the information source.

[0007] Based on the above technical solution, the present invention can also be improved as follows.

[0008] Furthermore, the text decomposition prompt word template, the entity extraction and fact query statement generation prompt word template and the text verification prompt word template are all templates containing preset character strings.

[0009] Furthermore, punctuation marks are used to divide the text into paragraphs and sentences, and each sentence of the article is classified into description, lyricism, and argumentation to determine whether each sentence contains factual knowledge. If the sentence is classified as description, then the sentence contains factual knowledge and the factual knowledge in the sentence is retained; otherwise, the sentence is deleted.

[0010] Furthermore, the key entities of the simplified factual expression text are extracted, the key entities are converted into question sentences, and the factual query sentences are generated.

[0011] Furthermore, the priority of using the trained large language model for three-way parallel judgment and verification is as follows: construct a text verification prompt word template, use key entities to use fact query statements to search the local proprietary knowledge base, fill the searched knowledge text and the original text into the text verification prompt word template, and use the trained large language model to perform judgment and verification based on the content filled in the text verification prompt word template; use fact query statements to perform Internet retrieval, use information sources in the trusted URL library, fill the retrieved content and the original text into the text verification prompt word template to construct verification prompt words, and use the trained large language model to perform judgment and verification; construct a prompt word template, input the original text into the trained large language model to directly perform judgment and verification on the fact expression text.

[0012] Further, the verification result is whether the factual statement is consistent with the known information or not; the verification result is output and the difference text is output.

[0013] The beneficial effects of the present invention are as follows: the present invention fully utilizes the powerful text analysis and processing capabilities of the large language model, and only relies on the large language model. All tasks use the same large language model as the base, without the need to use numerous NLP (Natural Language Processing) subtask models, which greatly reduces the error accumulation caused by other submodels to achieve higher-precision proofreading; in addition, the method of the present invention supports a variety of knowledge bases, which can contain both fixed common sense and those knowledge bases that change dynamically over time without the need to send special personnel to maintain them in real time. In addition, factual texts can be customized, such as facts that cannot be queried on the comparison network. These knowledge bases can ensure high precision and high real-time performance of the facts. Events that occurred on the day can be searched in real time during Internet searches, and then factual verification can be performed to avoid delays caused by waiting for updates to the local knowledge base and delay proofreading. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1A schematic diagram of a text factual proofreading method based on a large language model provided in Example 1 of the present invention; Figure 2 Schematic diagram of the task-adaptive large language model prompt word framework; Figure 3 It is a schematic diagram of the text factual proofreading system based on a large language model of the present invention. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0016] Example 1 As an example, Figure 1 As shown, in order to solve the above technical problems, this embodiment provides a text factual proofreading method based on a large language model, including: Build a large-scale language model prompt word framework for task adaptation, as shown in the attached Figure 2 The task-adaptive large language model prompt word framework shown includes a task goal and description unit, a task workflow unit, a task constraint unit, a task example unit and a task output format setting unit; the task goal and description unit is used to define the task goal of the prompt word and describe the expected output of the large language model prompt word framework; the task workflow unit is used to define the workflow to be followed to complete the task; the task constraint unit is used to set task constraints to guide the large language model prompt word framework to perform tasks under specified conditions; the task example unit is used to add task examples to the prompt word; the task output format setting unit is used to specify the expected large language model prompt word framework reply format; Construct a text decomposition prompt word template based on a large language model prompt word framework. For texts containing factual knowledge, use the text decomposition prompt word template to decompose the text into several independent and concise factual expression texts. Based on the large language model prompt word framework, a prompt word template for entity extraction and fact query statement generation is constructed, and the simplified fact expression text is filled into the prompt word template for entity extraction and fact query statement generation, and the key entities of the simplified fact expression text are extracted to generate fact query statements; Establish a local proprietary knowledge base and a trusted URL base; the local proprietary knowledge base includes fixed common sense, factual texts obtained from a dynamically changing knowledge base, and custom-defined factual texts; Synthesize fact verification instruction data based on the large language model prompt word framework, and use the synthesized fact verification instruction data to fine-tune the large language model prompt word framework to obtain a trained large language model; The trained large language model is used to perform three-way parallel judgment verification, including: constructing a prompt word template, inputting the original text into the trained large language model to directly judge and verify the fact expression text; constructing a text verification prompt word template, using key entities to use fact query statements to search the local proprietary knowledge base, filling the searched knowledge text and the original text into the text verification prompt word template, and using the trained large language model to perform judgment verification based on the content filled into the text verification prompt word template; using fact query statements to search the Internet, using information sources in a trusted URL library, filling the retrieved content and the original text into the text verification prompt word template to construct verification prompt words, and using the trained large language model to perform judgment verification; Output judgment verification results and information sources.

[0017] By using a large language model to decompose the text into several independent and concise factual expression texts, identifying each independent factual statement in the text, splitting complex sentences into multiple simple statements, removing modifying language, and retaining core information, it is possible to split complex factual text content into smaller and more easily verified units, thereby improving the accuracy of verification.

[0018] The present invention proposes a special large model prompt word framework - T5 prompt word framework, which focuses on the accuracy and clarity of task instructions, and aims to allow users to more accurately control the output of the large language model through structured and optimized prompt words, so that the results are more in line with expectations. The task goal and description unit can refine the task implementation process and improve the accuracy of task completion; the task workflow unit is used to define the workflow that needs to be followed to complete the task; the task constraint unit is used to set task constraints and guide the large language model to generate higher quality content; the task example unit adds task examples to the prompt words to facilitate the model to perform gradient-free learning; the task output format setting unit specifies the expected large language model reply format to facilitate the extraction of corresponding results in the reply.

[0019] In actual application, the fact verification instruction data is constructed as follows: extract relevant data texts containing people, places and events from public encyclopedia data, extract fact descriptions from text paragraphs, and obtain bigram data such as [fact description, reference text paragraph]; in the obtained bigram data, randomly replace a certain proportion (such as 80%) of entities in the fact description with entities of the same type (such as time entity, place entity and organization entity, etc.), that is, synthesize the wrong fact description text, and combine it with the previous bigram to obtain a triple such as [wrong fact description, reference text paragraph, correct fact description]; in addition, in the obtained bigram data, keep a certain proportion (such as 20%) of entities in the fact description unchanged, and construct a triple such as: [correct fact description, reference text paragraph, correct fact description]; mix these two types of triple data to obtain the original data of the fact verification corpus. These triple data are used to construct fact verification instruction data based on the T5 prompt word framework for instruction fine-tuning training of large language models.

[0020] Optionally, the text decomposition prompt word template, the entity extraction and fact query statement generation prompt word template, and the text verification prompt word template are all templates containing preset character strings.

[0021] The template of the preset string is as follows: “###[]###”. The original text is in “[]”.

[0022] Optionally, use punctuation marks to divide the text into paragraphs and sentences, and classify each sentence of the article into description, lyricism, and argumentation to determine whether each sentence contains factual knowledge. If the sentence is classified as description, then the sentence contains factual knowledge and the factual knowledge in the sentence is retained; otherwise, the sentence is deleted.

[0023] Optionally, extract key entities of the simplified fact expression text, convert the key entities into question sentences, and generate fact query sentences.

[0024] When constructing prompt word templates for entity extraction and fact query statements, query questions suitable for Internet search are generated based on input entities and input text. Specifically: key information in the input text is extracted, combined with the input entities, a query question is created, and the key entities are converted into interrogative sentences. This can ensure that the query question is targeted and clear so that relevant information can be found in the search results. At the same time, it is ensured that the query question contains key entities in the input entities and uses syntax and formats suitable for Internet search engines.

[0025] Optionally, the priority of using the trained large language model for three-way parallel judgment and verification is as follows: construct a text verification prompt word template, use key entities to use fact query statements to search the local proprietary knowledge base, fill the searched knowledge text and the original text into the text verification prompt word template, and use the trained large language model to perform judgment and verification based on the content filled in the text verification prompt word template; use fact query statements to perform Internet retrieval, use information sources in the trusted URL library, fill the retrieved content and the original text into the text verification prompt word template to construct verification prompt words, and use the trained large language model to perform judgment and verification; construct a prompt word template, input the original text into the trained large language model to directly perform judgment and verification on the fact expression text.

[0026] The error correction results of the methods with higher priority are used first. If no errors are found in the three methods, the text is proofread without errors and the final factual proofreading result is given. If there is a factual error, the correct fact is given and the source of information (local knowledge base or trusted website) is provided for further confirmation by the text author.

[0027] Optionally, the verification result is whether the factual statement is consistent with the known information or not; the verification result is output and the difference text is output.

[0028] Specifically, when verifying and judging the accuracy of factual knowledge in the input text, if the factual statement in the text is correct, then directly answer: "This factual statement is correct"; if the factual statement in the text is incorrect, then point out the error and provide correct information. If it is not possible to determine whether it is correct, then directly answer: "This factual statement cannot be judged to be correct." When using known information to verify the accuracy of factual knowledge in the input text, the specific process is as follows: compare the known information and the factual statement to determine whether the factual statement is consistent with the known information; if the factual statement is consistent with the known information, answer: "Based on the retrieved information, the factual statement is accurate." If the factual statement is inconsistent with the known information, point out the difference and provide evidence; if the known information is insufficient for effective verification, answer: "Based on the known information, it is impossible to judge the accuracy of the factual statement." The present invention makes full use of the powerful text analysis and processing capabilities of large-scale language models, and only relies on large-scale language models. All tasks use the same large-scale language model as the base, without the need to use numerous NLP (Natural Language Processing) subtask models, which greatly reduces the error accumulation caused by other sub-models to achieve higher-precision proofreading. In addition, the method of the present invention supports multiple knowledge bases (knowledge contained in the large model itself, self-built high-precision knowledge bases, and trusted Internet knowledge bases), which can contain both fixed common sense and knowledge bases that change dynamically over time without the need to send special personnel to maintain them in real time. In addition, factual texts can be customized, such as facts that cannot be queried on the Internet. These knowledge bases can ensure high precision and high real-time performance of facts. For example, when writing news articles, events that occurred on the day can be searched in real time on the Internet, and then factual verification can be performed to avoid delays caused by waiting for updates to the local knowledge base and delay proofreading.

[0029] Example 2 Based on the same principle as the method shown in Example 1 of the present invention, as shown in the attached Figure 3 As shown, an embodiment of the present invention also provides a text factual proofreading system based on a large language model, including a first construction unit, a second construction unit, an extraction and generation unit, a library establishment unit, a training unit, a judgment and verification unit and an output unit; The first construction unit is used to construct a task-adaptive large-scale language model prompt word framework, including a task goal and description unit, a task workflow unit, a task constraint unit, a task example unit and a task output format setting unit; the task goal and description unit is used to define the task goal of the prompt word and describe the expected output of the large-scale language model prompt word framework; the task workflow unit is used to define the workflow to be followed to complete the task; the task constraint unit is used to set task constraints to guide the large-scale language model prompt word framework to perform tasks under specified conditions; the task example unit is used to add task examples to the prompt word; the task output format setting unit is used to specify the expected large-scale language model prompt word framework reply format; The second construction unit is used to construct a text decomposition prompt word template based on the large language model prompt word framework, and for a text containing factual knowledge, the text decomposition prompt word template is used to decompose the text into a plurality of independent simplified fact expression texts; An extraction and generation unit, which is used to construct a prompt word template for entity extraction and fact query statement generation based on a large language model prompt word framework, fill the simplified fact expression text into the prompt word template for entity extraction and fact query statement generation, extract key entities of the simplified fact expression text, and generate a fact query statement; A library establishment unit is used to establish a local proprietary knowledge base and a trusted URL library; the local proprietary knowledge base includes fixed common sense, factual texts obtained from a dynamically changing knowledge base, and custom-defined factual texts; A training unit, used to synthesize fact verification instruction data based on the large language model prompt word framework, and use the synthesized fact verification instruction data to fine-tune the large language model prompt word framework to obtain a trained large language model; The judgment and verification unit is used to use the trained large language model to perform three-way parallel judgment and verification, including: constructing a prompt word template, inputting the original text into the trained large language model to directly judge and verify the fact expression text; constructing a text verification prompt word template, using the key entity to use the fact query statement to search the local proprietary knowledge base, filling the searched knowledge text and the original text into the text verification prompt word template, and using the trained large language model to perform judgment and verification according to the content filled into the text verification prompt word template; using the fact query statement to search the Internet, using the information source in the trusted website library, filling the retrieved content and the original text into the text verification prompt word template to construct the verification prompt word, and using the trained large language model to perform judgment and verification; The output unit is used to output the judgment verification result and the information source.

[0030] Optionally, the text decomposition prompt word template, the entity extraction and fact query statement generation prompt word template, and the text verification prompt word template are all templates containing preset character strings.

[0031] Optionally, use punctuation marks to divide the text into paragraphs and sentences, and classify each sentence of the article into description, lyricism, and argumentation to determine whether each sentence contains factual knowledge. If the sentence is classified as description, then the sentence contains factual knowledge and the factual knowledge in the sentence is retained; otherwise, the sentence is deleted.

[0032] Optionally, extract key entities of the simplified fact expression text, convert the key entities into question sentences, and generate fact query sentences.

[0033] Optionally, the priority of using the trained large language model for three-way parallel judgment and verification is as follows: construct a text verification prompt word template, use key entities to use fact query statements to search the local proprietary knowledge base, fill the searched knowledge text and the original text into the text verification prompt word template, and use the trained large language model to perform judgment and verification based on the content filled in the text verification prompt word template; use fact query statements to perform Internet retrieval, use information sources in the trusted URL library, fill the retrieved content and the original text into the text verification prompt word template to construct verification prompt words, and use the trained large language model to perform judgment and verification; construct a prompt word template, input the original text into the trained large language model to directly perform judgment and verification on the fact expression text.

[0034] Optionally, the verification result is whether the factual statement is consistent with the known information or not; the verification result is output and the difference text is output.

[0035] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A text factual proofreading method based on a large language model, characterized in that: include: Construct a task-adaptive large-scale language model prompt word framework, including a task goal and description unit, a task workflow unit, a task constraint unit, a task example unit and a task output format setting unit; the task goal and description unit is used to define the task goal of the prompt word and describe the expected output of the large-scale language model prompt word framework; the task workflow unit is used to define the workflow to be followed to complete the task; the task constraint unit is used to set task constraints to guide the large-scale language model prompt word framework to perform tasks under specified conditions; the task example unit is used to add task examples to the prompt word; The task output format setting unit is used to specify the expected large language model prompt word frame reply format; Construct a text decomposition prompt word template based on a large language model prompt word framework. For texts containing factual knowledge, use the text decomposition prompt word template to decompose the text into several independent and concise factual expression texts. Based on the large language model prompt word framework, a prompt word template for entity extraction and fact query statement generation is constructed, and the simplified fact expression text is filled into the prompt word template for entity extraction and fact query statement generation, and the key entities of the simplified fact expression text are extracted to generate fact query statements; Establish a local proprietary knowledge base and a trusted URL base; the local proprietary knowledge base includes fixed common sense, factual texts obtained from a dynamically changing knowledge base, and custom-defined factual texts; Synthesize fact verification instruction data based on the large language model prompt word framework, and use the synthesized fact verification instruction data to fine-tune the large language model prompt word framework to obtain a trained large language model; The trained large language model is used to perform three-way parallel judgment verification, including: constructing a prompt word template, inputting the original text into the trained large language model to directly judge and verify the fact expression text; constructing a text verification prompt word template, using key entities to use fact query statements to search the local proprietary knowledge base, filling the searched knowledge text and the original text into the text verification prompt word template, and using the trained large language model to perform judgment verification based on the content filled into the text verification prompt word template; using fact query statements to search the Internet, using information sources in a trusted URL library, filling the retrieved content and the original text into the text verification prompt word template to construct verification prompt words, and using the trained large language model to perform judgment verification; Output judgment verification results and information sources.

2. The text factual proofreading method based on a large language model according to claim 1 is characterized in that: The text decomposition prompt word template, the entity extraction and fact query statement generation prompt word template and the text verification prompt word template are all templates containing preset character strings.

3. The text factual proofreading method based on a large language model according to claim 1 is characterized in that: Use punctuation marks to divide the article into paragraphs and sentences, and classify each sentence into description, lyricism and argumentation to determine whether each sentence contains factual knowledge. If the sentence is classified as description, it contains factual knowledge and the factual knowledge in the sentence is retained; otherwise, the sentence is deleted.

4. The text factual proofreading method based on a large language model according to claim 1 is characterized in that: Extract key entities from concise factual expression text, convert key entities into interrogative sentences, and generate factual query statements.

5. The text factual proofreading method based on a large language model according to claim 1 is characterized in that: The priority of using the trained large-scale language model for three-way parallel judgment and verification is as follows: construct a text verification prompt word template, use key entities to use factual query statements to search the local knowledge base, fill the searched knowledge text and the original text into the text verification prompt word template, and use the trained large-scale language model to perform judgment and verification based on the content filled in the text verification prompt word template; use factual query statements to search the Internet, use information sources in the trusted URL library, fill the retrieved content and the original text into the text verification prompt word template to construct verification prompt words, and use the trained large-scale language model for judgment and verification; construct a prompt word template, input the original text into the trained large-scale language model to directly judge and verify the factual expression text.

6. The text factual proofreading method based on a large language model according to claim 1, characterized in that: The verification result is whether the factual statement is consistent with the known information or not; the verification result is output and the difference text is output.

7. A text factual proofreading system based on a large language model, characterized by: It includes a first construction unit, a second construction unit, an extraction and generation unit, a library establishment unit, a training unit, a judgment and verification unit and an output unit; The first construction unit is used to construct a task-adaptive large-scale language model prompt word framework, including a task goal and description unit, a task workflow unit, a task constraint unit, a task example unit and a task output format setting unit; the task goal and description unit is used to define the task goal of the prompt word and describe the expected output of the large-scale language model prompt word framework; the task workflow unit is used to define the workflow to be followed to complete the task; the task constraint unit is used to set task constraints to guide the large-scale language model prompt word framework to perform tasks under specified conditions; the task example unit is used to add task examples to the prompt word; The task output format setting unit is used to specify the expected large language model prompt word frame reply format; The second construction unit is used to construct a text decomposition prompt word template based on the large language model prompt word framework, and for a text containing factual knowledge, the text decomposition prompt word template is used to decompose the text into a plurality of independent simplified fact expression texts; An extraction and generation unit, which is used to construct a prompt word template for entity extraction and fact query statement generation based on a large language model prompt word framework, fill the simplified fact expression text into the prompt word template for entity extraction and fact query statement generation, extract key entities of the simplified fact expression text, and generate a fact query statement; A library establishment unit is used to establish a local proprietary knowledge base and a trusted URL library; the local proprietary knowledge base includes fixed common sense, factual texts obtained from a dynamically changing knowledge base, and custom-defined factual texts; A training unit, used to synthesize fact verification instruction data based on the large language model prompt word framework, and use the synthesized fact verification instruction data to fine-tune the large language model prompt word framework to obtain a trained large language model; The judgment and verification unit is used to use the trained large language model to perform three-way parallel judgment and verification, including: constructing a prompt word template, inputting the original text into the trained large language model to directly judge and verify the fact expression text; constructing a text verification prompt word template, using the key entity to use the fact query statement to search the local proprietary knowledge base, filling the searched knowledge text and the original text into the text verification prompt word template, and using the trained large language model to perform judgment and verification according to the content filled into the text verification prompt word template; using the fact query statement to search the Internet, using the information source in the trusted website library, filling the retrieved content and the original text into the text verification prompt word template to construct the verification prompt word, and using the trained large language model to perform judgment and verification; The output unit is used to output the judgment verification result and the information source.

Citation Information

Patent Citations

  • Question decomposition type semantic parsing method fusing fact text

    CN114841170A

  • Prompt text generation method and system, computer equipment and storage medium

    CN118012990A

  • Structured and unstructured fact knowledge fused corpus construction method and device

    CN118296157A

  • Complex system operation guiding method and device based on hierarchical knowledge graph

    CN118427362A

  • Text factuality verification method and device, equipment and medium

    CN118468846A

Cited By

  • Data analysis method based on large-scale language model

    CN119358682A

  • Event content proofreading method and device based on large model and storage medium

    CN120145075A

  • Text factuality proofreading method and system, electronic equipment and medium

    CN120278145A

  • Text factuality proofreading method, system, electronic device and medium

    CN120278145B

  • Historical figure knowledge proofreading method and system, storage medium and electronic equipment

    CN120611041A