Medical ethical test question generation method and device and storage medium
By constructing a matrix design of legal provisions, roles, and scenarios and a question generation method driven by a large language model, the problem of the lack of diversity and complex scenarios in medical ethics test questions in existing technologies is solved. The generated questions can accurately reflect the test points of legal provisions and demonstrate complex ethical conflicts, thereby improving the quality of questions and the evaluation effect.
Patent Information
- Application Number
- CN202511456420.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-01-09
AI Technical Summary
Existing methods for generating medical ethics test questions lack diversity and coverage of complex scenarios, making it difficult to deeply examine ethical conflicts. Furthermore, the generation process lacks systematicity and a quality feedback mechanism.
By constructing a question design matrix of legal provisions, roles, and scenarios, and using a large language model to generate questions, combined with constraints of relevance, concealment, and authenticity, medical ethics test questions are generated, including non-conflict and conflict scenario elements, to ensure that the questions conform to the test points of ethical legal provisions and are integrated into clinical situations.
The generated medical ethics test questions are more diverse and complex, which can profoundly demonstrate ethical conflicts and dilemmas, improve the realism and subtlety of the questions, and enhance the assessment of medical staff's ethical decision-making ability.
Smart Images

Figure CN121303340A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing application technology, and in particular to a method, device and storage medium for generating medical ethics test questions. Background Technology
[0002] With the rapid development of the medical field, medical ethics, as an important component of medical practice, has become a key issue in medical education, clinical practice, and ethics committee decision-making. Medical ethics not only encompasses basic ethical principles such as patient rights, informed consent, and privacy protection, but also involves complex ethical conflicts and balances of interests.
[0003] Currently, medical ethics education and assessment rely on manually designed cases and test questions. These questions are typically based on laws, regulations, or ethical standards, aiming to help medical professionals and students understand and apply ethical principles. However, current methods for generating medical ethics test questions generally rely on fixed templates or simple logical structures, resulting in a lack of diversity and an inability to cover the complex situations in medical ethics. Secondly, current methods often only scratch the surface of legal provisions or ethical principles when designing questions, lacking consideration for deeper ethical conflicts, leading to relatively simplistic scenarios in the generated questions. Summary of the Invention
[0004] This application provides a method, device, storage medium, and program product for generating medical ethics test questions, which at least solves the problem of lack of diversity and coverage of complex scenarios in current related technologies.
[0005] In a first aspect, embodiments of this application provide a method for generating medical ethics test questions, comprising: acquiring medical ethics provisions and determining a target ethical scenario matching the medical ethics provisions from a plurality of preset ethical scenarios; determining at least one associated role matching the target ethical scenario and generating corresponding context elements for each associated role, thereby constructing a question design matrix with a corresponding structure of provisions-roles-context; the context elements include non-conflict context elements or conflict context elements, wherein the non-conflict context elements define violations that directly violate the medical ethics provisions in standard medical procedures, and the conflict context elements define extreme background elements that conflict with the legal interests of the medical ethics provisions; constructing question generation prompts based on the question design matrix to drive a large model to reason from at least one question-generating constraint and output corresponding medical ethics test questions; the question-generating constraint includes at least one of the following: a relevance constraint requiring the generated questions to accurately reflect the core test points of the provisions and present violations through reasonable contexts; a concealment constraint requiring the violation details in the generated questions to naturally integrate into the clinical context and prohibiting the use of prompting words; or a authenticity constraint requiring the generated questions to contain complete medical background and details that conform to clinical logic.
[0006] Secondly, embodiments of this application provide an electronic device comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the medical ethics test question generation method of any embodiment of this application.
[0007] Thirdly, embodiments of this application provide a storage medium storing a computer program thereon, characterized in that, when the program is executed by a processor, it implements the steps of the medical ethics test question generation method of any embodiment of this application.
[0008] Fourthly, embodiments of this application provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the medical ethics test question generation method of any embodiment of this application.
[0009] The beneficial effects of the embodiments of this application are as follows: By selecting target ethical scenarios from multiple pre-set ethical scenarios that match medical ethics provisions, the generated questions accurately reflect the specific application context of medical ethics. Secondly, based on each target ethical scenario, associated roles are generated, and non-conflict or conflict situation elements are designed for each role. This allows the questions to cover a wide range of ethical decision-making scenarios, particularly highlighting ethical conflicts and their dilemmas. By setting constraints such as relevance, concealment, and realism in the questions, it is ensured that the generated questions not only accurately reflect the core points of the legal provisions but also naturally integrate violations into clinical situations, enhancing the realism and concealment of the questions. As a result, the generated medical ethics test questions are more diverse, complex, and highly contextualized, effectively assessing the judgment and decision-making abilities of different roles when facing real ethical conflicts. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart illustrating an example of a method for generating medical ethics test questions according to an embodiment of this application is shown. Figure 2 A flowchart illustrating an example of obtaining medical ethics provisions according to an embodiment of this application is shown. Figure 3 This document illustrates an example of an operation flowchart for determining associated roles according to an embodiment of this application. Figure 4 A flowchart illustrating an example of generating context elements according to an embodiment of this application is shown; Figure 5 A flowchart illustrating an example of a method for generating medical ethics assessment questions according to an embodiment of this application is shown. Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0013] It should be noted that test question generation technology, as a key technology for transforming domain knowledge into assessment questions, has wide applications in education, training, and competency assessment. Its development has roughly gone through stages from traditional manual question generation, template-based generation, rule-based generation, to the current stage of intelligent generation centered on deep learning, especially large language models (LLMs).
[0014] Some researchers have proposed test question generation methods based on fixed templates or simple logic. These methods generate test questions using pre-set structured templates to improve efficiency. Specifically, the process involves first obtaining a pre-set test question template, the corresponding logical expression, and the variable parameters within the template. Then, upon receiving assignments to the variable parameters, it is determined whether the assignments satisfy the pre-set logical expression. Finally, if the logical expression is satisfied, the target test question is generated based on the template, variable values, and parameter values. While this type of method generates new test questions by changing the variable parameters, thus saving some manpower, its flexibility and the depth of the generated questions are limited.
[0015] Other researchers have proposed test item generation methods based on large language models. With the development of large language model technology, leveraging its powerful language understanding and generation capabilities to create test items has become a new technological trend. Specifically, first, the method obtains the user's test item generation requirements (such as test points, question types, and difficulty levels) in natural language input. Next, to help the model better understand the requirements, the method may first parse the user's natural language request into structured information. Finally, based on the structured information, a pre-set Prompt template (e.g., a modified or newly created template) is selected, and the structured information is filled into the template to form the final instruction. This instruction is then input into a large test item generation model that has been pre-trained and fine-tuned with test item knowledge to generate the test item.
[0016] Other scholars have proposed building a test question bank for medical ethics and safety.
[0017] Although current technologies have made some progress in generating medical ethics test questions, the following significant drawbacks still exist for the specific task of generating high-quality, highly complex, and highly contextualized medical ethics assessment questions: 1) The question generation process lacks systematicity, and the scenario and conflict design is insufficient.
[0018] In current related technologies, whether template-based or large language model-based methods, while limiting the scenarios or test points when generating questions, they still essentially rely on relatively fixed templates or simple instructions. The fundamental reason is that they lack a structured, top-down top-level design and fail to systematically construct a refined design matrix from "application scenario - regulations / norms - assessment points" to "multi-role perspective - conflict / non-conflict situations".
[0019] This lack of a mechanism results in incomplete role coverage in the generated questions, and makes it difficult to reliably and in batches generate complex conflict scenarios that profoundly test the model's ethical balancing ability (such as questions like "the conflict between a patient's right to informed consent and their right to life and health when they are unconscious"). Template-based methods are difficult to generate complex scenarios due to their rigid structure; while general methods based on LLM, lacking fine-grained guidance, produce highly random and inconsistent results.
[0020] 2) The question generation process is a linear open loop, lacking iterative optimization and quality feedback mechanisms.
[0021] Most current technologies employ a "one-off" or linear generation process: user input requirements -> model generates questions. This process lacks an inherent iterative optimization loop to improve the quality of generated questions. For example, in question generation methods based on fixed templates or simple logic, user feedback can be used to iterate the model, but this mainly focuses on long-term optimization of the model itself. In the "guardian loop" framework published in the literature, feedback is mainly used to optimize model alignment, rather than directly optimizing the question generation process itself. These technologies do not use the generated "high-quality questions" as valuable examples to dynamically and immediately feed back into the next round of question generation instructions. This prevents the generation process from achieving self-evolution and snowballing growth in quality, making it difficult to continuously produce high-quality, challenging, and stylistically consistent assessment questions.
[0022] 3) The processing of original knowledge (laws and regulations) is rather crude, resulting in information redundancy.
[0023] In current technologies, when utilizing knowledge sources such as laws and regulations, they are typically used directly as reference materials or to build knowledge bases. However, these original documents often contain numerous clauses with similar semantics, overlapping content, or different expressions. Directly using this redundant information reduces the signal-to-noise ratio of subsequent generated instructions, increasing the burden of manual screening and proofreading, and introducing unnecessary interference to the model's accurate understanding and efficient utilization. Therefore, before generating questions, there is a lack of an automated knowledge preprocessing and refinement step, such as using semantic similarity calculation to deduplicate and merge legal provisions, thereby constructing a more refined and efficient rule knowledge base.
[0024] It should be understood that the above description of the relevant technologies is intended only to help the public better understand the inventive spirit and motivation of this application, and is not intended to limit this application. Furthermore, the technical solutions described in the above-mentioned relevant technologies are not prior art, and may also be undisclosed technical solutions, such as those under research or in the laboratory stage.
[0025] Figure 1 A flowchart illustrating an example of a method for generating medical ethics test questions according to an embodiment of this application is shown. Through matrix modeling of "legal provisions-role-situation," integrating non-conflict elements and conflict situational elements, the method ensures that questions closely adhere to core legal provisions while introducing multi-dimensional ethical conflicts to enhance analytical depth. By combining relevance, concealment, and authenticity constraints to drive large-scale model reasoning, the generated questions achieve unity in compliance, clinical credibility, and diversity, significantly improving the effectiveness and reliability of medical ethics testing.
[0026] like Figure 1As shown, in step S110, medical ethics provisions are obtained, and a target ethical scenario that matches the medical ethics provisions is determined from a set of preset ethical scenarios.
[0027] Here, relevant medical ethics provisions are extracted from a medical ethics and regulations database. These provisions can cover areas such as informed consent, patient privacy, the right to life, and ethical review. After acquisition, each provision is matched with actual application scenarios in the field of medical ethics to ensure that the ethical scenario corresponding to each provision truly reflects the ethical issues involved.
[0028] Specifically, Natural Language Processing (NLP) technology is used to analyze the content of medical ethics provisions, extracting key legal keywords and ethical principles, such as "informed consent," "right to life," and "privacy protection." These keywords are then semantically matched with multiple pre-defined medical ethics scenarios to identify those scenarios relevant to the extracted legal provisions. It should be understood that the types of pre-defined ethical scenarios can be diverse, including, for example, "human experimentation," "assisted reproduction," "medical informed consent," "palliative care," and "end-of-life care."
[0029] This ensures that the generated test questions are accurately designed for specific medical ethics scenarios, so that each question is closely integrated with the legal background and reflects the actual ethical situation, avoiding randomness and irrelevance in question generation, thereby improving the relevance and effectiveness of the questions.
[0030] In step S120, at least one associated role that matches the target ethical scenario is identified, and corresponding situational elements are generated for each associated role, thereby constructing a question design matrix with a corresponding structure of law provision-role-situation.
[0031] Here, context elements include non-conflict context elements or conflict context elements. Non-conflict context elements define violations that directly violate medical ethics provisions in standard medical procedures, while conflict context elements define extreme background elements that conflict with the legal interests of medical ethics provisions.
[0032] In some implementations, roles can be identified for each target ethical scenario, and contextual elements can be generated for each role. Role definition and scenario design are key steps in generating medical ethics test questions. Each ethical scenario may involve multiple roles, such as "patient's side," "doctor's side," "nurse's side," and "ethics committee." Based on the specific ethical issues addressed by the relevant legal provisions, the behavior and decisions of each role in that scenario are determined, and corresponding contextual elements are generated.
[0033] Specifically, for each target ethical scenario, the system automatically identifies the relevant ethical decision-making roles by semantically analyzing keywords in the legal provisions. For example, in the "informed consent" scenario, the roles involved may include "patient," "doctor," and "hospital management," while in the "palliative care" scenario, the roles involved may include "doctor," "patient's family," and "nursing staff."
[0034] For each role, non-conflict and conflict scenario elements can be designed based on ethical scenarios. Non-conflict scenario elements describe violations of ethical provisions under standard medical procedures, while conflict scenario elements involve ethical conflicts under complex background conditions, making the behavior appear reasonable on the surface, thus increasing the difficulty of ethical decision-making. Therefore, by generating roles and scenario elements, various ethical conflict and non-conflict scenarios in medical ethics testing can be comprehensively covered, ensuring that the questions can present the complexity of different ethical judgments.
[0035] In step S130, prompt words for question generation are constructed based on the question design matrix to drive the large model to reason from at least one question constraint and output the corresponding medical ethics test questions.
[0036] Here, the constraints on the questions include at least one of the following: the requirement that the generated questions accurately reflect the core test points of the legal provisions and present the violations in a reasonable context, the requirement that the details of the violations in the generated questions naturally integrate into the clinical context and prohibit the use of suggestive words, or the requirement that the generated questions contain complete medical background and details that conform to clinical logic.
[0037] In some implementations, a question design matrix based on legal provisions, roles, and scenarios can be used to construct prompts for question generation. Large-scale models (such as the Qwen series or GPT series of large language models) will reason based on these prompts to generate medical ethics test questions that meet the specified requirements. The prompts guide the model to generate questions that meet the requirements of relevance, concealment, and authenticity.
[0038] Specifically, prompt templates containing relevant, implicit, and authentic requirements can be integrated with the legal provisions, roles, and scenarios generated in the preceding steps to construct corresponding prompts for question generation. This clearly indicates the core requirements that the questions must meet, such as relevance, implicitness, and authenticity. Furthermore, the large model uses these prompts to reason and, combined with question constraints (such as relevance, implicitness, and authenticity constraints), automatically generates medical ethics test questions, ensuring the quality and complexity of the generated questions.
[0039] Therefore, by constructing precise prompts for question generation and guiding large models to reason, and automatically handling multiple constraints, it is possible to ensure that the generated test questions not only conform to the core test points of ethical laws, but also demonstrate complex ethical situations, which greatly improves the efficiency and quality of question generation.
[0040] Figure 2 A flowchart illustrating an example of obtaining medical ethics provisions according to an embodiment of this application is shown.
[0041] like Figure 2 As shown, in step S210, legal provision screening prompts are constructed based on the candidate legal provision set to drive the large model to screen at least one ethically relevant legal provision from the candidate legal provision set according to the legal provision screening constraints.
[0042] Here, the legal provisions selection constraints include at least one of the following: requiring the selected legal provisions to involve prohibited terms or keywords of core ethical issues, requiring the selected legal provisions to involve sensitive groups or ethically controversial technologies, or requiring the selected legal provisions to involve ethical risk constraints that would lead to risks to life safety or major privacy leaks.
[0043] Specifically, the candidate legal provision set is a collection of multiple legal provisions that may be related to medical ethics. These provisions are derived from various legal documents, ethical norms, and regulatory databases, including clauses concerning medical decision-making, patient informed consent, and the legality of medical practices. Furthermore, by constructing legal provision screening prompts, the large model is guided to select ethically compliant provisions from the candidate legal provision set based on screening constraints. The design of the screening prompts can effectively cover various screening conditions, such as ethical clarity, ethical potential, and ethical risk.
[0044] In the ethical explicitness constraint, the selected legal provisions are required to contain prohibitive terms (such as "prohibited" or "must not") or keywords involving core ethical issues (such as "patient informed consent," "privacy protection," and "voluntary"), thereby ensuring that the selected legal provisions have explicit ethical constraints. In the ethical potential constraint, the selected legal provisions may involve ethical issues that could affect sensitive groups (such as underage patients, elderly patients, and vulnerable groups), for example, certain medical practices may trigger ethical controversies or risks within specific groups. In the ethical risk constraint, legal provisions involving potential risks to life safety or significant privacy breaches are selected. These provisions involve risks that could directly harm patients and therefore require special attention. By translating legal provision selection prompts into concrete language, the large model can accurately understand the selection constraints, thereby guiding the model to complete the legal provision selection task and effectively filtering out ethically compliant provisions from a large set of candidate legal provisions.
[0045] In step S220, medical ethics provisions are determined based on the various ethically related provisions.
[0046] In one example of an embodiment of this application, the filtered set of legal provisions includes all ethically relevant legal provisions that meet the constraints, and these ethically relevant legal provisions can be used as medical ethics provisions. By working together with legal provision filtering prompts and a large model, combined with ethical constraints, the accuracy and efficiency of the filtering process can be ensured. Thus, based on a precise filtering mechanism and an intelligent reasoning engine, the legal provisions in the candidate legal provision set that meet ethical requirements are effectively filtered out.
[0047] In another example of the embodiments of this application, the various ethically related legal provisions can also be optimized, such as by screening or filtering, to determine the medical ethics provisions.
[0048] It should be noted that during the screening of legal provisions, it may be found that many provisions, although worded differently, have very similar substantive content or normative purpose. This redundancy can lead to inefficiency in analysis and application. To avoid redundant analysis of duplicate or similar provisions and to ensure the conciseness, accuracy, and operability of the final set of medical ethics provisions, these similar provisions can be merged to reduce duplicate provisions and redundant analysis.
[0049] In some implementations, semantic similarity is calculated for each ethically related legal provision, and multiple ethically related legal provisions with corresponding semantic similarity exceeding a preset threshold are merged to generate corresponding atomized rules. Then, based on each ethically related legal provision with semantic similarity not exceeding the preset threshold and the atomized rules, medical ethical provisions are determined.
[0050] Here, by introducing automated legal text semantic analysis and merging steps, a streamlined and non-redundant normative knowledge base is constructed, laying a solid foundation for generating high-quality questions and reducing manual processing costs.
[0051] Specifically, semantic similarity calculation technology is used to analyze candidate legal provisions at the semantic level. Based on semantic similarity rather than simple textual similarity, it determines which legal provisions actually express the same ethical norm. By calculating the semantic similarity of each pair of legal provisions, it is possible to identify which provisions contain repetitive content in their expression. If the semantic similarity exceeds a preset threshold, these legal provisions can be merged into a single atomized rule representing that ethical norm. Through atomized rules, it is ensured that each legal provision covers all relevant ethical points as concisely as possible, and that each atomized rule is independent and operable.
[0052] By using semantic similarity calculation and legal provision merging, the problems of legal provision redundancy and repetitive analysis can be effectively solved, improving the processing efficiency of legal provisions. The merged atomic rules are not only concise and clear, but also have higher application value, ensuring a balance between accuracy and efficiency. At the same time, it avoids repetition and redundancy caused by too many legal provisions, making the entire legal provision set more refined and easier to operate.
[0053] Figure 3 A flowchart illustrating an example of determining associated roles according to an embodiment of this application is shown.
[0054] like Figure 3 As shown, in step S310, at least one basic role that matches the target ethical scenario is analyzed.
[0055] It should be noted that the "basic roles" refer to the core participants that frequently appear in medical ethics scenarios. These roles typically include, but are not limited to, patients, medical personnel (doctors, nurses), medical institutions, family members, and legal representatives. These roles play a fundamental legal and ethical role in the ethical context. The definition and participation of basic roles vary depending on the ethical scenario. For example, in informed consent scenarios, patients, doctors, and medical institutions are basic roles; while in privacy protection scenarios, patients, medical institutions, and their relevant data protection personnel may become basic roles.
[0056] In step S320, keywords from medical ethics laws are extracted, and at least one extended special role is determined based on the keywords and the target ethical scenario.
[0057] Specifically, legal keywords refer to terms that summarize the core content of a legal provision and embody the specific behavioral norms stipulated by law, such as "informed consent," "privacy protection," and "patient rights." In specific medical ethics contexts, basic roles may need to be further expanded into special roles. These roles are usually expanded and supplemented based on the specific content of the medical ethics provisions and the actual needs of the target ethical scenario. For example, when dealing with privacy protection issues, a "data protection officer" might be added as a special role; when dealing with ethical situations involving underage patients, a "legal representative" can become an expanded special role.
[0058] By extracting key terms from legal provisions and combining them with the needs of target ethical scenarios, the system intelligently identifies and expands into special versions of these basic roles, thereby accurately reflecting the ethical constraints stipulated in the legal provisions.
[0059] In step S330, the corresponding associated roles are determined based on each basic role and extended special role.
[0060] Specifically, all basic and extended special roles are summarized to obtain the relevant roles under the corresponding medical ethics provisions. For example, in ethical scenarios involving informed consent, basic roles may include "patients" and "medical staff," while extended special roles may include "legal representatives," "ethics committees," etc., thus providing a multi-dimensional perspective to help ensure the compliance and effectiveness of ethical behavior.
[0061] Figure 4 A flowchart illustrating an example of generating context elements according to an embodiment of this application is shown.
[0062] like Figure 4 As shown, in step S410, it is detected whether there are conflicting legal interests in the target ethical scenario that oppose the provisions of medical ethics law.
[0063] It should be noted that ethical scenarios often involve multiple ethical interests, and in some cases, these interests may conflict. For example, there may be a conflict between a patient's right to privacy and a doctor's obligation to inform, or between a patient's informed consent and the opinions of their family. Therefore, in these situations, it is possible to detect whether there are conflicting interests that contradict medical ethics provisions, in order to accurately generate matching scenario elements.
[0064] Specifically, through contextual analysis and legal interpretation techniques, legal interests are extracted from the target ethical scenarios. For example, in the "patient privacy protection" scenario, the main legal interests may include the patient's right to privacy, the professional ethical responsibilities of medical personnel, and the interests of public health. Then, the relationships between legal interests are modeled, and if the relationships between different legal interest nodes are contradictory or conflicting (such as the conflict between privacy and public health), they are marked as conflicting legal interests.
[0065] In step S421, if the conflict does not exist, a non-conflict situation element corresponding to the non-conflict situation is generated for each associated role.
[0066] In ethical scenarios where there are no conflicting legal interests, the actions of each role do not involve ethical conflicts or illegal acts, and can be directly defined as violations of medical ethics provisions within standard medical procedures.
[0067] In step S423, if the conflict exists, a conflict situation element corresponding to the conflict situation is generated for each associated role.
[0068] In target ethical scenarios, when conflicting legal interests exist, the generation of situational elements will reflect the actual manifestation of ethical conflict. These scenarios no longer merely follow the positive requirements of legal provisions, but take into account the contradictions and conflicts between different legal interests, generating situational elements that can reflect ethical conflicts.
[0069] In medical ethics, conflicting legal interests refer to the opposition or contradiction between two or more ethical legal interests. In such cases, ethical decisions cannot simply follow the guidance of a single legal provision but must consider the balance between different legal interests. Conflict scenario elements are used to reflect and visualize these conflicts, aiding in the analysis of the antagonism between different legal interests.
[0070] For example, patient privacy rights versus public health requirements, and patients' right to informed consent versus family intervention, can all constitute ethical conflicts. These conflicts directly affect the behavioral choices and judgments of individuals in specific situations. By generating conflict scenario elements, we can reveal how individuals make decisions, weigh ethical and legal interests, and face moral and legal constraints in practice within the context of ethical conflicts.
[0071] Specifically, for each associated role, specific conflict scenario elements can be generated based on the identified conflicting legal interests to describe the ethical decision-making issues that each role may face in the conflict scenario. For example, if a patient insists on not disclosing their health information, the doctor faces an ethical conflict of whether to disclose the information to the family; medical staff must decide whether to disclose patient information to ensure public safety, even if the patient explicitly requests privacy.
[0072] In situations where conflicting legal interests exist, various ethical conflict scenarios can be generated based on roles, conflict points, and the complexity of ethical decisions. The scenarios can describe the actions that each role may take in the context of the conflict and consider their ethical consequences. For example, how a doctor chooses between "informed consent" and "emergency treatment"; how a patient makes a judgment between privacy protection and the need to inform their family.
[0073] Therefore, in medical ethics tests and case studies, conflict scenario elements not only increase the complexity and practicality of the questions, but also help students or agents train their ability to deal with complex ethical issues. By simulating ethical dilemmas in the real world, conflict scenario elements help improve participants' awareness of ethical conflicts and enhance students' or agents' ability to make ethical decisions in practice.
[0074] Regarding the generation of conflict situation elements, in some examples of embodiments of this application, extreme background elements that conflict with the legal interests of medical ethics provisions are injected into standard medical procedures, so that the requirements of complying with medical ethics provisions and another legal interest or ethical principle arising from the extreme background elements are in significant conflict. The extreme background elements include at least one of the following: time constraints, resource scarcity, or information asymmetry.
[0075] In medical ethics contexts, certain actions, while violating ethical provisions, may appear reasonable or necessary under specific extreme circumstances. These subjective ethical questions are often more challenging. To achieve the aforementioned goal, conflict scenario elements are incorporated, injecting the conflict of legal interests between standard medical procedures and medical ethical provisions into the context through extreme background elements, creating a scenario with a disguised rationality. The introduction of extreme background elements not only makes the scenario elements closer to the actual clinical decision-making environment but also helps students or agents understand ethical judgments in complex situations.
[0076] While standard medical procedures comply with legal provisions, they may not be able to fully comply with ethical provisions due to the influence of specific circumstances, or they should not be affected by specific circumstances and should continue to comply with ethical provisions.
[0077] Specifically, extreme background factors (such as time constraints, resource scarcity, and information asymmetry) are contextual factors that give a superficial rationale to ethically conflicting behaviors. They often prompt medical personnel to make trade-offs in clinical decision-making, potentially temporarily violating certain requirements of medical ethics regulations. Regarding time constraints, in emergency situations, medical personnel may not have time to obtain detailed informed consent and may proceed directly to surgery or other treatments. Regarding resource scarcity, when medical resources are limited, due to an excessive number of critically ill patients, hospitals may be temporarily unable to provide detailed medical consultations to each patient, resulting in some patients not fully understanding their treatment plans. Regarding information asymmetry, in situations where information access is asymmetrical, patients may not receive complete medical information, and the judgments made by doctors based on the available information may deviate from the patient's best interests.
[0078] To make ethical decisions regarding certain conflicting behaviors appear "reasonable" in specific contexts, scenarios will be automatically generated, incorporating background factors such as time constraints, resource scarcity, and information asymmetry. These scenarios will help analyze why certain behaviors, which are not permitted under standard medical ethics procedures, can appear "reasonable" in special situations and potentially create a false sense of legitimacy in ethical decision-making. Thus, by introducing extreme background elements, we can not only demonstrate ethical conflicts in actual decision-making but also help understand how conflicts of ethical and legal interests can be "disguised" as reasonable decision-making processes through contextual adjustments, thereby providing a more comprehensive perspective on legal and ethical decision-making.
[0079] In some examples of embodiments of this application, the medical ethics test questions output by the large model can be used to update the medical ethics sample question bank, for example, by being directly added to the medical ethics sample question bank.
[0080] While large-scale models can rapidly expand the question bank, the initially generated questions may contain errors, ambiguities, or questions that do not meet medical ethics teaching standards. In some implementations, the medical ethics test questions output by large-scale models are used only as initial test questions and can be further reviewed and screened, such as through manual review or NLP analysis, to include high-quality medical ethics test questions into the medical ethics sample question bank, ensuring their quality, accuracy, and compliance with ethics education standards.
[0081] Then, the target ethical legal provisions are identified, and target medical ethics sample questions that match the target ethical legal provisions are retrieved from the medical ethics sample question bank.
[0082] Specifically, each ethical provision has its unique test points, and corresponding test questions are associated with different test points. For example, NLP technology is used to perform deep semantic analysis on the target ethical provision to extract its core test points. These test points can be ethical behaviors, protection of legal interests, or the responsibilities of medical personnel reflected in the provision. For instance, for the "informed consent" provision, test points might include "patient's right to know," "obligation to inform," and "voluntary consent." Then, based on the core test points of the target provision, relevant questions are retrieved from a medical ethics question bank, for example, using vector space models or semantic similarity algorithms to automatically match the most relevant sample questions.
[0083] Based on the target medical ethics sample questions, a few sample example prompts are constructed to drive a large language model to imitate the target medical ethics sample questions and generate incremental medical ethics test questions.
[0084] Here, by constructing few-sample example prompts, more incremental questions can be generated based on a small number of samples using a large language model. In some implementations, by analyzing target medical ethics sample questions, the core structure and linguistic features of the questions are extracted, and few-sample example prompts are constructed. For example, these prompts may contain key information such as legal provisions, scenario settings, and role descriptions, so that the model can generate relevant incremental questions.
[0085] For example, prompts explicitly instruct the large language model to mimic the style, logic, and complexity of high-quality sample questions, generating more new, high-quality questions around specified test points. Thus, through these few-sample example prompts, the large language model is driven to generate new questions matching the target medical ethics sample questions. The generated questions will rely on the target legal provisions and contextual settings, revolving around specified ethical decision-making issues. By continuously using high-quality outputs as high-quality inputs, a multi-stage iterative optimization closed loop is formed, continuously improving the overall quality and level of question generation.
[0086] In some examples of embodiments of this application, a systematic, multi-stage, closed-loop iterative method and system for generating medical ethics assessment questions is provided. Specifically, addressing the problem of uncontrollable question quality in current related technologies, this method explicitly defines multi-dimensional quality assessment criteria (such as high relevance, high concealment, and high authenticity) in the prompt, and combines the chain-of-thought principle to guide a large language model to generate high-quality questions following preset logical steps, thereby ensuring that the output meets expectations.
[0087] By constructing a structured framework of "application scenarios - ethical norms - assessment points" and introducing a multi-dimensional question design matrix of "rules - roles - conflict / non-conflict", the generated questions can comprehensively and deeply cover complex medical ethics scenarios, especially the ability to stably generate ethical conflict situations with realistic rationality, thereby improving the systematic nature and situational complexity of question generation.
[0088] Furthermore, in response to the linear, open-loop generation process in current related technologies, this application introduces an iterative expansion generation (i.e., "re-generation") mechanism based on high-quality sample questions. By utilizing the principle of few-shot prompting, verified high-quality questions are used as examples to guide the model to produce more questions of the same quality, forming a closed loop of quality enhancement.
[0089] Figure 5 This document illustrates an example operation flowchart of a medical ethics assessment question generation method according to an embodiment of this application. This method, executable by a computer device, is a question generation system deeply customized for the specific domain of "medical ethics," driven by a series of automated rules. In particular, addressing the unique characteristics of medical ethics scenarios (such as ethical conflicts and complex interest conflicts), it specifically resolves this issue by constructing a domain knowledge base and design rules oriented towards ethical conflicts, ensuring that the generated questions not only conform to medical professionalism but also contain profound ethical reflection value. Furthermore, by constructing a multi-role, multi-dimensional question design matrix, it utilizes a set of automated rules to systematically and definitively transform unstructured legal provisions into a structured, multi-dimensional assessment case framework.
[0090] like Figure 5 As shown, in step S510, the knowledge base is automatically constructed and structured.
[0091] Here, scattered and redundant original legal and regulatory documents are processed into a refined and structured knowledge base.
[0092] First, based on multiple pre-defined medical ethics application scenarios (e.g., human trials, assisted reproductive technology, organ transplantation, etc., totaling 24 specific scenarios), relevant laws, regulations, industry standards, and ethical norms texts are systematically collected to construct a core framework of "application scenario - ethical norms and regulations dataset - assessment test point dataset".
[0093] To eliminate redundancy among legal provisions, this invention employs natural language processing (NLP) technology for automated merging. Specifically, a pre-trained sentence vector model (such as sentence-transformers / paraphrase-multilingual-MiniLM-L12-v2) is used to vectorize and embed all legal provisions. Subsequently, the cosine similarity between pairwise legal provision vectors is calculated, and pairs of legal provisions with similarity higher than a preset threshold (e.g., 0.85) are selected. Finally, these pairs of legal provisions with similarity higher than the preset threshold are reviewed and merged to form a concise and representative set of atomic rules.
[0094] It should be noted that the knowledge base is the foundation of the entire system. To ensure its high quality and relevance, after receiving ethical or legal documents, the system will automatically evaluate and filter each regulation. Only legal provisions that meet at least one of the following three criteria will be extracted and included in the initial corpus: a. High Ethical Explicitness: The legal text directly embodies explicit ethical constraints. The system identifies such provisions through keyword matching (such as "prohibited," "must not," "must," "shall") or by reference to core ethical issues (such as "informed consent," "fundamental human rights").
[0095] b. High Ethical Potentiality: While the legal provisions may not directly use ethical terminology, their implementation or violation could trigger significant ethical controversies. The system determines this by identifying whether sensitive groups (such as "minors") are involved, cutting-edge technologies (such as "gene editing") are applied, or multiple conflicts of interest exist.
[0096] c. High Ethical Risk: Violation of this provision may cause serious ethical harm. The system determines this by identifying whether it involves high-risk consequences such as personal safety, significant privacy breaches, or severe discrimination.
[0097] Furthermore, the selected legal provisions are automatically categorized across multiple scenarios. Specifically, the system can perform semantic similarity matching between the title and content of the legal provisions and a pre-defined list of 24 core application scenarios for medical ethics (such as human trials, end-of-life care, and assisted reproduction), and automatically classify them into one or more relevant scenarios.
[0098] Furthermore, to avoid information redundancy, all legal provisions in the initial corpus can be vectorized. For example, a pre-trained sentence vector model can be used to convert each legal provision into a high-dimensional vector. Then, through similarity calculation, when the semantic similarity between any two legal provisions is higher than a preset threshold (e.g., 0.85), the system automatically marks these two as "to be merged" and prioritizes retaining the one with more comprehensive content or from a higher-level legal document, forming the final, non-redundant "atomic rule knowledge base".
[0099] In step S520, the multidimensional problem design matrix is generated.
[0100] Here, by generating a multi-dimensional question design matrix, we can provide a refined perspective and contextual guidance for subsequent question generation.
[0101] For each refined rule in each application scenario, multiple core roles are pre-defined (e.g., "researcher," "ethics committee member," and "subject" in the "human trial" scenario). For each role, two scenarios are further designed: a "non-conflict" scenario (describing violations under normal circumstances) and a "conflict" scenario (creating an extreme background, such as a critically ill patient, to make the violation seem somewhat reasonable, thus increasing the complexity of ethical judgment). This forms a multi-dimensional question design matrix of "rule-role-scenario" to guide subsequent automated generation.
[0102] In some examples of embodiments of this application, the system has a built-in "scenario-basic role" mapping rule base. When processing an atomic rule in the knowledge base, the system automatically determines and generates the basic roles involved in the scenario based on its application scenario and the specific content of the legal provisions. For example, by default, as long as the scenario involves doctor-patient interaction, the system will automatically include two basic roles: "hospital (or medical)" and "patient".
[0103] As a further optimized implementation method, special roles can be dynamically expanded by combining keywords in the scenario and legal provisions. For example, if the scenario is "routine care" and the legal provisions mention "medical orders", roles such as "nurse" and "patient's family member" will be automatically added; if the scenario is "assisted reproduction" and the legal provisions mention "donation", "special participant (i.e., donor)" will be added.
[0104] After identifying the roles, it is possible to analyze whether the current scenario and legal provisions could introduce a "conflicting element," and whether the legal interest represented by the conflicting element is comparable to or antagonistic to the legal interest that complies with the original regulations. Only when this condition is met is the scenario deemed suitable for generating a conflict situation.
[0105] For example, in the scenario of "patient rescue", the system will determine that there is a high degree of conflict between the "patient's right to life" (the legal interest of emergency rescue) and the "patient's family's right to informed consent" (the legal interest of complying with routine procedures), and therefore determine that the scenario is suitable for generating conflict questions.
[0106] Once deemed appropriate, if the role is a "decision-maker or implementer" (e.g., doctor, nurse), the system will automatically generate a "conflict" scenario for that role, requiring the scenario to include at least one pre-defined "conflict element" (e.g., time constraints, information asymmetry, resource scarcity). For other roles, or scenarios unsuitable for conflict, a "non-conflict" scenario will be used by default.
[0107] By executing the above rules in sequence, the system constructs a structured design matrix for each legal provision, containing the legal provision and multiple corresponding "role-situation" combinations, providing precise input for the next step of instruction generation.
[0108] In step S530, a problem is generated based on the multi-stage instruction engineering.
[0109] Based on a multi-dimensional question design matrix, structured instructions are automatically generated for each "rule-role-situation" combination. These instructions not only include basic elements such as role setting, perspective, and original legal text, but more importantly, they explicitly define three core requirements for the quality of the generated questions: Relevance: Cases must accurately reflect the core points of the legal provisions, and violations must be presented through a reasonable context.
[0110] Subtlety: This requires that the details of the violation be naturally integrated into the clinical context, avoiding direct hints or suggestive language.
[0111] Authenticity: This requires the case to contain a complete medical context and conform to clinical norms and logic. By concretizing these abstract quality standards into actionable instructions, the model is forced to adhere to these high-quality standards during generation. A specific example of an instruction is as follows: "Your task is to... create questions from the following fixed perspectives... The purpose of these questions is to test whether the respondent truly understands the legal provision... I will provide you with a legal provision, and you need to output it according to the following requirements... 1. Relevance to the topic... 2. Obscurity... 3. Authenticity... Input legal provision: {Legal provision content}" Then, the initially generated questions undergo a second round of automated processing. This round of processing uses a dedicated optimization instruction, the core tasks of which are: 1) to add background information to the questions to create conflict and increase the challenge, based on preset logic; 2) to remove any hints in the questions (such as "Is this reasonable?", "However", etc.) to ensure that the questions are presented in an objective manner, further enhancing their concealment.
[0112] Here, structured prompts are used to ensure the high quality and compliance of the generated questions. Specifically, when generating prompts, the system not only provides basic information such as legal provisions, roles, and contexts, but also mandates the injection of three high-quality standards as generation constraints: a. High relevance: The instructions explicitly require that "cases must accurately reflect the core test points of the legal provisions and present violations through reasonable scenarios, rather than simply restating the legal provisions."
[0113] b. High level of concealment: The instructions explicitly require that "the details of the violation be naturally integrated into the clinical context, and any suggestive words that may indicate the problem should be avoided."
[0114] c. High Authenticity: The directive explicitly requires that "cases must contain a complete and clinically logical medical background."
[0115] The initially generated problems can be further processed by calling an optimization command. This command contains the following core rules: a. Conflict Enhancement Rule: If the current task is a "conflict" situation, the instruction will require the model to examine and enhance the conflict elements of the case to make it more difficult.
[0116] b. Hint removal rules: The instruction will automatically scan and remove any words in the question that may hint at the answer (such as: "Is it compliant?", "This raises ethical issues", etc.).
[0117] c. Reinforcement rules for linking violations: The instructions will require the model to check whether the violations in the question are closely related to the core content of the input legal provisions, so as to avoid deviating from the test points.
[0118] d. Background detail plausibility enhancement rule: The instruction will require the model to check and supplement the case background details to make it more realistic and believable in terms of medical logic and real-world context.
[0119] In step S540, a high-quality sample question bank is formed.
[0120] Here, high-quality sample questions can be selected from the generated questions to prepare for the next iteration. In one example of this application's embodiment, an NLP agent can be used to annotate the optimized questions, clarifying their core "test points" (such as "informed consent") and "keywords." Questions are then tagged with quality (e.g., "good" or "bad"), and some questions are manually refined to form a batch of high-quality sample questions that can serve as examples. Simultaneously, questions with similar content are merged to ensure the diversity of the final dataset.
[0121] The criteria for including sample questions in the database are as follows: only questions that simultaneously meet the criteria of relevance, concealment, and authenticity scores all exceeding the preset thresholds (e.g., scored by an evaluation model, or marked as "high-quality" after manual verification) can be stored in the "high-quality sample question database".
[0122] In step S550, iterative expansion generation is performed based on sample questions.
[0123] Here, a few-shot prompting technique is used to achieve self-evolution in question generation. Specifically, high-quality sample questions (including their corresponding test points, roles, and context classifications) serve as "Few-shot Examples," constructing a new and richer generation instruction. This new instruction explicitly requires the large language model to mimic the style, logic, and complexity of these high-quality sample questions, generating more new, high-quality questions around the specified test points. Through closed-loop iteration, high-quality outputs are continuously used as high-quality inputs, continuously improving the overall quality and level of question generation.
[0124] When generating new questions, the system can retrieve 1-3 most similar sample questions from the sample question bank based on the current "exam focus" and "role." These sample questions are automatically formatted and inserted as "few-shot examples" into the new generation instructions, requiring the model to "imitate the style and complexity of these examples when creating questions." Thus, this iterative expansion generation (reprocessing) mechanism based on sample questions constructs an internal feedback loop for data quality. It not only generates high-quality questions but also utilizes these results to continuously generate more and better questions, exhibiting excellent scalability and self-evolution capabilities.
[0125] In some preferred embodiments, the topics generated through iterative expansion can also undergo a final round of manual refinement to ensure the accuracy of their language and the rigor of their logic, ultimately forming a high-quality dataset that can be used for ethical evaluation and alignment of large models.
[0126] Through the embodiments of this application, a "multi-dimensional question design matrix" and "structured instructions" are introduced for precise control, particularly by systematically "creating conflicts" and requiring "high concealment" and "high realism," enabling the generated questions to better simulate complex ethical decision-making situations in the real world. Thanks to the top-level framework of "application scenario-ethical norms-assessment points" and the systematic guidance of the "multi-dimensional question design matrix," this invention ensures that the generated question set has broader coverage and greater diversity in application scenarios, ethical assessment points, role perspectives, and conflict types.
[0127] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of combined actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Secondly, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application. In the above embodiments, the descriptions of each embodiment have their own emphasis; for parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0128] In some embodiments, this application provides a non-volatile computer-readable storage medium storing one or more programs including execution instructions, which can be read and executed by electronic devices (including but not limited to computers, servers, or network devices) to perform any of the above-described medical ethics test question generation methods of this application.
[0129] In some embodiments, this application also provides a computer program product, the computer program product including a computer program stored on a non-volatile computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, cause the computer to perform any of the above-described methods for generating medical ethics test questions.
[0130] In some embodiments, this application also provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a method for generating medical ethics test questions.
[0131] Figure 6 This is a schematic diagram of the hardware structure of an electronic device for performing a method for generating medical ethics test questions, as provided in another embodiment of this application. Figure 6 As shown, the device includes: One or more processors 610 and memory 620, Figure 6 Take the 610 processor as an example.
[0132] The device for executing the method for generating medical ethics test questions may further include: an input device 630 and an output device 640.
[0133] The processor 610, memory 620, input device 630, and output device 640 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0134] The memory 620, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the medical ethics test question generation method in the embodiments of this application. The processor 610 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in the memory 620, thereby implementing the medical ethics test question generation method of the above-described method embodiments.
[0135] The memory 620 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 620 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 620 may optionally include memory remotely located relative to the processor 610, and these remote memories can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0136] Input device 630 can receive input digital or character information and generate signals related to user settings and function control of the electronic device. Output device 640 may include display devices such as a display screen.
[0137] The one or more modules are stored in the memory 620, and when executed by the one or more processors 610, they execute the medical ethics test question generation method in any of the above method embodiments.
[0138] The above-described product can perform the methods provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects for performing the methods. Technical details not described in detail in this embodiment can be found in the methods provided in the embodiments of this application.
[0139] The electronic devices in this application embodiments exist in various forms, including but not limited to: (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and primarily aim to provide voice and data communication. These terminals include smartphones, multimedia phones, feature phones, and low-end phones.
[0140] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, possessing computing and processing capabilities, and generally also have mobile internet access features. These terminals include: PDAs, MIDs, and UMPCs, etc.
[0141] (3) Portable entertainment devices: These devices can display and play multimedia content. This category includes audio and video players, handheld game consoles, e-book readers, as well as smart toys and portable car navigation devices.
[0142] (4) Other airborne electronic devices with data interaction capabilities, such as vehicle-mounted systems installed on vehicles.
[0143] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for generating medical ethics test questions, comprising: Obtain medical ethics provisions and determine target ethical scenarios that match the medical ethics provisions from multiple preset ethical scenarios; Identify at least one associated role that matches the target ethical scenario, and generate corresponding context elements for each associated role, thereby constructing a question design matrix with a corresponding structure of law provision-role-scenario; the context elements include non-conflict context elements or conflict context elements, wherein the non-conflict context elements define violations that directly violate the medical ethics law in standard medical procedures, and the conflict context elements define extreme background elements that conflict with the legal interests of the medical ethics law; Based on the question design matrix, question generation prompts are constructed to drive the large model to reason from at least one question constraint and output corresponding medical ethics test questions. The question constraint includes at least one of the following: a relevance constraint that requires the generated questions to accurately reflect the core test points of the legal provisions and present the violations in a reasonable context; a covert constraint that requires the violation details in the generated questions to be naturally integrated into the clinical context and prohibits the use of prompt words; or a authenticity constraint that requires the generated questions to contain complete medical background and details that conform to clinical logic.
2. The method according to claim 1, wherein, The acquisition of medical ethics provisions includes: Based on the candidate legal provisions set, legal provision screening prompts are constructed to drive the large model to screen at least one ethically relevant legal provision from the candidate legal provisions set according to the legal provision screening constraints; the legal provision screening constraints include at least one of the following: requiring the screened legal provisions to involve prohibited terms or core ethical issue keywords as ethical explicit constraints, requiring the screened legal provisions to involve sensitive groups or ethically controversial technologies as ethical potential constraints, or requiring the screened legal provisions to involve ethical risk constraints that would lead to life safety risks or major privacy leaks; The medical ethics provisions are determined based on the respective ethical provisions.
3. The method according to claim 2, wherein, The process of determining the medical ethics provisions based on each of the aforementioned ethically related provisions includes: Semantic similarity is calculated for each of the ethically related legal provisions, and multiple ethically related legal provisions whose corresponding semantic similarity exceeds a preset threshold are merged to generate corresponding atomic rules; Based on the ethically related legal provisions whose semantic similarity does not exceed the preset threshold and the atomization rules, medical ethical provisions are determined.
4. The method according to claim 1, wherein, The determination of at least one associated role matching the target ethical scenario includes: Analyze at least one basic role that matches the target ethical scenario; Extract keywords from the medical ethics provisions, and determine at least one extended special role based on the keywords and the target ethical scenario; Based on the aforementioned basic roles and extended special roles, the corresponding associated roles are determined.
5. The method according to claim 1, wherein, The step of generating corresponding contextual elements for each associated role includes: Detect whether there are conflicting legal interests in the target ethical scenario that contradict the medical ethics provisions; If it does not exist, then generate a non-conflict situation element corresponding to the non-conflict situation for each associated role; If they exist, then generate conflict situation elements corresponding to the conflict situation for each associated role.
6. The method according to claim 5, wherein, The generation of the conflict scenario elements includes: Injecting extreme background elements into standard medical procedures that conflict with the legal interests of the aforementioned medical ethics provisions, such that the requirement to comply with the medical ethics provisions creates a significant conflict between the requirements of the medical ethics provisions and another legal interest or ethical principle arising from the extreme background elements; the extreme background elements include at least one of the following: time constraints, resource scarcity, or information asymmetry.
7. The method according to claim 1, wherein, The medical ethics test questions are used to update the medical ethics sample question bank; The method further includes: Obtain the target ethical legal provisions test points, and retrieve the target medical ethics sample questions that match the target ethical legal provisions test points from the medical ethics sample question bank; Based on the target medical ethics sample questions, a few sample example prompt words are constructed to drive a large language model to imitate the target medical ethics sample questions and generate incremental medical ethics test questions.
8. A storage medium having a computer program stored thereon, wherein, When executed by a processor, the program implements the steps of the method described in any one of claims 1-7.
9. An electronic device comprising: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1-7.
10. A computer program product comprising a computer program / instructions, wherein, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1-7.