A financial and legal fusion hierarchical intelligent agent system based on a large language model and a review method
By using a hierarchical intelligent agent system that integrates finance and law based on a large language model, the system solves the problems of difficult cross-domain knowledge integration, high experience barriers in fraud detection, and low efficiency of legal retrieval under the traditional manual review model. It achieves deep integration of financial and legal knowledge and cross-conversation memory, thereby improving the reliability and efficiency of corporate compliance review.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HARBIN INST OF TECH
- Filing Date
- 2026-05-15
- Publication Date
- 2026-06-19
AI Technical Summary
Under the traditional manual review model, corporate legal and financial compliance work faces challenges such as difficulty in cross-domain knowledge integration, high experience barriers in fraud detection, low efficiency in legal retrieval, reliability issues in the application of large language models, and lack of context management in multi-turn dialogues. There is also a lack of an integrated intelligent agent system that deeply integrates financial and legal knowledge.
A hierarchical intelligent agent system integrating finance and law based on a large language model is adopted, including an intent recognition layer, a task planning layer, a tool execution layer, and a memory and retrieval layer. Combined with a hybrid retrieval enhancement generation system, it achieves deep integration of financial and legal knowledge and cross-session memory. Task execution is driven by pre-set templates and topological sorting, and legal retrieval is expanded by utilizing knowledge graphs.
It improves task reliability and collaboration efficiency, reduces cross-domain compliance review costs, achieves unified processing of financial accounting standards, securities regulatory rules and laws and regulations, supports cross-session knowledge accumulation and reuse, and meets the interpretability and accuracy requirements of enterprise compliance reviews.
Smart Images

Figure CN122240793A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and corporate compliance review technology, and is a financial and legal integrated hierarchical intelligent agency system and review method based on a large language model. Background Technology
[0002] With increasingly stringent regulations in China's capital market and the deepening revisions to corporate accounting standards, the complexity of corporate legal and financial compliance work has significantly increased. Tasks such as annual report audit compliance for listed companies, contract legal review, and disclosure of related-party transactions all require expertise in both financial accounting and legal regulations. Traditional manual review methods face the following challenges: (1) Difficulty in cross-domain integration of knowledge: Financial audit compliance requires adherence to the legal system such as the Accounting Law, Enterprise Accounting Standards, and Securities Law, while also taking into account specific audit procedure standards. Financial professionals lack legal knowledge, and legal professionals lack financial analysis capabilities, resulting in low efficiency of cross-domain collaboration.
[0003] (2) High experience barrier for fraud identification: Identifying methods such as fictitious monetary funds, inventory fraud, and early recognition of revenue requires a large number of actual cases and cannot be systematically and automatically promoted.
[0004] (3) Low efficiency of regulatory retrieval: Corporate compliance work involves multiple sources of knowledge such as legal provisions, judicial interpretations, regulatory rules, and case judgments. Traditional keyword retrieval lacks semantic understanding, has poor relevance, and has a high omission rate.
[0005] (4) The direct application of large language models has reliability issues: When large language models are directly used for multi-step compliance review tasks, there are defects such as task planning illusion, unstable tool calls, and inability to trace the reasoning process, which makes it difficult to meet the requirements of enterprise compliance review for interpretability and accuracy.
[0006] (5) Lack of context management in multi-turn dialogues: Existing intelligent question answering systems lack cross-conversation memory, and users need to describe the background again each time they ask a question, making it impossible to accumulate and reuse historical review experience.
[0007] In existing technologies, Retrieval-Augmented Generation (RAG) systems typically only perform single-stage vector retrieval and cannot leverage the relationships in knowledge graphs for in-depth expansion; multi-agent systems usually rely on dynamic programming of large language models, which suffers from illusion and uncertainty problems; existing compliance review systems are mostly single-domain (purely financial or purely legal), and there are no reports of integrated intelligent agent systems that deeply integrate financial and legal knowledge. Summary of the Invention
[0008] To address the problems existing in the prior art, this invention discloses a financial and legal fusion hierarchical intelligent agent system and review method based on a large language model.
[0009] This invention provides the following technical solutions: A financial and legal integrated hierarchical intelligent agent system based on a large language model, the system comprising: an intent recognition layer, a task planning layer, a tool execution layer, and a memory and retrieval layer connected from top to bottom, and a hybrid retrieval enhancement generation system that works in collaboration with the tool execution layer; The intent recognition layer is used to receive the user's natural language input, perform zero-shot classification using a large language model, identify six types of task intents, and output a structured intent result that includes intent type, confidence level, feasibility flag, list of missing fields, and subtask suggestions. The task planning layer is used to retrieve the corresponding directed acyclic graph template from the preset task template library according to the intent type output by the intent recognition layer, and instantiate and generate an execution plan containing task nodes and dependencies. The tool execution layer is used to schedule the execution order of task nodes according to the directed acyclic graph generated by the task planning layer through a topology sorting algorithm, call the tool manager to distribute the tasks to the corresponding professional tools to complete the execution, and pass the execution results to the subsequent task nodes through a dependency propagation mechanism. The memory and retrieval layer includes a session memory module and a long-term memory module. The session memory module maintains the sliding window context of the current conversation, while the long-term memory module stores historical session summaries and original messages based on a lightweight database of structured query language and a full-text search virtual table, supporting cross-session semantic retrieval. The tool execution layer includes a financial and legal integrated compliance inspection toolkit, which integrates financial disclosure compliance inspection based on corporate accounting standards and related securities regulations, financial fraud detection based on accounting fraud characteristic patterns, related party transaction identification and compliance verification based on corporate accounting standards, and regulatory law retrieval based on legal knowledge graphs. The hybrid retrieval enhancement generation system supports the legal retrieval tools in the tool execution layer. Through a two-stage retrieval pipeline of vector similarity retrieval and knowledge graph leapfrog expansion, it retrieves legal provisions, judicial interpretations, and case information from the legal knowledge graph database.
[0010] Preferably, the intent recognition layer performs deterministic zero-shot classification. The system prompts explicitly define the semantic boundaries of six compliant task intents and the criteria for judging infeasible requests. The large language model is invoked with a temperature parameter of 0, and the output is strictly constrained to a JSON object, containing intent type enumeration values, confidence floating-point numbers, feasibility boolean flags, a list of missing field strings, and a list of subtask suggestions. When the model output format is abnormal, a backup parsing mechanism based on regular expressions is enabled to extract key fields.
[0011] Preferably, the planning process of the task planning layer is completed through table lookup and instantiation. The template includes a preparation stage, a core review stage, including procedural compliance checks and data verification, and a risk reporting stage, including risk assessment, suggestion generation, and report export, totaling eight task nodes. Dependencies are described by node identifiers.
[0012] Preferably, the scheduler continuously traverses the nodes to be executed in the execution loop, marks the nodes whose dependent nodes have all been completed as executable, calls the tool manager and passes in standardized parameters, including the user's original input, task metadata, and the execution results of dependent tasks; After the tool's execution result is written to a node, the system automatically adds it to the input parameters of subsequent dependent nodes, thus achieving chain propagation of the result.
[0013] Preferably, the tool manager maintains a registry for 11 types of professional tools, including document parsing, information extraction, regulatory retrieval, internal knowledge base query, compliance checklist generation, contract clause review, risk scoring, rectification suggestion generation, report export, document indexing, and financial data verification.
[0014] Preferably, the tool execution layer includes the following four types of tools: Financial disclosure compliance inspection tool, based on corporate accounting standards and the management measures for information disclosure of listed companies, checks the completeness of necessary disclosure items in annual reports and interim reports, and adapts a differentiated list of disclosure requirements according to report type and industry category; The financial fraud detection tool has five built-in fraud feature detection modes, including discrepancies between revenue and cash flow, abnormal accounts receivable, related party fund misappropriation, abnormal inventory, and frequent changes in accounting policies. It also integrates a fraud feature knowledge base from publicly available securities regulatory penalty cases and conducts fraud risk assessment through rule matching supplemented by large language model reasoning. Related party compliance inspection tools, scope of identification, inspection of the completeness of related party identification, compliance of transaction approval procedures, adequacy of annual report disclosure, and fairness of transaction pricing; The contract-finance consistency check tool cross-compares contract stipulations with actual financial records to identify contracts not recorded, accounting treatments with amount differences exceeding 5%, inter-period adjustments, and account posting errors.
[0015] Preferably, in the first stage, vector approximate nearest neighbor retrieval is performed, and the query text is encoded into a 1024-dimensional semantic vector through an embedding model. The top K similar nodes are retrieved in the vector index of the graph database. In the second stage, the results of the first stage are used as seeds to perform multi-hop relation traversal in the knowledge graph, dynamically expand semantically related nodes, and filter them according to the cosine similarity threshold. After deduplication, the candidate results are refined by the re-ranking model to return the most relevant legal provisions, judicial interpretations, or case information.
[0016] A financial and legal compliance review method based on a large language model, wherein the method operates on a hierarchical intelligent agent system based on a large language model, and the method includes the following steps: Step 1: Contextual Retrieval Step: Receive user natural language input, query the current session context and historical similar sessions from the memory and retrieval layer, and concatenate them to form a context containing background information; Step 2: Intent Classification Step: Submit user input and context to the intent recognition layer. The large language model outputs the intent type, confidence level, feasibility judgment, and missing information in a zero-shot classification manner. If the request is not feasible, a rejection feedback is returned to the user. If there are missing fields, the user is prompted to complete the information. Step 3: Task planning steps: Load the corresponding directed acyclic graph template for the task from the pre-set template library according to the intent type, and instantiate and generate a task execution plan in combination with user input and session context; Step 4: Task Execution Steps: The tool execution layer traverses the task nodes in topological order and calls the corresponding tools for nodes that meet the dependency conditions; tasks involving legal retrieval trigger the hybrid retrieval enhancement generation pipeline; tasks involving compliance verification trigger the financial and legal integration inspection toolset; the tool execution results are written to the task nodes and propagated to subsequent dependent nodes; Step 5: Results Summary Step: After all task nodes are completed, integrate the output of each node to generate a comprehensive report that includes the problems found, risk levels, and rectification suggestions. It supports exporting in text, spreadsheet, or structured data formats. Step 6: Memory Persistence Step: Persist the metadata such as intent type, input summary, discovery summary, risk level, and complete dialogue message of this session into the long-term memory module for subsequent cross-session context retrieval.
[0017] A computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement a financial and legal compliance review method based on a large language model.
[0018] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement a financial and legal compliance review method based on a large language model.
[0019] The present invention has the following beneficial effects: This invention eliminates the planning illusion and improves task reliability: template-driven planning separates task decomposition from dynamic reasoning in large language models, improving planning accuracy from unstable results of direct planning in large language models to deterministic results verified by humans, with 100% tool coverage and 100% dependency validity.
[0020] The system unifies the processing of financial accounting standards, securities regulatory rules, legal provisions, and judicial cases within a single system, eliminating the need for users to switch between financial and legal systems and significantly reducing the collaboration costs of cross-domain compliance reviews. The hybrid retrieval enhancement generation system expands upon knowledge graph relationships to additionally acquire semantically related legal provisions and cases, improving search results in both semantic relevance and legal relevance. A long-term memory module persistently stores historical review results, allowing the system to automatically retrieve similar historical cases before starting a new task, enabling cross-session accumulation and reuse of compliance knowledge.
[0021] This invention incorporates a multi-mode financial fraud detection tool and a publicly available knowledge base of penalty cases, solidifying empirical fraud identification methods into programmable detection rules, thus reducing reliance on human expert experience. Each task node records creation, execution, and completion timestamps, as well as the tool's execution results, forming a complete and auditable execution trajectory that meets the requirements of enterprise compliance management for operational traceability. Attached Figure Description
[0022] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0023] Figure 1 The diagram shown is a schematic representation of the overall system architecture of the present invention. Figure 2 This is a flowchart illustrating the intent recognition layer workflow of the present invention. Detailed Implementation
[0024] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] The present invention will be described in detail below with reference to specific embodiments. Specific Implementation Example 1: according to Figures 1 to 2 As shown, the specific optimized technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows: The present invention relates to a financial and legal integrated hierarchical intelligent agency system and review method based on a large language model. The present invention is particularly applicable to scenarios such as enterprise financial audit compliance verification, contract legal risk review, related party transaction compliance analysis and intelligent detection of financial fraud.
[0027] This invention provides a financial and legal integrated hierarchical intelligent agent system and review method based on a large language model. The method includes the following steps: A hierarchical intelligent agent system integrating finance and law based on a large language model includes: The intent recognition layer is used to receive the user's natural language input, perform zero-shot classification using a large language model, identify six types of task intents, and output a structured intent result that includes intent type, confidence level, feasibility flag, list of missing fields, and subtask suggestions. The task planning layer is used to retrieve the corresponding directed acyclic graph template from the preset task template library according to the intent type output by the intent recognition layer, and instantiate and generate an execution plan containing task nodes and dependencies. The tool execution layer is used to schedule the execution order of task nodes according to the directed acyclic graph generated by the task planning layer through a topology sorting algorithm, call the tool manager to distribute the tasks to the corresponding professional tools to complete the execution, and pass the execution results to the subsequent task nodes through a dependency propagation mechanism. The memory and retrieval layer includes a session memory module and a long-term memory module. The session memory module maintains the sliding window context of the current conversation, while the long-term memory module stores historical session summaries and original messages based on a lightweight structured query language database and a full-text search virtual table, supporting cross-session semantic retrieval. The tool execution layer includes a financial and legal integrated compliance inspection toolkit, which integrates financial disclosure compliance inspection based on corporate accounting standards and related securities regulations, financial fraud detection based on accounting fraud characteristic patterns, related party transaction identification and compliance verification based on corporate accounting standard No. 36, and regulatory law retrieval based on legal knowledge graph. The hybrid retrieval enhancement generation system supports the legal retrieval tools in the tool execution layer. Through a two-stage retrieval pipeline of vector similarity retrieval and knowledge graph leapfrog expansion, it retrieves legal provisions, judicial interpretations, and case information from the legal knowledge graph database.
[0028] This invention provides a financial and legal fusion hierarchical intelligent agent system based on a large language model, comprising an intent recognition layer, a task planning layer, a tool execution layer, and a memory and retrieval layer connected from top to bottom, as well as a hybrid retrieval enhancement generation system that works in collaboration with the tool execution layer.
[0029] The core design principle of the intent recognition layer is deterministic zero-shot classification. The system prompts explicitly define the semantic boundaries of six compliant task intents, as well as the criteria for judging infeasible requests. The large language model is invoked with a temperature parameter of 0, and the output is strictly constrained to a JSON object containing intent type enumeration values, a confidence floating-point number, a feasibility boolean flag, a list of missing field strings, and a list of subtask suggestions. When the model output format is abnormal, a backup parsing mechanism based on regular expressions is enabled to extract key fields, ensuring the robustness of the structured output.
[0030] The core innovation of the task planning layer is replacing dynamic programming using large language models with pre-defined, manually verified templates. The template library provides pre-defined Directed Acyclic Graph (DAG) task templates for six types of intents. Each template consists of several task nodes, each containing a unique identifier, a human-readable name, execution stage, tool type, and a list of dependencies. The planning process is completed through table lookups and instantiation, achieving zero inference latency and eliminating illusions. Taking the audit report verification intent as an example, the template includes eight task nodes: a preparation stage (information extraction, rule retrieval, checklist generation), a core review stage (procedure compliance check, data verification), and a risk reporting stage (risk assessment, suggestion generation, report export). Dependencies are precisely described through node identifiers.
[0031] The tool execution layer implements topology-driven task scheduling, in conjunction with a unified tool management interface. The scheduler continuously traverses the nodes to be executed in the execution loop, marking nodes whose dependent nodes have all been completed as executable, invoking the tool manager and passing in a standardized parameter package (including user input, task metadata, and execution results of dependent tasks). After the tool execution result is written to the node, the system automatically adds it to the input parameters of subsequent dependent nodes, achieving chain propagation of results. The tool manager maintains a registry for 11 types of professional tools, including document parsing, information extraction, regulatory retrieval, internal knowledge base query, compliance checklist generation, contract clause review, risk scoring, rectification suggestion generation, report export, document indexing, and financial data verification.
[0032] The financial and legal integration compliance inspection toolset is the core feature module of this invention, including the following four types of tools: Financial disclosure compliance inspection tool: Based on corporate accounting standards and the management measures for information disclosure of listed companies, it checks the completeness of necessary disclosure items in annual reports and interim reports, and adapts differentiated disclosure requirement lists according to report type and industry category (finance, real estate, manufacturing, etc.); Financial fraud detection tool: It has five built-in fraud feature detection modes (revenue and cash flow discrepancy, abnormal accounts receivable, related party fund occupation, abnormal inventory, and frequent changes in accounting policies), and integrates a fraud feature knowledge base from publicly available securities regulatory penalty cases. It conducts fraud risk assessment through rule matching and large language model reasoning. Related party compliance inspection tools: Based on the scope of related party identification as defined in Accounting Standard No. 36, check the completeness of related party identification, compliance of transaction approval procedures, adequacy of annual report disclosure, and fairness of transaction pricing; Contractual financial consistency check tool: cross-compare contractual agreements with actual financial records to identify contracts not recorded, accounting treatments with amount differences exceeding 5%, inter-period adjustments, and account posting errors.
[0033] The memory and retrieval layers implement a two-layer memory architecture. The session memory module maintains a sliding window buffer of the most recent dialogue rounds in memory (retaining the most recent 10 rounds by default), supporting real-time context splicing. The long-term memory module is based on an SQLite database and features a two-level storage structure: a session summary index table stores compressed summaries and key findings for each review task, on which a full-text search (FTS5) virtual table based on trigram segmentation is built, supporting efficient substring matching of Chinese keywords; the raw message storage table stores complete dialogue records grouped by session identifiers for use in context reconstruction.
[0034] The hybrid retrieval enhancement generation system employs a two-stage retrieval pipeline to serve regulatory retrieval needs. The first stage performs vector approximate nearest neighbor retrieval, encoding the query text into a 1024-dimensional semantic vector using an embedding model, and retrieving the top K similar nodes in the graph database vector index. The second stage uses the results from the first stage as seeds to perform multi-hop relation traversal in the knowledge graph, dynamically expanding semantically related nodes and filtering them according to a cosine similarity threshold. After deduplication, candidate results are refined and sorted by a re-ranking model, returning the most relevant legal provisions, judicial interpretations, or case information.
[0035] This invention provides a financial and legal compliance review method based on a large language model. The method operates on a hierarchical intelligent agent system based on a large language model, and its key feature is that the method includes the following steps: Step 1: Contextual Retrieval Step: Receive user natural language input, query the current session context and historical similar sessions from the memory and retrieval layer, and concatenate them to form a context containing background information; Step 2: Intent Classification Step: Submit user input and context to the intent recognition layer. The large language model outputs the intent type, confidence level, feasibility judgment, and missing information in a zero-shot classification manner. If the request is not feasible, a rejection feedback is returned to the user. If there are missing fields, the user is prompted to complete the information. Step 3: Task planning steps: Load the corresponding directed acyclic graph template for the task from the pre-set template library according to the intent type, and instantiate and generate a task execution plan in combination with user input and session context; Step 4: Task Execution Steps: The tool execution layer traverses the task nodes in topological order and calls the corresponding tools for nodes that meet the dependency conditions; tasks involving legal retrieval trigger the hybrid retrieval enhancement generation pipeline; tasks involving compliance verification trigger the financial and legal integration inspection toolset; the tool execution results are written to the task nodes and propagated to subsequent dependent nodes; Step 5: Results Summary Step: After all task nodes are completed, integrate the output of each node to generate a comprehensive report that includes the problems found, risk levels, and rectification suggestions. It supports exporting in text, spreadsheet, or structured data formats. Step 6: Memory Persistence Step: Persist the metadata such as intent type, input summary, discovery summary, risk level, and complete dialogue message of this session into the long-term memory module for subsequent cross-session context retrieval.
[0036] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement a financial and legal fusion hierarchical intelligent agent system and review method based on a large language model.
[0037] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a financial and legal fusion hierarchical intelligent agent system and review method based on a large language model. Specific Implementation Example 2: The only difference between Embodiment 2 and Embodiment 1 of this application is that: Compliance verification of listed company annual report audit Scenario Description: A user uploads a PDF of a listed company's 2024 audit report and requests the system to verify the compliance of the audit procedures and the consistency of the financial data in the report.
[0039] Step 1 (Contextual Retrieval): The system receives user input and calls the memory and retrieval layers: the session memory module returns the previous dialogue of the current session (if any), and the long-term memory module retrieves the three most recent relevant historical session summaries by keywords through the full-text search virtual table. The user input is then concatenated with the historical context to form a complete input containing background information.
[0040] Step Two (Intent Classification): The intent recognition layer is based on a large language model. The system prompts include six intent definitions and infeasibility judgment criteria. The model returns the intent type, feasibility flag (true), and a list of empty or missing fields in JSON format. If the feasibility is true and there are no missing fields, the process proceeds directly to the planning step.
[0041] Step 3 (Task Planning): The task planning layer queries the corresponding preset template and instantiates it to generate a directed acyclic graph containing eight nodes, as shown in Table 1.
[0042] Table 1. List of Nodes in the Directed Acyclic Graph for Audit Report Verification Tasks
[0043] Step Four (Task Execution): The tool execution layer initiates topology sorting and scheduling. Round One: AR_T01 and AR_T02 are independent and execute in parallel, respectively completing PDF text extraction and structured audit information extraction, as well as obtaining applicable audit standard clauses through hybrid retrieval enhancement of the generation system. Round Two: After both dependencies are completed, AR_T03 generates a checklist covering resource compliance, procedural compliance, and disclosure compliance. Round Three: AR_T04 and AR_T05 execute in parallel, respectively completing item-by-item verification of procedural compliance and cross-verification of financial data. Rounds Four through Six: AR_T06 outputs a comprehensive risk score, AR_T07 generates priority-ranked rectification suggestions, and AR_T08 summarizes and outputs in three formats: a text summary report, an Excel detailed table, and JSON structured data.
[0044] Step 5 (Results Summary): The system presents the user with an audit report, which includes a list of specific compliance issues (including issue descriptions, violated guidelines and clauses, and risk levels), a comprehensive risk score, and rectification suggestions based on priority ranking, and provides a link to download the exported file.
[0045] Step Six (Memory Persistence): The system writes metadata such as intent type, input summary, core findings, and complete dialogue messages of this session into the long-term memory module for reference in subsequent similar tasks.
[0046] Contract legal risk review Scenario Description: A user uploads a purchase contract Word document and requests the system to identify legal risk clauses in the contract.
[0047] The intent recognition layer identifies the intent as CONTRACT_REVIEW. The task planning layer loads the contract review template. The tool execution layer executes the following steps in sequence: document parsing to extract the contract text, information extraction to output contract elements (subject matter, amount, rights and obligations of both parties, breach of contract clauses, etc.), legal retrieval to obtain relevant provisions of the Civil Code's Contract Law, contract clause inspection tool to identify high-risk clauses (excessive liquidated damages, unreasonable unilateral termination rights, unclear ownership of intellectual property rights, etc.), risk scoring, and rectification suggestions are generated.
[0048] Related Party Transaction Compliance Analysis Scenario Description: A company's finance personnel describe the financial transactions with the controlling shareholder and request the system to assess the relevant compliance risks.
[0049] The intent recognition layer identifies the intent as RISK_ASSESSMENT. The task planning layer loads the compliance risk assessment template. The tool execution layer calls the related party compliance check tool to identify whether the transaction involves the scope of related party identification based on Enterprise Accounting Standard No. 36, checks whether the board of directors or shareholders' meeting approval procedures have been followed, assesses whether the scale of fund transactions exceeds the threshold for separate disclosure in the annual report, and analyzes whether the fund transaction pattern conforms to the characteristics of major shareholder fund misappropriation through fraud detection tools. Finally, a report containing a list of compliance defects and a quantitative score of violation risk is output.
[0050] The above description is merely a preferred embodiment of a financial and legal integrated layered intelligent agent system and review method based on a large language model. The scope of protection for such a system and method is not limited to the above embodiments; all technical solutions falling within this conceptual framework are within the scope of protection of this invention. It should be noted that for those skilled in the art, any improvements and variations made without departing from the principles of this invention should also be considered within the scope of protection of this invention.
Claims
1. A hierarchical intelligent agent system integrating finance and law based on a large language model, characterized by: The system includes, from top to bottom, an intent recognition layer, a task planning layer, a tool execution layer, and a memory and retrieval layer, as well as a hybrid retrieval enhancement generation system that works in conjunction with the tool execution layer; The intent recognition layer is used to receive the user's natural language input, perform zero-shot classification using a large language model, identify six types of task intents, and output a structured intent result that includes intent type, confidence level, feasibility flag, list of missing fields, and subtask suggestions. The task planning layer is used to retrieve the corresponding directed acyclic graph template from the preset task template library according to the intent type output by the intent recognition layer, and instantiate and generate an execution plan containing task nodes and dependencies. The tool execution layer is used to schedule the execution order of task nodes according to the directed acyclic graph generated by the task planning layer through a topology sorting algorithm, call the tool manager to distribute the tasks to the corresponding professional tools to complete the execution, and pass the execution results to the subsequent task nodes through a dependency propagation mechanism. The memory and retrieval layer includes a session memory module and a long-term memory module. The session memory module maintains the sliding window context of the current conversation, while the long-term memory module stores historical session summaries and original messages based on a lightweight database of structured query language and a full-text search virtual table, supporting cross-session semantic retrieval. The tool execution layer includes a financial and legal integrated compliance inspection toolkit, which integrates financial disclosure compliance inspection based on corporate accounting standards and related securities regulations, financial fraud detection based on accounting fraud characteristic patterns, related party transaction identification and compliance verification based on corporate accounting standards, and regulatory law retrieval based on legal knowledge graphs. The hybrid retrieval enhancement generation system supports the legal retrieval tools in the tool execution layer. Through a two-stage retrieval pipeline of vector similarity retrieval and knowledge graph leapfrog expansion, it retrieves legal provisions, judicial interpretations, and case information from the legal knowledge graph database.
2. The system according to claim 1, characterized in that: The intent recognition layer performs deterministic zero-shot classification. The system prompts explicitly define the semantic boundaries of six compliant task intents and the criteria for judging infeasible requests. The large language model is invoked with a temperature parameter of 0. The output is strictly constrained to a JSON object, which includes intent type enumeration values, confidence floating-point numbers, feasibility boolean flags, a list of missing field strings, and a list of subtask suggestions. When the model output format is abnormal, a backup parsing mechanism based on regular expressions is enabled to extract key fields.
3. The system according to claim 2, characterized in that: The planning process of the task planning layer is completed through table lookup and instantiation. The template includes a preparation stage, a core review stage, including procedural compliance checks and data verification, and a risk reporting stage, including risk assessment, suggestion generation, and report export, totaling eight task nodes. Dependencies are described through node identifiers.
4. The system according to claim 3, characterized in that: The scheduler continuously traverses the nodes to be executed in the execution loop, marks the nodes whose dependent nodes have all been completed as executable, calls the tool manager and passes in standardized parameters, including the user's original input, task metadata, and the execution results of dependent tasks; After the tool's execution result is written to a node, the system automatically adds it to the input parameters of subsequent dependent nodes, thus achieving chain propagation of the result.
5. The system according to claim 4, characterized in that: The tool manager maintains the registry for 11 types of professional tools, including document parsing, information extraction, regulatory retrieval, internal knowledge base query, compliance checklist generation, contract clause review, risk scoring, rectification suggestion generation, report export, document indexing, and financial data verification.
6. The system according to claim 5, characterized in that: The tool execution layer includes the following four types of tools: Financial disclosure compliance inspection tool, based on corporate accounting standards and the management measures for information disclosure of listed companies, checks the completeness of necessary disclosure items in annual reports and interim reports, and adapts a differentiated list of disclosure requirements according to report type and industry category; The financial fraud detection tool has five built-in fraud feature detection modes, including discrepancies between revenue and cash flow, abnormal accounts receivable, related party fund misappropriation, abnormal inventory, and frequent changes in accounting policies. It also integrates a fraud feature knowledge base from publicly available securities regulatory penalty cases and conducts fraud risk assessment through rule matching supplemented by large language model reasoning. Related party compliance inspection tools, scope of identification, inspection of the completeness of related party identification, compliance of transaction approval procedures, adequacy of annual report disclosure, and fairness of transaction pricing; The contract-finance consistency check tool cross-compares contract stipulations with actual financial records to identify contracts not recorded, accounting treatments with amount differences exceeding 5%, inter-period adjustments, and account posting errors.
7. The method according to claim 6, characterized in that: The first stage performs vector approximate nearest neighbor retrieval, encoding the query text into a 1024-dimensional semantic vector through an embedding model, and retrieving the top K similar nodes in the graph database vector index; the second stage uses the results of the first stage as seeds to perform multi-hop relation traversal in the knowledge graph, dynamically expanding semantically related nodes, and filtering them according to the cosine similarity threshold. After deduplication, the candidate results are refined and sorted by the re-ranking model to return the most relevant legal provisions, judicial interpretations or case information.
8. A financial and legal compliance review method based on a large language model, said method being based on a hierarchical intelligent agent system for financial and legal integration as described in claim 1, characterized in that: The method includes the following steps: Step 1: Receive user natural language input, query the current session context and historical similar sessions from the memory and retrieval layer, and concatenate them to form a context containing background information; Step 2: Submit the user input and context to the intent recognition layer. The large language model outputs the intent type, confidence level, feasibility judgment, and missing information in a zero-shot classification manner. If the request is not feasible, a rejection feedback is returned to the user. If there are missing fields, the user is prompted to complete the information. Step 3: Load the corresponding directed acyclic graph template for the task from the preset template library according to the intent type, and instantiate and generate a task execution plan by combining user input and session context; Step 4: The tool execution layer traverses the task nodes in topological order and calls the corresponding tools for nodes that meet the dependency conditions; tasks involving legal retrieval trigger the hybrid retrieval enhancement generation pipeline; tasks involving compliance verification trigger the financial and legal integration inspection toolset; the tool execution results are written to the task nodes and propagated to subsequent dependent nodes; Step 5: After all task nodes are completed, integrate the output of each node to generate a comprehensive report that includes the problems found, risk levels, and rectification suggestions. It can be exported in text, spreadsheet, or structured data format. Step 6: Persistently write the metadata such as intent type, input summary, discovery summary, risk level, and complete dialogue message of this session into the long-term memory module for subsequent cross-session context retrieval.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method as claimed in claim 8.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: The processor implements the method of claim 8 when executing the computer program.