Adaptive intelligent contract auditing method and device based on large language model

By assembling the audit module of the general module and using CoT prompt word technology and function_calling, the semantic audit difficulties in contract audit and the unreliable LLM audit results are solved, and a flexible and reliable intelligent contract audit method is realized.

CN119850316APending Publication Date: 2025-04-18SHANGHAI YISAIQI SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411784338.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art is difficult to deal with semantic audits in contract audits. The audit results of direct use of large language models (LLMs) may be unreliable, and prompt words need to be frequently modified to accommodate different contract types.

Method used

By assembling the audit module of the general module, adapting to different task requirements and contract types, CoT prompt word technology and function_calling are used to improve the accuracy and reliability of LLM audit results.

Benefits of technology

A flexible, reliable, reusable and scalable smart contract audit method is realized, which can efficiently handle semantic audits, reduce dependence on prompt words, and improve the accuracy of audit results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850316A_ABST
    Figure CN119850316A_ABST
Patent Text Reader

Abstract

The invention discloses an adaptive intelligent contract auditing method and device based on a large language model, and the method comprises the steps: extracting contract content from a contract file, and enabling the contract content to be the contract text information read from the contract file; obtaining all audit data items through RPA; wherein the auditing data item is selected from at least one of a first party name, a second party name, an invoice type, a payment amount and a payment date; sending the contract content and the auditing data items to corresponding auditing modules for auditing to obtain auditing results of the auditing data items; the auditing module comprises at least one of a first party auditing module, a second party auditing module, an invoice type auditing module, a payment amount auditing module and a payment date auditing module; and generating a final contract auditing result according to the auditing results of all the auditing data items.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to an adaptive intelligent contract review method and device based on a large language model, belonging to the field of data processing technology. Background Art

[0002] The Large Language Model (LLM) is a general-purpose natural language processing (NLP) model that can perform well in a wide range of tasks, rather than being trained specifically for a specific type of NLP task like traditional NLP models. LLM can achieve the effect of a specially trained traditional NLP model by simply using prompt words to focus on a specific type of task, and even achieve better results and greater flexibility. The emergence of LLM has undoubtedly lowered the threshold and difficulty of NLP applications. At present, using an LLM can basically cover all traditional NLP application scenarios, including: translation, sentiment analysis, information extraction, text error correction, text classification, text summarization and other tasks.

[0003] However, for contract review scenarios, the traditional NLP solution is to extract information from the contract and then match it with the data. This solution can solve most literal reviews, such as the exact amount or date, but cannot handle semantic reviews, such as payment deadline requirements. LLM can easily and quickly implement semantic reviews, but even when using LLM for review, there are usually several problems: 1. The review results of LLM directly may be unreliable; 2. Prompt words are usually used to prompt LLM how to review. When the review standards or review items change, the prompt words need to be modified, or a large number of prompt words need to be prepared to cover various types of contracts. Summary of the invention

[0004] Purpose: In view of at least one of the above technical problems, the present application provides an adaptive intelligent contract audit method and device based on a large language model, which is adapted to audit tasks with different task requirements and different contract types by assembling audit modules using general modules.

[0005] Technical solution: To solve the above technical problems, the technical solution adopted in this application is:

[0006] In a first aspect, the present application provides an adaptive smart contract audit method based on a large language model, the method comprising:

[0007] Extracting contract content from the contract document, wherein the contract content is represented by contract text information read from the contract document;

[0008] Acquire all audit data items through RPA, wherein the audit data item is selected from at least one of the following: Party A's name, Party B's name, invoice type, payment amount, and payment date;

[0009] Send the contract content and the audit data items to the corresponding audit module for audit, and obtain the audit results of each audit data item; the audit module includes at least one of a Party A audit module, a Party B audit module, an invoice type audit module, a payment amount audit module, and a payment date audit module;

[0010] Generate the final contract audit results based on the audit results of all audit data items.

[0011] In a second aspect, the present application provides an adaptive smart contract auditing device based on a large language model, the device comprising:

[0012] A contract content extraction module is used to: extract the contract content from the contract document, wherein the contract content is represented by the contract text information read from the contract document;

[0013] An audit data item acquisition module, used to: acquire all audit data items through RPA; wherein the audit data item is selected from at least one of the following: Party A name, Party B name, invoice type, payment amount, and payment date;

[0014] An item-by-item review module is used to send the contract content and review data items to corresponding review modules for review, and obtain the review results of each review data item; the review module includes at least one of a Party A review module, a Party B review module, an invoice type review module, a payment amount review module, and a payment date review module;

[0015] The result generation module is used to generate the final contract audit result based on the audit results of all audit data items.

[0016] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect.

[0017] In a fourth aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.

[0018] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0019] Beneficial effects: The adaptive smart contract audit method and device based on the large language model provided by this application have the following advantages: 1. This application allows business personnel to define audit items and their audit standards by themselves to form multiple independent audit modules through general modules and assembly modules, and then flexibly construct audit tasks adapted to different task requirements and different contract types. 2. Improve the accuracy and reliability of LLM audit results through COT, function_calling and other technologies. 3. A general, easy-to-use, flexible, reliable, reusable and extensible smart contract audit method is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of an application scenario of a method according to an embodiment of the present application;

[0021] Figure 2 A flowchart of an adaptive smart contract review method based on a large language model according to an embodiment of the present application;

[0022] Figure 3 A schematic diagram of an adaptive smart contract review device based on a large language model according to an embodiment of the present application;

[0023] Figure 4 A schematic diagram of an electronic device provided according to an embodiment of the present application;

[0024] Figure 5 This is a schematic diagram of an example of contract payment requirements in the embodiment;

[0025] Figure 6 This is a schematic diagram of an example of invoice payment in the embodiment;

[0026] Figure 7 This is a schematic diagram of an example of setting an audit module in an embodiment;

[0027] Figure 8 This is a schematic diagram of an example of assembling an audit module in an embodiment. DETAILED DESCRIPTION

[0028] The present application is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and cannot be used to limit the protection scope of the present application.

[0029] For contract review scenarios, the traditional NLP solution is to extract information from the contract and then match it with the data. This solution can solve most literal reviews, such as the exact amount or date, but cannot handle semantic reviews, such as payment deadline requirements. LLM can easily and quickly implement semantic reviews, but even with LLM reviews, there are usually several problems: 1. The audit results of LLM directly may be unreliable; 2. Prompt words are usually used to prompt LLM how to review. When the review standards or review items change, the prompt words need to be modified, or a large number of prompt words need to be prepared to cover various types of contracts.

[0030] Based on this, this application proposes an adaptive smart contract audit method based on a large language model; it is a smart contract audit method that can flexibly adapt to various types of contracts. More specifically, this method independently encapsulates each audit item into multiple audit modules, and achieves an audit method that can adapt to various types of contracts through the assembly of audit modules; this solution uses CoT prompt word technology and function_calling to improve the reliability of LLM audits, uses prompt word templates to generalize prompt words, and uses the idea of ​​splitting and assembling to flexibly adapt to the audit of various types of contracts.

[0031] This solution takes smart contract review as an example, but the idea of ​​splitting LLM tasks into multiple modules for flexible assembly can be widely applied to various LLM application scenarios, especially scenarios where tasks are changeable and need to be frequently modified or multiple sets of prompt words need to be prepared. In addition, tasks can be split into multiple independent small modules, so that one prompt word specifically solves the problem of one module, and multiple types of tasks can be handled through module assembly.

[0032] In this application, the professional terms are explained as follows:

[0033] Large Language Model (LLM): A deep learning model that uses a large amount of text data for training, has billions of parameters, and can understand and process natural language. It is a general-purpose natural language processing (NLP) model.

[0034] Prompt words: text content used to prompt LLM to give targeted answers, usually including system prompts, which are used to prompt LLM to generate answers in the current context window in what role, scenario, and format. User prompts generally refer to the conversation content entered by the user, which are used to prompt LLM to complete tasks, including but not limited to daily conversations, answering questions, translation, writing, and coding.

[0035] Context: LLM itself does not record the content of the conversation. The context is used to record all the current conversation content, including: prompt words, and the answer content generated by LLM. LLM infers and generates content based on the current context content. Of course, the context window size is limited. Currently, taking gpt-4o as an example, the context window size can reach 128k tokens.

[0036] Tool: This is implemented through the function_calling function of LLM. By providing the tool name and tool description, LLM calls the tool by replying with formatted JSON, executes the tool in the external operating environment, and returns the operating results to LLM. Agents can perceive external information or take actions through tools.

[0037] Chain of Thought (CoT) is a prompt word technology that guides LLM to think, which can effectively improve LLM's reasoning ability. The principle is that because LLM is generated token by token, the previously generated content also serves as a prompt for subsequent generation.

[0038] Robotic process automation (RPA) is a program that simulates the manual operations of users on the computer desktop through RPA process code to achieve process automation.

[0039] Before describing the embodiments of the present application in detail, a specific scenario example is used to reveal the scenario in which the technical solution of the present application can be used. In a possible scenario example, specifically, Figure 1 As shown, the user performs specific operations on the client 110, on which a data collection device and a large language model (LLM) are deployed. The data collection device is used to collect contract documents on the client 110, and the collected contract documents are transmitted to the server through the network. The server extracts the contract content from the contract document through a preset program; obtains all audit data items through RPA; sends the contract content and audit data items to the corresponding audit module for audit, and obtains the audit results of each audit data item; generates the final contract audit result based on the audit results of all audit data items.

[0040] The large language model (LLM) can run on the client terminal side or the server side. The method of the present application can be configured in the large language model (LLM) on the client terminal / or server side, and the client terminal and the server are connected through network transmission to realize multi-terminal interaction.

[0041] The server may be an electronic device with certain computing and processing capabilities. For example, the server may be a server of a distributed system, or a system with multiple processors, memories, network communication modules, etc. operating in collaboration. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The server may also be a server cluster formed by several servers. Alternatively, with the development of science and technology, the server may also be a new technical means capable of realizing the corresponding functions of the embodiments of the specification. For example, it may be a new form of "server" based on quantum computing.

[0042] The client terminal may be an electronic device with network access capability. Specifically, for example, the terminal may be a desktop computer, a tablet computer, a laptop computer, a smart phone, etc. Alternatively, the terminal may also be software that can run in the electronic device.

[0043] The network may be any type of network that can support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. The one or more networks may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0044] Contract review is usually a manual review of whether the data items are consistent with the contract content. Take the review of invoices and contracts as an example: whether the payer and payee of the invoice are consistent with Party A and Party B of the contract, whether the payment amount of the invoice is consistent with the amount in the contract, and whether the payment date is within the required date. Through manual review, it may take 5-10 minutes to complete a review process, and there are often audit errors due to too much content in the contract. A more detailed review may take more time.

[0045] The goal of this smart contract audit is to use LLM to replace manual audits more efficiently and accurately. After several solutions evolved, this application solution was finally proposed.

[0046] Solution 1: Accurate extraction + accurate matching

[0047] At the beginning of the solution design, the audit solution of precise extraction + precise matching was first proposed.

[0048] The implementation idea of ​​solution 1 is:

[0049] First, use RPA to obtain information about all audit items. Of course, you can obtain information about audit items in any form, such as API, SQL, etc. I will not go into details here. As long as you can automatically obtain information about audit items, it will be fine. Here, we mainly use RPA to obtain information.

[0050] Secondly, LLM can accurately extract the information of pre-defined audit items from the contract, for example, directly extract Party A, amount, etc.

[0051] Finally, the information of all audit items is accurately matched to obtain the audit results.

[0052] This idea is actually similar to the way of using traditional NLP, the difference is that the traditional NLP model is replaced by LLM. The disadvantage of solution 1: the information in the contract is usually a paragraph with semantic information, while the information extracted by precise extraction is usually a word or a string of numbers. Precise extraction and precise matching cannot audit the audit items at the semantic level, and the semantic information in the contract is lost, resulting in extremely inaccurate audit results.

[0053] For example, there are two identical amounts in a contract. The withdrawal amount of 895,000 can represent both the contract amount and the remaining amount. An exact match here can pass the audit. The audit result is unreliable. If the amounts are different, the withdrawal result will directly affect the audit result. In fact, the "associated payment plan" information should be included during the audit so that the audited amount can be correctly matched.

[0054] To accurately extract the information of the audit items from the contract, it is usually necessary to accurately describe the definition of the audit items in the prompt words. The problems are: 1. The definition of the audit items in different contracts may be different, and the prompt words need to cover all possible definitions. Even if you enumerate as much as possible, you cannot cover all situations; 2. It is difficult to describe. Even if the description is accurate, you will have to modify the prompt words again next time you change a scenario.

[0055] For example, if there are three amounts in a contract, and the description is just "amount", the large language model cannot determine which amount it is, and may extract it as the total amount. If the description is too accurate, you will need to modify the prompt word next time you want to extract other amounts.

[0056] Solution 2: Relevant paragraph extraction + semantic review

[0057] Solution 1 only uses the capabilities of the large language model when extracting contract information. However, as can be seen from the above problems, it is best to use the capabilities of the large language model for both contract information extraction and review.

[0058] Subsequently, in order to solve the above problems, an audit scheme of relevant paragraph extraction + semantic audit was proposed.

[0059] The implementation idea of ​​solution 2 is:

[0060] First, use RPA to capture information about all audit items. (Different from Solution 1, semantically related items, such as "associated payment plan," will also be captured.)

[0061] Secondly, all relevant paragraphs of the audit items are extracted from the contract through LLM;

[0062] Finally, LLM will review the information and relevant paragraphs of the audit items and give the audit results.

[0063] Advantages of Solution 2: The audit item information captured by RPA contains semantically related items, and the contract information extracted by the large language model is the relevant paragraphs of the audit items, so a large amount of semantics is retained to ensure that the audit items can be correctly matched. Extracting relevant paragraphs first and then auditing removes irrelevant contract content, reducing the noise of large language model reasoning, which helps to improve the accuracy and reliability of LLM audit results.

[0064] Shortcomings of Solution 2: Similarly, when the task changes, the prompt words still need to be modified. Modifying the prompt words is not friendly to either developers or business personnel. Frequent modification and addition of prompt words increases the workload of developers, and it is impossible to cover all situations. It is unlikely that business personnel can modify the prompt words themselves; for audit items that need to be calculated, the results are still unreliable.

[0065] Example 1: Figure 2 As shown, this embodiment provides an adaptive smart contract audit method based on a large language model, which can be applied to a large language model (LLM), and the large language model (LLM) can run in a client terminal. The adaptive smart contract audit method based on a large language model includes:

[0066] Step S1, extracting the contract content from the contract document, wherein the contract content is represented by the contract text information read from the contract document;

[0067] Step S2: Obtain all audit data items through RPA; wherein the audit data item is selected from at least one of the following: Party A's name, Party B's name, invoice type, payment amount, and payment date;

[0068] Step S3: Send the contract content and the audit data items to the corresponding audit module for audit, and obtain the audit results of each audit data item; the audit module includes at least one of a Party A audit module, a Party B audit module, an invoice type audit module, a payment amount audit module, and a payment date audit module;

[0069] Step S4: Generate the final contract audit result based on the audit results of all audit data items.

[0070] In some embodiments, the working method of each audit module includes:

[0071] Obtain the contract content and the audit data items corresponding to the audit module;

[0072] Extract the relevant paragraphs of the audit data item from the contract content through LLM;

[0073] Audit the audit data items and related paragraphs through LLM, and output the audit results of the audit data items.

[0074] It should be further explained that the method for obtaining the audit module adapted to the audit tasks of different contract types includes: step S31, encapsulating the general module interface.

[0075] Each audit module is implemented using a common module interface. The input of the common module interface is the contract content, audit data items, and predefined audit item definitions and audit standards; the output is the audit result of the audit data item.

[0076] The general module interface is implemented by general prompt words, which include general prompt word template, thought chain COT and function call function_calling;

[0077] The prompt word template allows users to define the relevant paragraphs to be extracted from the contract content; the thinking chain COT guides the large language model LLM to think; and the function call function_calling provides computing power for the audit.

[0078] In some embodiments, the prompt word template includes a System prompt word, which is used to prompt the audit module to check whether the acquired audit data items comply with the contract content according to the predefined audit item definition and audit standards.

[0079] The following is an example of a generic prompt template design:

[0080] System prompt words:

[0081] Your task is to check whether the information to be verified complies with the contract content based on the user's questions and the information to be verified.

[0082] 1. First, you should always find all relevant content from the contract according to the user's question. Please try to find relevant content. If it is not in the contract, please indicate "not found" in "Related content";

[0083] 2. Secondly, check and explain whether the information to be checked complies with the requirements of the relevant content in the contract;

[0084] 3. Then, answer the user's questions in "Answer";

[0085] 4. Finally, draw the inspection conclusion: it must be "compliant" or "non-compliant".

[0086] Please think about it step by step. No extra explanation is needed. Please return it in the following json format:

[0087] ```json

[0088] {

[0089] "Related content":"",

[0090] "Inspection description":"",

[0091] "answer":"",

[0092] "in conclusion":""

[0093] }

[0094] ```

[0095] First, explain the task, then list the COT steps, and finally provide structured output.

[0096] The first step is equivalent to extracting relevant paragraphs in solution 2;

[0097] The second step is to guide the large language model to think;

[0098] The third step is mainly used to verify whether the content extracted by the large language model is correct, so that business personnel can have a reference for the model review results, which can avoid the model review process being a black box.

[0099] Finally, the large language model obtains the final review result based on the output of the first three steps.

[0100] Prompt word template:

[0101] Contract Contents:

[0102] {pdf_content}

[0103] User Question:

[0104] {user_query}

[0105] Information to be verified:

[0106] {info}

[0107] Start task: ```json```

[0108] The contract content refers to the contract text information read from the contract document;

[0109] User questions allow business personnel to define the definition and standards of the audit items of this module;

[0110] The information to be verified is the audit data item obtained;

[0111] Function calls provide accurate calculation capabilities for audits, because the calculation results obtained by LLM through reasoning are often unreliable, which will affect the accuracy and reliability of the audit results. Specific function calls are provided based on common calculation situations in contract audits, such as date calculation, amount calculation, etc. The following is an example of a function call for date calculation:

[0112]

[0113]

[0114] In particular, semantic date calculation is a difficult point for LLM. Figure 5 For example, the contract requires "Party A shall pay the contract amount to Party B within 15 working days after the contract is signed and Party B receives the special value-added tax invoice of the corresponding amount provided by Party B, totaling: RMB 895,000.00." Then compare_date_1 needs to be used to calculate the deadline of 15 working days after the invoice is received, and then compare whether the payment date is before the deadline.

[0115] If the contract requires "Party A shall pay the remaining contract amount of RMB 895,000.00 before April 1, 2025 upon receipt of the special value-added tax invoice of the corresponding amount provided by Party B.", and the contract requires a clear deadline, then use compare_date_2 to directly compare whether the payment date is before the deadline.

[0116] Function_calling can greatly improve the computing power of LLM and indirectly improve the accuracy and reliability of audit results.

[0117] Step S32: Business personnel define audit modules according to audit items.

[0118] As mentioned above, after the general module interface is implemented, you only need to set the module input: contract content, audit item definition and standards, and audit data items. Then the module is a module specifically used to process a certain audit item and can be reused in different types of contracts.

[0119] like Figure 7As shown in the figure, a module for reviewing "Party A" and a module for reviewing "Party B" are set up. Then, for the contracts that need to review Party A and Party B, these two modules can be reused when assembling tasks.

[0120] Step S33: Business personnel flexibly assemble modules according to contract types to form review tasks suitable for different contract types.

[0121] According to the audit task requirements and contract types, the defined modules are assembled into audit tasks that are suitable for different task requirements and different contract types.

[0122] like Figure 8 , add a new audit item "Invoice Type", then you only need to add a "Invoice Type" module, and you can assemble the tasks and add an audit task without destroying the original audit task. Figure 8 In addition to the sample audit tasks, you can also quickly assemble an audit task that only audits "Party A" and "Invoice Type".

[0123] In this way, no matter how the task requirements and contract types change, a new audit task adaptation can be assembled flexibly and quickly.

[0124] In summary, the above-mentioned implementation method provides an adaptive smart contract audit method based on a large language model, first extracts the contract content from the contract file; obtains all audit data items through RPA; then sends the contract content and audit data items to the corresponding (pre-defined and assembled according to task requirements and contract types) audit module for audit, and obtains the audit results of each audit data item; the audit module includes at least one of the Party A audit module, the Party B audit module, the invoice type audit module, the payment amount audit module, and the payment date audit module; and then generates the final contract audit result based on the audit results of all audit data items. The above method has the following advantages: 1. This application allows business personnel to define audit items and their audit standards to form multiple independent audit modules by themselves through general modules and assembly modules, and then flexibly construct audit tasks adapted to different task requirements and different contract types. 2. Improve the accuracy and reliability of LLM audit results through COT, function_calling and other technologies. 3. A general, easy-to-use, flexible, reliable, reusable and extensible smart contract audit method is realized.

[0125] Example 2: Based on Example 1, Figure 3 As shown, the present application provides an adaptive smart contract auditing device based on a large language model, the device comprising:

[0126] A contract content extraction module is used to: extract the contract content from the contract document, wherein the contract content is represented by the contract text information read from the contract document;

[0127] An audit data item acquisition module, used to: acquire all audit data items through RPA; wherein the audit data item is selected from at least one of the following: Party A name, Party B name, invoice type, payment amount, and payment date;

[0128] An item-by-item review module is used to send the contract content and review data items to corresponding review modules for review, and obtain the review results of each review data item; the review module includes at least one of a Party A review module, a Party B review module, an invoice type review module, a payment amount review module, and a payment date review module;

[0129] The result generation module is used to generate the final contract audit result based on the audit results of all audit data items.

[0130] Embodiment 3: Based on Embodiment 1, this embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in Embodiment 1 are implemented.

[0131] Embodiment 4: Based on embodiment 1, as Figure 4 As shown, this embodiment provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in Embodiment 1 when executing the computer program.

[0132] Embodiment 5: Based on Embodiment 1, this embodiment proposes a hardware system that applies an adaptive smart contract audit method based on a large language model in Embodiment 1. The method is applied on the server side.

[0133] The terminal may be an electronic device with network access capability, for example, a desktop computer, a tablet computer, a laptop computer, a smart phone, a digital assistant, a shopping guide terminal, a television, etc.

[0134] The server can be an electronic device with certain computing and processing capabilities. For example, the server can be a server of a distributed system, or a system with multiple processors, memories, network communication modules, etc. operating in collaboration. The server can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The server can also be a server cluster formed by several servers. Alternatively, with the development of science and technology, the server can also be a new technical means that can realize the corresponding functions of the implementation method of the specification. For example, it can be a new form of "server" based on quantum computing.

[0135] Example 6: Based on Example 1, this example also provides a computer program product comprising instructions, which, when executed by a computer, enables the computer to execute an adaptive smart contract review method based on a large language model in Example 1.

[0136] It should be understood that the specific examples in this article are only intended to help those skilled in the art better understand the implementation methods of this specification, rather than limiting the scope of this application.

[0137] It can be understood that in the various implementations of this specification, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of this specification.

[0138] It can be understood that the various embodiments described in this specification can be implemented individually or in combination, and the embodiments of this specification are not limited to this.

[0139] Unless otherwise specified, all technical and scientific terms used in the embodiments of this specification have the same meaning as those generally understood by those skilled in the art of the technical field of this specification. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the scope of this specification. The term "and / or" used in this specification includes any and all combinations of one or more related listed items. The singular forms of "a", "above", and "the" used in the embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0140] It can be understood that the processor of the embodiment of this specification can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiment of this specification can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of this specification can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0141] It is understood that the memory in the embodiments of this specification may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasablePROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0142] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.

[0143] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.

[0144] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0145] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0146] In addition, each functional unit in each embodiment of the present specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0147] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0148] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. An adaptive smart contract audit method based on a large language model, characterized in that: The method comprises: Extracting contract content from the contract document, wherein the contract content is represented by contract text information read from the contract document; Acquire all audit data items through RPA, wherein the audit data item is selected from at least one of the following: Party A's name, Party B's name, invoice type, payment amount, and payment date; Send the contract content and the audit data items to the corresponding audit module for audit, and obtain the audit results of each audit data item; the audit module includes at least one of a Party A audit module, a Party B audit module, an invoice type audit module, a payment amount audit module, and a payment date audit module; Generate the final contract audit results based on the audit results of all audit data items.

2. The adaptive smart contract audit method based on a large language model according to claim 1 is characterized in that: The working methods of each audit module include: Obtain the contract content and the audit data items corresponding to the audit module; Extract the relevant paragraphs of the audit data item from the contract content through LLM; Audit the audit data items and related paragraphs through LLM, and output the audit results of the audit data items.

3. The adaptive smart contract audit method based on a large language model according to claim 1 or 2 is characterized in that: Each audit module is implemented using a common module interface. The input of the common module interface is the contract content, audit data items, and predefined audit item definitions and audit standards; the output is the audit result of the audit data item.

4. The adaptive smart contract audit method based on a large language model according to claim 3 is characterized in that: The general module interface is implemented by general prompt words, which include general prompt word template, thought chain COT and function call function_calling; The prompt word template allows users to define the relevant paragraphs to be extracted from the contract content; the thinking chain COT guides the large language model LLM to think; and the function call function_calling provides computing power for the audit.

5. The adaptive smart contract audit method based on a large language model according to claim 4 is characterized in that: The prompt word template includes the System prompt word, which is used to prompt the audit module to check whether the acquired audit data items comply with the contract content according to the predefined audit item definition and audit standards.

6. The adaptive smart contract audit method based on a large language model according to claim 5 is characterized in that: The System prompt words include: First, explain the task, then list the COT steps, and finally make a structured output; The first step is "relevant content". First, find all relevant content from the contract content according to the user's question; The second step, "check instructions", guides the large language model to think; The third step, "Answer", is mainly used to verify whether the content extracted by the large language model is correct; Finally, in the "conclusion", the large language model LLM draws the final audit result based on the output of the first three steps.

7. The adaptive smart contract audit method based on a large language model according to claim 1 is characterized in that: The audit module can assemble the defined audit modules according to the audit task requirements and contract types, and assemble them into audit tasks that are suitable for different task requirements and different contract types.

8. An adaptive smart contract auditing device based on a large language model, characterized in that: The device comprises: A contract content extraction module is used to: extract the contract content from the contract document, wherein the contract content is represented by the contract text information read from the contract document; An audit data item acquisition module, used to: acquire all audit data items through RPA; wherein the audit data item is selected from at least one of the following: Party A name, Party B name, invoice type, payment amount, and payment date; An item-by-item review module is used to send the contract content and review data items to corresponding review modules for review, and obtain the review results of each review data item; the review module includes at least one of a Party A review module, a Party B review module, an invoice type review module, a payment amount review module, and a payment date review module; The result generation module is used to generate the final contract audit result based on the audit results of all audit data items.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.