Project Document Risk Analysis Method and System
By combining a large language model and a thought chain reasoning model with a dialogue pre-training model, we can automatically identify and analyze risk points in project files and generate detailed reports. This solves the problems of inefficiency and misjudgment in traditional methods and achieves efficient and accurate risk analysis and modification suggestions.
Patent Information
- Application Number
- CN202510486492.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-04-18
AI Technical Summary
Traditional project document processing methods rely on manual review, which is inefficient and prone to information omissions or misjudgments due to human factors. It is unable to fully identify risk points in complex structured texts, and modification suggestions lack specificity and practicality, affecting the accuracy and efficiency of project execution.
A large language model is used to identify the semantic vectors of project files, and a thinking chain reasoning model is used for logical reasoning. The dialogue pre-training model is combined to generate risk analysis text and modification suggestion text. Semantic embedding technology and standard library comparison are used to identify differences and abnormal semantic vectors, and generate a detailed risk analysis report.
It improves the efficiency and accuracy of risk identification in project documents, reduces the workload of manual review, provides comprehensive risk analysis, improves project quality and reduces labor costs, and promotes technological innovation and application.
Smart Images

Figure CN120012784B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to a project file risk analysis method and system. Background Art
[0002] With the rapid development of information technology, the processing and analysis of project documents plays a vital role in many fields, including enterprise management, software development, and engineering construction. Project documents usually contain key information such as detailed project descriptions, plans, schedules, and resource allocation, and are the basis for project execution and monitoring. However, traditional project document processing methods mainly rely on manual review and analysis, which is not only inefficient but also prone to information omissions or misjudgments due to human factors, thus posing potential risks to the smooth implementation of the project. Although some text recognition and induction technologies have achieved certain results in the field of text processing, they still face many challenges in practical applications. In particular, when processing text data such as project documents with complex structures and professional terminology, risk analysis capabilities are limited and it is impossible to fully identify potential risk points in the documents. The generation of modification suggestions lacks pertinence and practicality, making it difficult to meet the actual needs of users.
[0003] These problems not only affect the efficiency and accuracy of project document processing, but also restrict the application and promotion of related technologies in a wider range of fields. Summary of the Invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a project document risk analysis method and system to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a project document risk analysis method, comprising:
[0006] Obtaining a project file and identifying a semantic vector of the project file using a large language model;
[0007] Comparing the semantic vector with a pre-generated standard semantic vector to screen out a difference semantic vector that is inconsistent with the standard semantic vector;
[0008] Use the thought chain reasoning model to perform logical reasoning on the semantic vector of the project file based on user questions to obtain the abnormal semantic vector;
[0009] Inputting the difference semantic vector and the abnormal semantic vector into the dialogue pre-training model in sequence to obtain corresponding risk analysis text and modification suggestion text;
[0010] The difference semantic vector and the abnormal semantic vector are converted into sentences, and the sentences, corresponding risk analysis text and modification suggestion text are written into a preset report template to obtain a risk analysis report.
[0011] In an optional embodiment, obtaining a project file and identifying a semantic vector of the project file using a large language model includes:
[0012] Preprocessing the project files, including parsing and converting the file formats;
[0013] Use natural language processing technology to perform word segmentation and syntactic analysis on the pre-processed project files to obtain structured information;
[0014] Performing deep semantic analysis on the structured information using a large language model to identify key entities and relationships between key entities in the structured information;
[0015] Semantic embedding technology is used to map key entities and their relationships into high-dimensional vector space to obtain semantic vectors.
[0016] In an optional embodiment, the semantic vector is compared with a pre-generated standard semantic vector to screen out a difference semantic vector that is inconsistent with the standard semantic vector, including:
[0017] Pre-building a standard library, wherein the standard library stores standard semantic vectors, wherein the standard semantic vectors are semantic vectors obtained by mapping legal entities and relationships into a high-dimensional vector space;
[0018] Calculating the cosine similarity between the semantic vector and the standard semantic vector in the standard library;
[0019] Determine whether there is a standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches a set similarity threshold:
[0020] If so, the semantic vector is determined to be normal;
[0021] If not, it is determined that the semantic vector is a difference semantic vector.
[0022] In an optional embodiment, a thought chain reasoning model is used to perform logical reasoning on the semantic vector of the project file based on the user question to obtain an abnormal semantic vector, including:
[0023] Use machine learning or deep learning technology to identify project scenarios and user needs;
[0024] Retrieving a matching target reasoning path from predefined reasoning paths based on the project scenario and user requirements;
[0025] Identify the hierarchical structure of the semantic vectors of the project file, and decompose the user question into multiple sub-questions based on the hierarchical structure;
[0026] The target reasoning path is used to perform reasoning verification on the sub-problems corresponding to each level and identify abnormal semantic vectors.
[0027] In an optional embodiment, the method further comprises:
[0028] Use contrastive learning technology to automatically label unlabeled project data;
[0029] After confirming that laws and regulations have been updated, the updated content is automatically extracted and, through knowledge distillation technology based on the Teacher-Student Model, the new regulatory information is compressed and migrated into the existing model, seamlessly integrating it into the existing system while maintaining the model's reasoning ability and stability.
[0030] Through the active learning mechanism, based on the confidence level of the large model in the query, sample data for further annotation and learning is automatically selected to improve the learning efficiency of the model;
[0031] Expand the labeled sample library, extract representative samples from unlabeled data, improve the accuracy of comparative learning, and enhance understanding of complex regulations by analyzing the applicability of different regulations and policies.
[0032] In an optional embodiment, the difference semantic vector and the abnormal semantic vector are sequentially input into the dialogue pre-training model to obtain corresponding risk analysis text and modification suggestion text, including:
[0033] Generate prompt engineering based on difference semantic vectors and abnormal semantic vectors;
[0034] The prompt project is input into the dialogue pre-training model to obtain corresponding risk analysis text and modification suggestion text.
[0035] In an optional embodiment, the method further comprises:
[0036] The vocabulary selection, structure and language expression of the prompt project are adjusted based on the answer instructions fed back by the user.
[0037] In a second aspect, the present invention provides a project document risk analysis system, comprising:
[0038] A semantic recognition module, configured to obtain a project file and identify a semantic vector of the project file using a large language model;
[0039] A vector comparison module is used to compare the semantic vector with a pre-generated standard semantic vector and filter out a difference semantic vector that is inconsistent with the standard semantic vector;
[0040] The logical reasoning module is used to use the thought chain reasoning model to perform logical reasoning on the semantic vector of the project file based on the user's questions to obtain the abnormal semantic vector;
[0041] A risk analysis module is used to input the difference semantic vector and the abnormal semantic vector into the dialogue pre-training model in sequence to obtain corresponding risk analysis text and modification suggestion text;
[0042] The report generation module is used to convert the difference semantic vector and the abnormal semantic vector into a statement, write the statement and the corresponding risk analysis text and modification suggestion text into a preset report template to obtain a risk analysis report.
[0043] The beneficial effects of the present invention lie in the fact that the project document risk analysis method and system provided herein, by combining the advantages of a large language model, a thought chain reasoning model, and a dialogue pre-training model, accurately identifies project document semantics, comprehensively analyzes risk points, and precisely generates modification suggestions. The implementation of this invention not only enhances the intelligent and automated level of project document processing, but also provides enterprise managers and project team members with more efficient and convenient document processing tools, thereby promoting the sustainable development and innovation of related industries.
[0044] The beneficial effects specifically include the following aspects:
[0045] 1. Improved Risk Identification Efficiency: Traditional project document risk analysis relies primarily on manual review, which is not only inefficient but also prone to missed detections. This invention significantly improves risk identification efficiency by automatically acquiring project documents and utilizing a large language model to rapidly identify semantic vectors. 2. Enhanced Risk Identification Accuracy: By comparing pre-generated standard semantic vectors, this invention accurately screens out discrepant semantic vectors that are inconsistent with the standard. Furthermore, by utilizing a thought chain reasoning model for logical reasoning, it further identifies potential anomalous semantic vectors, thereby enhancing the accuracy of risk identification. 3. Provides Comprehensive Risk Analysis: This invention not only identifies discrepant and anomalous semantic vectors but also generates corresponding risk analysis text and modification suggestions through a conversational pre-trained model. This provides users with comprehensive risk analysis information, helping them better understand the risks within project documents and their impact. 4. Reduced Labor Costs: Because this invention implements automated risk analysis, it significantly reduces the workload of manual review, thereby reducing labor costs. Furthermore, the automated analysis process avoids misjudgments or missed detections caused by human error. 5. Improved Project Quality: By promptly identifying and addressing risk points within project documents, this invention helps improve the overall quality of projects. During the project execution process, early detection and resolution of potential problems significantly reduces the cost of subsequent modifications and rework, ensuring the smooth progress of the project. 6. Promote technological innovation and application: The implementation of this invention will promote the innovation and application of related technologies in the field of project risk management. By combining a variety of advanced models and technical means, this invention provides a new solution for project risk management and is expected to lead the technological progress of the industry. In summary, the present invention achieves comprehensive, efficient and accurate risk analysis of project documents through an intelligent method, bringing significant technological progress and economic benefits to the field of project management. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings used in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0048] Figure 2 FIG. 4 is a schematic block diagram of a system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0051] The key terms appearing in the present invention are explained below.
[0052] Large Language Models (LLMs) are AI models trained on large amounts of text data, designed to understand and generate human language. The following is a detailed introduction to LLMs:
[0053] 1. Features
[0054] Large-scale parameters: Large language models typically contain billions or even tens of billions of parameters, which enables them to learn rich language features and patterns.
[0055] Deep learning architectures: These are typically based on deep neural networks, such as the Transformer architecture, which includes a self-attention mechanism and is able to handle long-range dependencies.
[0056] Pre-training capability: Pre-training on large amounts of text data to learn universal representations of language, which enables the model to generalize to a variety of different tasks.
[0057] Fine-tuning flexibility: Fine-tuning on specific tasks to adapt to different application scenarios, such as translation, summarization, question answering, etc.
[0058] Contextual Understanding: Ability to understand the context of input text and generate coherent and relevant output.
[0059] Multi-task learning: Some large models can handle multiple language tasks and show a certain degree of versatility.
[0060] Generative capabilities: In addition to understanding language, many large models are also able to generate coherent and grammatically correct text.
[0061] 2. Basic composition
[0062] Word embeddings: Convert words into continuous vectors that can be processed by neural networks. These vector representations incorporate semantic information, placing similar words closer together in the vector space. Typical methods include Word2Vec, GloVe, and BERT.
[0063] Encoder-Decoder Architecture: Many large models use the Transformer architecture, which consists of an encoder and a decoder. The encoder converts input text into an internal representation, and the decoder converts the internal representation into output text. A typical architecture, such as the Transformer model, contains multiple layers of encoders and decoders, each with a self-attention mechanism and a feedforward neural network.
[0064] Self-Attention Mechanism: When processing an input sequence, the model focuses on different parts of the sequence and understands the dependencies between words. It processes all words in the sequence in parallel, improving computational efficiency.
[0065] Feedforward Neural Networks: In each layer of the transformer, a feedforward neural network is used to further process and transform the encoded representation. The structure is usually a fully connected layer with an activation function (such as ReLU).
[0066] Positional encoding: Because the transformer architecture has no order information, positional encoding is added to the word embedding to provide the position information of each word in the sequence. Implementations include fixed positional encoding or trainable positional encoding generated by sine and cosine functions.
[0067] Loss function: This function measures the gap between the model output and the actual target, and is used to guide the update of model parameters. Common types, such as the cross-entropy loss function, are commonly used in language models.
[0068] Optimization algorithm: Based on the feedback from the loss function, the model parameters are adjusted to minimize the loss. Common methods include Adam and SGD (stochastic gradient descent).
[0069] The Chain of Thought (CoT) reasoning model is an advanced prompting technology designed to improve the reasoning capabilities of large language models (LLMs) by simulating the human thought process. The following is a detailed explanation of the Chain of Thought reasoning model:
[0070] The thought chain reasoning model simulates human thinking by breaking down complex problems into simpler subproblems and inserting intermediate reasoning steps. Its core principle can be summarized as "simplifying the complex and solving each problem piece by piece." Specifically, when faced with a complex problem, the model gradually breaks it down and solves these simpler problems one by one, ultimately arriving at the final answer.
[0071] Implementations of the MindChain reasoning model typically combine specific AI technologies and frameworks. For example, the LangChain framework has implemented the Plan-and-Executor mechanism and the ReAct mechanism, both of which are used to build MindChain reasoning models. In specific applications, developers design precise prompts to guide the model in demonstrating its reasoning process.
[0072] Conversational pre-training models are pre-trained using large-scale corpora, enabling them to engage in intelligent and natural conversations. The fundamental principle is to train models on a large corpus to understand the syntax, semantics, and context of natural language, thereby achieving efficient understanding and generation of natural language. These models typically utilize Transformer-based deep learning architectures, such as BERT and GPT. Transformers utilize a self-attention mechanism and a multi-layered network structure to achieve a high-level, abstract representation of natural language. These structures can capture long-range dependencies within language, enabling a more accurate understanding of conversational context.
[0073] The project document risk analysis method provided by the embodiment of the present invention is executed by a computer device. Accordingly, the project document risk analysis system runs in the computer device.
[0074] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject is a project document risk analysis system. According to different requirements, the order of the steps in the flowchart is changed and some are omitted.
[0075] like Figure 1 As shown, the method includes:
[0076] S1. Obtain a project file and use a large language model to identify a semantic vector of the project file.
[0077] Project files are retrieved from designated sources. These files include documents, code, data tables, and other formats. Next, large language models (such as BERT and GPT) are used to perform semantic analysis on the project files. Large language models can deeply understand text content and convert it into high-dimensional semantic vectors. These semantic vectors are mathematical representations of the text content, capturing key information and contextual relationships within the text, providing a foundation for subsequent comparison and reasoning.
[0078] S2. Compare the semantic vector with a pre-generated standard semantic vector, and filter out the difference semantic vector that is inconsistent with the standard semantic vector.
[0079] After obtaining the semantic vector of the project file, it is then compared with predefined standard semantic vectors. Standard semantic vectors are generated based on industry standards, project requirements, or historical data, and represent the correct or expected semantic features that a project file should possess. By calculating the similarity or distance between the semantic vector of the project file and the standard semantic vector, discrepancies with the standard semantic vector are screened out. These discrepancies represent issues or non-compliant portions of the project file.
[0080] S3. Use the thought chain reasoning model to perform logical reasoning on the semantic vector of the project file based on user questions to obtain the abnormal semantic vector.
[0081] After obtaining the difference semantic vectors, we use the thought chain reasoning model to conduct logical reasoning to gain a deeper understanding of the problem. The thought chain reasoning model simulates the human thought process, gradually breaking down the problem and solving it one by one, ultimately generating abnormal semantic vectors. These abnormal semantic vectors are derived through logical reasoning based on the user's question and the semantic vectors of the project file. They represent logical errors, inconsistencies, or other issues in the project file.
[0082] S4. Input the difference semantic vector and the abnormal semantic vector into the dialogue pre-training model in sequence to obtain the corresponding risk analysis text and modification suggestion text.
[0083] After obtaining the difference and anomaly semantic vectors, they are then fed into the conversational pre-training model. Based on these semantic vectors, the conversational pre-training model generates corresponding risk analysis text and modification suggestion text. The risk analysis text details the risks and issues arising from the differences and anomalies, while the modification suggestion text provides targeted solutions or modification suggestions. These texts help users better understand the issues and take appropriate measures to resolve them.
[0084] S5. Convert the difference semantic vector and the abnormal semantic vector into a statement, write the statement and the corresponding risk analysis text and modification suggestion text into a preset report template, and obtain a risk analysis report.
[0085] The difference and anomaly semantic vectors are converted into easily understandable statements. These statements, along with the risk analysis and recommended changes, are then written into a pre-configured report template. The report template is customized based on the specific needs and formatting requirements of the project, ensuring a clearly structured and easily understandable risk analysis report. Upon completion of this step, users receive a detailed risk analysis report that helps them better understand the issues and risks within the project documents and take appropriate action to address them.
[0086] This invention primarily addresses the problem of efficiently and accurately identifying discrepant and abnormal semantic vectors that are inconsistent with standard semantics during project document analysis, and generating corresponding risk analysis reports. By combining a large language model, a thought chain reasoning model, and a conversation pre-training model, this invention provides a new, intelligent method for project document risk analysis.
[0087] In an embodiment of the present invention, based on step S1, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0088] S101. Preprocessing the project file, including parsing and converting the file format
[0089] In this sub-step, the project files obtained from the specified source are first processed. These files exist in various formats, such as Word documents, PDFs, Excel spreadsheets, code files, etc. For the convenience and consistency of subsequent processing, these files are pre-processed.
[0090] Preprocessing primarily involves parsing and converting file formats. For document files like Word and PDF, we extract the text content while preserving its original formatting and structure, such as headings, paragraphs, and lists. For spreadsheet files like Excel, we read the data within the table and understand its row-column relationships and data types. For code files, we parse their syntax and extract key code snippets and comments.
[0091] In the process of parsing and converting file formats, some professional tools or libraries are used, such as PDF parsing libraries, Excel reading libraries, code parsers, etc. These tools can help to more accurately extract and convert file content, providing high-quality data input for subsequent processing steps.
[0092] S102. Use natural language processing technology to perform word segmentation and syntactic analysis on the pre-processed project files to obtain structured information
[0093] After obtaining the preprocessed project file, natural language processing technology (NLP) is used to perform word segmentation and syntactic analysis on the text content.
[0094] Word segmentation is a fundamental task in Natural Language Processing (NLP). It breaks down continuous text into individual words or phrases. Word segmentation is a relatively complex process for Chinese text, as words are not clearly separated by spaces. Word segmentation tools or algorithms, such as rule-based word segmentation, statistical word segmentation, or deep learning word segmentation models, can be used to accurately segment text.
[0095] Syntactic analysis is a crucial step in understanding the grammatical structure of a text. It identifies sentence components, phrase types, and grammatical relationships within the text. This information is crucial for extracting structured information and understanding the text's semantics.
[0096] Based on word segmentation and syntactic analysis, we further extract structured information from the text, such as named entities (personal names, place names, organization names, etc.), time, numbers, keywords, etc. This information will be represented in a structured form to facilitate subsequent processing steps.
[0097] S103. Using a large language model to perform deep semantic analysis on the structured information, identifying key entities and relationships between key entities in the structured information
[0098] After obtaining structured information, we further use the large language model to perform deep semantic analysis. The large language model has powerful language understanding and generation capabilities and can capture the deep semantic information in the text.
[0099] In this step, structured information is fed into a large language model, which is then guided to identify key entities and their relationships. Key entities are core nouns or phrases in the text, such as names of people, places, organizations, and concepts. Key entity relationships describe the interactions or connections between these entities, such as the relationships between characters or the causal relationships between events.
[0100] Through deep semantic analysis, we can more accurately understand the text content and extract valuable information for subsequent processing. This information will support subsequent comparison, reasoning, and decision-making.
[0101] S104. Using semantic embedding technology, map key entities and their relationships into a high-dimensional vector space to obtain semantic vectors.
[0102] After obtaining the key entities and their relationships, semantic embedding technology is used to map this information into a high-dimensional vector space. Semantic embedding technology can convert text or text fragments into high-dimensional vector representations. These vectors can capture the semantic information and contextual relationships in the text.
[0103] In this step, key entities and their relationships are used as input, and semantic embedding algorithms (such as Word2Vec and BERT) are used to generate corresponding semantic vectors. These vectors serve as mathematical representations of the text content, providing a foundation for subsequent tasks such as comparison, classification, and clustering.
[0104] Semantic embedding technology can convert text information into a computable numerical form, facilitating subsequent processing and analysis. At the same time, these semantic vectors can also retain key information and contextual relationships in the text, providing strong support for subsequent comparison and reasoning.
[0105] In summary, through project file preprocessing, word segmentation, syntactic analysis, deep semantic parsing, and semantic embedding, we can gradually extract and transform text content, ultimately obtaining high-quality semantic vector representations. These semantic vectors will serve as the basis for subsequent comparison, reasoning, and decision-making, providing strong support for the smooth progress of the project.
[0106] In an embodiment of the present invention, based on step S2, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0107] Pre-built standard library
[0108] A key step in the project workflow is pre-building a standard library. This library is a knowledge base that stores standard semantic vectors. These standard semantic vectors are obtained by mapping legal entities and relationships into a high-dimensional vector space. This process is similar to the semantic embedding technology mentioned earlier, but here, it focuses on text content related to laws and regulations.
[0109] When building the standard library, we first collect a large amount of legal text, such as laws, regulations, judicial interpretations, and case studies. Natural language processing techniques are then used to segment and parse these texts, extracting structured information. Next, a large language model is used to perform deep semantic analysis on this structured information, identifying legal entities (such as legal titles, institution names, and personal names) and legal relationships (such as rights and obligations, and causal relationships). Finally, semantic embedding techniques are used to map these legal entities and relationships into a high-dimensional vector space, generating standard semantic vectors that are stored in the standard library.
[0110] Calculate the cosine similarity between the semantic vector and the standard semantic vector in the standard library
[0111] After obtaining the semantic vectors for the project files, we calculated the cosine similarity between these vectors and the standard semantic vectors in the standard library. Cosine similarity is a commonly used metric for measuring the similarity between two vectors. Its value range is [-1, 1], where 1 indicates that the two vectors are completely similar, -1 indicates that the two vectors are completely opposite, and 0 indicates that the two vectors have no correlation.
[0112] When calculating cosine similarity, the dot product of the vectors is divided by the product of their moduli. Specifically, for two vectors A and B, their cosine similarity is calculated using the following formula:
[0113] cos(θ) = (A·B) / (|A| * |B|)
[0114] Where A·B represents the dot product of vectors A and B, and |A| and |B| represent the moduli of vectors A and B, respectively.
[0115] Determine whether there is a standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches the set similarity threshold
[0116] After calculating the cosine similarity between the semantic vector and all standard semantic vectors in the standard library, it is determined whether one or more standard semantic vectors have a cosine similarity with the semantic vector that meets the set similarity threshold. This similarity threshold is set based on actual needs and determines whether two vectors are considered sufficiently similar.
[0117] In actual operation, the calculated cosine similarity is compared with a set similarity threshold. If there are one or more standard semantic vectors whose cosine similarity with the semantic vector is greater than or equal to the similarity threshold, it is considered that there are standard semantic vectors similar to the semantic vector in the standard library.
[0118] Determine whether the semantic vector is normal
[0119] Based on the results of the previous step, the semantic vector is evaluated. If a standard semantic vector exists in the standard library whose cosine similarity with the semantic vector meets the set similarity threshold, the semantic vector is considered normal, meaning it meets the expected legal semantic characteristics. This means that the relevant text content in the project file is semantically similar to the legal text in the standard library, with no significant differences.
[0120] However, if there is no standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches the set similarity threshold, the semantic vector is determined to be a difference semantic vector. This means that there is a significant semantic difference between the relevant text content in the project file and the legal text in the standard library, and further review and analysis is required.
[0121] In summary, by pre-building a standard library, calculating the cosine similarity between semantic vectors and standard semantic vectors, determining whether the similarity reaches a set threshold, and determining whether the semantic vectors are normal, we can effectively perform semantic analysis and comparison on the legal text in project documents, thereby identifying any discrepancies and issues. This is of great significance for ensuring the legality and compliance of project documents.
[0122] In an embodiment of the present invention, based on step S3, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0123] S301. Use machine learning or deep learning techniques to identify project scenarios and user needs
[0124] A crucial step in the project workflow is accurately identifying the project scenario and user needs. This not only forms the foundation for subsequent reasoning and verification but also ensures that the final project deliverables meet user expectations. To achieve this, machine learning or deep learning technologies are used to assist in this identification.
[0125] Specifically, a neural network model is trained to identify different project scenarios, such as contract review, legal consultation, and compliance checks. This neural network model makes judgments by analyzing the text content, keywords, formatting, and other information in project documents. It also uses user-entered questions or descriptions to further refine scenario identification, thereby more accurately grasping user needs.
[0126] To train such a model, a large amount of project files and user question data is collected, annotated, and preprocessed. During the training process, model parameters and feature selection are continuously adjusted to improve the model's recognition accuracy and generalization ability.
[0127] S302. Based on the project scenario and user needs, retrieve the matching target reasoning path from the predefined reasoning path.
[0128] After identifying the project scenario and user needs, a matching target reasoning path is retrieved from predefined reasoning paths. These reasoning paths are predefined based on industry knowledge, laws and regulations, historical experience, etc., and are used to guide the subsequent problem analysis and reasoning verification process.
[0129] To achieve this goal, we build a reasoning path library that contains multiple reasoning paths for different project scenarios and user needs. Once the project scenario and user needs are identified, we search and match the reasoning path library based on this information to find the target reasoning path that best suits the current situation.
[0130] When building the inference path library, we ensure the accuracy and completeness of the inference paths. This is achieved through in-depth research and understanding of industry knowledge, laws and regulations, and continuous optimization and improvement based on historical experience. At the same time, we regularly update the inference path library to adapt to industry development and changes in user needs.
[0131] S303. Identify the hierarchical structure of the semantic vector of the project file and decompose the user question into multiple sub-questions based on the hierarchical structure
[0132] After obtaining the semantic vector of the project file, we further identify its hierarchical structure. This helps us gain a deeper understanding of the content and organizational structure of the project file, providing strong support for subsequent problem analysis and reasoning verification.
[0133] Specifically, natural language processing technology is used to hierarchically segment the semantic vectors of project documents, such as paragraphs, sentences, and phrases. Then, based on this hierarchical information, the user question is broken down into multiple sub-questions. These sub-questions inquire about or verify specific paragraphs, sentences, or phrases in the project document.
[0134] When breaking down user problems, ensure the accuracy and independence of the sub-problems. This allows for in-depth analysis and understanding of the user problem, and allows for a reasonable division based on the hierarchical structure of the project file. It also ensures that the logical relationships between sub-problems are clear and explicit, facilitating subsequent reasoning, verification, and integration.
[0135] S304. Using the target reasoning path, perform reasoning verification on the sub-problems corresponding to each level and identify abnormal semantic vectors
[0136] After obtaining the decomposed sub-questions, they are reasoned and verified using the target reasoning path. This process aims to check whether the sub-questions conform to the expected legal semantic features or industry standards and identify abnormal semantic vectors.
[0137] Specifically, each sub-question is verified one by one according to the steps and rules in the target reasoning path. This includes checking the semantic consistency, legality, and compliance of the sub-questions. During the verification process, relevant laws and regulations, industry standards, historical cases, and other information are referenced to assist in the judgment.
[0138] If, during verification, a sub-problem is found to contain an abnormal semantic vector—that is, a semantic feature that does not match expectations or contains obvious errors—these are promptly flagged and recorded. These abnormal semantic vectors represent potential issues or risk points within the project file and are subject to further review and analysis. Furthermore, based on the verification results, necessary adjustments and optimizations are made to the target reasoning path to improve its accuracy and applicability.
[0139] In summary, by using machine learning or deep learning technology to identify project scenarios and user needs, retrieving matching target reasoning paths from predefined reasoning paths, identifying the hierarchical structure of the semantic vectors of project documents and breaking down user questions into multiple sub-questions, and using the target reasoning path to perform reasoning verification on sub-questions and identify abnormal semantic vectors, the legal texts in project documents can be more effectively semantically analyzed and compared, thereby ensuring the legality and compliance of the project.
[0140] In an embodiment of the present invention, based on step S4, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0141] A prompt project is generated based on the difference semantic vector and the abnormal semantic vector; the prompt project is input into the dialogue pre-training model to obtain corresponding risk analysis text and modification suggestion text.
[0142] During the compliance review process, semantic vector comparison and discrepancy screening yielded a series of discrepant semantic vectors that were inconsistent with the legal semantic vectors, as well as abnormal semantic vectors identified through chain-of-thought reasoning. These vectors represent compliance issues within the project documents. To more specifically present these issues and generate corresponding risk analysis and suggested revisions, a prompting system was constructed based on these discrepancies and abnormal semantic vectors and fed into the conversational pre-trained model.
[0143] Sample content
[0144] 1. Differential Semantic Vector Example and Its Prompt Engineering Construction
[0145] Example of differential semantic vector:
[0146] Vector 1: The “environmental assessment report” mentioned in the project documents does not explicitly include a “noise pollution assessment” section.
[0147] Vector 2: There are subtle differences between the "liability for breach of contract" clause in the contract and the description of liability for breach of contract in relevant laws and regulations.
[0148] Prompt project construction:
[0149] Tip 1: "Please analyze the completeness of the 'Environmental Assessment Report' in the project documents, especially whether the 'Noise Pollution Assessment' section is missing, and provide a risk analysis."
[0150] Tip 2: "Please compare the 'liability for breach of contract' clause in the contract with relevant laws and regulations, identify any discrepancies, and assess the risks."
[0151] 2. Abnormal semantic vector examples and their prompt engineering construction
[0152] Example of abnormal semantic vector:
[0153] Vector 1: In the "Fund Usage Report" in the project file, the description of the use of a certain fund does not match the actual use.
[0154] Vector 2: There is a logical contradiction in the "project schedule" in the project plan, such as the completion time of a task in a certain stage is earlier than the start time of the predecessor task.
[0155] Prompt project construction:
[0156] Tip 1: "Please review the description of the use of a certain fund in the 'Fund Usage Report' to confirm whether it is consistent with the actual use and provide modification suggestions."
[0157] Tip 2: "Please review the 'Project Timeline' in the project plan, identify any logical inconsistencies, and provide recommendations for adjustments."
[0158] 3. Application and Output of Dialogue Pre-training Model
[0159] Input the above-built prompt projects into the dialogue pre-training model (such as ChatGLM3-6B-32k, etc.) in sequence, and the model will generate corresponding risk analysis text and modification suggestion text.
[0160] Example of risk analysis text:
[0161] Regarding the missing section of the "Environmental Assessment Report," the model generates the following risk analysis: "Environmental Assessment Reports that do not include the 'Noise Pollution Assessment' section cause projects to be hindered during the environmental approval phase, increasing the risk of project delays or cancellation."
[0162] Regarding the differences in the "liability for breach of contract" clauses in the contract, the model points out: "There are subtle differences between the "liability for breach of contract" clauses in the contract and the laws and regulations, which lead to adverse consequences in dispute resolution."
[0163] Example of suggested text for modification:
[0164] Regarding the issue of inconsistent fund usage descriptions, the model suggests: "It is recommended to update the 'Fund Usage Report' to ensure that the fund usage description is consistent with the actual usage to avoid problems in subsequent audits or inspections."
[0165] Regarding the issue of logical inconsistencies in the project timeline, the model suggests: "It is recommended to adjust the 'project timeline' in the project plan to ensure that the time sequence of tasks in each phase is reasonable and to avoid logical inconsistencies."
[0166] By generating prompts based on differential and abnormal semantic vectors and inputting them into a pre-trained conversational model, we generate specific risk analysis text and modification suggestions. These provide clear guidance to project teams, helping them quickly identify and resolve compliance issues and reduce project risks.
[0167] In an embodiment of the present invention, based on step S5, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0168] Difference and exception semantic vector conversion: Convert the difference semantic vector and exception semantic vector into easy-to-understand sentence form for presentation in the report.
[0169] Report template setting: Pre-set the report template, which includes the basic structure, format and style requirements of the report.
[0170] Report content filling and generation: Write the converted statements, risk analysis text and modification suggestion text into the pre-set report template to generate a complete risk analysis report.
[0171] Report output and sharing: Output the generated risk analysis report as a PDF, Word or other format file and share it with the project team, management or relevant stakeholders for review and decision-making.
[0172] On the basis of the above embodiments, in order to further improve the performance of the model provided by the above embodiments, an implementable method is to use contrastive learning technology to automatically label data, and use continuous learning and knowledge distillation technology to dynamically update model parameters to ensure that the system can adapt to the latest laws, regulations and policy changes and maintain efficient compliance review capabilities.
[0173] Application of Contrastive Learning Technology: The system uses contrastive learning technology to automatically annotate unlabeled project data. By comparing similarities and differences in project documents, it identifies key content and annotates corresponding legal clauses or policy requirements. This not only identifies obvious compliance risks but also extracts project content with hidden risks from underlying semantic differences.
[0174] Continuous Learning: The system dynamically updates its large model to incorporate new regulations and policy changes through a continuous learning mechanism. Updates are automatically extracted and integrated into the existing model using small-batch online learning techniques. This approach is suitable for new models and requirements in legal and regulatory updates and project management.
[0175] Application of knowledge distillation technology: During the update process, new regulations and policies are integrated into the existing model structure using knowledge distillation. This ensures that new knowledge is learned without forgetting old knowledge, maintaining stable model performance. Using knowledge distillation technology based on the Teacher-Student model, new policy content is compressed into a lightweight model, reducing computing resource consumption.
[0176] Active Learning and Sample Expansion: The system automatically selects sample data for further annotation and learning through an active learning mechanism. It prioritizes annotation and learning of legal issues with higher uncertainty, reducing annotation workload and improving compliance assessment capabilities. It also automatically expands the annotated sample library, enhancing the accuracy of comparative learning and understanding of complex regulations.
[0177] Regular model updates and performance monitoring: The system implements a regular update mechanism, retrieving the latest regulations and policies from the legal database and retraining the large model. The model performance monitoring module provides real-time monitoring of the large model's performance across various compliance review tasks. Model parameters are dynamically adjusted based on inference accuracy, response time, and user feedback.
[0178] Real-time regulatory updates and adaptation: The system automatically retrieves and updates legal provisions based on real-time regulatory changes. It automatically learns new regulations, updates the knowledge base, and adjusts the model's reasoning path. Real-time connectivity with the legal and regulatory database ensures the model remains current and adapts to the latest policy challenges.
[0179] Improved Compliance Review Efficiency: By combining comparative learning with continuous learning, the efficiency of compliance reviews is significantly improved. Rapidly respond to policy changes and provide immediate compliance review recommendations. Rapidly adapt to new regulations with fewer annotated samples, maintaining efficient and accurate reasoning capabilities and reducing manual intervention.
[0180] Together, these technologies form the core framework for system compliance review, ensuring that the system can maintain efficient, accurate and real-time compliance review capabilities in the face of an ever-changing regulatory and policy environment.
[0181] In addition, to further improve the matching between the answers of the dialogue pre-training model and user needs, the prompt engineering is continuously adjusted. Specific adjustment methods include:
[0182] 1. Automatic Prompt Generation Basics
[0183] Based on the user's question or need, the system automatically analyzes the task context, integrating project documentation with legal requirements, and generates the most appropriate prompt. Using natural language understanding technology, the system extracts key information from user input, such as project phase and review questions, ensuring the generated prompt is highly targeted and guiding the large model to accurately understand the user's needs.
[0184] 2. Prompt Engineering and Application
[0185] Prompt engineering, also known as prompt learning, guides models to correctly understand and process input data by providing specifically formatted textual information (prompts). Prompts come in a variety of types, including descriptions, examples, and guiding questions, suitable for different tasks and datasets. Prompts can significantly improve model performance and interpretability in application scenarios such as text classification, question-answering systems, and machine translation.
[0186] 3. Dynamic Prompt Optimization and Customization
[0187] Dynamic Optimization: The system dynamically adjusts the prompt structure based on user feedback and the quality of the model's answers, optimizing language expression, vocabulary selection, and structure to ensure that the prompt can better guide the model to provide high-quality answers.
[0188] Scenario Customization: The system generates customized prompts based on project scenarios and user-specific needs or roles. For example, the project review process focuses on funding sources and approval processes, while the acceptance phase focuses on contract fulfillment and delivery standards.
[0189] 4. Semantic Context
[0190] The system tracks user input context to ensure that generated prompts are consistent with previous conversations or actions. This helps the model maintain its understanding of the context of the question during complex, multi-turn conversations, enabling it to provide accurate compliance analysis or legal advice.
[0191] 5. User problem optimization and conversion
[0192] The system automatically analyzes the complexity and expression of user questions, transforming complex, ambiguous, or incomplete questions into clear ones. This optimization and transformation ensures that the large model can accurately understand user intent and generate high-quality answers when processing complex questions.
[0193] 6. Continuous optimization and feedback mechanism
[0194] The system continuously optimizes its prompt generation strategy through a feedback loop. Every interaction between the user and the model provides new data, helping it improve the quality of future prompts. Based on the feedback from the model's output, the system adjusts the keywords, structure, and context of the prompt to ensure that the answer meets the user's needs.
[0195] 7. Prompt Learning Based on Feedback
[0196] The system automatically learns optimization directions for prompts based on user ratings and corrections to the large model's answers. Through machine learning, the system accumulates a large amount of user feedback data and dynamically adjusts the prompt generation algorithm to improve the large model's question-answering capabilities.
[0197] 8. Combining Prompt with Model Inference Path
[0198] When generating prompts, the system combines the current reasoning path to ensure consistency between the prompt and the larger model's reasoning logic. This combination reduces reasoning bias and improves the reliability and accuracy of answers.
[0199] 9. Improve the relevance and accuracy of model responses
[0200] Through intelligent prompt generation and optimization, the system significantly improves the accuracy and pertinence of the large model's responses in various project scenarios. The system can automatically generate prompts tailored to specific compliance reviews, ensuring the professionalism of the large model's responses to detailed questions.
[0201] In summary, the automated prompt generation mechanism significantly improves the quality and relevance of large models' answers in different project scenarios through comprehensive analysis of user questions, dynamic prompt optimization, customized generation, associating semantic context, optimizing and transforming user questions, continuous feedback and learning, and combining reasoning paths.
[0202] The following is a specific embodiment, which provides a project document risk analysis method, including:
[0203] 1. Obtain project files and identify semantic vectors
[0204] The project files are preprocessed, word segmented and syntactically analyzed, deep semantic parsing is performed using a large language model, and key entities and relationships are mapped into a high-dimensional vector space through semantic embedding technology.
[0205] Preprocessing: Let the project file be F, and get F′ after file format parsing and conversion.
[0206] Word segmentation and syntactic analysis: Use natural language processing technology to process F′ and obtain structured information S.
[0207] Deep semantic parsing: Use a large language model to parse S and identify the key entity set E={e1,e2,⋯,e n} and key entity relationship set R={r1,r2,⋯,r m}.
[0208] Semantic embedding: Use the semantic embedding function fembed to map E and R into a high-dimensional vector space to obtain a semantic vector v: v=fembed(E,R)
[0209] 2. Filtering differential semantic vectors
[0210] Calculate the cosine similarity between the project file semantic vector and the standard semantic vector, and determine whether it is a difference semantic vector based on the similarity threshold.
[0211] Assume that the set of standard semantic vectors in the standard library is {v std 1 ,v std 2 ,⋯,v std k}.
[0212] Calculate the project file semantic vector v and the standard semantic vector v std i The cosine similarity sim i :
[0213] Set the similarity threshold θ, if all sim i <θ, then v is determined to be a difference semantic vector.
[0214] 3. Infer the abnormal semantic vector
[0215] Retrieve the reasoning path based on the project scenario and user needs, break down the user problem into sub-problems, and perform reasoning verification on the sub-problems corresponding to each level.
[0216] Use machine learning or deep learning technology to identify the project scene Sscene and user needs Uneed. In this embodiment, the LSTM model is used for identification:
[0217] Data preprocessing: Perform word segmentation on the input text data, converting the text into a sequence of words. Build a vocabulary, mapping each word to a corresponding integer index. Pad or truncate the input sequence to make it of the same length.
[0218] Model training: Feed the preprocessed data into the LSTM model. Use the cross-entropy loss function to calculate the loss between the predicted result and the true label. Use an optimization algorithm (such as the Adam optimizer) to update the model parameters to minimize the loss function.
[0219] Prediction phase: New input text undergoes the same preprocessing. The preprocessed text is fed into the trained model. The model outputs a predicted class probability distribution, and the class with the highest probability is selected as the final prediction.
[0220] From the predefined inference path set P={p1,p2,⋯,p l} to retrieve the matching target reasoning path p target .
[0221] Identify the hierarchical structure H of the semantic vector v and decompose the user question Q into a set of sub-questions Q sub ={q1,q2,⋯,q s}.
[0222] Use the target reasoning path ptarget to verify the reasoning of each sub-problem and identify abnormal semantic vectors:
[0223] Rule-based reasoning involves matching and inferring input facts according to a predefined set of rules to reach new conclusions. Rules are typically expressed in an "IF - THEN" form, where the conclusion (THEN) is executed when the condition (IF) is met.
[0224] Assume that the rule set R={r1,r2,⋯,r n}, each rule r i Represented as a two-tuple (C i ,A i ), where C i is the conditional part, A i This is the conclusion part.
[0225] The inference function infer is defined as follows:
[0226] def infer(facts, rules): new_facts = set(facts) while True: old_facts= set(new_facts) for rule in rules: condition, action = rule if all(fact innew_facts for fact in condition): new_facts.add(action) if new_facts == old_facts: break return new_facts.
[0227] The processing flow includes:
[0228] Initialization: Take the initial fact set F as known information.
[0229] Rule matching: Traverse the rule set R, and for each rule ri, check whether its condition part Ci is included in the current fact set.
[0230] Conclusion derivation: If the condition part of the rule is met, the conclusion part Ai is added to the fact set.
[0231] Termination condition: When the set of facts no longer changes, the reasoning process ends.
[0232] For example:
[0233] # Define rule set rules = [ ({"The project has legal risks", "Legal risks are not resolved"}, "The project has compliance issues"), ({"The project has compliance issues"}, "Rectification is needed") ] # Define initial fact set facts = {"The project has legal risks", "Legal risks are not resolved"} # Perform reasoning result = infer(facts,rules) print("Inference result:", result).
[0234] 4. Generate risk analysis text and modification suggestion text
[0235] Generate prompts based on the difference semantic vector and abnormal semantic vector, and input them into the dialogue pre-training model to obtain the results.
[0236] Let the difference semantic vector be v diff , the abnormal semantic vector is v anomaly , generate the prompt project Pprompt.
[0237] Input Pprompt into the dialogue pre-training model M dialogue , get the risk analysis text T risk and modify the suggested text Tsuggest :(T risk ,T suggest )=M dialogue (Pprompt).
[0238] 5. Generate risk analysis report
[0239] The difference semantic vector and the abnormal semantic vector are converted into sentences, and written into the report template together with the risk analysis text and the modification suggestion text.
[0240] V diff and v anomaly Convert to statement S diff and S anomaly .
[0241] S diff 、S anomaly 、T risk and T suggest Writing report template T template , get the risk analysis report R report .
[0242] Automatic labeling: using contrastive learning technology contrast For unlabeled project data D unlabeled Perform automatic labeling to obtain labeled data Dlabeled: D labeled =f contrast (D unlabeled ).
[0243] Knowledge distillation: When laws and regulations are updated, extract the updated content C update , through the knowledge distillation technology of teacher-student model f distill Migrate new regulatory information to existing Model M old , get the updated model M new :M new =f distill (M old ,C update ).
[0244] Active learning: Based on the confidence of the large model for the query, through the active learning mechanism f active Select sample data D for further annotation and learning selected :
[0245] D selected =f active (confidence).
[0246] Expand the labeled sample library: extract representative samples D from unlabeled data representative , expand the labeled sample library D labeled :D labeled =D labeled ∪D representative .
[0247] Through the above embodiments, the data processing principle and process of the project file risk analysis method are explained in detail.
[0248] In some embodiments, the project document risk analysis system includes a plurality of functional modules composed of computer program segments. The computer program of each program segment in the project document risk analysis system is stored in the memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Function of project document risk analysis.
[0249] In this embodiment, the project file risk analysis system is divided into multiple functional modules according to the functions it performs, such as Figure 2As shown in FIG. The functional modules of system 200 include: a semantic recognition module 210, a vector comparison module 220, a logical reasoning module 230, a risk analysis module 240, and a report generation module 250. As used herein, a module refers to a series of computer program segments that can be executed by at least one processor and perform fixed functions, and are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0250] A semantic recognition module, configured to obtain a project file and identify a semantic vector of the project file using a large language model;
[0251] A vector comparison module is used to compare the semantic vector with a pre-generated standard semantic vector and filter out a difference semantic vector that is inconsistent with the standard semantic vector;
[0252] The logical reasoning module is used to use the thought chain reasoning model to perform logical reasoning on the semantic vector of the project file based on the user's questions to obtain the abnormal semantic vector;
[0253] A risk analysis module is used to input the difference semantic vector and the abnormal semantic vector into the dialogue pre-training model in sequence to obtain corresponding risk analysis text and modification suggestion text;
[0254] The report generation module is used to convert the difference semantic vector and the abnormal semantic vector into a statement, write the statement and the corresponding risk analysis text and modification suggestion text into a preset report template to obtain a risk analysis report.
[0255] Optionally, as an embodiment of the present invention, the semantic recognition module includes:
[0256] A preprocessing unit, configured to preprocess the project file, including parsing and converting the file format;
[0257] The first processing unit is used to perform word segmentation and syntactic analysis on the pre-processed project file using natural language processing technology to obtain structured information;
[0258] a second processing unit, configured to perform deep semantic parsing on the structured information using a large language model, and identify key entities and relationships between key entities in the structured information;
[0259] The semantic embedding unit is used to map key entities and their relationships into a high-dimensional vector space using semantic embedding technology to obtain semantic vectors.
[0260] Optionally, as an embodiment of the present invention, the vector comparison module includes:
[0261] A standard library construction unit, configured to pre-construct a standard library, wherein the standard library stores standard semantic vectors, which are semantic vectors obtained by mapping legal entities and relationships into a high-dimensional vector space;
[0262] A similarity calculation unit, configured to calculate the cosine similarity between the semantic vector and a standard semantic vector in a standard library;
[0263] A judgment module, configured to judge whether there is a standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches a set similarity threshold;
[0264] a first determination unit, configured to determine that the semantic vector is normal if there is a standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches a set similarity threshold;
[0265] The second determining unit is configured to determine that the semantic vector is a difference semantic vector if there is no standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches a set similarity threshold.
[0266] Optionally, as an embodiment of the present invention, a thought chain reasoning model is used to perform logical reasoning on the semantic vector of the project file based on the user question to obtain an abnormal semantic vector, including:
[0267] Use machine learning or deep learning technology to identify project scenarios and user needs;
[0268] Retrieving a matching target reasoning path from predefined reasoning paths based on the project scenario and user requirements;
[0269] Identify the hierarchical structure of the semantic vectors of the project file, and decompose the user question into multiple sub-questions based on the hierarchical structure;
[0270] The target reasoning path is used to perform reasoning verification on the sub-problems corresponding to each level and identify abnormal semantic vectors.
[0271] Optionally, as an embodiment of the present invention, the method further includes:
[0272] Use contrastive learning technology to automatically label unlabeled project data;
[0273] After confirming that laws and regulations have been updated, the updated content is automatically extracted and, through knowledge distillation technology based on the Teacher-Student Model, the new regulatory information is compressed and migrated into the existing model, seamlessly integrating it into the existing system while maintaining the model's reasoning ability and stability.
[0274] Through the active learning mechanism, based on the confidence level of the large model in the query, sample data for further annotation and learning is automatically selected to improve the learning efficiency of the model;
[0275] Expand the labeled sample library, extract representative samples from unlabeled data, improve the accuracy of comparative learning, and enhance understanding of complex regulations by analyzing the applicability of different regulations and policies.
[0276] Optionally, as an embodiment of the present invention, the difference semantic vector and the abnormal semantic vector are sequentially input into the dialogue pre-training model to obtain corresponding risk analysis text and modification suggestion text, including:
[0277] Generate prompt engineering based on difference semantic vectors and abnormal semantic vectors;
[0278] The prompt project is input into the dialogue pre-training model to obtain corresponding risk analysis text and modification suggestion text.
[0279] Optionally, as an embodiment of the present invention, the method further includes:
[0280] The vocabulary selection, structure and language expression of the prompt project are adjusted based on the answer instructions fed back by the user.
[0281] Although the present invention has been described in detail with reference to the accompanying drawings and in conjunction with preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, persons of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and such modifications or substitutions shall be within the scope of the present invention. Any changes or substitutions that can be easily conceived by persons skilled in the art within the technical scope disclosed in the present invention shall be within the scope of protection of the present invention.
Claims
1. A project document risk analysis method, characterized in that: include: Obtaining a project file and identifying a semantic vector of the project file using a large language model; Comparing the semantic vector with a pre-generated standard semantic vector to screen out a difference semantic vector that is inconsistent with the standard semantic vector; Use the thought chain reasoning model to perform logical reasoning on the semantic vector of the project file based on user questions to obtain the abnormal semantic vector; Inputting the difference semantic vector and the abnormal semantic vector into the dialogue pre-training model in sequence to obtain corresponding risk analysis text and modification suggestion text; Converting the difference semantic vector and the abnormal semantic vector into a statement, and writing the statement, the corresponding risk analysis text and the modification suggestion text into a preset report template to obtain a risk analysis report; The thought chain reasoning model is used to perform logical reasoning on the semantic vectors of project files based on user questions to obtain abnormal semantic vectors, including: Use machine learning or deep learning technology to identify project scenarios and user needs; Retrieving a matching target reasoning path from predefined reasoning paths based on the project scenario and user requirements; Identify the hierarchical structure of the semantic vectors of the project file, and decompose the user question into multiple sub-questions based on the hierarchical structure; Using the target reasoning path, reasoning and verifying the sub-problems corresponding to each level are performed to identify abnormal semantic vectors; The difference semantic vector and the abnormal semantic vector are sequentially input into the dialogue pre-training model to obtain corresponding risk analysis text and modification suggestion text, including: Generate prompt engineering based on difference semantic vectors and abnormal semantic vectors; The prompt project is input into the dialogue pre-training model to obtain corresponding risk analysis text and modification suggestion text.
2. The method according to claim 1, characterized in that Obtaining a project file and identifying a semantic vector of the project file using a large language model, including: Preprocessing the project files, including parsing and converting the file formats; Use natural language processing technology to perform word segmentation and syntactic analysis on the pre-processed project files to obtain structured information; Performing deep semantic analysis on the structured information using a large language model to identify key entities and relationships between key entities in the structured information; Semantic embedding technology is used to map key entities and their relationships into high-dimensional vector space to obtain semantic vectors.
3. The method according to claim 2, characterized in that Comparing the semantic vector with a pre-generated standard semantic vector to screen out difference semantic vectors that are inconsistent with the standard semantic vector, including: Pre-building a standard library, wherein the standard library stores standard semantic vectors, wherein the standard semantic vectors are semantic vectors obtained by mapping legal entities and relationships into a high-dimensional vector space; Calculating the cosine similarity between the semantic vector and the standard semantic vector in the standard library; Determine whether there is a standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches a set similarity threshold: If yes, the semantic vector is determined to be normal; If not, it is determined that the semantic vector is a difference semantic vector.
4. The method according to claim 1, wherein The method further comprises: Use contrastive learning technology to automatically label unlabeled project data; After confirming that laws and regulations have been updated, the updated content is extracted and, through knowledge distillation technology based on the teacher-student model, the new regulatory information is compressed and migrated to the existing model, allowing it to seamlessly integrate into the existing system while maintaining the model's reasoning ability and stability; Through the active learning mechanism, based on the confidence level of the large model in the query, sample data for further annotation and learning is automatically selected to improve the learning efficiency of the model; Expand the labeled sample library, extract representative samples from unlabeled data, improve the accuracy of comparative learning, and enhance understanding of complex regulations by analyzing the applicability of different regulations and policies.
5. The method according to claim 1, wherein The method further comprises: The vocabulary selection, structure and language expression of the prompt project are adjusted based on the answer instructions fed back by the user.
6. A project document risk analysis system, characterized in that: include: A semantic recognition module, configured to obtain a project file and identify a semantic vector of the project file using a large language model; A vector comparison module is used to compare the semantic vector with a pre-generated standard semantic vector and filter out a difference semantic vector that is inconsistent with the standard semantic vector; The logical reasoning module is used to use the thought chain reasoning model to perform logical reasoning on the semantic vector of the project file based on the user's questions to obtain the abnormal semantic vector; A risk analysis module is used to input the difference semantic vector and the abnormal semantic vector into the dialogue pre-training model in sequence to obtain corresponding risk analysis text and modification suggestion text; A report generation module, configured to convert the difference semantic vector and the abnormal semantic vector into a statement, and write the statement, the corresponding risk analysis text and the modification suggestion text into a pre-set report template to obtain a risk analysis report; The thought chain reasoning model is used to perform logical reasoning on the semantic vectors of project files based on user questions to obtain abnormal semantic vectors, including: Use machine learning or deep learning technology to identify project scenarios and user needs; Retrieving a matching target reasoning path from predefined reasoning paths based on the project scenario and user requirements; Identify the hierarchical structure of the semantic vectors of the project file, and decompose the user question into multiple sub-questions based on the hierarchical structure; Using the target reasoning path, reasoning and verifying the sub-problems corresponding to each level are performed to identify abnormal semantic vectors; The difference semantic vector and the abnormal semantic vector are sequentially input into the dialogue pre-training model to obtain corresponding risk analysis text and modification suggestion text, including: Generate prompt engineering based on difference semantic vectors and abnormal semantic vectors; The prompt project is input into the dialogue pre-training model to obtain corresponding risk analysis text and modification suggestion text.
7. The system according to claim 6, characterized in that The semantic recognition module includes: A preprocessing unit, configured to preprocess the project file, including parsing and converting the file format; The first processing unit is used to perform word segmentation and syntactic analysis on the pre-processed project file using natural language processing technology to obtain structured information; a second processing unit, configured to perform deep semantic parsing on the structured information using a large language model, and identify key entities and relationships between key entities in the structured information; The semantic embedding unit is used to map key entities and their relationships into a high-dimensional vector space using semantic embedding technology to obtain semantic vectors.
8. The system according to claim 7, characterized in that The vector comparison module includes: A standard library construction unit, configured to pre-construct a standard library, wherein the standard library stores standard semantic vectors, which are semantic vectors obtained by mapping legal entities and relationships into a high-dimensional vector space; A similarity calculation unit, configured to calculate the cosine similarity between the semantic vector and a standard semantic vector in a standard library; A judgment module, configured to judge whether there is a standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches a set similarity threshold; a first determination unit, configured to determine that the semantic vector is normal if there is a standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches a set similarity threshold; The second determining unit is configured to determine that the semantic vector is a difference semantic vector if there is no standard semantic vector in the standard library whose cosine similarity with the semantic vector reaches a set similarity threshold.
Citation Information
Patent Citations
Intelligent analysis method for junior middle school English reading understanding test questions based on large model
CN119514553A