Text factual proofreading method and system based on large language model

Through the text factual proofreading method based on large language models, the task-adaptive large language model prompt word framework and multiple knowledge bases are used to solve the shortcomings of text factual proofreading in the existing technology, and high precision and high real-time performance are achieved proofreading effect.

CN119149720BActive Publication Date: 2025-02-14CHENGDU POTENTIAL ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology has shortcomings in the intelligent proofreading of factual or knowledgeable errors in text manuscripts. It often requires manual proofreading, which is time-consuming and labor-intensive. In addition, there are many steps in existing intelligent fact proofreading methods, which can easily cause error accumulation and fail to make full use of large language models. Strong ability.

Method used

Using a text factual proofreading method based on a large language model, the text is broken down into a streamlined fact expression text, key entities are extracted and fact query statements are generated, combined with local knowledge base and can be used. The website library performs three-way parallel judgment verification.

Benefits of technology

Achieve higher precision proofreading, reduces the accumulation of errors caused by other sub-models, supports multiple knowledge bases, ensures high accuracy and high real-timeness of facts, and avoids delays caused by waiting for local knowledge base updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149720B_ABST
    Figure CN119149720B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of text processing technology, and relates to a method and system for factual proofreading of text based on a large language model. The method includes: constructing a task-adaptive large language model prompt word framework; decomposing the text into a number of independent concise factual expression texts; generating factual query statements; establishing a local proprietary knowledge base and a trusted URL library; fine-tuning the training to obtain a trained large language model; using the trained large language model to perform three-way parallel judgment verification; and outputting the judgment verification results and information sources. The present invention makes full use of the powerful text analysis and processing capabilities of the large language model to reduce error accumulation and achieve higher-precision proofreading; supports multiple knowledge bases, and can obtain those knowledge bases that change dynamically over time without sending special personnel to maintain them in real time, customize factual texts, ensure high precision and high real-time performance of facts, and then perform factual verification to avoid delays caused by waiting for updates to the local knowledge base and delay proofreading.
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:

[0006] 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;

[0007] 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.

[0008] 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;

[0009] 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;

[0010] 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;

[0011] 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;

[0012] Output judgment verification results and information sources.

[0013] 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;

[0014] 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;

[0015] 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;

[0016] 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;

[0017] 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;

[0018] 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;

[0019] 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;

[0020] The output unit is used to output the judgment verification result and the information source.

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

[0022] 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.

[0023] 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.

[0024] 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.

[0025] 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.

[0026] 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.

[0027] 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

[0028] Figure 1 A schematic diagram of a text factual proofreading method based on a large language model provided in Example 1 of the present invention;

[0029] Figure 2 Schematic diagram of the task-adaptive large language model prompt word framework;

[0030] 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

[0031] 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.

[0032] Example 1

[0033] 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:

[0034] Build a large-scale language model prompt word framework for task adaptation, as shown in the attached Figure 2The 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;

[0035] 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.

[0036] 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;

[0037] 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;

[0038] 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;

[0039] 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;

[0040] Output judgment verification results and information sources.

[0041] 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.

[0042] 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.

[0043] 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.

[0044] 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.

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

[0046] 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.

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

[0048] 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.

[0049] 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.

[0050] 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.

[0051] 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.

[0052] 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."

[0053] 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."

[0054] 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.

[0055] Example 2

[0056] 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;

[0057] 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;

[0058] 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;

[0059] 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;

[0060] 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;

[0061] 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;

[0062] 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;

[0063] The output unit is used to output the judgment verification result and the information source.

[0064] 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.

[0065] 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.

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

[0067] 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.

[0068] 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.

[0069] 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; Based on the large language model prompt word framework, a text decomposition prompt word template is constructed. For texts containing factual knowledge, the text decomposition prompt word template is used to decompose the text into several independent concise factual expression texts; 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, it contains factual knowledge and the factual knowledge in the sentence is retained, otherwise the sentence is deleted; Based on the large language model prompt word framework, construct prompt word templates for entity extraction and fact query sentence generation, fill the simplified fact expression text into the prompt word templates for entity extraction and fact query sentence generation, extract the key entities of the simplified fact expression text, convert the key entities into question sentences, and generate fact query sentences; 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 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 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 and 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 website library, filling the retrieved content and the original text into the text verification prompt word template to construct a verification prompt word, and using the trained large language model to perform judgment and verification; 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; 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 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.

3. The text factual proofreading method based on a large language model according to claim 1 is 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.

4. 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 a large language model prompt word framework. For text containing factual knowledge, the text decomposition prompt word template is used to decompose the text into a number of independent concise factual expression texts; segmentation and sentence division are performed through punctuation marks, and each sentence of the article is classified according to description, lyricism and argumentation to determine whether each sentence contains factual knowledge. If the sentence is classified as description, the sentence contains factual knowledge and the factual knowledge in the sentence is retained, otherwise the sentence is deleted; An extraction and generation unit, which is used to construct a prompt word template for entity extraction and fact query sentence 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 sentence generation, extract key entities of the simplified fact expression text, convert the key entities into question sentences, and generate fact query sentences; 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 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 and 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 website library, filling the retrieved content and the original text into the text verification prompt word template to construct a verification prompt word, and using the trained large language model to perform judgment and verification; 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; 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

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

    CN118296157A