LLM medical ethics compliance verification system and method based on multi-agent and RAG

By constructing a hierarchical knowledge reasoning framework and a multi-agent collaborative LLM medical ethics compliance verification system, the problems of low efficiency, low accuracy, and insufficient collaboration in existing technologies have been solved. This system achieves accuracy and adaptability in medical research ethics compliance verification and supports unified management and real-time updates throughout the entire process.

CN122263943APending Publication Date: 2026-06-23许晓峰 +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610294511.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-11
Publication Date
2026-06-23

Smart Images

  • Figure CN122263943A_ABST
    Figure CN122263943A_ABST
Patent Text Reader

Abstract

The application discloses a kind of LLM medical ethics compliance verification system and method based on multi-agent and RAG, including hierarchical knowledge reasoning framework, knowledge reasoning library module, multi-agent cooperation module, reasoning control module, review optimization module and iterative self-learning module, hierarchical knowledge reasoning framework constructs rule reasoning, case reasoning, scene reasoning three-level reasoning logic, knowledge reasoning library module provides knowledge and reasoning rule support for hierarchical knowledge reasoning framework, each agent of multi-agent cooperation module is embedded hierarchical knowledge reasoning sub-framework, configuration reasoning logic driven customized RAG search strategy, reasoning control module is built-in reasoning rule set version management engine, adjusts reasoning trigger threshold and calculation complexity, review optimization module supports professional review optimization reasoning decision result and reasoning rule, generates reasoning optimization data, iterative self-learning module is based on optimization data, optimizes the reasoning rule and agent search strategy of hierarchical knowledge reasoning framework.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence, natural language processing, and medical ethics, and in particular to an LLM medical ethics compliance verification system and method based on multi-agent and RAG. Background Technology

[0002] With the rapid development of medical technology, the number of cutting-edge research projects has surged. Medical research ethics compliance verification has become a key link in safeguarding research integrity and protecting the rights and interests of research subjects. It needs to cover the entire process of research writing, submission and review, adapt to the differentiated needs of different research types, stages and regional policies, and ensure that the verification standards are unified and adapted to the scenarios.

[0003] Currently, existing medical research ethics compliance verification methods are mainly divided into manual verification and simple intelligent verification, both of which have obvious technical shortcomings and are difficult to meet the requirements of high efficiency, accuracy, and intelligence. The specific deficiencies are as follows: First, the verification process is inefficient and highly subjective. Manual verification consumes a lot of manpower and time, and the review conclusions are affected by the subjective perception of the personnel, resulting in significant differences in ethical judgments for similar projects. Simple intelligent verification can only achieve keyword matching, has low verification accuracy, cannot identify hidden ethical risks, and cannot be adapted to both writing warnings and submission review scenarios, making it difficult to achieve unified management throughout the entire process.

[0004] Second, there is a lack of a systematic reasoning framework and knowledge support. Existing intelligent systems have not built a complete hierarchical reasoning logic, and mostly use single rule matching. They cannot combine case evidence and scenario constraints for multi-dimensional reasoning, and the determination of violations lacks interpretability. Knowledge and reasoning rules are stored separately, updates are lagging, and it is difficult to connect to authoritative third-party data sources, making it unable to adapt to new ethical policies and scientific research scenarios.

[0005] Third, there is insufficient multi-agent collaboration, and retrieval and reasoning are disconnected. Although some systems introduce multiple agents, each agent lacks a unified reasoning core, and the retrieval strategy and reasoning logic are independent, making deep coupling impossible. There are no standardized data interfaces and dynamic scheduling mechanisms between agents, resulting in low collaboration efficiency. Furthermore, the scientific research writing early warning scenario lacks lightweight processing, leading to excessive computational consumption.

[0006] In addition, existing technologies suffer from problems such as inconsistent ethical review standards and lagging supervision, which exacerbate the difficulty of verification.

[0007] Therefore, we propose an LLM-based medical ethics compliance verification system and method based on multi-agent and RAG to address the above issues. Summary of the Invention

[0008] This invention overcomes the shortcomings of the prior art and provides a method and system for verifying LLM medical ethics compliance based on multi-agent and RAG.

[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows: an LLM medical ethics compliance verification system based on multi-agent and RAG, comprising: a hierarchical knowledge reasoning framework, a knowledge reasoning base module, a multi-agent collaboration module, a reasoning control module, a review and optimization module, and an iterative self-learning module; The hierarchical knowledge reasoning framework constructs a three-level reasoning logic of rule reasoning, case reasoning, and scenario reasoning, thereby making medical research ethics verification hierarchical judgment. The knowledge reasoning base module provides knowledge and reasoning rules support for the hierarchical knowledge reasoning framework, realizing a deep binding between knowledge and reasoning rules; Each agent in the multi-agent collaborative module is embedded in a hierarchical knowledge reasoning sub-framework, and a customized RAG retrieval strategy driven by reasoning logic is configured to achieve deep coupling between retrieval and reasoning. The inference control module has a built-in inference rule set version management engine, which allocates lightweight and full version rule sets for scientific research writing warnings and submission review processes, respectively. The core rules of the two are the same, only the inference trigger threshold and computational complexity are adjusted. The review and optimization module supports professionals in reviewing and optimizing reasoning judgment results and reasoning rules, and generating standardized reasoning optimization data. The iterative self-learning module optimizes the reasoning rules and agent retrieval strategies of the hierarchical knowledge reasoning framework based on optimized data, forming a closed-loop iterative retrieval and reasoning process.

[0010] In a preferred embodiment of the present invention, the three-level reasoning logic of the hierarchical knowledge reasoning framework is as follows: the rule reasoning layer constructs a rule reasoning engine based on first-order predicate logic, and transforms the core clauses of scientific research ethics into rule predicates to achieve basic matching of violation points; The case reasoning layer builds a case matching reasoning engine based on analogical reasoning, and uses feature matching to provide evidence for violation cases. The scenario reasoning layer builds a scenario-adaptive reasoning engine based on fuzzy reasoning, and adds scenario constraints by incorporating scientific research type, stage and regional policies. The three-level reasoning layers proceed sequentially and verify each other. The upper-level reasoning filters, corrects, and supplements the results of the lower level, and outputs a unified judgment result.

[0011] In a preferred embodiment of the present invention, the knowledge reasoning base module adopts a dual-binding structured architecture of knowledge and rules, including a reasoning knowledge layer and a reasoning rule layer, and the two layers are deeply bound and updated synchronously. The reasoning knowledge layer stores medical research ethics knowledge in a three-level reasoning logic hierarchy, and all knowledge is labeled with research reasoning tags and semantic vectors. The reasoning rule layer stores the corresponding executable reasoning rules. Each rule corresponds one-to-one with the reasoning knowledge, and triggering the reasoning rule is achieved by calling the knowledge. The knowledge reasoning base module supports connection to authoritative third-party ethical knowledge data sources, and enables real-time knowledge updates through web crawling and API interface synchronization.

[0012] In a preferred embodiment of the present invention, the multi-agent collaborative module includes six reasoning agents: scientific research data analysis, scientific research ethics rule verification, multi-dimensional tracing, scientific research ethics improvement scheme, scientific research review report generation, and scientific research writing early warning. Each of the aforementioned intelligent agents is embedded in a hierarchical knowledge reasoning sub-framework, and is configured with a dedicated reasoning triggering mechanism and a RAG retrieval strategy driven by reasoning logic; The intelligent agents adopt a unified and standardized inference result data interface, which includes core fields such as inference type, judgment result, basis index, and confidence level. The collaboration order is dynamically scheduled by the inference control module based on the research project stage. The scientific research writing early warning scenario uses model distillation technology to lightweight the hierarchical knowledge reasoning framework, reducing computational power consumption.

[0013] In a preferred embodiment of the present invention, the multi-dimensional source tracing reasoning intelligent agent constructs a four-level source tracing system based on a hierarchical knowledge reasoning framework, and generates a multi-dimensional reasoning source tracing index of scientific research projects, violation points, reasoning rules, corresponding clauses, source documents, similar cases, and scenario constraints, so as to achieve deep binding between source tracing results and reasoning judgment results; The matching degree values ​​between the violation points and ethical clauses and similar cases in the source tracing index are used as the core weight parameters of the gradient generation scheme of the reasoning agent in the scientific research ethics improvement scheme.

[0014] In a preferred embodiment of the present invention, the reasoning agent of the scientific research ethics improvement scheme is based on a scenario reasoning engine of a hierarchical knowledge reasoning framework. It designs a reasoning-driven flexible correction mechanism, integrates scientific research type, stage and regional policy constraints, and generates multiple sets of gradient improvement schemes with reasoning basis. The reasoning basis includes ethical rules, similar cases and scenario adaptation constraints.

[0015] Another technical solution adopted in this invention is an LLM-based medical ethics compliance verification method based on multi-agent and RAG, applied to the above system. This method integrates three-level hierarchical reasoning logic throughout the entire process control, achieving a unified reasoning logic for real-time early warning of research writing and precise verification of research submission review. The precise verification process for research submission review includes: S1. Building a framework to construct a dual binding of knowledge and rules: Build a hierarchical knowledge reasoning framework, construct a medical research ethics knowledge reasoning base with dual binding of knowledge and rules, and realize the synchronization of knowledge access and reasoning rule triggering; S2. Project creation generates exclusive reasoning configuration: Create a research project, set the research type and stage, upload documents to be reviewed, start the research data analysis and reasoning agent to complete the structured parsing of documents, match the scenario reasoning constraints and generate exclusive reasoning configuration; S3. Adjusting rules to generate scenario-specific rule sets: Reviewers adjust the weights and trigger thresholds of reasoning rules to create a research scenario-specific reasoning and judgment rule set; S4. Coupled verification and report generation: Start each reasoning agent in sequence, and through retrieval and reasoning coupled verification, output a list of violations, a reasoning source index, and a gradient improvement plan, and generate a draft audit report with full-process reasoning source tracing. S5. Review and optimize data: The auditor reviews and optimizes the reasoning results and source index, marks the reasons for optimization, and the system generates standardized reasoning optimization data. S6. Multi-dimensional optimization to form a closed loop: Based on the optimization of data, the three-level reasoning rules, intelligent agent retrieval strategy and knowledge reasoning base are optimized synchronously to form a closed loop iteration of retrieval, reasoning and knowledge.

[0016] In a preferred embodiment of the present invention, the real-time early warning process for scientific research writing and the precise verification process for scientific research submission review share the same hierarchical knowledge reasoning framework and knowledge reasoning base, including the following steps: S101. Create a task and match the configuration: Create a research writing task, set the research type and outline, match the lightweight reasoning rules and scenario constraints, and activate the warning reasoning threshold. S102, Content Capture Trigger Configuration: Capture written content and chapters in real time, trigger a lightweight rule reasoning sub-framework, and drive a dynamic retrieval strategy to obtain matching ethical knowledge and reasoning rules; S103. Generate graded alerts based on reasoning: Generate graded alerts with reasoning basis by outputting the alert judgment results through three-level reasoning in a lightweight collaborative manner. S104. Data collection and rule optimization: Collect early warning reasoning trigger data and user correction data, and feed them back to the iterative self-learning module to optimize lightweight reasoning rules and early warning retrieval strategies.

[0017] In a preferred embodiment of the present invention, in step S5, the system supports visual adjustment of inference rules and inference-based annotation of review opinions. Reviewers can directly adjust the predicate weight of rule inference, the feature matching threshold of case inference, and the fuzzy constraint coefficient of scenario inference. The adjustment operation is bound to the review opinions to form a traceable record of inference rule optimization, which serves as the core training data for closed-loop iteration.

[0018] In a preferred embodiment of the present invention, the self-learning module adopts a dual-path iterative mechanism that prioritizes inference rules. First, it optimizes the third-level inference rules based on standardized inference optimization data, and then adaptively adjusts the RAG retrieval strategies of each agent. Among them, the rule reasoning layer uses the logistic regression algorithm to update the predicate weights, the case reasoning layer uses the gradient descent algorithm to adjust the feature matching threshold, and the scenario reasoning layer uses the fuzzy C-means clustering algorithm to update the fuzzy constraint coefficients.

[0019] This invention addresses the shortcomings of the prior art and has the following beneficial effects: (1) Compared with existing medical ethics compliance verification technologies, this invention achieves deep coupling between retrieval and reasoning and unified control of reasoning logic throughout the entire scientific research process by organically integrating core designs such as a hierarchical knowledge reasoning framework, a knowledge reasoning base that binds knowledge and rules, and a reasoning-driven multi-agent collaborative architecture. At the same time, it incorporates human-machine fusion optimization and closed-loop iteration mechanisms, which greatly improves the accuracy, professionalism, scenario adaptability and practicality of medical ethics compliance verification. It effectively solves the core problems in existing technologies such as single reasoning logic, disconnect between retrieval and reasoning, inconsistent control throughout the entire process, untimely knowledge updates and excessive computing power consumption.

[0020] (2) This invention constructs a three-level hierarchical reasoning logic of rule reasoning, case reasoning and scenario reasoning, which deeply integrates first-order predicate logic, analogy reasoning, fuzzy reasoning and medical research ethics verification. The three levels of reasoning are progressive and mutually verified. The upper-level reasoning filters, corrects and supplements the results of the lower-level reasoning. It achieves basic and accurate matching of violation points through rule reasoning, strengthens the reliability of judgment results through case reasoning, and integrates exclusive constraints such as research type, stage and regional policies through scenario reasoning. It effectively avoids the problem of missed judgment and misjudgment caused by single reasoning logic, and greatly improves the accuracy and professional adaptability of medical research ethics verification judgment.

[0021] Meanwhile, the knowledge reasoning library module adopts a structured architecture that deeply binds knowledge and reasoning rules, enabling knowledge calls to trigger corresponding reasoning rules, avoiding the disconnect between knowledge and reasoning, providing accurate and efficient knowledge and rule support for the hierarchical knowledge reasoning framework, and supporting the connection with third-party authoritative ethical knowledge data sources. Through web crawling and API interface synchronization, knowledge can be updated in real time, which can quickly adapt to newly released medical research ethics guidelines, industry norms and regional policies. Knowledge iteration can be completed without refactoring the system, which greatly improves the system's response speed to policy and industry needs.

[0022] Furthermore, the six reasoning agents in the multi-agent collaboration module are all embedded with a hierarchical knowledge reasoning sub-framework and configured with a dedicated, logic-driven, customized RAG retrieval strategy. This achieves deep coupling of "retrieval feeding reasoning and reasoning guiding retrieval," ensuring that retrieval results accurately match the needs of reasoning logic. At the same time, a unified and standardized reasoning result data interface is used between the agents, and the collaboration order is dynamically scheduled by the reasoning control module based on the research project stage. This improves the collaboration efficiency and data interoperability of the multi-agents, allowing each agent to cooperate within its capabilities and reducing the workload of a single agent.

[0023] (3) The reasoning control module of the present invention has a built-in reasoning rule set version management engine, which allocates lightweight and full version rule sets to the two major processes of scientific research writing warning and submission review respectively. The core reasoning rules of the two are consistent. Only by adjusting the reasoning trigger threshold and computational complexity to adapt to different scenario requirements, the reasoning logic of ethical verification throughout the entire life cycle of scientific research is unified, which effectively solves the problem of result deviation caused by the inconsistency between warning and review judgment logic in the prior art. At the same time, the scientific research writing warning scenario adopts model distillation technology to lightweight the hierarchical knowledge reasoning framework, which greatly reduces the computing power consumption in the real-time warning scenario and improves the practicality and operating efficiency of the system.

[0024] Meanwhile, the four-level traceability system constructed by the multi-dimensional traceability reasoning agent generates a multi-dimensional reasoning traceability index containing elements such as research projects, violation points, reasoning rules, and corresponding clauses. This achieves a deep binding between traceability results and reasoning judgment results, and the traceability matching degree value can be used as a core weight parameter for generating improvement schemes, providing clear and traceable basis for reviewers to verify and rectify. The reasoning-driven flexible correction mechanism designed by the research ethics improvement scheme reasoning agent integrates multi-dimensional scenario constraints to generate multiple sets of gradient improvement schemes with complete reasoning basis. While ensuring ethical compliance, it also takes into account the actual needs of medical research scenarios, avoids the problem of rigid research design caused by a single correction scheme, and improves the practicality of the correction scheme.

[0025] In addition, the review and optimization module supports professionals to perform double review and optimization on the reasoning judgment results and reasoning rules. It can not only correct the judgment results, but also visually adjust the core reasoning parameters such as the predicate weight of rule reasoning and the feature matching threshold of case reasoning. All adjustment operations and review opinions are bound to form a traceable optimization record, which integrates the industry experience and professional judgment of medical professionals into the AI ​​reasoning framework. This effectively makes up for the limitations of pure AI reasoning in professional scenarios and continuously improves the professionalism and scenario adaptability of the system's reasoning judgment.

[0026] (4) The iterative self-learning module of this invention adopts a dual-path iterative mechanism that prioritizes reasoning rules. Based on standardized reasoning optimization data, it first optimizes the three-level reasoning rules of the hierarchical knowledge reasoning framework, and then adaptively adjusts the RAG retrieval strategy of each agent according to the reasoning rule optimization results. It also adopts a dedicated optimization algorithm for different reasoning layers to achieve collaborative optimization of reasoning rules and retrieval strategies, and updates the knowledge reasoning base in sync, forming a closed-loop iteration of retrieval-reasoning-knowledge. This allows the system to continuously optimize its performance based on feedback from actual verification scenarios, gradually improve verification accuracy, and adapt to more diverse medical research ethics verification scenarios.

[0027] (5) This invention integrates three-level hierarchical reasoning logic into the entire process of real-time early warning and precise verification of scientific research writing and submission for review. The two processes share the same hierarchical knowledge reasoning framework and knowledge reasoning library, realizing ethical compliance management of medical research documents from writing to submission for review. It moves ethical risk management from "post-event rectification" to "pre-event early warning", allowing researchers to discover and correct potential ethical violations in real time during the document writing stage, greatly reducing the ethical rectification cost in the later stage of scientific research projects, improving the efficiency of scientific research work, and effectively avoiding medical research ethical risks such as privacy leakage, damage to the rights and interests of subjects, and non-compliance of scientific research processes.

[0028] Meanwhile, the core modules of this invention are independent yet deeply coupled. The hierarchical knowledge reasoning framework, multi-agent collaboration module, and reasoning control module can all be flexibly configured according to different application scenarios (such as different hospitals, different regions, and different types of scientific research), and scenario adaptation can be completed without reconstructing the core architecture. At the same time, the lightweight processing, computing power optimization, and third-party data source integration design allow the system to adapt to hardware environments with different computing power levels, taking into account the high-precision verification needs of large medical institutions and the lightweight application needs of small and medium-sized institutions, which greatly improves the industry scalability and practical implementation of the system. Attached Figure Description

[0029] The present invention will be further described below with reference to the accompanying drawings and embodiments; Figure 1 This is a system architecture diagram of a preferred embodiment of the present invention; Figure 2 This is a system module logic operation diagram of a preferred embodiment of the present invention; Figure 3 This is a three-level reasoning logic diagram of a hierarchical knowledge reasoning framework according to a preferred embodiment of the present invention; Figure 4 This is a flowchart of the submission review and accurate verification method according to a preferred embodiment of the present invention; Figure 5 This is a flowchart of the writing real-time early warning process according to a preferred embodiment of the present invention. Detailed Implementation

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

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

[0032] This embodiment takes the ethical compliance verification process of a clinical trial medical research project for tumor drugs as an example to specifically illustrate the LLM medical ethics compliance verification system and method based on multi-agent and RAG of the present invention. This embodiment is only used to explain the present invention and is not intended to limit the scope of protection of the present invention.

[0033] In this embodiment, the system is applied to the medical research ethics review committee of a tertiary-level Class A hospital. The applicable scenario is the ethical writing warning and submission review process of the targeted drug clinical trial research project in the Department of Oncology of the hospital. This research project belongs to the clinical trial category and is in the project initiation stage. It involves core links such as subject recruitment, experimental sample collection and cross-departmental use, and informed consent form formulation. It must strictly follow the Declaration of Helsinki, the Guidelines for Ethical Review of Drug Clinical Trials, and the hospital's internal research ethics management system.

[0034] like Figure 1 , Figure 2 and Figure 3 As shown, an LLM medical ethics compliance verification system based on multi-agent and RAG is presented.

[0035] First, a hierarchical knowledge reasoning framework is built, and reasoning engines corresponding to three levels of reasoning logic are constructed respectively: the first-order predicate logic refers to the logical formula that transforms ethical rules into conditions to results to achieve rule matching. Based on this logic, predicate formulas for medical research ethics rules are written, such as: subject recruitment → including risk disclosure + written informed consent + compensation clauses; sample use across institutions / departments → ethics committee approval + subject secondary informed consent, forming a rule reasoning layer.

[0036] Analogical reasoning refers to obtaining evidence by extracting the core features of a case and matching them with the project to be verified. Based on this logic, a case matching reasoning engine is built for the case reasoning layer to extract the core features of ethical violation cases (research type, violation process, violation type, rectification plan) and establish a feature matching model. Fuzzy reasoning refers to the integration of multi-dimensional scene features to set constraint coefficients to achieve scene-based adaptation. Based on this logic, a scene adaptation reasoning engine is built for the scene reasoning layer. Fuzzy constraint coefficients and weight matrices are set for research type (clinical trial / basic research), research stage (project initiation / implementation / completion), and regional policy (provincial / hospital level). The weight for protecting the rights and interests of subjects in clinical trial projects is set to 0.9, and the rule matching strictness for the project initiation stage is set to 0.85. The three levels of reasoning advance sequentially and verify each other, with the higher-level reasoning filtering, correcting, and supplementing the results of the lower-level reasoning.

[0037] A knowledge reasoning base module is constructed, and a structured architecture with dual binding of knowledge and rules is used to build a reasoning knowledge layer and a reasoning rule layer: the reasoning knowledge layer stores ethical knowledge in a three-level reasoning logic hierarchy, and the rule reasoning knowledge layer records core rules such as the special provisions of the Declaration of Helsinki on clinical trials, the Guidelines for Ethical Review of Drug Clinical Trials, and the hospital's scientific research ethics management system. All knowledge is labeled with scientific research reasoning tags such as "project initiation stage" and "subject recruitment" for clinical trials and semantic vectors are generated. The case-based reasoning knowledge layer records typical cases of ethical violations in domestic targeted drug clinical trials (such as lack of informed consent from subjects, unapproved sample use, etc.). The scenario reasoning knowledge layer incorporates the hospital's clinical trial research process guidelines and the latest provincial medical research ethics policies. The reasoning rule layer stores executable reasoning rules that correspond one-to-one with reasoning knowledge, enabling knowledge access to trigger the corresponding reasoning rule. At the same time, the knowledge reasoning library is connected to authoritative third-party ethical knowledge data sources such as the National Medical Products Administration and the Medical Ethics Society, and knowledge is updated in real time through API interfaces.

[0038] The system deploys a multi-agent collaborative module, configuring six reasoning agents for scientific research data analysis, scientific research ethics rule verification, multi-dimensional source tracing, scientific research ethics improvement schemes, scientific research review report generation, and scientific research writing early warning. Each agent is embedded with a hierarchical knowledge reasoning sub-framework and configured with a dedicated reasoning trigger mechanism and a customized RAG retrieval strategy driven by reasoning logic. Each strategy first matches the core retrieval dimensions based on reasoning logic, and then accurately retrieves the corresponding knowledge from the knowledge reasoning base.

[0039] A unified and standardized reasoning result data interface is configured for each intelligent agent. The interface includes four core fields: reasoning type, judgment result, basis index, and confidence level. At the same time, the intelligent agent for scientific research writing and early warning is lightweighted by model distillation technology. Model distillation refers to reducing the computational power consumption of the model by cutting redundant computing nodes in the hierarchical knowledge reasoning framework while ensuring the basic accuracy of reasoning, so as to adapt to the low computational power requirements of real-time early warning.

[0040] Configure the inference control module, with a built-in inference rule set version management engine to generate two versions of inference rule sets: lightweight and full. The core rules remain the same, and only the inference trigger threshold and computational complexity are adjusted: the full rule set enables the complete computational logic of the three-level inference layer, and the inference trigger threshold is set to 0.7 for accurate verification of scientific research submissions. The lightweight rule set simplifies the feature matching dimension of the case reasoning layer and reduces the computational complexity of the scenario reasoning layer. The reasoning trigger threshold is set to 0.6 for real-time early warning in scientific writing.

[0041] The review and optimization module and the iterative self-learning module are built: The review and optimization module configures a visual adjustment interface for inference rules, which allows reviewers to adjust the predicate weights of rule inference, the feature matching thresholds of case inference, and the fuzzy constraint coefficients of scenario inference. It also supports the inference-based annotation and storage of review opinions.

[0042] The iterative self-learning module is configured with a dual-path iterative mechanism that prioritizes inference rules. The preset rule inference layer uses a logistic regression algorithm to update predicate weights, the case inference layer uses a gradient descent algorithm to adjust feature matching thresholds, and the scene inference layer uses a fuzzy C-means clustering algorithm to update fuzzy constraint coefficients. Fuzzy C-means clustering refers to dynamically optimizing the fuzzy coefficients of scene constraints by performing cluster analysis on scene feature data, thereby achieving collaborative optimization of inference rules and agent retrieval strategies.

[0043] like Figure 4-5 As shown, an LLM-based medical ethics compliance verification method based on multi-agent and RAG is presented.

[0044] In this embodiment, researchers write project proposals for targeted drug clinical trials online through the institute's research management platform. The specific implementation steps are as follows: S101. Create a task and match the configuration: Researchers create a research writing task in the system, select the research type as "clinical trial" and the research stage as "project initiation", and upload the writing outline (including chapters such as project background, subject recruitment plan, sample usage plan, and informed consent form design). The system matches a lightweight version of the reasoning rule set for the task, loads the scenario reasoning constraints of the clinical trial-project initiation stage, activates the early warning reasoning threshold (0.6), and shares the same hierarchical knowledge reasoning framework and knowledge reasoning library with the scientific research submission review and precise verification process.

[0045] S102. Content Capture Trigger Configuration: Researchers write the "Subject Recruitment Plan" chapter online. The system captures the writing content and current chapter information in real time, and lightly triggers the rule reasoning sub-framework of the hierarchical knowledge reasoning framework. The research writing early warning agent drives a dynamic RAG retrieval strategy of "writing chapter + rule priority + scene tag". This strategy first matches the chapter tags of the knowledge reasoning base according to the writing chapter, then sorts the matching results according to the rule priority, and finally combines the scene tags to filter the retrieval results, accurately obtaining the ethical knowledge and reasoning rules related to subject recruitment from the knowledge reasoning base.

[0046] S103. Generate graded warnings based on reasoning alerts: The system initiates lightweight collaborative computation at the three-level reasoning layer. The rule reasoning layer matches the written content to find that it does not include the subject experiment risk disclosure clause or does not clearly define the compensation standard, triggering a basic match for the violation point. The scenario reasoning layer adds the scenario constraint of "clinical trial - project initiation stage - subject recruitment" to confirm that the violation point meets the scenario adaptation requirements. The case reasoning layer lightweight matches similar violation cases (confidence level 0.72), and the three-level reasoning collaborative outputs a level two warning judgment result. The system generates graded warnings with reasoning basis on the writing interface, marking the violation point, the corresponding ethical rule (Article 26 of the Declaration of Helsinki), the index of similar cases, the scenario constraints, and preliminary correction suggestions.

[0047] S104. Data collection and rule optimization: Researchers supplement the subject risk disclosure terms and compensation standards according to the warning prompts. The system collects inference trigger data, user correction data, warning confidence and other information in real time for this warning and feeds it back to the iterative self-learning module. The module fine-tunes the trigger threshold of the lightweight inference rules based on the data and optimizes the semantic matching weight of the dynamic RAG retrieval strategy of the research writing warning agent.

[0048] After completing the project proposal, researchers submit an application for review to the hospital's medical research ethics review committee. The specific steps are as follows: S1. Building a framework to construct knowledge and rules with dual binding: In this embodiment, the system has completed the construction of a hierarchical knowledge reasoning framework and a medical research ethics knowledge reasoning base with dual binding of knowledge and rules. It has also completed knowledge updates according to the latest provincial medical research ethics policies to ensure the synchronization of knowledge and reasoning rules, and to share the same framework and knowledge base with the real-time early warning process for scientific research writing.

[0049] S2. Project creation generates exclusive inference configuration: Researchers create research review projects in the system, confirm the research type as "clinical trial" and the research stage as "project initiation", and upload the complete targeted drug clinical trial project initiation report and related attachments. The system launches a research data analysis and reasoning agent to perform structured parsing of the uploaded documents (segmenting chapters, extracting core information, and identifying document types), and matches the scenario reasoning constraints of "clinical trial - project initiation stage" (subject rights protection weight 0.9, sample use approval constraint) for the project, generating a unique reasoning configuration.

[0050] S3. Adjusting the rules to generate a scenario-specific rule set: The hospital ethics reviewer logs into the system, obtains the review application for the research project, and adjusts the inference rule parameters in the visualization interface of the review and optimization module based on the core links of the project (subject recruitment, cross-departmental use of samples): increases the predicate weight of the rules related to subject recruitment to 0.95, lowers the inference trigger threshold of cross-departmental use of samples to 0.65, and creates a scenario-specific inference judgment rule set for the clinical trial-project initiation stage.

[0051] S4. Coupling Verification and Report Generation: The reviewer initiates the review task. The inference control module dynamically schedules the collaborative sequence of six inference agents based on the research project stage. These agents sequentially initiate research data analysis, research ethics rule verification, multi-dimensional tracing, research ethics improvement plan development, and research review report generation. This achieves deep coupling verification between retrieval and inference; that is, the retrieval results are directly fed to the inference engine as the basis for judgment, and the inference logic guides the optimization direction of the retrieval strategy. (1) The research ethics rule verification agent drives a hybrid RAG retrieval strategy of "rules + cases". This strategy first matches the core ethical rules, then retrieves similar violation cases as evidence. The retrieval results are fed to the three-level inference engine to complete the ethical rule verification of single document / cross document and output a list of violations with confidence, including "the cross-departmental use of samples did not clearly define the approval process of the ethics committee" (confidence 0.88) and "the informed consent form did not include the confidentiality clause of experimental data" (confidence 0.82). (2) The multi-dimensional source tracing reasoning agent constructs a four-level source tracing system based on a hierarchical knowledge reasoning framework. It generates a multi-dimensional reasoning source tracing index for violations, which includes research projects, violations, reasoning rules, corresponding clauses, source literature, similar cases, and scenario constraints. It marks the violation points as corresponding to Article 15 of the "Guiding Principles for Ethical Review of Drug Clinical Trials" and Article 8 of the hospital's research ethics management system. It matches two similar violation cases and calculates the matching degree values ​​(0.88 and 0.81) between the violation points and ethical clauses and similar cases. (3) The reasoning agent of the scientific research ethics improvement scheme uses the matching degree value in the source index as the core weight parameter. Based on the flexible correction mechanism of the scenario reasoning engine, it integrates the scenario constraints of the clinical trial-project establishment stage to generate two sets of gradient improvement schemes with complete reasoning basis for each violation point. The schemes are marked with compliance level, scientific research adaptability suggestions and rectification difficulty. The reasoning basis includes ethical rules, similar cases and scenario adaptability constraints. (4) The research review report generation agent integrates information such as the list of violations, multi-dimensional reasoning and tracing index, and gradient improvement plan to generate a draft review report with full-process reasoning and tracing. The report includes core parts such as basic project information, violation judgment results, tracing basis, improvement plan, and preliminary review conclusion.

[0052] S5. Review and optimize the results: The auditor reviews the initial draft of the audit report in the system and reviews the reasoning and judgment results and multi-dimensional traceability index through the review and optimization module: confirm that the judgment results of the violation points are accurate, fine-tune the improvement plan of "samples used across departments", and supplement the "handover process specifications for cross-department sample use". Meanwhile, the fuzzy constraint coefficient related to "sample usage" in the scene inference layer of the visualization interface was adjusted from 0.8 to 0.85, and the reason for the optimization was marked as "adapting to the actual process of cross-departmental scientific research collaboration in our institute". The system stores the reviewer's review operations, rule adjustment parameters, and optimization reasons in a structured manner, generating standardized reasoning optimization data, which serves as the core training data for closed-loop iteration.

[0053] S6. Multi-dimensional optimization forms a closed loop: The system initiates an iterative self-learning module, performing dual-path iterative optimization based on standardized inference optimization data, prioritizing inference rules. That is, it first optimizes the inference rules, and then adaptively adjusts the retrieval strategy based on the optimization results of the inference rules. (1) Optimization path of reasoning rules: The logistic regression algorithm is used to update the weight of the predicate related to "samples used across departments" in the rule reasoning layer, the gradient descent algorithm is used to adjust the feature matching threshold of sample use violation cases in the case reasoning layer, and the fuzzy constraint coefficient of clinical trial items in the scenario reasoning layer is updated by the fuzzy C-means clustering algorithm. (2) Optimization path of retrieval strategy: Based on the optimization results of the reasoning rules, the RAG retrieval strategy of the intelligent agent such as scientific research ethics rule verification and multi-dimensional source tracing is adaptively adjusted, and the weight of retrieval keywords, semantic similarity calculation parameters, and scene tag matching rules are optimized. Meanwhile, the iterative self-learning module adds the ethical requirements related to the "cross-department sample use and handover process" discovered in this review to the scenario reasoning knowledge layer of the knowledge reasoning base, thereby achieving synchronous updates of the knowledge reasoning base and ultimately forming a closed-loop iteration of retrieval-reasoning-knowledge.

[0054] Subsequent applications of system iterative optimization Following the completion of ethical verification for this targeted drug clinical trial research project, the system optimized its reasoning rules and retrieval strategies through an iterative self-learning module, and the knowledge reasoning base was also updated with the latest scenario-specific knowledge. In subsequent ethical verifications of other clinical trial research projects at the hospital, the optimized system can directly adapt to the ethical verification requirements of core aspects such as "cross-departmental use of samples" and "subject recruitment," significantly improving verification accuracy and efficiency. Simultaneously, the system synchronizes with the latest national and provincial medical research ethics policies in real time through API interfaces from authoritative third-party data sources, updating knowledge and rules without restructuring the core architecture and continuously adapting to new ethical verification requirements.

[0055] The embodiments of the present invention are not limited to the aforementioned clinical trial research projects. For other types of medical research projects such as basic research and translational research, it is only necessary to match the corresponding research type tags and scenario reasoning constraints in the knowledge reasoning base, and adjust the weight and trigger threshold of the reasoning rules to achieve accurate ethical compliance verification. At the same time, the system of the present invention can be modularly configured according to the medical research ethics policies of different hospitals and regions, taking into account the high-precision verification needs of large medical institutions and the lightweight application needs of small and medium-sized medical institutions, and has broad industry adaptability.

[0056] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention. These are all equivalent modifications and improvements made to the above embodiments based on the essential technology of the present invention, and all of these fall within the protection scope of the present invention.

Claims

1. A multi-agent and RAG-based LLM medical ethics compliance verification system, characterized in that, include: The hierarchical knowledge reasoning framework, knowledge reasoning base module, multi-agent collaboration module, reasoning control module, review and optimization module, and iterative self-learning module; The hierarchical knowledge reasoning framework constructs a three-level reasoning logic of rule reasoning, case reasoning, and scenario reasoning, thereby making medical research ethics verification hierarchical judgment. The knowledge reasoning base module provides knowledge and reasoning rules support for the hierarchical knowledge reasoning framework, realizing a deep binding between knowledge and reasoning rules; Each agent in the multi-agent collaborative module is embedded in a hierarchical knowledge reasoning sub-framework, and a customized RAG retrieval strategy driven by reasoning logic is configured to achieve deep coupling between retrieval and reasoning. The inference control module has a built-in inference rule set version management engine, which allocates lightweight and full version rule sets for scientific research writing warnings and submission review processes, respectively. The core rules of the two are the same, only the inference trigger threshold and computational complexity are adjusted. The review and optimization module supports professionals in reviewing and optimizing reasoning judgment results and reasoning rules, and generating standardized reasoning optimization data. The iterative self-learning module optimizes the reasoning rules and agent retrieval strategies of the hierarchical knowledge reasoning framework based on optimized data, forming a closed-loop iterative retrieval and reasoning process.

2. The LLM medical ethics compliance verification system based on multi-agent and RAG as described in claim 1, characterized in that: The hierarchical knowledge reasoning framework has three levels of reasoning logic: the rule reasoning layer constructs a rule reasoning engine based on first-order predicate logic, transforming the core clauses of scientific research ethics into rule predicates to achieve basic matching of violation points; The case reasoning layer builds a case matching reasoning engine based on analogical reasoning, and uses feature matching to provide evidence for violation cases. The scenario reasoning layer builds a scenario-adaptive reasoning engine based on fuzzy reasoning, and adds scenario constraints by incorporating scientific research type, stage and regional policies. The three-level reasoning layers proceed sequentially and verify each other. The upper-level reasoning filters, corrects, and supplements the results of the lower level, and outputs a unified judgment result.

3. The LLM medical ethics compliance verification system based on multi-agent and RAG as described in claim 1, characterized in that: The knowledge reasoning base module adopts a dual-binding structured architecture of knowledge and rules, including a reasoning knowledge layer and a reasoning rule layer, and the two layers are deeply bound and updated synchronously. The reasoning knowledge layer stores medical research ethics knowledge in a three-level reasoning logic hierarchy, and all knowledge is labeled with research reasoning tags and semantic vectors. The reasoning rule layer stores the corresponding executable reasoning rules. Each rule corresponds one-to-one with the reasoning knowledge, and triggering the reasoning rule is achieved by calling the knowledge. The knowledge reasoning base module supports connection to authoritative third-party ethical knowledge data sources, and enables real-time knowledge updates through web crawling and API interface synchronization.

4. The LLM medical ethics compliance verification system based on multi-agent and RAG as described in claim 1, characterized in that: The multi-agent collaborative module includes six reasoning agents: scientific research data analysis, scientific research ethics rule verification, multi-dimensional source tracing, scientific research ethics improvement scheme, scientific research review report generation, and scientific research writing early warning. Each of the aforementioned intelligent agents is embedded in a hierarchical knowledge reasoning sub-framework, and is configured with a dedicated reasoning triggering mechanism and a RAG retrieval strategy driven by reasoning logic; The intelligent agents adopt a unified and standardized inference result data interface, which includes core fields such as inference type, judgment result, basis index, and confidence level. The collaboration order is dynamically scheduled by the inference control module based on the research project stage. The scientific research writing early warning scenario uses model distillation technology to lightweight the hierarchical knowledge reasoning framework, reducing computational power consumption.

5. The LLM medical ethics compliance verification system based on multi-agent and RAG as described in claim 4, characterized in that: The multi-dimensional source tracing reasoning intelligent agent constructs a four-level source tracing system based on a hierarchical knowledge reasoning framework, generating a multi-dimensional reasoning source tracing index of scientific research projects, violation points, reasoning rules, corresponding clauses, source documents, similar cases, and scenario constraints, thereby achieving deep binding between source tracing results and reasoning judgment results. The matching degree values ​​between the violation points and ethical clauses and similar cases in the source tracing index are used as the core weight parameters of the gradient generation scheme of the reasoning agent in the scientific research ethics improvement scheme.

6. The LLM medical ethics compliance verification system based on multi-agent and RAG as described in claim 4, characterized in that: The proposed research ethics improvement scheme uses a scenario-based reasoning engine based on a hierarchical knowledge reasoning framework. It designs a reasoning-driven flexible correction mechanism, integrates research type, stage, and regional policy constraints, and generates multiple sets of gradient improvement schemes with reasoning basis, including ethical rules, similar cases, and scenario adaptation constraints.

7. A method for verifying LLM medical ethics compliance based on multi-agent and RAG, characterized in that: Applied to the system described in any one of claims 1-6, the three-level hierarchical reasoning logic is integrated throughout the entire process control, achieving a unified reasoning logic for real-time early warning of scientific research writing and precise verification of scientific research submission review. The precise verification process for scientific research submission review includes: S1. Building a framework to construct a dual binding of knowledge and rules: Build a hierarchical knowledge reasoning framework, construct a medical research ethics knowledge reasoning base with dual binding of knowledge and rules, and realize the synchronization of knowledge access and reasoning rule triggering; S2. Project creation generates exclusive reasoning configuration: Create a research project, set the research type and stage, upload documents to be reviewed, start the research data analysis and reasoning agent to complete the structured parsing of documents, match the scenario reasoning constraints and generate exclusive reasoning configuration; S3. Adjusting rules to generate scenario-specific rule sets: Reviewers adjust the weights and trigger thresholds of reasoning rules to create a research scenario-specific reasoning and judgment rule set; S4. Coupled verification and report generation: Start each reasoning agent in sequence, and through retrieval and reasoning coupled verification, output a list of violations, a reasoning source index, and a gradient improvement plan, and generate a draft audit report with full-process reasoning source tracing. S5. Review and optimize data: The auditor reviews and optimizes the reasoning results and source index, marks the reasons for optimization, and the system generates standardized reasoning optimization data. S6. Multi-dimensional optimization to form a closed loop: Based on the optimization of data, the three-level reasoning rules, intelligent agent retrieval strategy and knowledge reasoning base are optimized synchronously to form a closed loop iteration of retrieval, reasoning and knowledge.

8. The method for verifying LLM medical ethics compliance based on multi-agent and RAG as described in claim 7, characterized in that: The real-time early warning process for scientific research writing and the precise verification process for scientific research submission review share the same hierarchical knowledge reasoning framework and knowledge reasoning base, including the following steps: S101. Create a task and match the configuration: Create a research writing task, set the research type and outline, match the lightweight reasoning rules and scenario constraints, and activate the warning reasoning threshold. S102, Content Capture Trigger Configuration: Capture written content and chapters in real time, trigger a lightweight rule reasoning sub-framework, and drive a dynamic retrieval strategy to obtain matching ethical knowledge and reasoning rules; S103. Generate graded alerts based on reasoning: Generate graded alerts with reasoning basis by outputting the alert judgment results through three-level reasoning in a lightweight collaborative manner. S104. Data collection and rule optimization: Collect early warning reasoning trigger data and user correction data, and feed them back to the iterative self-learning module to optimize lightweight reasoning rules and early warning retrieval strategies.

9. The method for verifying LLM medical ethics compliance based on multi-agent and RAG according to claim 7, characterized in that: In step S5, the system supports visual adjustment of reasoning rules and reasoning annotation of review opinions. Reviewers can directly adjust the predicate weight of rule reasoning, the feature matching threshold of case reasoning, and the fuzzy constraint coefficient of scenario reasoning. The adjustment operation is bound to the review opinions to form a traceable record of reasoning rule optimization, which serves as the core training data for closed-loop iteration.

10. The method for verifying LLM medical ethics compliance based on multi-agent and RAG according to claim 7, characterized in that: The self-learning module adopts a dual-path iterative mechanism that prioritizes inference rules. First, it optimizes the three-level inference rules based on standardized inference optimization data, and then adaptively adjusts the RAG retrieval strategy of each agent. Among them, the rule reasoning layer uses the logistic regression algorithm to update the predicate weights, the case reasoning layer uses the gradient descent algorithm to adjust the feature matching threshold, and the scenario reasoning layer uses the fuzzy C-means clustering algorithm to update the fuzzy constraint coefficients.