A document intelligent proofreading method based on a large language model
By combining system settings and a large language model with an industry terminology database, a multi-dimensional proofreading strategy is implemented. This solves the problems of illusion and lack of domain knowledge in document proofreading caused by the large language model, achieving efficient and accurate document proofreading and ensuring logical consistency throughout the document.
Patent Information
- Application Number
- CN202610311928.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-16
- Publication Date
- 2026-05-26
- Estimated Expiration
- 2046-03-16
AI Technical Summary
Existing document review methods based on large language models suffer from illusion problems, lack of domain-specific knowledge, and difficulty in maintaining logical consistency across the entire document, resulting in unreliable and inefficient review results.
By setting system parameters and review standards, and combining a large language model with an industry terminology database, the system performs checks on typos, version specifications, structural integrity, compliance, consistency, and calculation accuracy. This constructs a multi-dimensional, in-depth error correction strategy that suppresses illusions and integrates domain knowledge.
It achieves highly accurate and efficient document proofreading in complex long texts and vertical professional fields, ensuring logical consistency throughout the document and improving document processing quality and efficiency.
Smart Images

Figure CN121859891B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and natural language processing, and in particular to a document intelligent proofreading method based on a large language model. Background Technology
[0002] With the rapid development of digital office and information technology, the number of various electronic documents, such as legal contracts, official documents, technical tenders, and academic papers, has increased significantly. Document writing and review have become an extremely important part of daily work. In the traditional document processing workflow, proofreading mainly relies on manual labor, which is not only inefficient but also prone to omissions or misjudgments due to fatigue during long working hours.
[0003] The emergence of large language models has brought about tremendous changes to natural language processing tasks. Based on the Transformer architecture, large language models possess powerful semantic understanding, contextual logical reasoning, and text generation capabilities, enabling them to handle more complex language tasks than traditional rule-based or statistical models. Currently, using large language models to assist in writing and polishing is becoming increasingly common; trained on massive amounts of data, they can accurately capture grammatical errors and stylistic issues in text.
[0004] However, existing methods for directly applying large language models for document review still have significant drawbacks. First, large language models suffer from the illusion problem, meaning they may alter original facts or fabricate non-existent errors during the review process, leading to unreliable review results. Second, general-purpose large models lack expertise in specific vertical domains, such as laws and regulations, medical standards, and engineering specifications, making it difficult to uncover deep-seated logical flaws or compliance risks. Finally, for long documents, existing models are often limited by context length, making it difficult to maintain logical consistency throughout the entire document. Therefore, in high-precision and complex semantic environments, how to suppress the illusion of large models and integrate domain knowledge to achieve reliable document review is an urgent problem to be solved. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, this invention provides a document intelligent proofreading method based on a large language model.
[0006] A document intelligent proofreading method based on a large language model is characterized by the following steps:
[0007] S1, System Settings, uses system definitions and review standards to determine review rules;
[0008] S2, typos and terminology proofreading, parses the document to be proofread to obtain the review objects, performs format screening through preprocessing and regularization mechanisms, combines the preloaded industry terminology library definition constraint set into the large language model for in-depth review, and performs consistency and reliability checks to output valid problem items;
[0009] S3, the standard version review, extracts suspected reference fragments through candidate triggering mode, calls the large language model to extract the standard reference triple set, and performs two-way precise retrieval by number and name to determine the validity of the status;
[0010] S4, Structural integrity review: Extract the actual outline and chapter page number mapping list of the document to be reviewed, call the matcher to obtain the target template description vector for differential comparison, generate a differential set containing missing or disordered content and identify empty content chapters;
[0011] S5, compliance review, uses a search-enhanced generation mechanism to vectorize the regulatory rule base to create an index, calls the extraction model to obtain the claim set of the document to be reviewed, constructs a query vector to recall the evidence sequence, and inputs it into the judgment model to output the compliance judgment result;
[0012] S6, Consistency Review: The document to be reviewed is extracted into a set of semantically complete chapters and matched with preset topic rules. Semantic enhancement quadruples containing scope and value are extracted and aggregated. Logical consistency is determined by combining dimensional conversion.
[0013] S7, Accuracy Verification: Extract the formula set containing the original formula to construct an inverted index mapping, merge the context to extract the variable value dictionary, and substitute it into an independent programming environment to perform recalculation verification; S8, Common Error Verification: Extract metadata to infer the report type, filter common error rule batches and construct textual rule groups, input the large language model to perform double-loop batching and output structured error records.
[0014] Furthermore, to better realize the present invention, in S2, during the preprocessing and regularization stage, text fragments containing paragraphs, headings, and table units are used as review objects. An industry terminology library is loaded and a constraint set is defined. Screening for repeated punctuation and mixed use of Chinese and English punctuation is performed based on regularity rules. During the deep review stage, text fragments are intelligently divided into blocks according to length thresholds, and strongly related terms are extracted and written into prompt words to constrain the large language model to prioritize the identification of terminology errors and semantic errors. During the consistency and reliability verification stage, type filtering, field constraints, reasonableness judgment, and existence verification are performed sequentially on the model return items to eliminate false and fabricated results.
[0015] Furthermore, in order to better realize the present invention, in S3, the standard reference triple extracted by the large language model includes the standard number, the standard name and the original text fragment; after the system constructs a unique key to remove duplicates, it performs a standardized and precise matching on the standard number, performs a precise or candidate set matching on the standard name and sorts them according to the state weight, and determines the standard as unknown, standard mismatch, name error, number error or standard invalid according to the matching result.
[0016] Furthermore, to better implement the present invention, in S4, when extracting the actual outline, if the document has a parse tree structure, a recursive traversal function is executed to generate the outline and synchronize page number identification; if it does not exist, text fragments with title attributes are selected to generate the outline. The system determines the difference between the actual outline and the standard template outline, and counts the number of text characters and text fragments in the leaf chapters through a rollback mechanism. If the count is lower than a preset threshold, an empty content problem entry is generated.
[0017] Furthermore, to better realize the present invention, in S5, each rule in the normative rule base is concatenated with the topic, keywords and clause content to form a retrieval corpus, and an index is established by mapping it to a vector set through an embedding model; the text is segmented and the claim extraction model is called to output a structured claim set, and a query request containing the topic and facts is constructed to recall highly relevant evidence; the judgment model combines the claims and evidence to output the judgment result, and finally the confidence and consistency gating logic is executed to output only high-confidence non-compliant items.
[0018] Furthermore, to better implement the present invention, in S6, a topic rule library containing data types and tolerance definitions is loaded, and a large language model is called to extract semantically enhanced quadruples for chapters that hit the topic; a cleaning operator is used to perform semantic disambiguation and normalization merging on the scope and parameter names in the quadruples to generate a list of data points aggregated by standardized keys; when the same parameter contains multiple data points, a consistency determination function is called to determine the consistency between context and numerical logic.
[0019] Furthermore, in order to better realize the present invention, in S7, the formula content is recorded to the paragraph through the text topology association position index, and the description paragraph containing the parameter definition is merged into the current calculation block by adopting the context association paragraph extraction and merging strategy; the large language model is called to output the calculation item containing the target name, the declared result and the variable value table; the variables are substituted into the formula to calculate independently to obtain the recalculation result, and the accuracy is determined by comparing whether the error between the recalculation result and the declared result exceeds the set threshold.
[0020] Furthermore, to better realize the present invention, in S8, the report type is deduced by association matching based on preset file features according to metadata or file name, and the applicable rule subset is selected according to the report type and sliced into rule batches; the current rule batch is converted into structured task instruction text and concatenated with context blocks and input into the large language model for review; the output items are filtered by a verification filtering mechanism based on the existence of the original text, and fictitious judgment results without factual basis in the original text are eliminated to ensure that the erroneous original text truly exists in the original document.
[0021] The beneficial effects of this invention are:
[0022] This invention designs an intelligent document proofreading method based on a large language model to ensure the accuracy and efficiency of document proofreading in complex long texts and vertical professional field environments.
[0023] Leveraging the powerful deep semantic understanding and long-range contextual dependency capture capabilities of large language models, this approach overcomes the limitations of traditional rule-based or statistical models, ensuring logical consistency throughout the entire document. By combining domain knowledge bases and logical constraint mechanisms, it effectively suppresses the illusions inherent in large models and addresses the issues of insufficient specialization and factual fabrication in specific vertical domains by general-purpose models. Through the construction of a multi-dimensional deep error correction strategy, it achieves automated intelligent proofreading with high accuracy, low false positive rate, and interpretability, significantly improving the quality and efficiency of document processing. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of the main steps of the present invention;
[0025] Figure 2 This is a schematic diagram of the review process of the present invention. Detailed Implementation
[0026] 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 a part of the embodiments of the present invention, and not all of them. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0027] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0028] like Figures 1 to 2This invention provides a specific embodiment of an intelligent document review method based on a large language model. Leveraging the powerful deep semantic understanding and long-range context dependency capture capabilities of large language models, it solves the problems of inconsistent logic and semantic ambiguity in the context of complex long texts. The method first determines review standards based on system settings and user-uploaded standards; then, it sequentially performs checks on the document to be reviewed, including typos and terminology review, version specification review, structural integrity review, compliance review, consistency review, calculation accuracy review, and common error review; finally, it summarizes the problem items generated by each review module, forms the review result, and outputs it. The specific steps are as follows:
[0029] 1. System settings: The review standards are determined by system definitions and user-uploaded standards.
[0030] 2. Typo and Terminology Proofreading: The typo and terminology proofreading process consists of three stages: preprocessing and initial screening, and deep verification based on a large language model to check consistency and reliability. The specific steps are as follows:
[0031] Preprocessing and Initial Screening Stage: First, the input document undergoes structured parsing, dividing it into several text segments for review. These text segments include paragraphs, headings, and text content within table cells. Second, an industry terminology database is preloaded, containing standard terms and their common misspellings. Each term entry consists of a set of standard terms and their corresponding misspellings, used to constrain terminology usage during subsequent review. Finally, for the extracted target review segments, a pre-defined set of regular expression rules is used for initial format screening. This set includes rules for detecting repeated punctuation, continuous mixed punctuation, and mixed use of Chinese and English punctuation. After these rule checks, a preliminary problem entry set is generated to record clearly identifiable formatting errors.
[0032] The deep review stage based on a large language model involves the following steps: First, text segments are divided into blocks according to a preset text length threshold, ensuring that the length of each block does not exceed the threshold for subsequent model processing. Second, a corresponding short identifier is generated for each text segment, and a mapping relationship is established between the short identifier and the text segment to accurately locate the original text position when the model returns the result. Finally, each text block is structured and then input into the large language model for semantic review. During the model review process, a subset of terms related to the current text block is extracted from an industry terminology database and provided as constraint information to the large language model, enabling the model to prioritize the identification of the following types of problems: misspellings of professional terms, homophonic semantic errors, and obvious typos. After completing the analysis, the model outputs a structured review result containing the location of the problems and suggested modifications.
[0033] Consistency and Reliability Verification Phase: To improve the accuracy of the review results, consistency and reliability verification is performed on the output of the large language model. First, the model's returned results are filtered by type, removing result items marked as error-free or null. Second, each result item undergoes a field integrity check to ensure that both the original text content and suggested modifications exist and that their lengths are within a preset range. Then, the reasonableness of candidate modifications is judged, excluding suggestions involving minor adjustments to spaces or punctuation or abnormal expansions. Finally, each result undergoes existence verification to confirm that the original text indeed exists in the corresponding text segment, and the original text position is accurately located using the aforementioned short identifier mapping relationship. After the above verifications, the final set of valid issue items is obtained.
[0034] 3. Standard Version Review: Standard version review is used to check for issues such as incorrect numbering, incorrect naming, or outdated versions of standards or specifications referenced in the document. This review process includes four stages: preprocessing and initial screening, in-depth review based on a large language model, consistency and reliability verification, and location and output. The specific steps are as follows:
[0035] Preprocessing and initial screening stage: First, the document is divided into multiple text segments as review objects. These text segments include paragraph text, heading text, and text content in table cells. The entire document's line set is extracted, meaning the document is divided by lines to obtain several lines of text data. Second, several candidate trigger patterns are defined. These candidate trigger patterns are regular expression rules used to identify standard or specification citations, such as rules for matching standard numbers or names. Finally, the text is divided into blocks by line, and the candidate trigger patterns are used to match and detect each line of text, thereby identifying text segments that may contain standard citation information. For the detected suspected citation segments, deduplication is performed. The deduplicated set of citation segments will serve as input data for the subsequent in-depth review stage.
[0036] The deep review stage based on a large language model involves the following steps: First, suspected citation fragments are segmented according to a preset maximum input length threshold, ensuring that the text length of each batch does not exceed the model's maximum allowed input length. Second, prompt information is constructed for each text batch, and this batch of text is then input into the large language model for analysis. Finally, the large language model identifies standard citation information in the text and extracts its structured information. This structured information includes: standard number, standard name, version information, or publication date. This information collectively constitutes a standard citation triple, and the model outputs from each batch are aggregated to form a complete set of standard citation information.
[0037] Consistency and Reliability Verification Phase: First, a unique identifier is generated for each standard reference to avoid duplicate records. Second, the system performs two retrieval methods: number retrieval and name retrieval. Number retrieval standardizes the extracted standard numbers (e.g., unifying character format and removing redundant symbols) and then performs an exact match retrieval in the standard database. Name retrieval normalizes the extracted standard names (e.g., removing redundant spaces or unifying character format), then retrieves a set of candidate standards matching the name from the standard database and sorts them according to standard status priority. Finally, the standard reference status is determined based on the number and name retrieval results. The determination results include the following types: when neither the standard number nor the name matches a corresponding standard in the database, it is determined to be an unknown standard; when the standard number exists but the standard name does not match, it is determined to be a mismatched standard name; when the standard name exists but the standard number does not match, it is determined to be an incorrect standard number; when both the standard number and name match but the corresponding standard has been abolished, it is determined to be an invalid standard version.
[0038] Location and Output Phase: After completing the standard citation verification, the document location is performed for each detected issue. First, the corresponding cited text is retrieved from the document fragment set, and relevant location information is extracted based on the text's position, including: paragraph number, line number, and table cell position. Second, the system generates an issue entry for each issue. Each issue entry includes: the original cited text, the identified standard number, the identified standard name, the verification result type, and the specific location in the document. Finally, all issue entries are summarized and output to form the document specification version review result.
[0039] 4. Structural Integrity Review: Structural integrity review is used to check whether the document structure is complete, such as whether there are missing chapters, inconsistencies between the table of contents and the main text, or chapters without main text content. The document structural integrity review process is divided into three stages: preprocessing and initial screening, in-depth review based on a large language model, and consistency and reliability verification.
[0040] Preprocessing and Initial Screening Stage: First, document structure information, including the actual chapter outlines and corresponding page numbers, is extracted from the document to be reviewed. To improve the reliability of structure recognition, document structure is extracted sequentially according to different data sources. The first source is parse tree extraction. When the document's structure parse tree is available, it is used as input to extract title nodes at all levels through recursive traversal, and a hierarchical outline of the document is generated according to the title hierarchy. Simultaneously, the page number or position identifier information of each chapter is recorded. The second source is title fragment recognition. When the document's structure parse tree does not exist, possible title fragments are selected from the document's text fragment set, such as text with obvious title formatting characteristics. Subsequently, a document outline is generated based on the title level information, and a correspondence between chapters and page numbers or text positions is established. The third source is original file structure extraction. When the original file structure information can be read, document directory information is extracted based on the file type. Finally, the chapter information extracted from any of the above sources constitutes the actual outline structure of the document, and a mapping relationship between chapters and page numbers is generated simultaneously.
[0041] The deep review phase based on a large language model involves the following steps: After obtaining the actual outline structure, a standard structural template that the document should follow is determined through template matching. First, multiple standard document structure templates are retrieved from a template library. Each template describes the chapter structure and chapter hierarchy that a particular type of document should contain. Second, based on the document's title information and chapter structure characteristics, matching calculations are performed on each template to determine the template that best matches the current document. When the matching confidence level is higher than a preset threshold, the corresponding template is designated as the target template, and the standard chapter structure defined by that template is extracted. Third, the actual outline structure is compared and analyzed with the standard template structure to identify structural differences, such as missing chapters, redundant chapters, chapter hierarchy not conforming to standards, and incorrect chapter order. Finally, these differences are converted into structural specification error types, and corresponding problem entries are generated. Each problem entry includes: the name of the chapter involved, the error type, the chapter location, and a suggested modification method.
[0042] Consistency and Reliability Verification Phase: After structural difference detection, the consistency between document content and directory structure is further verified. First, the amount of main text content contained in each chapter is counted based on the chapter page number information, such as the number of characters or the number of main text segments. Second, leaf chapters (i.e., last-level chapters) in the document are checked to determine whether they have actual main text content. In some cases, multiple chapter titles may be located on the same page, making it impossible to accurately define page number boundaries. To solve this problem, chapters are grouped, and non-main text content such as table of contents pages and title lines are removed using filtering rules. The number of main text characters and main text paragraphs for each chapter is counted. When the amount of main text content in a chapter is lower than a preset threshold, the chapter is determined to have a "table of contents but no content" problem, and a corresponding problem entry is generated. Finally, all problem entries generated in the preprocessing phase, template difference detection phase, and content verification phase are summarized to form the document structure integrity review result.
[0043] 5. Compliance Review: Compliance review is used to check whether the content of a document complies with relevant specifications or rules. This review process includes three stages: preprocessing and initial screening, in-depth review based on a large language model, and consistency and reliability verification.
[0044] Preprocessing and Initial Screening Stage: This stage first completes the vectorization of the rule base data and the structured segmentation of the documents to be reviewed, loading the rule set from the standard rule base. Each rule typically includes a rule topic, keyword information, and rule clause content. Next, a retrieval corpus text is constructed for each rule. This retrieval corpus combines rule keywords with rule clause content to express the semantic information of the rule. Simultaneously, corresponding metadata information is generated for each rule, such as rule number, rule source, and scope of application. Third, the rule corpus is vectorized using an embedding model, converting it into a vector representation and establishing a vector index in a vector database, thus forming a rule retrieval tool suitable for semantic retrieval. Finally, the documents to be reviewed are structured, divided into paragraphs, and shorter paragraphs are merged based on paragraph length to form text blocks suitable for model processing.
[0045] The deep review phase based on a large language model involves the following steps: After document segmentation, compliance analysis is performed using a large language model. First, claim extraction is performed. For each text segment, the large language model is used for semantic analysis to identify statements that may involve regulatory requirements and extract corresponding structured claim information, such as technical requirements, design constraints, and descriptive normative expressions. The extracted claim information undergoes a structural integrity check to ensure the claim content, related descriptions, and contextual information are complete and valid, resulting in a set of valid claims. Second, evidence retrieval is performed. For each claim, a corresponding search query is generated based on the claim content, and the aforementioned rule retrieval tool is used to search for relevant rule clauses in the rule base. The system returns several of the most relevant rule clauses as an evidence set based on semantic similarity. The retrieved rule clauses are then formatted and organized to form a reference text. Finally, compliance determination is performed. The claim content and the corresponding rule basis are input into the determination model for analysis. The determination model outputs compliance determination results, including: whether the rule requirements are met, the determination confidence level, the explanation of the determination basis, modification suggestions, and the relevant violation rule number.
[0046] Consistency and Reliability Verification Phase: After obtaining the compliance judgment result, firstly, a threshold judgment is performed based on the confidence information in the judgment result. When the judgment result shows non-compliance and its confidence level is higher than the preset threshold, the claim is identified as a high-confidence non-compliance item. Secondly, the judgment result is cleaned and its format is validated to ensure that the output fields are complete and the data types are correct. For all non-compliant claims that meet the judgment conditions, the system generates corresponding issue entries. Each issue entry includes the following information: issue type, issue description, modification suggestions, original text content, document location, and the identifier of the text block to which it belongs. The issue entry is mapped to the original location in the document based on the text block identifier information, thereby determining the specific paragraph or page number position of the issue in the document. Finally, all issue entries are summarized to form the document compliance review result.
[0047] 6. Consistency Review: The consistency review process is divided into three stages: preprocessing and initial screening, in-depth review based on a large language model, and consistency and reliability verification.
[0048] Preprocessing and Initial Screening Stage: First, the document content is semantically structured, and a mapping relationship between chapters and rules is established. Based on the document outline structure and metadata information of text fragments, the entire text is divided into several semantically complete chapter units. Second, a page number or position mapping relationship is established for each text fragment to accurately locate the specific location of the problem in the document during subsequent proofreading. Third, the topic rule base is loaded. The topic rule base contains multiple topic rules, each describing the consistency requirements of a certain type of parameter or indicator. Each rule typically includes: topic name, keyword set, parameter description, data type, unit information, and allowable error range. Finally, a topic matching operation is performed on each chapter text. Specifically, matching is performed on the chapter title or chapter content based on the keywords in the rules. When a keyword match is detected, the chapter is considered to be related to the corresponding topic, and an association relationship is established between the chapter and the topic rule.
[0049] The deep review stage based on a large language model involves extracting information from the chapter content after obtaining the correspondence between chapters and topic rules. First, semantic analysis is performed on each chapter's text using the large language model to extract information that may involve parameter descriptions. Each extraction result typically includes the following: the parameter's applicable scope or object, parameter name, parameter value or value range, parameter description context, and the corresponding original text fragment. Second, the extracted parameter information is normalized, for example, by standardizing parameter names, standardizing the objects to which parameters belong, and standardizing unit representations. Finally, the data is grouped according to the combination of "parameter object + parameter name," thus grouping data items describing the same parameter together, and recording the corresponding numerical value and context information for each data item.
[0050] Consistency and Reliability Verification Phase: After grouping the parameter data, consistency verification is performed on each group of parameter information. First, parameter groups containing multiple data items are selected. Second, a large language model is used to perform semantic consistency analysis on the data within the same parameter group. The analysis includes: whether the parameter values are consistent, whether the parameter units are consistent, whether there are conflicts in the descriptions of numerical ranges, and whether there are logical contradictions in the descriptions in different chapters. During the analysis, unit conversions and numerical range comparisons are performed to help determine whether there are conflicts between different data. When a significant contradiction is detected in the same parameter across different chapters, the parameter is determined to have a consistency problem, and a corresponding problem entry is generated: error type, severity, problem description, modification suggestion, original text content, document location, and the identifier of the text segment to which it belongs. Finally, all detected consistency problems are summarized to form the document consistency review result.
[0051] 7. Calculation accuracy verification: The calculation accuracy verification process is divided into three stages: preprocessing and initial screening, in-depth verification based on the large language model, and consistency and reliability verification.
[0052] Preprocessing and Initial Screening Stage: First, formula information is extracted from the document, and an index relationship is established between formulas and text fragments. A formula extractor identifies mathematical formulas in the document and generates formula records. Each formula record includes the following information: formula identifier, its associated text fragment identifier, formula text content, formula format, and page number. Second, a mapping relationship is established between text fragments and formulas, ensuring each text fragment corresponds to its contained formula, thus accurately locating formulas during subsequent proofreading. Third, the document content is divided into blocks according to paragraph order, and a text length threshold is set to control the size of each text block. During the block division process, a formula detection operation is performed. When a paragraph contains a formula or matches a formula text pattern, the text block is marked as containing a formula. Finally, the system generates a set of text blocks containing formula information to be proofread.
[0053] The deep review phase based on a large language model involves: after obtaining text blocks containing formulas, a structured analysis of the calculation process is performed using a large language model. First, semantic analysis is performed on each text block using the large language model to extract calculation-related information. Each calculation item typically includes the following: the name of the calculation target, the calculation formula used, the calculation result declared in the document, the unit of the result, and the formula variables and their corresponding values. Second, based on the name of the calculation target or related keywords, the corresponding reference formula is retrieved from the standard formula library to obtain the standard calculation method or formula expression. Finally, the extracted calculation items are independently verified. The verification process includes: checking whether the variable values are reasonable, re-executing the formula calculation based on the extracted variable values, and comparing the recalculated result with the calculation result declared in the document. When the error between the recalculated result and the original result exceeds a preset threshold, the calculation result is determined to be erroneous, and detailed recalculation information is generated to record the calculation process and error status.
[0054] Consistency and Reliability Verification Phase: After completing the calculation verification, review results are generated for detected calculation problems. First, when an incorrect calculation result is detected, a corresponding problem entry is generated. Each problem entry includes the following information: error type, severity, problem description, suggested modification, original text content, document location, and the identifier of the text segment to which it belongs. If the problem involves a specific formula, the problem location is determined first based on the text segment containing the formula, and the corresponding page number information is obtained through the previously established formula mapping relationship. Second, the recalculation process and recalculation results are added as supplementary information to the suggested modification for manual review by the reviewers. Finally, all detected calculation problems are summarized to form the calculation accuracy review results.
[0055] 8. Common Error Review: Common error review is used to detect recurring, common errors in documents, such as phrasing errors, formatting errors, omissions, or errors in fixed rules common in specific report types. This process consists of three stages: preprocessing and regularization, deep review based on a large language model, and consistency and reliability verification.
[0056] Preprocessing and Regularization Stage: First, report type identification, rule filtering, and document segmentation are completed to infer the report type of the document to be reviewed. Report type information from the document metadata is read first; if the corresponding information is not found in the metadata, the report type is heuristically identified based on the filename, title, or other text features to determine the report category of the current document. Second, a set of rules is loaded from a common error rule library. This library stores multiple predefined rules, each corresponding to a different report type. Based on the currently identified report type, a subset of rules applicable to that report type is selected from the rule library. In addition to rules specific to a particular type, general rules applicable to all report types can also be loaded simultaneously. The selected rules are further grouped according to a preset batch size to form multiple rule batches for subsequent batch-based review using a large language model. Finally, the document content is segmented into context blocks. Specifically, the system organizes the document according to paragraph order and merges several adjacent paragraphs into context blocks based on a maximum text length threshold. Each context block includes at least the following information: the text content of the context block and the original paragraph identifier information corresponding to that context block.
[0057] The deep review stage based on a large language model involves: First, a combined chunking and batching approach is used to perform common error detection using the large language model. For each context block, various rule batches are selected sequentially, and the current rule batch is converted into rule description text suitable for model understanding. Second, the text content of the current context block and the rule descriptions of the corresponding rule batches are input into the large language model for analysis. The large language model reviews the current text content according to the rule requirements and outputs one or more suspected error results. Each suspected error result preferably includes the following: the triggering rule identifier, error type, problem description, modification suggestions, original error text, and severity. A complete set of common error candidate results is obtained by processing all context blocks and all rule batches.
[0058] Consistency and Reliability Verification Phase: After obtaining suspected error results from the large language model output, consistency and reliability verification is performed to reduce the impact of false positives and model illusions. First, a field integrity check is performed on each suspected error result to ensure that key fields such as rule identifier information, error type, problem description, and modification suggestions are not empty. Second, a text inclusion check is performed. Specifically, it verifies whether the original error text in the suspected error result actually exists in the current context block text. If the original error text does not appear in the corresponding text content, the result is considered unreliable and is discarded. Third, a validity check is performed on the modification suggestions, excluding suggestions containing whitespace characters, pure punctuation, or without actual modification significance. Severity information is standardized, converting different expressions of severity into a unified severity level or weight representation for subsequent output and sorting. Finally, for suspected error results that pass the above verification, final problem entries are generated. Each problem entry includes the following information: error type, severity, problem description, modification suggestion, original error text, document location, and the identifier of the text segment to which it belongs. All problem entries that pass the verification are summarized to form common error review results.
[0059] Figure 2 This is a diagram illustrating the intelligent document review process. The specific process is as follows:
[0060] (1) The document review system sets corresponding review rules, including rules for reviewing typos and terminology, rules for reviewing standard versions, rules for reviewing structural integrity, rules for reviewing compliance, rules for reviewing consistency, rules for reviewing calculation accuracy, and rules for reviewing common errors.
[0061] (2) When a user uploads a document requiring review, the system standardizes the document and calls a large language model to perform the corresponding review process. For typos and terminology review, it detects punctuation errors, homophones or near-homophones, semantic errors, typos, and misuse of professional terms. For standard version review, it extracts the standard specifications referenced in the document and compares them with the database to check whether they are valid, expired, or have incorrect names or numbers. For structural integrity review, it compares the outline tree with the standard template to identify issues such as missing, repetitive, redundant, and missing content (empty chapters). For compliance review, it uses Retrieval Enhanced Generation (RAG) technology and logical reasoning to extract design claims and compare them with the standard clauses to determine whether the design parameters meet mandatory requirements. For consistency review, it checks whether there are contradictions or conflicts in the values or descriptions of the same parameter in different positions of the document based on semantic analysis. For calculation accuracy review, it intelligently identifies the calculation context, extracts formulas and parameters, performs program recalculation, and verifies the accuracy of the calculation results. For common error review, it automatically filters according to the report type rules and batch checks common errors in writing style or format in the document.
[0062] (3) After the uploaded documents are reviewed, the system records and organizes the review results in a unified manner, and generates the original document (Word or PDF) with highlighted annotations and a multi-dimensional Excel summary report.
[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Any other modifications or equivalent substitutions made by those skilled in the art to the technical solutions of the present invention, as long as they do not depart from the spirit and scope of the technical solutions of the present invention, should be covered within the scope of the claims of the present invention.
Claims
1. A document intelligent proofreading method based on a large language model, characterized in that, Includes the following steps: S1, System Settings, uses system definitions and review standards to determine review rules; S2, typos and terminology proofreading, parses the document to be proofread to obtain the review objects, performs format screening through preprocessing and regularization mechanisms, combines the preloaded industry terminology library definition constraint set into the large language model for in-depth review, and performs consistency and reliability checks to output valid problem items; S3, the standard version review, extracts suspected reference fragments through candidate triggering modes, calls the large language model to extract the standard reference triple set, and performs precise retrieval of both number and name to determine the validity of the status; the standard reference triple set extracted by the large language model contains the standard number, standard name, and original text fragment; after the system constructs a unique key for deduplication, it performs standardized precise matching on the standard number, and performs precise or candidate set matching on the standard name and sorts it according to the status weight. Based on the matching results, it is determined to be an unknown standard, a standard mismatch, a name error, a number error, or a standard invalid. S4, Structural integrity review: Extract the actual outline and chapter page number mapping list of the document to be reviewed, call the matcher to obtain the target template description vector for differential comparison, generate a differential set containing missing or disordered content and identify empty content chapters; S5, compliance review, uses a search-enhanced generation mechanism to vectorize the regulatory rule base to create an index, calls the extraction model to obtain the claim set of the document to be reviewed, constructs a query vector to recall the evidence sequence, and inputs it into the judgment model to output the compliance judgment result; S6, Consistency Review: The document to be reviewed is extracted into a set of semantically complete chapters and matched with preset topic rules. Semantic enhancement quadruples containing scope and value are extracted and aggregated. Logical consistency is determined by combining dimensional conversion. S7, Accuracy Verification: Extract the formula set containing the original formula to construct an inverted index mapping, merge the context to extract the variable value dictionary, and substitute it into an independent programming environment to perform recalculation verification; S8, Common Error Verification: Extract metadata to infer the report type, filter common error rule batches and construct textual rule groups, input the large language model to perform double-loop review and output structured error records.
2. The document intelligent proofreading method based on a large language model according to claim 1, characterized in that: In step S2, during the preprocessing and regularization stage, text fragments containing paragraphs, headings, and table units are used as review objects. An industry terminology database is loaded, and a constraint set is defined. Screening for repeated punctuation and mixed use of Chinese and English punctuation is performed based on regularity rules. During the deep review stage, text fragments are intelligently divided into blocks according to length thresholds, and strongly related terms are extracted and written into prompt words to constrain the large language model to prioritize the identification of terminology errors and semantic errors. During the consistency and reliability verification stage, type filtering, field constraints, rationality judgment, and existence verification are performed sequentially on the model's returned items to eliminate erroneous results.
3. The document intelligent proofreading method based on a large language model according to claim 1, characterized in that: In step S4, when extracting the actual outline, if the document has a parse tree structure, a recursive traversal function is executed to generate the outline and synchronize page number identification; if it does not exist, text fragments with title attributes are selected to generate the outline. The system determines the difference between the actual outline and the standard template outline, and counts the number of text characters and text fragments in the leaf chapters through a rollback mechanism. If the count is lower than a preset threshold, an empty content problem entry is generated.
4. The document intelligent proofreading method based on a large language model according to claim 1, characterized in that: In step S5, each rule in the normative rule base is concatenated with the topic, keywords, and clause content to form a retrieval corpus, and an index is established by mapping it to a vector set through an embedding model; the text is segmented and the claim extraction model is called to output a structured claim set, and a query request containing the topic and facts is constructed to recall highly relevant evidence; the judgment model combines the claims and evidence to output the judgment result, and finally the confidence and consistency gating logic is executed to output only high-confidence non-compliant items.
5. The document intelligent proofreading method based on a large language model according to claim 1, characterized in that: In step S6, a topic rule library containing data types and tolerance definitions is loaded, and a large language model is called to extract semantically enhanced quadruples for chapters that hit the topic; a cleaning operator is used to perform semantic disambiguation and normalization merging on the scope and parameter names in the quadruples to generate a list of data points aggregated by standardized keys; when the same parameter contains multiple data points, a consistency determination function is called to determine the consistency between context and numerical logic.
6. The document intelligent proofreading method based on a large language model according to claim 1, characterized in that: In S7, the formula content is recorded to the paragraph through the text topology association position index, and the explanatory paragraph containing parameter definition is merged into the current calculation block by the context association paragraph extraction and merging strategy. The large language model outputs a computed item containing the target name, declared results, and a table of variable values. The variables are substituted into the formula to calculate independently to obtain the recalculated result. The accuracy is determined by comparing the error between the recalculated result and the declared result to see if it exceeds a set threshold.
7. The document intelligent proofreading method based on a large language model according to claim 1, characterized in that: In step S8, the report type is deduced by performing association matching based on preset file features according to metadata or file name. Applicable rule subsets are selected according to report type and sliced into rule batches. The current rule batch is converted into structured task instruction text and concatenated with context blocks and input into the large language model for approval. The output entries are filtered based on the existence of the original text, eliminating fictitious judgment results that have no factual basis in the original text, and ensuring that the erroneous original text actually exists in the original document.
Citation Information
Patent Citations
Intelligent document checking method and system of visual workflow
CN120106084A
Text intelligent calibration method and system based on large language model
CN120805898A