A Text Generation Method Based on a Large Language Model

CN122113890BActive Publication Date: 2026-08-14ZHEJIANG MEIRI HUDONG NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-28
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

但这类方法往往核查粒度较粗、成本高昂,且无法区分内容中有据可查与自由发挥的部分,导致效率低下

Benefits of technology

1. 从源头控制幻觉,生成可靠性高:通过生成含参考文本素材引用标识符的结构化提纲及引用约束提示词,从内容规划阶段即明确事实依据来源,对大模型生成方向形成精准引导,改变现有技术生成与核查脱节的弊端,从源头降低无依据、矛盾内容(幻觉)的产生概率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122113890B_ABST
    Figure CN122113890B_ABST
Patent Text Reader

Abstract

This invention relates to the field of digital data processing, and in particular to a method and apparatus for generating and verifying anti-hallucination content using a large language model. The method includes: acquiring user-defined target text generation instructions and reference text materials; generating a structured content generation outline and citation constraint prompts containing citation identifiers for the reference text materials based on the two; calling a first large language model to generate initial text with citation index tags; classifying and verifying the initial text: performing source consistency checks on tagged statements, and initiating external information verification for untagged statements; and correcting and integrating the final text based on the verification results. This invention achieves source control of hallucinations and precise triage verification through outline guidance and citation tags, constructing a complete closed loop of generation, verification, and correction, improving the reliability, traceability, and verification efficiency of generated content, and systematically optimizing the quality of AI content generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic digital data processing, and in particular to a text generation method based on a large language model. Background Technology

[0002] With the rapid development of large-scale pre-trained language model technology, its application in text generation, content creation and other fields is becoming increasingly widespread. However, the inherent illusion problem of large models—that is, generating seemingly reasonable but actually fictitious, contradictory or unfounded content—severely restricts their reliable application in key areas.

[0003] To address this challenge, existing technologies have evolved primarily along several lines. In terms of pre-generation intervention, retrieval-enhanced generation techniques have become one of the mainstream solutions (e.g., publication number CN119312917A). These methods aim to supplement the generation process with a factual basis by retrieving relevant documents from a knowledge base as contextual input. However, this approach is essentially knowledge enhancement; there is a lack of explicit, traceable correlation between the model output and the retrieved source material, making it impossible to accurately trace and verify every factual claim in the generated result.

[0004] Regarding intervention during the generation process, real-time monitoring and rule-based correction systems have emerged, such as the one represented by publication number CN119357759A. This system predicts the type of hallucination by parsing the input and scores and modifies the output stream in real time based on a pre-defined rule base. While this method allows for immediate intervention, its effectiveness heavily relies on the completeness and accuracy of the predefined rules. For open domains, complex content, or content requiring external verification, its flexibility and fact-checking capabilities are limited.

[0005] In addition, there is another type of post-generation detection scheme, which focuses on batch factual verification of the complete output text. For example, it uses information extraction technology to convert the text into a structured query and then compares it with a database. However, this type of method often has a coarse-grained verification, is costly, and cannot distinguish between verifiable and improvised parts of the content, resulting in low efficiency.

[0006] In summary, existing technologies either focus on pre-generation knowledge enhancement (such as RAG), rule intervention during generation, or overall verification after generation, each with its limitations. In particular, there is a lack of an end-to-end solution capable of providing refined, structured guidance before generation, enforcing source material traceability during generation, and automatically performing triage and verification based on the binding relationship after generation. Therefore, there is an urgent need in this field for an innovative solution that deeply integrates guidance, source tracing, and verification to ensure content verifiability and traceability from the generation mechanism, thereby systematically improving the factual accuracy and credibility of large model outputs. Summary of the Invention

[0007] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows: This invention provides a text generation method based on a large language model, comprising: S100: Obtain the user-inputted target text generation instruction and at least one reference text material.

[0008] S200, based on the target text generation instruction and the reference text material, generate a structured content generation outline and citation constraint prompts; wherein, the content generation outline includes the title of the target text, the content framework, and the reference text material citation identifiers corresponding to at least part of the content in the content framework.

[0009] S300: Based on the content, generate an outline and citation constraint prompts, and call the first language model to generate initial text with citation index markers, wherein the citation index markers correspond to the citation identifiers of the reference text material.

[0010] S400, perform an authenticity check on the initial text: for statements in the text that contain the reference index mark, perform a source consistency check with the corresponding reference text material; for statements in the text that do not contain the reference index mark, initiate an external information verification process based on the target text generation instruction.

[0011] S500, based on the results of the authenticity verification, the initial text is corrected and integrated to output the final target text.

[0012] The present invention has at least the following beneficial effects: 1. Control illusions at the source and generate high reliability: By generating structured outlines and reference constraint prompts containing reference text material citation identifiers, the source of factual evidence is clearly defined from the content planning stage, providing precise guidance for the generation direction of the large model. This changes the drawback of the disconnect between existing technology generation and verification, reducing the probability of generating unfounded and contradictory content (illusions) from the source.

[0013] 2. Achieve automated and accurate verification with significantly improved efficiency: Relying on the reference index markers corresponding to the outline reference identifiers, the statements to be verified are intelligently sorted. Among them, the marked statements are automatically located to the corresponding reference text materials for source verification, while the unmarked statements are directed to external information verification, replacing the traditional manual or full-text batch verification mode, and greatly improving the verification targeting and automation efficiency.

[0014] 3. Construct a verifiable and traceable generation process: The reference index mark establishes a direct traceability link between the generated content and the original reference text material, enabling all source claims to be quickly verified, providing transparent technical support for content credibility, and strengthening user trust.

[0015] 4. Form a complete technical closed loop for anti-hallucination: Integrate outline-guided generation, index marking and source tracing, accurate classification and verification, and correction and integration output into a complete closed loop to achieve proactive prevention, timely detection and automatic correction of hallucinations, rather than a single technical intervention, and systematically improve the overall quality and practical value of AI-generated content.

[0016] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a text generation method based on a large language model, provided as an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0021] It should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. A process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. A process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0022] This invention provides a text generation method based on a large language model, which is particularly suitable for text generation scenarios that require high accuracy of facts and credibility of content, such as academic papers, legal documents, and news reports.

[0023] like Figure 1 As shown, a text generation method based on a large language model provided by an embodiment of the present invention may include the following steps: S100: Obtain the user-inputted target text generation instruction and at least one reference text material.

[0024] In this invention, the target text generation instruction is a functional description or task definition by the user of the text to be generated. Its forms include, but are not limited to: Natural Language Description: Text requests that users directly enter in input boxes within the graphical user interface, such as: "Please write a review report on 'the impact of climate change on agriculture,' requiring a neutral perspective and detailed data."

[0025] Structured form input: Users define tasks by filling in form fields, such as "Article type: Industry analysis report", "Topic: Development trend of new energy vehicle battery technology", "Word count: 3000 words", and "Style: Professional and rigorous" in the corresponding fields.

[0026] File loading: The user uploads a document containing the generation requirements (such as a Word or PDF file), and the system extracts the instructions from it through a text parsing module (such as an OCR or PDF parser).

[0027] Application Programming Interface (API) calls: Structured request packets (JSON / XML format) sent from other software systems via APIs, containing all metadata of the generated task.

[0028] Internally, the input is received through an instruction parsing module. This module may include functions such as input method adaptation, encoding conversion, and basic syntax checking. Its output is a structured instruction object for use by subsequent modules.

[0029] The reference text materials are factual or referential information sources provided for generating the target text. Their sources and forms include: User-initiated provision: (1) File upload: Users can directly upload documents stored locally or on the network (such as research papers, data reports, news reports, etc. in PDF, DOCX, and TXT formats).

[0030] (2) Text Paste: The user copies and pastes relevant text content into a specified text area.

[0031] (3) Link submission: The user provides one or more web page links, and the web crawler module or web page snapshot interface automatically captures and parses the main text content under the link.

[0032] Automatic retrieval and association: (1) Based on the key entities (such as “climate change” and “agriculture”) and topics in the target text generation instruction, call the preset knowledge base query interface or public / private search engine API to automatically retrieve and obtain a batch of relevant documents, summaries or data fragments as reference text materials.

[0033] (2) Match and recommend from historical data and project document library associated with the current user or task.

[0034] After obtaining the original reference text material, preprocessing is performed to form an internal representation that can be used efficiently: Format standardization: Convert all materials to a uniform plain text format and remove irrelevant layout marks, advertising codes, etc.

[0035] Basic structuring processing: Long documents are segmented into paragraphs and sentences, and each indexable text unit (such as a paragraph) is assigned a unique internal material identifier.

[0036] Metadata extraction and index construction: In one embodiment, the extraction of meta-information of the material mainly revolves around core fields such as abstract and article type, without involving traditional metadata such as author and publication time.

[0037] To support efficient retrieval, Milvus was chosen as the vector database, leveraging its built-in hybrid retrieval capabilities (combining semantic vectors with BM25 text matching) to simultaneously achieve semantic similarity retrieval and keyword recall within the same component. Therefore, there is no need to introduce additional full-text indexing engines such as Elasticsearch, simplifying the system architecture.

[0038] All original content, metadata, and vector indexes of all materials are associated with a unique internal material identifier and stored uniformly in the material management library, enabling centralized addressing and management.

[0039] In another embodiment, in a general material management scenario, it is usually necessary to extract complete metadata for each material, including title, author, publication time, source domain credibility score, etc.

[0040] To support diverse retrieval needs, a dual-path indexing strategy is typically employed: Full-text indexing: Inverted indexes are built using engines such as Elasticsearch and Lucene to enable fast keyword retrieval; Vector Indexing: By using embedding models such as BERT and Sentence-BERT, text units are converted into semantic vectors and stored in vector databases such as FAISS and Milvus, supporting semantic similarity retrieval.

[0041] The original content, metadata, and two types of index information of the materials are associated and managed uniformly through internal material identifiers and stored in the material management library to meet the performance and effect requirements of complex query scenarios.

[0042] S200: Based on the target text generation instruction and the reference text material, generate a structured content generation outline and citation constraint prompts.

[0043] The content generation outline includes the title of the target text, the content framework, and reference text material citation identifiers (reference_ids) corresponding to at least a portion of the content framework. These reference text material citation identifiers are associated with material relevance weights and citation priority.

[0044] In this invention, the citation identifiers corresponding to the reference text materials are uniformly identified using the form "MY", where "M" is an identifier prefix (used only to distinguish citation types), and "Y" is a natural number (such as 1, 2, 3, 4, 5, etc.) used to uniquely distinguish different reference text materials. For example, M1 corresponds to the citation identifier of the first reference text material, M2 corresponds to the citation identifier of the second reference text material, and so on, M3, M5, etc. This identifier format is only an exemplary configuration; in actual applications, the identifier prefix (such as "Ref-Y", "Doc-Y", etc.) can be adjusted according to the management needs of the reference text materials without affecting the technical implementation of this invention.

[0045] The citation constraint prompts are configured to guide the first large language model to prioritize references to materials corresponding to citation identifiers with high material relevance weights, avoid citing external information unless absolutely necessary, and distinguish between primary and secondary citations when multiple citation identifiers are associated with the same chapter. An illustrative example of citation constraint prompts could be: Please strictly adhere to the following reference text materials in your writing, using [M1], [M2] as priorities. Do not add any knowledge outside the materials unless the relevant information is completely unavailable. If you must cite external ideas, please mark them with [Unverified].

[0046] In this invention, the high material relevance weight refers to a material relevance weight greater than a preset weight threshold. In this invention, the material relevance weight, after normalization, ranges from [0,1]. The exemplary value of the preset weight threshold can be dynamically configured according to the domain characteristics and content rigor requirements of the target text. Specific examples are as follows: In scenarios where the accuracy of facts is extremely important, such as legal documents and medical instructions: the preset weight threshold is set to 0.7, that is, the reference text material corresponding to the reference identifier with a material relevance weight > 0.7 is judged as high-weight material, to ensure that core and credible evidence is referenced first; For academic papers, research reports, and other scenarios that require a balance between rigor and comprehensiveness of references: the preset weight threshold is set to 0.65, which both filters highly relevant materials and appropriately retains supplementary materials with some reference value; For scenarios where timeliness and accuracy need to be balanced, such as news reporting and industry analysis: the preset weight threshold is set to 0.6, which improves the flexibility and efficiency of material selection while ensuring the reliability of core evidence.

[0047] The above thresholds are exemplary values. In actual applications, they can be further calibrated by combining the distribution characteristics of materials in specific fields and historical usage feedback to ensure that the selection of high-weight materials not only meets the needs of the scenario, but also takes into account the accuracy and diversity of content generation.

[0048] Furthermore, S200 specifically includes the following steps: (1) Preprocessing and construction of enhanced reference information set First, the target text generation instructions are standardized and encapsulated, redundant expressions are removed, and a unified format standard is established to form machine-parseable instruction objects. At the same time, the reference text materials are summarized, generating a material summary index table containing a unique reference identifier and a summary of the core content for each material or its semantic paragraph, thus constructing a basic reference information set.

[0049] Furthermore, based on the standardized and encapsulated target text generation instructions, the core elements of the content framework (such as chapter themes and key argument directions) are extracted. A pre-defined semantic vector model is used to calculate the semantic similarity between each reference text (or its semantic paragraphs) and the corresponding parts of the content framework. This semantic similarity is then used as the core dimension for calculating the material relevance weights. The pre-defined semantic vector model can be a pre-trained model with sentence-level semantic encoding capabilities, such as BERT, Sentence-BERT, or BGE-M3. The selection principle prioritizes domain adaptability (e.g., BGE-M3 for Chinese scenarios, and Sentence-BERT for English scenarios).

[0050] The calculation of the material relevance weight is based on a preset fusion method, which integrates the semantic similarity between the reference text material and the content framework, the source credibility rating of the reference text material, and the timeliness factor of the reference text material. Specifically, the semantic similarity measures the thematic relevance between the reference text material and the corresponding content framework in the content generation outline; the source credibility rating assesses the credibility level of the reference text material's publisher; and the information timeliness characterizes the freshness or age of the reference text material.

[0051] Specifically, in one illustrative embodiment, the preset fusion method is a linear fusion method, and the material relevance weights satisfy the following condition: W ij =α·Sim(M i F j )+β·Auth(M i )+γ·Temp(M i ).

[0052] Among them, W ij For the i-th reference text material M i With the j-th content frame F j The weights are defined by Sim(·), a semantic similarity function, and Auth(·), a source credibility rating function, with exemplary values ​​as follows: 1.0: Sources have strict peer review or legal review mechanisms, and information release is subject to professional standards; 0.9: The source has a clear review process and a traceable publishing entity, and the content publication follows fixed editing or review standards; 0.5: Sources that are ordinary commercial entities, self-media, or sources that do not explicitly state a review mechanism; 0.2: Information whose source is unknown or whose publisher cannot be traced.

[0053] Temp(·) is a timeliness factor function, where α, β, and γ are preset coefficients and α+β+γ=1. Their values ​​are calibrated through domain adaptation experiments (e.g., α=0.7, β=0.15, γ=0.15 for technical texts; α=0.6, β=0.2, γ=0.2 for social science texts). The core principle is that semantic relevance has the highest weight, and source credibility and timeliness are adapted as needed. The value of i is from 1 to m, where m is the number of reference text materials, and the value of j is from 1 to n, where n is the number of content frames.

[0054] Among them, Temp(M i )=e -k·(Tnow-Tpub(i)), k is the timeliness decay coefficient, the value of which is determined through material update frequency experiments (e.g., k=0.005 / day in the rapid iteration domain, k=0.001 / day in the stable domain), ensuring that the timeliness factor of materials within the past year is ≥0.8, and the timeliness factor of materials older than 5 years is ≤0.3; Tnow refers to the current system time when the material relevance weight calculation is performed, that is, the time node that triggers the weight calculation process (e.g., the system time when generating a structured content outline), in days, months, or years; Tpub(i) refers to the original release / publication time of the i-th reference text material (i.e., the time when the material is first released, published, or made available, not the time when the user uploads it to this system), in the same unit as Tnow; Tnow-Tpub(i) represents the time span of the reference text material (i.e., the interval from the material's release to the current calculation). Combined with the exponential function e -k・(Tnow-Tpub(i)) Based on the characteristics, we can see that: the more recent the release time of the material (the smaller the difference between Tnow and Tpub(i), the closer the timeliness factor Temp(Mi) is to 1, and the higher the weight ratio, which is in line with the technical logic of prioritizing the reference of recent materials; the longer the release time of the material (the larger the difference between Tnow and Tpub(i), the closer the timeliness factor Temp(Mi) is to 0, and the lower the weight ratio, so as to avoid outdated information affecting the accuracy of the generated content.

[0055] In another illustrative embodiment, the preset fusion method is a non-linear fusion method, and the material relevance weights are calculated using a non-linear multi-dimensional fusion formula, satisfying the following condition: W ij =(1 / (1+e -(A+B-θ) ); Where, A = α·Sim(M) i F j ), B=β·(Auth(M i )+γ·Temp(M i ) 2 ) 1 / 2 θ is the activation threshold, which is determined through domain experiments. The value range of θ is [0.3, 0.7]. By calibrating the validation dataset, it is ensured that more than 80% of the material weights are distributed in the range of [0.2, 0.9] to avoid misjudgment of priority caused by extreme values.

[0056] Linear fusion is simple to calculate and highly interpretable, making it easy to quickly adjust the influence weights of each dimension according to different scenarios; non-linear fusion can capture the complex relationships between the evaluation results of each dimension, and by activating the threshold, the weight distribution can be made more suitable for actual needs (such as strengthening the weight ratio of highly timely materials).

[0057] In this invention, the reference identifiers of each reference text material (or its semantic paragraphs) are sorted from high to low according to the relevance weight of the material, and the corresponding reference priority level is marked.

[0058] In an illustrative embodiment, citation priorities may include: P1 level (primary citation), corresponding to a material relevance weight ≥ a preset primary citation weight threshold (e.g., 0.8); P2 level (auxiliary citation), corresponding to 0.5 ≤ material relevance weight < 0.8; and P3 level (supplementary citation), corresponding to a material relevance weight < 0.5. The material relevance weights and citation priority levels are added to the material summary index table to form an enhanced material summary index table containing citation identifiers, content summaries, relevance weights, and citation priorities, thus completing the construction of the enhanced reference information set. By constructing the enhanced reference information set, quantifiable and traceable reference bases are provided for subsequent outline generation, preventing the generation of large models without a basis from the outset.

[0059] In another illustrative embodiment, the reference priority is calculated using a weighted normalized sorting formula, which is: Where Sr is the priority score of the r-th reference identifier ([0,100]), r ranges from 1 to Q, and Q is the number of reference identifiers. Wr is the material relevance weight corresponding to the r-th reference identifier, max(W) and min(W) are the maximum and minimum material relevance weights corresponding to all reference identifiers, respectively. Nref(r) is the number of effective references of the r-th reference identifier in historical generation tasks (defined as "the number of times it has been successfully verified as an accurate reference in historical tasks"). max(Nref) is the maximum number of effective references in history for all reference identifiers. η is the weight ratio coefficient, calibrated through domain adaptation experiments. For example, η=0.8 for technical texts and η=0.7 for social science texts.

[0060] Citation priority levels are indicated by a priority score Sr: Sr ≥ S1 corresponds to P1 level (primary reference), S2 ≤ Sr < S1 corresponds to P2 level (secondary reference), and Sr < S2 corresponds to P3 level (supplementary reference). Here, S1 is the first preset value, which can be 80, and S2 is the second preset value, which can be 60.

[0061] The two embodiments described above are optional implementations of reference priority, which can be flexibly selected according to the application scenario: the former (weighted interval division) is suitable for scenarios with low requirements for priority division accuracy and pursuit of computational efficiency; the latter (weighted normalization formula) is suitable for scenarios that need to integrate historical reference effects and pursue accurate priority sorting.

[0062] (2) Generation of reference constraint prompts and construction of final prompt text Based on the citation priority rules in the enhanced material summary index table, citation constraint prompts are generated. These prompts explicitly include three core constraints: ① Prioritize reference to materials corresponding to high-priority P1-level citation identifiers, followed by materials corresponding to P2-level and P3-level citation identifiers; ② Avoid citing external information unless absolutely necessary (limited citations are permitted only when all referenced text materials lack relevant content, and the reason for citation must be clearly stated); ③ When multiple citation identifiers are associated with the same chapter, it is necessary to distinguish between primary citations (P1-level) and secondary citations (P2 / P3-level). Primary citations serve as core factual evidence, while secondary citations are only used for supplementary explanations or corroboration. The core function of these citation constraint prompts is to limit the information source boundaries of the large model and reduce the introduction of external, misleading information.

[0063] The system invokes a predefined prompt template. The template engine dynamically populates the corresponding placeholders in the template with the standardized, encapsulated target text generation instructions, the enhanced material summary index table (including relevance weights and citation priorities), and the generated citation constraint prompts. This generates a final prompt text that conforms to the input specifications of a large language model and contains clear structured output requirements and citation constraint rules. The predefined prompt template is a text or data format template containing structured placeholders, reserving dedicated placeholders for titles, content frames, citation identifiers, weights, priorities, and citation constraint prompts.

[0064] (3) Structured outline generation and large model invocation The final prompt text is input into the first language model, which is then started and constrained to perform a structured outline generation task based on the enhanced reference information set. This ensures that the generated outline automatically associates material relevance weights and citation priorities, strictly follows citation constraint rules, and outputs a structured response containing a title, content framework, citation identifiers, and corresponding weights and priorities.

[0065] (4) Response parsing, verification and repair After obtaining the structured response output by the first language model, the system first attempts to parse the response text using a JSON parser. If parsing fails, the system calls the text cleaning and regular expression matching module to extract key-value pairs from the response text that match the target structure (including headings, content frames, reference identifiers, relevance weights, and reference priorities), and then converts these key-value pairs into structured data objects.

[0066] Perform rule validation on the parsed data objects: ① Required field validation: check whether core fields such as title, content framework, reference identifier, material relevance weight, and reference priority are included, and whether there are any omissions; ② Reference relationship validity validation: verify whether each reference identifier listed in the reference identifier field in the data object exists in the pre-generated enhanced material summary index table, and whether the relevance weight and reference priority corresponding to the reference identifier are consistent with the records in the index table, and whether there are any conflicts.

[0067] If the validation fails (e.g., missing weight / priority fields, mismatched citation identifiers, inconsistent weight and priority information) or key fields are missing, a repair sub-process is triggered: the original response text that failed to parse, specific error information (e.g., missing relevance weight of citation identifier M3, inconsistency between the priority of citation identifier M5 and the index table), and the enhanced material summary index table are repackaged into a prompt message, explicitly guiding the first language model to complete the missing fields and correct inconsistent information according to the enhanced material summary index table, ensuring the output format fully matches the target structure, and sending it to the first language model to request correction and re-output; or, according to preset rules, the missing weight / priority fields are filled with default values ​​(e.g., citation identifiers without priority are set to P3 by default, and citation identifiers without weight are set to 0.3 by default), until the validation passes. Through dual validation and automatic repair, the citation relationships in the outline are ensured to be accurate, laying the foundation for accurate citation-tag mapping in subsequent text generation.

[0068] (5) Instantiation of outline object The validated data object is instantiated into a content generation outline object and stored in system memory or cache. The reference identifier field of this content generation outline object, combined with the material relevance weight and reference priority, establishes a clear, traceable, and hierarchical mapping relationship between the content framework and specific reference text materials, laying the foundation for accurate citation and efficient verification when the first language model generates text subsequently.

[0069] S300: Based on the content, generate an outline and citation constraint prompts, and call the first major language model to generate initial text with citation index markers.

[0070] The reference index marker is precisely associated with the reference identifier, and simultaneously marks the primary / secondary reference type and the corresponding material relevance weight level. S300 specifically includes the following steps: (1) Construction of enhanced content generation instructions The content outline object that passes S200 verification is converted into an enhanced content generation prompt that incorporates multi-dimensional constraints. This enhanced content generation prompt, in addition to specifying the citation index mark format (e.g., [Citation:X-Type-Weight], where X is the unique code for the citation identifier, Type is the primary / secondary citation type corresponding to "P1", "P2", and "P3", and Weight is the material relevance weight level, such as "High", "Medium", and "Low"), also includes the following core requirements: Strictly adhere to citation constraint prompts, prioritize generating core factual statements based on materials corresponding to the P1-level primary citation identifier, and use P2 / P3-level auxiliary citation materials only for supplementary explanations, and do not introduce any unverified external information unless necessary; The association between the citation index mark and the statement must be precisely matched: Each factual statement generated based on the reference text material must have a corresponding citation index mark inserted at the end of the sentence, and the Type and Weight of the mark must be consistent with the citation priority and weight of the content frame corresponding to the statement in the outline; For statements without corresponding reference text (without a citation identifier), a temporary [Unverified] marker should be added at the beginning of the sentence to clearly distinguish between source citations and source-free statements.

[0071] (2) Constraint content generation and markup embedding Input the enhanced content generation prompts into the first large language model to initiate the constrained text generation task: The first language model, based on the prompts and the content-generated outline's title and content framework, prioritizes extracting core information from materials with high material relevance weights and P1-level main reference identifiers to generate coherent text.

[0072] During the generation process, the one-to-one mapping rule of reference-tag is strictly followed. Based on the reference mapping relationship (reference identifier-weight-priority) in the content generation outline, the standardized reference index tag is automatically embedded at the end of the corresponding statement. For example, [Citation:M1-P1-high] indicates that the reference identifier is M1, P1 level main reference, and high weight material.

[0073] During the generation process, the system responds in real time to reference constraint prompts. If it detects that external information needs to be introduced (but the reference text material does not contain relevant content), a placeholder must be reserved in the text first, and the reason for the introduction must be recorded synchronously. This will be supplemented and verified in the subsequent external information verification process to avoid generating unfounded hallucination content.

[0074] (3) Multi-dimensional verification and repair of reference index tags After generating the initial text, the tag parsing and multi-dimensional verification process is initiated to ensure the validity, completeness, and relevance of the tags: Parsing and Extraction: Using regular expressions and a structured parsing module, all reference index tags and [Unverified] temporary identifiers are extracted from the initial text to construct a structured mapping table of "statement-tag-reference identifier"; Triple verification: ① Relevance verification: Check whether the reference identifier corresponding to each reference index mark exists in the enhanced material summary index table generated by S200, and whether the Type (primary / auxiliary) and Weight of the mark are consistent with the priority and weight in the index table; ② Completeness verification: Check whether the content framework marked as P1 level primary reference in the outline has embedded the reference index mark in the corresponding statement, without omission; ③ Accuracy verification: Check whether the mark format conforms to the preset specifications, without encoding errors, type confusion (such as primary reference mark being mistakenly marked as P2 level), etc. Repair process: If verification reveals missing, incorrect, or inconsistent tags, an automatic repair process is triggered: the problematic statement, error tags, and enhanced material summary index table are repackaged into a prompt and fed back to the first language model to request the supplementation or correction of tags; if the repair fails, the corresponding statement is marked with "[Tag Anomaly - Pending Review]" and an anomaly log is recorded for subsequent manual intervention.

[0075] (4) Structured storage of initial text and tags The initial text that has been verified (or repaired) is associated with and stored in a structured mapping table of statement-tag-reference identifier-weight-priority, forming a composite data object containing text content, reference tracing information, and tag verification records. This provides efficient data support for S400's triage-based authenticity verification (accurately locating materials based on primary / secondary references and weight levels).

[0076] S400, perform an authenticity check on the initial text: for statements in the text that contain the reference index mark, perform a source consistency check with the corresponding reference text material; for statements in the text that do not contain the reference index mark, initiate an external information verification process based on the target text generation instruction.

[0077] For the first statement in the initial text that contains the reference index mark, the corresponding reference text material is located according to the reference text material reference identifier associated with the first statement, and a source consistency check (hereinafter referred to as "consistency check") is performed with the reference text material. The consistency check is implemented through a closed-loop process of precise retrieval of candidate text fragments, intelligent determination of supporting relationships, multi-dimensional threshold check, conclusion output and processing, and specifically includes the following steps: S401, obtain one or more candidate text fragments related to the first statement containing the reference index mark from the corresponding reference text material through semantic retrieval.

[0078] Based on the citation index marker associated with the first statement, the corresponding reference text material is located. Through a three-level mechanism of feature extraction, hybrid retrieval, and priority filtering, candidate text fragments highly related to the first statement are obtained, as follows: Feature extraction: Perform multi-dimensional feature extraction on the first statement, and one or more of the following technical approaches can be used: ① Traditional NLP feature extraction: After word segmentation and removal of stop words, extract keywords, named entities (person names, place names, organization names, etc.), domain terms, and word frequency-inverse document frequency weights to construct sparse text feature vectors.

[0079] ②Deep learning semantic vector extraction: Using a pre-trained word embedding model (Word2Vec, GloVe) or sentence embedding model (BGE-M3), the first sentence is encoded into a dense semantic vector of fixed dimensions to capture deep semantic information.

[0080] Hybrid retrieval strategy: Combine feature types to perform parallel retrieval, ensuring both recall accuracy and coverage. ① Full-text search: If the main focus is on keywords / entity features, the inverted index built on Elasticsearch or Lucene is used to retrieve the top K text paragraphs by using key entities and terms as query terms and scoring them according to the BM25 algorithm (K is a configurable positive integer, preferably 5-15, to balance recall rate and computational cost).

[0081] ② Vector retrieval: If semantic vectors are generated, the cosine similarity between the first sentence vector and the pre-segmented text fragment vectors of the reference text material is calculated using vector databases such as FAISS and Milvus, and the top K fragments with the highest similarity are recalled.

[0082] ③ Result fusion: After deduplicating the two types of search results, sort them according to the weighted rule of full-text search score × 0.4 + vector similarity × 0.6, and select the Top-K segments as the initial candidate set.

[0083] Priority-based secondary screening: Based on the citation priority associated with the citation identifiers of the reference text materials (P1 primary citation, P2 secondary citation, P3 supplementary citation), the reference text materials corresponding to the high-priority citation identifiers are retrieved first, that is, the fragments corresponding to the P1 level materials are retained first, and then the P2 and P3 level fragments are included in turn; if the number of P1 level fragments in the initial candidate set is ≥3, only the P1 level fragments are retained to ensure the dominant position of the core reference text materials.

[0084] S402, based on the first statement and the candidate text fragment, determine the support relationship between the candidate text fragment and the first statement.

[0085] Based on the first statement and candidate text fragments, a dual determination mechanism of similarity threshold comparison and large language model relationship classification is adopted to clarify the supporting relationship between the two. In this invention, the supporting relationship is a general term for the factual association state between the first statement and the analysis context text fragments, which specifically includes three subtypes: supporting, negative, and questionable. Among them, the supporting type corresponds to the state where the first statement and the reference text are completely consistent in fact, the negative type corresponds to the state where the first statement and the reference text are clearly contradictory in fact, and the questionable type corresponds to the intermediate state where the factual association state cannot be clearly determined.

[0086] S402 specifically includes the following steps: Step 1, Mechanism Selection Based on the domain characteristics of the target text, the requirements for content rigor, and other application scenarios, we determine whether to adopt a single judgment mechanism or a combination of judgment mechanisms. Among them, the combination judgment mechanism takes the relationship classification result as the core and the similarity comparison result as the auxiliary basis.

[0087] Step 2, execute the judgment mechanism If a single decision mechanism is selected in step 1, perform any of the following operations; if a combined decision mechanism is selected, perform both of the following operations simultaneously: (1) Execute similarity threshold comparison mechanism: Use text similarity matching algorithms known in the field (including but not limited to cosine similarity algorithm and Jaccard coefficient algorithm) to calculate the semantic similarity score SP between the first statement and each candidate text segment. The semantic similarity score SP is used to directly characterize the degree of close association between the first statement and the candidate text segment at the text level. (2) Execute the large language model relation classification mechanism: ① Construct a preset relationship classification prompt template, and input the first statement, candidate text fragments, and the preset relationship classification prompt template into the second language model; ② The second major language model outputs relation classification results based on four predefined relation types, which are: First relation type: Characterizes the assertion in the first statement about a specific entity or event, where the same or synonymous statements exist in any text fragment within the analysis context.

[0088] The second relationship type represents all key information elements involved in the assertion about a specific entity or event in the first statement, which are all contained in the information provided by multiple text fragments in the analysis context, and there is no logical conflict between the information. Examples of logical conflicts include, but are not limited to: ① Data conflict (e.g., the first statement states that a product's sales volume in 2023 was 1 million, while the text fragment states that the product's sales volume in 2023 was 800,000); ② Conclusion conflict (e.g., the first statement asserts that technology A is superior to technology B, while the text fragment explicitly states that technology B's performance is superior to technology A); ③ Attribute conflict (e.g., the first statement describes an entity as a company, while the text fragment states that the entity is a public institution); ④ Time / space conflict (e.g., the first statement mentions that the event occurred in 2024, while the text fragment states that the event occurred in 2023).

[0089] The third type of relationship indicates that the assertion in the first statement about a specific entity or event contradicts the explicit factual description in one or more text fragments of the analytical context. Examples of factual contradictions include, but are not limited to: ① Data factual contradictions (e.g., the first statement claims that a company's revenue in 2023 was 1 billion yuan, while the text fragment explicitly states that the company's revenue in 2023 was 680 million yuan); ② Entity attribute factual contradictions (e.g., the first statement describes a piece of equipment as domestically produced, while the text fragment explicitly states that the equipment is an imported original); ③ Event authenticity factual contradictions (e.g., the first statement claims that a project was completed in March 2024, while the text fragment explicitly states that the project did not start construction due to policy adjustments); ④ Time / place factual contradictions (e.g., the first statement mentions that the meeting was held in Shanghai, while the text fragment explicitly states that the meeting was held in Beijing).

[0090] Fourth relation type: Indicates that there is no information in the analysis context that can support the assertion in the first statement about a specific entity or event.

[0091] ③ The second language model synchronously outputs relation type labels and classification confidence scores, wherein the classification confidence scores range from [0, 1].

[0092] Step 3: Relationship Classification The first and second relation types output in step 2 are classified as supporting relation types, and the third and fourth relation types are classified as negative relation types. S403, based on the determination result of the supporting relation and the preset confidence threshold, the conclusion of the source consistency verification is generated.

[0093] Based on the judgment results of supportive relationships and the preset reliability threshold, a consistency verification conclusion is generated. At the same time, a dynamic threshold calibration mechanism and a manual review fallback process are configured. The threshold setting and application logic are as follows: 1. Single-mechanism threshold setting and application 1.1 Similarity comparison mechanism: The preset similarity is compared using a threshold T. pass and similarity rejection threshold T reject And satisfy T pass >T reject If SP≥T pass If SP < T, then it is considered supported; reject If T, then it is determined as a negation; if T reject ≤SP<T pass If so, it is judged as questionable.

[0094] 1.2 Relationship Classification Mechanism: A first classification confidence threshold (used to ensure the reliability of automatic judgment results, with a preferred value of 0.85) and a second classification confidence threshold (used to filter low-confidence judgment results, with a preferred value of 0.60) are preset. If the judgment confidence of a supportive relationship type is ≥ the first classification confidence threshold, it is judged as supportive; if the judgment confidence of a negative relationship type is ≥ the first classification confidence threshold, it is judged as negative; if the classification confidence is < the second classification confidence threshold or the relationship type cannot be classified, it is judged as doubtful.

[0095] 2. Combination Mechanism Judgment Logic: A combination judgment rule is adopted, using the relationship classification result as the core and the similarity score as a supplement; if the relationship classification result is supportive but the corresponding similarity score SP < T... pass Or, the relationship classification result is negative, but the corresponding similarity score SP≥T reject If the result is not clear, the judgment will be downgraded to "questionable". In other cases, the judgment will be made according to the rules of the single relation classification mechanism.

[0096] Threshold dynamic calibration: T pass T reject The confidence thresholds for both categories are continuously optimized through the following methods: ① Initial Statistical Distribution Setting: Based on the validation dataset, analyze the score distribution of correctly quoted and hallucinatory statements, and set an empirical threshold. For example, during the method development phase, the text similarity matching algorithm can be run on a representative validation dataset to calculate the similarity scores of a large number of known correctly quoted statement pairs and irrelevant statement pairs. By analyzing the statistical distribution of these two types of scores (such as mean, variance, and overlap region), and considering the business requirements for the trade-off between precision and recall, a preliminary threshold T is set. pass and T reject Empirical values. For example, T pass It can be set in the high-scoring region of the score distribution (such as near the 90th percentile), T reject It can be set in the low score range (such as near the 10th percentile), and there should be a clear range of doubt between the two to trigger manual review.

[0097] ② Benchmark Set Optimization: Construct a labeled benchmark set containing positive examples (references that should pass) and negative examples (illusions that should be rejected). Using optimization algorithms such as grid search and binary search, find the optimal benchmark set T on this set that maximizes the overall evaluation metric (e.g., F1 score). pass and T reject Threshold combinations. This method yields data-driven optimal parameters.

[0098] ③ Dynamic optimization and adaptive tuning: Record feedback: Record all pending statements that have been reviewed and decided by the manual review process and their final judgment results (pass or fail) to form a high-quality feedback correction dataset.

[0099] Evaluation and Adjustment: Periodically, or when the feedback correction dataset accumulates to a certain size, evaluate the accuracy of the automatic judgment at the current threshold based on this dataset. Subsequently, automatically adjust T using this feedback data. pass and T reject The value.

[0100] Adaptive optimization: By iteratively executing the above process, the threshold parameter can continuously approach the optimal judgment boundary, thereby allowing the automated judgment result of the method to continuously adapt to different text domains and task characteristics, improving its generalization ability and long-term reliability.

[0101] Through the above-mentioned threshold setting and calibration methods, the present invention can dynamically establish and optimize the judgment boundary according to the actual application scenario and data characteristics, thereby achieving the best balance between the efficiency of automated processing and the accuracy of manual review, and ensuring the reliability and adaptability of the source verification process.

[0102] In the context of press release generation, experiments have shown that T pass It can be initially set to 0.75, T reject It is 0.35.

[0103] Final conclusion and trigger for manual review: ① Verification passed: This indicates that the first statement is consistent with the source of the reference text material. ② Verification failed: The result is negative, indicating that the first statement is significantly inconsistent with the reference text material, and may be a hallucination; ③ Manual review: If the statement is deemed questionable or there are contradictions in the classification conclusions of multiple candidate segments, a pending flag will be added to the first statement and the manual review process will be triggered.

[0104] In this invention, contradictory relation classification conclusions refer to the incompatibility and fundamental contradiction between the relation classification conclusions of the large language model for the same first sentence and different candidate text segments. Specifically, this can be divided into two typical cases: The relationship types are completely opposite: For example, for the first statement "Artificial intelligence technology has been widely used in medical diagnosis", the model determines that its relationship with candidate segment A (a medical report segment with high credibility) is a supportive relationship, but determines that its relationship with candidate segment B (another industry analysis segment) is a negative relationship. The two belong to completely opposite relationship types. Contradictory core judgment conclusions: Even if the relation type names are different, the core verification conclusions they point to conflict. For example, the model determines that the relationship between the first statement and fragment C is strong support (confidence 0.92) (corresponding to verification passed), while the relationship with fragment D is weak negation (confidence 0.85) (corresponding to verification failed). The two core judgment results cannot be true at the same time.

[0105] Furthermore, for the second statement in the initial text that does not contain a reference index marker, an external information verification process based on the target text generation instruction is initiated. This process is implemented through the core logic of precise query construction, multi-source information acquisition and evaluation, and fusion judgment conclusions, and provides two parallel optional implementation methods (explicit weighted calculation / large model intelligent analysis), specifically including the following steps: S410, based on the target text generation instruction and the second statement that does not contain a reference index marker, construct a query to obtain external information from multiple sources.

[0106] Based on the target text generation instruction and the second statement, a precise query string conforming to search engine syntax is constructed through key information extraction and query recombination. Then, a web search interface is called to obtain raw external information from multiple sources, as detailed below: (1) Construction of precise query string: Key information extraction: Extract core factual claims (subject, predicate, object), key entities (person names, organization names, place names), numerical values ​​(statistical data, amount, proportion), dates, and other key elements from the second statement, and filter out redundant modifying information; Query Expansion and Reorganization: Extracted key information is deeply integrated with the topic of the target text generation instruction, and optimized and reorganized into a query string. For example, if the second statement is "A became the world's best-selling electric vehicle in 2023," and the target instruction is "New Energy Vehicle Industry Analysis," query strings such as "2023 Global Electric Vehicle Sales Champion A" and "A2023worldwidebest-sellingelectricvehiclesalesdata" can be constructed to ensure the query's relevance.

[0107] (2) Acquisition and preliminary screening of external information from multiple sources: In this invention, the external information from multiple sources refers to independent Internet information resources returned by the network search interface, including but not limited to: highly credible institutional websites, mainstream news media and professional media, recognized encyclopedias or knowledge bases, academic publication databases (such as abstracts or indexes of academic papers and research reports), and other highly reputable commercial or professional websites; based on the precise query string constructed in step (1), the network search interface is called, and all unfiltered search results obtained are the original search results; after obtaining the original search results, the above-mentioned independent Internet information resources are retained first, low-quality spam information is filtered out, and effective information resources are retained. In an illustrative embodiment, low-quality spam information can be filtered out and effective information resources can be retained according to the following rules: Rule 1: Format filtering: Remove format-type information without substantial content, including but not limited to blank pages, pure advertising pop-up links, invalid 404 pages (i.e., web pages with HTTP status code 404, specifically referring to invalid pages where the requested resource does not exist or cannot be accessed), and resources containing only images / videos without text summaries (semantic information cannot be extracted for verification); Rule 2: Content Relevance Filtering: By using keyword matching (the matching degree with the core elements of the precise query string is lower than a preset threshold, such as 0.3) or simple semantic similarity calculation, information that is not related to the claims of the second statement or the topic of the target text generation instruction is removed (e.g., when querying "2023 electric vehicle sales", information related to car maintenance and repair is removed). Rule 3: Duplicate information filtering: Based on text fingerprints (such as the SimHash algorithm) or core digests, deduplication is performed, retaining unique and valid information from the same or different sources, and eliminating redundant results that are repeatedly forwarded or have completely identical content; Rule 4: Preliminary Source Filtering: Eliminate known low-reputation sources, including but not limited to malicious domains (such as domains containing "spam" or "ad"), unregistered illegal websites, and sources marked by third-party fact-checking platforms as "frequently publishing false information"; Rule 5: Content Quality Filtering: Remove content that is illogical, lacks factual basis, or is subjective and conjectured (such as text that contains only opinions without supporting data / evidence), low-quality text with numerous typos / grammatical errors, and information in a language other than the target language (such as removing English text without translation when the target text is in Chinese).

[0108] S420, assess the credibility of each piece of external information and the degree of semantic support between each piece of external information and the second statement.

[0109] For the valid external information acquired by S410, a two-way evaluation of credibility and semantic support is performed; depending on the application scenario, the following two parallel optional implementation methods are adopted: Implementation Method 1: Explicit Weighted Evaluation (Suitable for scenarios that require high quantitative accuracy) ① Credibility weight assessment: A multi-dimensional scoring model is constructed based on the inherent attributes of the source, with the formula W. src (D) u ) = α1 × AS (D u ) +β1×HC(D u )+γ1×TS(D u ).

[0110] Among them, W src (D) u ) is the u-th source D u Credibility weight, AS(D) u ) represents the credibility rating of the u-th source, which can be assigned a value based on the predefined category of the source domain (e.g., high credibility institution = 1.0, mainstream media = 0.8, general commercial website = 0.5, unknown source = 0.2), HC(D u ) represents the historical accuracy of the u-th source, which can be calculated based on the frequency with which information from that source has been verified as accurate by this system or a third-party fact-checking organization in the past. For example, number of accurate verifications / total number of verifications. TS(D u Let represent the timeliness factor of the u-th source, which can be calculated based on the decay over time since the information was published. For example, it can be set to 1.0 within one year, decaying by 0.2 for each additional year, with a minimum of 0.1. α1, β1, and γ1 are adjustment coefficients for each dimension, used to balance the importance of different dimensions, and satisfy (α1+β1+γ1=1). The value of u ranges from 1 to Z, where Z is the total number of sources participating in the evaluation.

[0111] It should be noted that the aforementioned formula for calculating credibility weights is merely an exemplary implementation provided to clearly illustrate the principle. In practical applications, the allocation and calculation of credibility weights can be achieved using various other methods or models known to those skilled in the art that can comprehensively evaluate the reliability of information sources, such as statistical weighting methods, rule-based scorecard models, or more complex machine learning-based regression models (which can be trained using historical data to automatically learn and assign optimal weights to different dimensional features). The core of this invention lies in the technical idea of ​​using the credibility weights of multi-source information for weighted decision-making, and is not limited to a specific weight calculation formula.

[0112] ② Semantic Support Evaluation: This evaluates the semantic consistency or support level between the content of each search result and the second statement. One specific implementation involves using a sentence similarity model (such as a BERT-based sentence vector model) to calculate the cosine similarity score between the search result summary and the second statement, and normalizing this score to the [0, 1] interval as the semantic support. If the search result explicitly refutes the statement, the semantic support can be recorded as a negative value.

[0113] Numerical data enhancement evaluation: If the second statement contains numerical data (identified and located through regular expressions / named entities), the semantic support of the source containing the numerical verification information is multiplied by the enhancement coefficient g (>1) to amplify the impact of numerical matching on the final result and avoid critical numerical errors. The value range of g is [1.2, 2.0], with 1.8 for technical texts and 1.5 for social science texts, and can be dynamically adjusted according to numerical sensitivity.

[0114] In verifying external information, a more stringent verification strategy is adopted for statements containing numerical data, mainly based on the following three interrelated technical reasons: First, the objectivity and verifiability of numerical data. Unlike qualitative descriptions or statements of opinion, numerical data (such as statistical results, years, measurements, and amounts) possesses a high degree of objectivity and precision. The criteria for judging its authenticity are clearly defined, with a clear boundary between right and wrong. Technically, these data points can be precisely located using regular expressions or named entity recognition, making automated comparison and verification algorithmically highly feasible. Therefore, it is necessary to apply stronger verification weights to this highly verifiable information.

[0115] Second, numerical errors are highly dangerous and have a low tolerance for error. In the generated text, an error in a key numerical value (such as mistakenly writing "15% growth" instead of "5% growth") can completely distort the facts and mislead decision-making, causing far greater harm than minor discrepancies in some qualitative descriptions. Such errors are often fatal flaws, severely damaging the credibility of the entire text. Therefore, in the comprehensive evaluation, the decisive role of numerical accuracy in the final score must be increased. By introducing a reinforcement coefficient g, the impact of the degree of numerical matching (reflected through semantic support) on the final comprehensive credibility score C is essentially amplified. This means that even if a source has low credibility (w... i (Not high), but as long as the value it provides is completely accurate (high semantic support), it can make a significant contribution to the final judgment; conversely, if a source with high credibility provides an incorrect value (low semantic support), its negative impact will be amplified, making it more likely to cause the overall score to fall below the threshold.

[0116] Third, optimize resource allocation and improve verification efficiency. From a processing perspective, verifying numerical data has a clear objective (verifying specific numbers), making it more efficient than verifying the overall truthfulness of a complex description. By assigning it higher priority and weight, more attention can be paid to the most critical and easily verifiable hard facts when computational resources are limited. This aligns with the design principles of optimizing the critical path in technical systems. It does not weaken the verification of qualitative information, but rather establishes a hierarchical importance system, ensuring that the robustness of the entire verification process is built upon the most solid factual foundation.

[0117] Implementation Method 2: Large-Scale Intelligent Evaluation (Applicable to complex semantic understanding and conflict resolution scenarios) Multi-source result filtering and summarization: Take the top H results (H is a configurable positive integer) according to the search engine ranking, extract the title, core summary or key fragment of each result to form a summary text; Structured evidence context construction: The second statement, target text, and multi-source summary text are generated into a structured evidence context according to the preset format of claim to be verified + evidence list (source + core information) to ensure information integrity; Large-scale model-guided analysis: Input the structured evidence context and pre-set evidence analysis and rating prompt templates into the third language model, guiding the third language model to perform the following analysis tasks: ① Evidence credibility analysis: Evaluate the inherent credibility of each source (based on domain name and publishing institution) and the text's intrinsic credibility (whether it contains data citations, whether the logic is rigorous, and whether it contains emotional expressions); ② Evidence relevance analysis: Determine the semantic relevance and degree of support / refutation between each summarized text and the second statement claim; ③ Conflict resolution and comprehensive judgment: Based on the consistency / conflict of multi-source evidence, infer the overall truthfulness of the second statement claim; ④ Structured conclusion generation: Output a verification conclusion containing a core judgment and a summary of key reasons. The core judgment is presented in a binary form (e.g., "verification passed" or "verification failed") or a graded form (e.g., "highly credible", "basically credible", "questionable", "likely untrue", etc., with comparable levels). The summary of key reasons briefly explains the key evidence points on which the judgment is based and their credibility considerations.

[0118] S430, Based on the fusion evaluation result of the credibility and the semantic support level, generate the conclusion of the external information verification process.

[0119] The final verification conclusion is generated based on the two-way evaluation results of S420. The two implementation methods correspond to the following judgment logic, both of which include a manual review fallback mechanism: Implementation Method 1: Comprehensive Credibility Score Determination Calculate the overall credibility score: The overall credibility C of the second statement is calculated using a weighted summation formula, as follows: .

[0120] Among them, W src (D) u ) is the u-th source D u The credibility weight, Sim(D) u Tpub1(D) represents the semantic support of the u-th statement originating from the second statement E, with a value range of [−1, 1], where support is positive and rebuttal is negative; T1now is the current system time when the external information verification process is executed; Tpub1(D) represents the semantic support of the u-th statement originating from the second statement E, with a value range of [−1, 1], where support is positive and rebuttal is negative; T1now is the current system time when the external information verification process u ) represents the original publication time of the u-th source, in the same unit as T1now. k1 is the timeliness decay coefficient (calibrated through domain experiments to control the influence of publication time on weight); h is the number of valid sources participating in the calculation, i.e., the number of sources that pass the credibility screening out of Z sources; h0 is the baseline number of valid sources (a preset value used to balance the influence of the number of sources on the overall credibility); d is the quantity condition coefficient, which can be a preset value, used to adjust the impact when the number of sources deviates from the baseline.

[0121] Threshold comparison and determination: ① Verification passed: If the overall credibility score C is greater than or equal to the preset credibility threshold (configurable, with an empirical range of [0.6, 0.8], or dynamically adjusted based on historical feedback), then the verification is deemed passed; ② Verification failed: If C is less than the preset credibility threshold, the verification is deemed to have failed.

[0122] ③ Manual review: If C falls within a preset review threshold range (e.g., [0.55, 0.65]) or there are serious conflicts in the core fact determination results from multiple external sources, a pending flag is added to the corresponding statement, and manual review is triggered. Examples of serious conflicts in the core fact determination results from multiple external sources include, but are not limited to: Scenario 1: ≥2 highly credible sources make completely contradictory judgments on the same core fact (such as data, entity attributes, or the authenticity of an event) (e.g., Source 1 clearly states "a certain technology was mass-produced in 2023", while Source 2 clearly states "a certain technology was not mass-produced in 2023"). Scenario 2: The judgment results of more than 50% of the valid sources (excluding low-credibility sources) are contradictory, and no judgment result is supported by ≥30% of the sources (i.e. there is no mainstream consensus). Scenario 3: There are ≥2 types of independent conflicts in the core factual dimensions (such as time, location, key data) (e.g., Source 1 and Source 2 conflict in the time of the event, and Source 3 and Source 4 conflict in the subjects involved in the event).

[0123] Implementation Method 2: Large Model Conclusion Analysis and Judgment Conclusion Analysis: Extract the core judgments and key reasons from the output of the third language model and map them to preset levels (pass level: highly credible, basically credible; fail level: very likely untrue; questionable level: questionable). Result determination: ① Verification passed: If the parsed verification conclusion indicates that the verification has passed or belongs to the preset pass level (such as "highly reliable" or "basically reliable"), then the external information verification is determined to be passed.

[0124] ② Verification failed: If the parsed verification conclusion indicates that the verification failed or belongs to the preset failure level (such as "very likely to be untrue"), then the external information verification is determined to have failed.

[0125] ③ Manual review: If the parsed verification conclusion is unclear, contradictory, or does not belong to any preset conclusion type, or if the third language model expresses high uncertainty in the output, then add a pending mark to the second statement and trigger the manual review process.

[0126] The two implementation methods are parallel options that can be flexibly selected according to the scenario: explicit weighted evaluation is suitable for scenarios with clear requirements for quantitative results and precise control of weights; large model intelligent evaluation is suitable for complex semantic scenarios (such as multiple evidence conflicts and qualitative description verification), taking into account both efficiency and depth of understanding.

[0127] S500, based on the results of the authenticity verification, the initial text is corrected and integrated to output the final target text.

[0128] In this step, based on the results of the authenticity verification (including the source consistency verification results of the first statement and the external information verification results of the second statement), the initial text is processed by statement, reorganized for coherence, and standardized in language, and finally the target text that integrates the verification auxiliary information is output.

[0129] This step reconstructs discrete statements into a logically coherent and standardized complete document, specifically including the following sub-steps: S501, Targeted processing of sentences: Generating intermediate text sets For the first statement with a citation index in the initial text and the second statement without a citation index, perform the corresponding operations based on their verification results, retain processing traces, and form an intermediate text set: (1) Processing of the first statement (corresponding to the consistency check result of the source) Retention operation: If the verification result is passed, the first statement is retained as is, marked as verified, and associated with the corresponding candidate text fragment index (such as "reference text material M1-P1 level fragment 3") for easy tracing later; Correction operations: If the verification result fails, the following steps will be performed first: ① Content replacement: Retrieve the correct content from the corresponding reference text material and replace or rewrite the first statement; ② Generate correction description information: Include the reason for the correction (such as "the original statement does not match the content of reference text material M1") and the source identifier of the reference text material on which it is based (such as "reference text material M1-P1 level fragment 3"), and associate the statement in a non-intrusive form such as footnotes and floating prompts; Marking operation: If the verification result is questionable (triggering manual review), or the correction operation fails due to lack of reference text material: ① Keep the original text of the first sentence; ② Add prompt information (such as [Pending verification], [Information is questionable, it is recommended to check reference text material M1]), and present it in the form of a mark at the end of the sentence or in a highlighted form; Post-manual review and processing: Based on the manual ruling, perform retention / correction / marking operations, and update the processing records and traceability information simultaneously.

[0130] (2) Processing of the second statement (corresponding to the external information verification result) Retention Operation: If the verification result is passed, retain the second statement as is, mark it as passed by external verification, and associate it with the key evidence source index; Correction Operations: If the verification result is not passed, the following actions will be taken first: ① Content Replacement: Replace or rewrite the second statement based on highly credible external evidence (such as search results with high credibility weight and high semantic support); ② Generate Correction Explanation Information: Include the reason for the correction (such as "the original data is inconsistent with the 2023 report of institution X") and the source identifier of the external evidence on which it is based, and associate the statement in a non-intrusive manner. Marking operation: If the verification result is questionable (triggering manual review), or the correction operation fails due to lack of highly credible evidence: ① Keep the original text of the second statement; ② Add prompt information (such as "[External information is questionable]", "[Public data of agency X needs to be verified]"). Post-manual review and processing: Based on the manual ruling, perform retain / correction / mark operations and update the processing records synchronously.

[0131] S502, Coherence Reorganization and Language Normalization: Optimizing Intermediate Text Sets Perform overall processing on the intermediate text set to eliminate issues such as logical breaks and stylistic inconsistencies, generating high-quality continuous text. Specifically, this includes: (1) Coherence Reorganization: Optimization of Logical Connection and Structural Consistency A collaborative architecture combining logical relationship analysis and coherence restoration is employed to ensure both logical flow between sentences and maintain structural consistency between the text and the original outline. The specific technical solution is as follows: Logical relationship analysis: ① Semantic Role Labeling (SRL): Using a finely tuned BERT / RoBERTa SRL model, the core predicates, agent / patient semantic roles of the statement are extracted, and cross-statement logical relationships such as sequence, causality, and condition are determined by role overlap (relying on open-source tools such as LTP from Harbin Institute of Technology, the technology is highly mature). ② Dependency parsing: Using open-source tools such as Stanford Parser and spaCy, the parsing is used to analyze the syntactic relationships such as subject-verb, verb-object, and contrast within sentences, and to accurately locate the logical connection gaps between adjacent sentences (such as missing contrast conjunctions). ③Outline structure anchor point matching: Sentence-BERT is used to calculate the semantic similarity between the sentences and the original outline chapter topics to ensure that the sentence reorganization does not deviate from the core of the corresponding chapter and maintains the consistency of the overall text structure with the outline.

[0132] Coherent repair: ① Transition sentence generation: Using small-parameter pre-trained models such as T5-small and BART-base, input the sentences to be connected and the logical relationship to be judged (such as "sequential" and "contrast"). The Prompt guides the generation of appropriate transition sentences (example: input "AI technology is developing rapidly; it is widely used in the medical field; sequential", generate "in the context of continuous technological iteration"). It can be achieved without complex fine-tuning. ② Sentence ordering optimization: Based on the results of logical relationship analysis, a logical relationship graph of sentences is constructed. The semantic similarity of chapter themes and the strength of logical relationships between sentences are used as dual weights. The Kahn topology sorting algorithm is used to fine-tune the order of sentences within paragraphs to ensure smooth reading flow without changing the core facts (topology sorting is a mature graph theory algorithm that has been widely used in text structured reorganization). ③ Unified optimization of conjunctions: Construct a preset conjunction library classified according to logical relationships (sequential conjunctions such as "in addition" and "furthermore", adversative conjunctions such as "but" and "however", causal conjunctions such as "therefore" and "in summary"). Identify the type of logical relationship through dependency parsing, automatically replace colloquial / inconsistent expressions, and insert appropriate conjunctions when missing.

[0133] (2) Language standardization: improving text quality and professionalism Integrating mature NLP tools to achieve comprehensive language optimization and ensure consistent text standards: Grammar / Spelling Correction: Utilizes grammar checking engines such as Grammarly to correct basic errors such as subject-verb agreement, tense, and spelling. Reference resolution: The reference object of pronouns ("its" and "the") is clarified through the reference resolution model, ensuring that the names of key entities and domain terms are consistent throughout the text; Style / Terminology Consistency: Adjust the professionalism of the vocabulary and the complexity of the sentences according to the explicit or implicit style of the target text generation instructions (such as academic reports and press releases), and apply the domain terminology list in sync; Standardized formatting: Automatically generates heading levels, paragraph indentation, bulleted lists, etc., conforming to standard document specifications or user-defined templates.

[0134] The semantic role labeling, dependency parsing, pre-trained generative models, and topological sorting techniques employed in this step are all mature, industrially validated technologies in the NLP field, supported by open-source tools (spaCy, Hugging Face Transformers) and public datasets. Problems such as multi-module collaboration and large-scale text efficiency optimization that need to be addressed in practical engineering implementation can be solved through conventional engineering methods such as model lightweighting and parallel computing, and do not constitute theoretically insurmountable obstacles.

[0135] S503, outputs the final target text.

[0136] The final target text is output through a user interface or application programming interface; wherein the output final target text is text formatted or structured data containing the explanatory information and the prompt information.

[0137] The final output target text is a composite document integrating the main content and verification supplementary information. It includes: Main content: The main text that has been coherently reorganized and standardized in language.

[0138] Embedded information: Explanatory information (for corrections) and prompts (for markers) integrated into the text are presented in a way that is perceptible to the user but does not disrupt the main reading flow.

[0139] Output format: The final result can be provided in multiple formats, for example: Readable document formats: such as PDF, Word documents, and HTML web pages, where correction notes and question marks are presented as visual elements (such as annotations, color highlights, and icons).

[0140] Structured data formats, such as JSON and XML, with the body, correction records, and questionable markers as separate, machine-readable fields, facilitating subsequent programmatic processing or import into other systems.

[0141] Users can choose whether to display supplementary information and the display format (such as footnotes / hovering tips) through the system configuration interface to meet the usage needs of different scenarios.

[0142] Furthermore, during the process of generating the initial text by calling the first large language model, real-time verification is performed synchronously, including: S610, calculate the semantic relevance between the currently generated statement and the reference text material specified in the content generation outline, sentence by sentence.

[0143] During the process of generating text sentence by sentence using the first language model, each time a candidate sentence (i.e., the currently generated sentence) is output, a semantic relevance calculation is immediately triggered. The semantic relevance is quantitatively characterized by a hybrid calculation model to represent the degree of correlation between the currently generated sentence and the reference text material specified in the content generation outline. The specific implementation is as follows: Related material location: Based on the reference text material reference identifier corresponding to the content frame to which the current sentence belongs in the content generation outline, locate the corresponding reference text material. If the content frame is associated with multiple reference identifiers, locate all related materials, giving priority to the highest priority P1 level materials.

[0144] Two-dimensional score calculation: ① Vector-based semantic similarity scoring Sim vec The text is encoded into dense vectors using a pre-trained sentence embedding model (such as BGE-M3 or Sentence-BERT). The cosine similarity between two vectors is calculated using the cosine similarity formula, and the result is the semantic similarity score. The cosine similarity value ranges from [-1, 1]. To ensure compatibility with subsequent calculations, it needs to be linearly normalized to the interval [0, 1]. For example, the normalized cosine similarity value is equal to the sum of the original cosine similarity value plus 1, divided by 2.

[0145] ② Keyword-based full-text search relevance score Sim kw The generated statement is segmented, stop words are removed, and core keywords, named entities, and domain terms are extracted. A full-text search engine based on Elasticsearch or Lucene is used to perform keyword retrieval in the located reference text materials, and the BM25 algorithm is used to calculate the retrieval relevance score. The BM25 score range is a non-negative real number; to unify it to the [0,1] interval for fusion, min-max normalization is required. Specifically, during the initialization or periodic calibration phase, a retrieval is run on a representative query set, the BM25 score distribution of all query-document pairs is statistically analyzed, and its empirical minimum and maximum values ​​are recorded. Subsequently, any raw BM25 score calculated in real time is subjected to min-max normalization. To avoid division by zero errors or the influence of extreme values, upper and lower bounds can be set for score truncation.

[0146] In the subsequent formula for fusion of hybrid correlation, Sim vec With Sim kw This refers to the score after normalization.

[0147] Hybrid Relevance Fusion: The final semantic relevance Rel between the currently generated statement and the corresponding reference text material is calculated using a weighted summation formula: Rel = a1 × Sim vec +a2×Sim kw ×Wc / max(Wc).

[0148] Wherein, Wc represents the relevance weight of the reference text material associated with the currently generated statement to the content framework to which the statement belongs (taken from the enhanced material summary index table constructed by S200); max(Wc) is the maximum relevance weight among all reference text materials associated with the content framework to which the current statement belongs, used to normalize Wc (making Wc / max(Wc)∈[0,1]) to enhance the proportion of keyword relevance scores of high-weight materials in the fusion result. a1 and a2 are fusion weight coefficients, satisfying the constraint a1+a2=1, calibrated through cross-validation experiments on multi-domain sample sets (exemplary values: a1=0.6, a2=0.4 for technical texts; a1=0.5, a2=0.5 for social science texts), adapting to the semantic relevance characteristics of texts in different domains.

[0149] S620, if the semantic relevance of the currently generated statement is lower than the preset semantic relevance threshold, a correction mechanism is triggered.

[0150] Preset semantic relevance threshold Th rel The value range of is [0.3, 0.6], which can be determined in the following ways: ① Based on the statistics of the validation dataset, analyze the distribution of the relevance of correctly cited statements and take the 30th percentile as the initial value; ② Combine the feedback from manual review of historical generation tasks and dynamically adjust the threshold to ensure that the relevance is lower than Th. rel Furthermore, among statements without citation markers, the proportion of statements requiring correction or questionable statements reaches the preset target, such as over 80%.

[0151] If the currently generated statement satisfies Rel < Th rel If this occurs, a correction mechanism is immediately triggered. This correction mechanism performs the following corresponding operations based on whether the currently generated statement contains a reference index marker: (a) If the currently generated statement contains a reference index marker, a correction prompt is sent to the first large language model. The correction prompt guides the model to regenerate content based on the corresponding reference text material or correct the reference index marker. Optionally, the correction prompt is a structured prompt, for example: the semantic relevance between the currently generated statement {candidate statement} and the reference text material (reference identifier {ID}) associated with the content frame {frame name} is insufficient (Rel={specific value}). Please supplement the core information based on the reference text material and ensure that the reference index marker {current marker} at the end of the sentence is accurately associated. If the regenerated statement is still below a preset threshold, the correction prompt is sent repeatedly until the preset number of retries is reached or the semantic relevance meets the requirements; if it still does not meet the requirements after reaching the number of retries, an unverified marker is finally added.

[0152] (b) If the currently generated statement does not contain a reference index marker, a basic correction operation is performed: the statement is regenerated based on the reference text material, and a standardized unverified marker is added to the regenerated statement (e.g., in the format "[Unverified - Related Material {ID}]", where {ID} is the reference text material reference identifier corresponding to the content framework to which the current statement belongs). The reason for the marker is recorded synchronously, and the statement is included in the subsequent key verification queue. If the regenerated statement still meets the requirement that the semantic relevance is less than a preset threshold, an enhanced marker is added (e.g., in the format "[Unverified - Requires Manual Review]").

[0153] In addition to the basic correction mechanisms mentioned above, for statements that contain reference index tags but have low semantic relevance, the following enhanced correction operations can be enabled depending on the application scenario (they can be executed in combination with the basic mechanisms, or the execution logic of enhanced operations can be preset to take precedence): Reference text material content filling: From the reference text materials associated with this statement, the core text fragment ranked first in descending order of semantic similarity is selected, and key facts, data or conclusions in the fragment are automatically extracted. The fragments are then integrated into the current statement through a sentence adaptation algorithm (adjusting the grammatical structure based on dependency parsing to ensure compatibility with the original sentence structure), replacing redundant or unfounded statements. At the same time, the original citation index marks are retained or corrected to ensure that the marks are consistent with the source of the filling content.

[0154] To ensure that all low-relevance statements are processed in a closed loop, a composite correction strategy is enabled: If, after sending a correction prompt to the primary language model, the regenerated content still satisfies the semantic relevance < preset threshold, or if the reference text material content filling operation fails due to reasons such as lack of relevant core segments or sentence structure adaptation failure, then a fallback flag operation will be executed: add a "[Insufficient Relevance - Fallback Flag]" to the statement, and record the initial relevance value, the type of correction operation executed, and the reason for failure in detail in the system log to ensure that the entire process is traceable and that no low-quality statements are missed.

[0155] This application employs a hybrid calculation model (S610) that integrates two dimensions (vector semantic similarity + keyword retrieval relevance) and correlates material weights to accurately quantify the semantic relevance between the generated statement and the specified reference text material, avoiding the bias of a single evaluation dimension and ensuring the accuracy of relevance determination. Simultaneously, S620 uses a dynamic trigger correction mechanism based on preset thresholds, performing differentiated processing based on whether the current statement contains a reference index marker. Specifically, marked statements receive precise correction prompts to guide the return to the reference text material, while unmarked statements are marked with standardized unverified labels and included in key verification. This is supplemented by enhanced operations such as reference text material content filling and a fallback labeling strategy, achieving closed-loop processing of low-relevance statements. This real-time verification process can promptly intervene in statements deviating from the reference text material during text generation, reducing the generation of unfounded content (illusions) from the source. Furthermore, by recording the reasons for labeling and processing logs in detail, it strengthens content traceability, prevents low-quality statements from flowing into subsequent stages, reduces overall verification costs and rework risks, and ensures the fit and overall quality of the generated content with the reference text material.

[0156] In various embodiments of the present invention, the first, second, and third large language models all refer to pre-trained models with a large number of parameters and powerful natural language understanding and generation capabilities. Each model has a clear division of labor based on task localization, as detailed below: The core purpose of the first major language model is to generate initial text. It needs to be adapted to the requirements of structured content generation outlines and citation constraint prompts, with a focus on enhancing text fluency, structural consistency, and the ability to accurately embed citation index tags. It can be fine-tuned through text generation datasets (including citation tag specification samples) to ensure that the generated content fits the outline framework and that the tags are accurately associated.

[0157] The second and third language models are used for adjudication tasks (i.e., the Judger model). They are primarily used for fact-checking operations such as semantic relation classification, evidence credibility rating, and conflict resolution. They require strong semantic understanding and logical reasoning abilities. They can be fine-tuned through fact-checking corpora, semantic relation classification datasets, and multi-source evidence rating datasets to ensure that the adjudication results are reliable and fair.

[0158] This invention does not impose any special restrictions on the specific selection of large language models. Any existing or future pre-trained model with the above-mentioned task adaptability can be used, including but not limited to: For the first major language model (initial text generation), mainstream domestic generation models can be selected, such as DeepSeek-V3.2 and Qwen3-235B-A22B. The autoregressive generation capability of this type of model can ensure the fluency and structural consistency of the text and adapt to the requirements of embedding reference index tags.

[0159] For the second and third major language models (fact-checking adjudicators), mainstream domestic strong reasoning models can be selected, such as Qwen3-Coder-480B-A35B, GLM4.7, Kimi-K2, etc. After fine-tuning the fact-checking corpus, these models can accurately complete the tasks of determining support / negation / doubt relationships, assessing the credibility of evidence, and resolving conflicts.

[0160] The core of this invention lies in task definition, process control, and data interaction logic, and is independent of the specific technical implementation of the underlying large language model (such as neural network architecture and parameter scale). The above exemplary model is only for the purpose of understanding the feasibility of this invention. Any pre-trained model with equivalent natural language processing capabilities (including new models in future iterations) can be directly replaced and used. The solution of this invention has good compatibility and technological foresight. This invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform the method described in this invention.

[0161] This invention also provides a computer-readable storage medium storing computer-executable instructions for performing the methods described in this invention.

[0162] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.

[0163] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A text generation method based on a large language model, characterized in that, include: S100: Obtain the user-inputted target text generation instruction and at least one reference text material; S200, based on the target text generation instruction and the reference text material, generate a structured content generation outline and citation constraint prompts; wherein, the content generation outline includes the title of the target text, the content framework, and reference text material citation identifiers corresponding to at least part of the content in the content framework; S300, Based on the content, generate an outline and citation constraint prompts, and call the first language model to generate initial text with citation index markers, wherein the citation index markers correspond to the citation identifiers of the reference text material; S400, Perform an authenticity check on the initial text: For statements in the text that contain the reference index mark, perform a source consistency check with the corresponding reference text material, specifically including: Semantic retrieval is used to obtain one or more candidate text fragments related to the first statement containing the reference index marker from the corresponding reference text material; Based on the first statement and the candidate text fragments, determine the support relationship between the candidate text fragments and the first statement; Based on the determination result of the support relationship and the preset confidence threshold, the conclusion of the source consistency verification is generated; For statements in the text that do not contain the reference index marker, an external information verification process based on the target text generation instruction is initiated, specifically including: Based on the target text generation instructions and the second statement that does not contain reference index tags, a query is constructed to obtain external information from multiple sources; Assess the credibility of each piece of external information and the degree of semantic support between each piece of external information and the second statement; Based on the fusion evaluation results of the credibility and the semantic support level, the conclusion of the external information verification process is generated; S500, based on the results of the authenticity check, the initial text is corrected and integrated to output the final target text. Furthermore, during the process of generating the initial text using the first large language model, real-time verification is performed synchronously, including: Calculate the semantic relevance between the currently generated statement and the reference text material specified in the content generation outline, sentence by sentence; If the semantic relevance of the currently generated statement is lower than a preset semantic relevance threshold, a correction mechanism is triggered. The correction mechanism performs corrections or adds unverified flags to the currently generated statement based on the reference text material, depending on whether the currently generated statement contains a reference index marker.

2. The method according to claim 1, characterized in that, The reference text material citation identifier is associated with the material relevance weight; the citation constraint prompt is configured to guide the first large language model to prioritize the reference text material corresponding to the citation identifier with a high material relevance weight.

3. The method according to claim 2, characterized in that, The material relevance weight is obtained by fusing the semantic similarity between the reference text material and the content framework, the source credibility rating of the reference text material, and the timeliness factor of the reference text material based on a preset fusion method.

4. The method according to claim 1, characterized in that, The semantic relevance is obtained through a hybrid computation model that integrates vector-based semantic similarity with keyword-based full-text retrieval relevance scores.

5. The method according to claim 1, characterized in that, The process of correcting and integrating the initial text includes: For statements that perform correction operations, correction description information is generated, which includes the source identifiers of the reference text materials or external evidence on which the correction is based.

6. The method according to claim 3, characterized in that, The content generation outline also includes citation priority, which is determined based on the relevance weight of the material; the citation constraint prompt is further configured to guide the first language model to distinguish between primary and secondary citations based on the citation priority when generating text.

7. The method according to claim 1, characterized in that, The final target text is output in a structured form, and the final target text integrates at least one of the following types of supplementary information: correction instructions, unverified information, and manual review conclusions.

Citation Information

Patent Citations

  • Retrieval enhancement generation method and device based on large model and medium

    CN119312917A

  • System for monitoring and intervening large model to generate illusion content in real time

    CN119357759A