Risk control configuration and risk control method and device, storage medium and electronic equipment

By deploying a flexible risk control strategy plug-in in the large language model (LLM) business scenario, the problem of incorrectly intercepting user question and answer information in the existing technology is solved, achieving more efficient risk control configuration and a better user experience.

CN120671815APending Publication Date: 2025-09-19ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510712159.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The risk control method of the large language model (LLM) in the existing technology is prone to incorrectly intercepting user question and answer information, resulting in a decline in user experience.

Method used

This paper provides a risk control configuration method that deploys a flexible risk control strategy plug-in for the Large Language Model (LLM) business scenario through the configuration platform. It allows users to select and configure flexible risk control strategies, avoid blindly intercepting question and answer information, and adopt flexible risk control strategies to perform risk control on question and answer information.

Benefits of technology

It effectively avoids the misinterpretation of question and answer information in LLM business scenarios, improves user experience, reduces the configuration burden on backend personnel, and improves risk control configuration efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671815A_ABST
    Figure CN120671815A_ABST
Patent Text Reader

Abstract

According to the method, all flexible risk control strategies which do not intercept user question and answer information are preset, and all the flexible risk control strategies are deployed on a configuration platform in a plug-in mode, so that background personnel can carry out risk control according to the configuration strategy after configuring an LLM service scene to be subjected to risk control through the configuration platform. And calling the flexible risk control strategy plug-in, and configuring the flexible risk control strategy in the plug-in for the LLM service scene to be subjected to risk control, so that when risk control is performed on the LLM service scene to be subjected to risk control, risk control is performed on the question and answer information by adopting the configured flexible risk control strategy instead of intercepting the question and answer information with risks, and risk control is performed on the LLM service scene to be subjected to risk control. The question and answer information can be effectively prevented from being mistakenly intercepted in the LLM service scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a risk control configuration and risk control method, device, storage medium, and electronic device. Background Art

[0002] With the development of artificial intelligence (AI) technology, the business scenarios of large language models (LLM) are becoming increasingly diverse, and the requirements for content security control of artificial intelligence generated content (AIGC) are also increasing.

[0003] In the existing technology, the risk control engine is usually called by an intelligent agent with LLM as the core, and the risk control engine detects the question information input by the user into the LLM and the answer information output by the LLM. Once it is detected that the above question and answer information involves illegal information or sensitive topics, the question and answer information is directly intercepted and the question and answer service is refused to the user.

[0004] The above-mentioned method of the prior art is prone to erroneous interception of some question and answer information, resulting in a decline in user experience. Summary of the Invention

[0005] The embodiments of this specification provide a risk control configuration and risk control method, device, storage medium, and electronic device to partially solve the problems existing in the above-mentioned prior art.

[0006] The embodiments of this specification adopt the following technical solutions:

[0007] This specification provides a risk control configuration method, which includes:

[0008] In response to a login request from a first user, displaying a configuration interface of a risk control engine to the first user;

[0009] Receive the large language model (LLM) business scenario to be risk-controlled configured by the first user on the configuration interface, and call the flexible risk control strategy plug-in of the configuration platform;

[0010] Through the flexible risk control strategy plug-in, various optional flexible risk control strategies are displayed to the first user; the flexible risk control strategy is a risk control strategy that does not intercept the question and answer information of the second user when executing business through LLM;

[0011] In response to the target flexible risk control strategy selected by the first user from the various optional flexible risk control strategies, the target flexible risk control strategy is associated with the LLM business scenario to be risk controlled, so as to adopt the target flexible risk control strategy to perform risk control on the question and answer information of the LLM business scenario to be risk controlled.

[0012] This specification provides a risk control method, which includes:

[0013] Receive user input into the business large language model (LLM);

[0014] Perform risk identification on the question information to obtain a risk type corresponding to the question information;

[0015] When the risk type is a specified risk type, the flexible risk control strategy pre-configured in the risk control engine is called to perform risk control on the question and answer information corresponding to the question information; wherein, the flexible risk control strategy is a risk control strategy that does not intercept the question information and answer information of the user.

[0016] This specification provides a risk control configuration device, which includes:

[0017] a login module, configured to display a configuration interface of the risk control engine to the first user in response to a login request from the first user;

[0018] A scenario configuration module, configured to receive the large language model (LLM) business scenario to be risk-controlled configured by the first user on the configuration interface, and call the flexible risk control strategy plug-in of the configuration platform;

[0019] a flexible policy configuration module, configured to display various optional flexible risk control policies to the first user through the flexible risk control policy plug-in; the flexible risk control policy is a risk control policy that does not intercept question and answer information of the second user when executing business through the LLM;

[0020] An association module is used to associate the target flexible risk control strategy with the LLM business scenario to be risk controlled in response to the target flexible risk control strategy selected by the first user from various optional flexible risk control strategies, so as to adopt the target flexible risk control strategy to perform risk control on the question and answer information of the LLM business scenario to be risk controlled.

[0021] This specification provides a wind control device, which includes:

[0022] A receiving module is used to receive question information input by the user into the business large language model LLM;

[0023] A risk identification module, configured to perform risk identification on the question information and obtain a risk type corresponding to the question information;

[0024] The risk control module is used to call the flexible risk control strategy pre-configured in the risk control engine when the risk type is a specified risk type, and perform risk control on the question and answer information corresponding to the question information; wherein, the flexible risk control strategy is a risk control strategy that does not intercept the question information and answer information of the user.

[0025] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned risk control configuration method and / or risk control method.

[0026] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned risk control configuration method and / or risk control method is implemented.

[0027] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0028] The embodiments of this specification disclose a risk control configuration method and a risk control method. The method presets various flexible risk control policies that do not intercept user question and answer information, and deploys each flexible risk control policy in the form of a plug-in on a configuration platform, so that backend personnel can use the configuration platform to call the flexible risk control policy plug-in after configuring the LLM business scenario to be risk controlled, and configure the flexible risk control policy in the plug-in for the LLM business scenario to be risk controlled. In this way, when risk controlling the LLM business scenario to be risk controlled, there is no need to blindly intercept risky question and answer information. Instead, the configured flexible risk control policy is used to risk control these question and answer information, which can effectively avoid the incorrect interception of question and answer information in the LLM business scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The exemplary embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:

[0030] Figure 1 A flow chart of a risk control configuration method provided in an embodiment of this specification;

[0031] Figure 2 A flow chart of a risk control method provided in an embodiment of this specification;

[0032] Figure 3 A schematic diagram of a risk control configuration device provided in an embodiment of this specification;

[0033] Figure 4 A schematic diagram of a wind control device provided in an embodiment of this specification;

[0034] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0035] To make the objectives, technical solutions, and advantages of this specification more clear, the following will clearly and completely describe the technical solutions of this specification in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this specification.

[0036] The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0037] Figure 1 A flow chart of a risk control configuration method provided in an embodiment of this specification includes the following steps:

[0038] S100: In response to a login request from a first user, a configuration interface of a risk control engine is displayed to the first user.

[0039] In the embodiment of this specification, the risk control configuration platform can be used to uniformly configure risk control for various business scenarios including LLM business scenarios. Therefore, Figure 1 The main device for performing risk control configuration in the method shown can be the server corresponding to the configuration platform (hereinafter referred to as the configuration platform).

[0040] The first user described in the embodiments of this specification refers to the backend personnel who configure risk control for each business scenario. When the first user configures risk control for the LLM business scenario to be risk controlled through the configuration platform, he needs to log in to the configuration platform first, and the configuration platform will display the configuration interface of the risk control engine to the first user.

[0041] S102: Receive the LLM business scenario to be risk-controlled configured by the first user on the configuration interface, and call the flexible risk control strategy plug-in of the configuration platform.

[0042] The first user can configure the LLM business scenario to be risk controlled through the configuration interface displayed in step S100. In the configuration interface, the first user can configure the LLM business scenario to be risk controlled, that is, which objects in which business are to be risk controlled. For example, if the LLM business scenario is to be risk controlled, the scenario identifier corresponding to the LLM business scenario (used to uniquely identify the LLM business scenario) can be configured in the configuration platform, and then the LLM application programming interface (Application Programming Interface, API) of the LLM business scenario can be configured as the risk control object, that is, the LLM call of the LLM business scenario is used as the risk control object, and the question information input into the business LLM and the answer information given by the business LLM can also be configured as the risk control object, that is, the question and answer information of the LLM business scenario (the question and answer information described in the embodiment of this specification includes question information and answer information) is used as the risk control object. Of course, if the configuration platform is connected to more than one risk control engine, the first user can also configure which risk control engine to use.

[0043] After receiving the configuration input by the first user in the configuration interface, the configuration platform can configure the LLM business scenario to be risk-controlled accordingly and call the flexible risk control strategy plug-in of the configuration platform. The flexible risk control strategy plug-in is pre-deployed on the configuration platform and includes several pre-set optional flexible risk control strategies.

[0044] It should be noted that the reason why the various optional flexible risk control strategies are deployed on the configuration platform in the form of plug-ins in this manual is because there are many different business scenarios that require risk control configuration. If a separate flexible risk control strategy is configured for each business scenario that requires risk control configuration, it will greatly increase the pressure on the first user. Therefore, in this manual, several optional flexible risk control strategies are pre-packaged into plug-ins and deployed on the configuration platform. When the first user configures risk control for a certain business scenario, he can directly associate the flexible risk control strategy in the plug-in with the business scenario without the need for separate configuration, which can effectively improve the efficiency of the first user's risk control configuration. Moreover, even if the flexible risk control strategies in the plug-in are not suitable for a certain business scenario, the first user can also modify the configuration of the flexible risk control strategy in the plug-in as a strategy template, and then associate the modified flexible risk control strategy with the business scenario on the one hand, and re-encapsulate it into the plug-in on the other hand, so that it can be used directly the next time the risk control configuration is performed.

[0045] S104: Displaying various optional flexible risk control strategies to the first user through the flexible risk control strategy plug-in.

[0046] After the configuration platform calls the pre-deployed flexible risk control strategy plug-in, all flexible risk control strategies contained in the plug-in can be displayed to the first user through the plug-in as optional flexible risk control strategies for the first user to select from these optional flexible risk control strategies.

[0047] Among them, the flexible risk control strategy described in the embodiment of this specification is a risk control strategy that does not intercept the question and answer information of the second user when performing business through LLM. Unlike the first user, the second user described in the embodiment of this specification is an ordinary user who performs business in the LLM business scenario. Compared with the strong risk control strategy in the prior art that directly intercepts the second user's question information and / or the answer information output by the business LLM for the second user as long as there is a risk, the flexible risk control strategy in this specification will not intercept these question information and answer information, but will try to output answer information or business results to the user as much as possible on the premise of ensuring legality and compliance, so as to meet the user's needs as much as possible. What kind of specific flexible risk control strategy is and how to perform risk control on LLM business scenarios based on these flexible risk control strategies will be described in detail below.

[0048] S106: In response to the target flexible risk control strategy selected by the first user from the optional flexible risk control strategies, the target flexible risk control strategy is associated with the LLM business scenario to be risk controlled, so as to adopt the target flexible risk control strategy to perform risk control on the question and answer information of the LLM business scenario to be risk controlled.

[0049] After the first user selects the target flexible risk control strategy from the optional flexible risk control strategies displayed on the configuration platform through the above-mentioned plug-in, the configuration platform can associate the target flexible risk control strategy selected by the first user with the LLM business scenario to be risk controlled, so that the risk control engine can subsequently perform risk control on the LLM business scenario to be risk controlled based on the flexible risk control strategy associated with the LLM business scenario to be risk controlled.

[0050] Furthermore, in the embodiments of this specification, each optional flexible risk control strategy included in the flexible risk control strategy plug-in can specifically be a flexible risk control strategy with adjustable configuration parameters. Therefore, after the first user selects a target flexible risk control strategy in step S104, they can further customize the configuration parameters of the target flexible risk control strategy based on the LLM business scenario to be risk-controlled. The configuration parameters of the flexible risk control strategy include, but are not limited to, the matching conditions for the flexible risk control strategy and the external dependencies required by the flexible risk control strategy.

[0051] The matching condition for the flexible risk control strategy can be at least one of the following: the second user's question and answer information contains a specified keyword; the risk type corresponding to the second user's question and answer information is a specified risk type; and the risk level corresponding to the second user's question and answer information is a specified risk level. The following description uses the matching condition for the flexible risk control strategy, where the risk type corresponding to the second user's question and answer information is a specified risk type, as an example.

[0052] When setting the risk type corresponding to the second user's question and answer information as a hit condition for the flexible risk control policy, this can be simplified to simply setting the risk type corresponding to the second user's question information as the hit condition for the flexible risk control policy. This is because, generally, if the user's question information does not involve any risks, the LLM will not provide risky answers. To identify the risk type of the second user's question information, the first user also needs to configure the risk control engine in the configuration platform to identify the risk type corresponding to the second user's question information in the LLM business scenario to be risk controlled.

[0053] In fact, through the above-mentioned configuration platform, the first user can orchestrate and configure the entire risk control process of the risk control LLM business scenario, including: first, through the risk type identification strategy package displayed by the configuration platform (the risk type identification strategy package contains several risk type identification strategies), select the risk type identification strategy to be used, and then configure the risk control engine to identify the risk type corresponding to the second user's question information based on the risk type identification strategy to be used, and then configure the hit conditions of each target flexible risk control strategy to be adopted for the risk type, and finally configure the external dependency functions required for each target flexible risk control strategy.

[0054] After configuration through the above method, the risk control engine can now identify the risk type of the question information of the second user received in the risk control LLM business according to the configured risk type identification strategy. When the risk type is identified as a specified risk type, that is, when a target flexible risk control strategy is hit, based on the external dependency function of the hit target flexible risk control strategy, the target flexible risk control strategy is used to perform risk control on the LLM business corresponding to the second user's question information.

[0055] Through the above method, various flexible risk control strategies that do not intercept user question and answer information are preset, and each flexible risk control strategy is deployed on the configuration platform in the form of a plug-in, so that back-end personnel can call the flexible risk control strategy plug-in through the configuration platform after configuring the LLM business scenario to be risk controlled, and configure the flexible risk control strategy in the plug-in for the LLM business scenario to be risk controlled. In this way, when performing risk control on the LLM business scenario to be risk controlled, there is no need to blindly intercept risky question and answer information. Instead, the configured flexible risk control strategy is used to perform risk control on these question and answer information, which can effectively avoid the incorrect interception of question and answer information in the LLM business scenario. Moreover, the back-end personnel do not need to configure different flexible risk control strategies for each different business scenario. They only need to select the required target flexible risk control strategy from the flexible risk control strategies contained in the plug-in, which effectively improves the efficiency of risk control configuration.

[0056] In the embodiments of this specification, three flexible risk control strategies are provided as examples, including question enhancement strategy, LLM proxy answering strategy, and QA proxy answering strategy. The following describes the configuration of these three flexible risk control strategies in detail.

[0057] When the first user selects the question enhancement strategy as the target flexible risk control strategy, the configuration platform may receive the first user's configuration of the question enhancement strategy, wherein the configuration of the question enhancement strategy includes the first risk type (i.e., hit condition) and the risk warning knowledge base (i.e., external dependency function) corresponding to the question enhancement strategy. The configuration platform may then associate the configured question enhancement strategy with the LLM business scenario to be risk controlled.

[0058] When the target flexible risk control strategy selected by the first user is the alternative LLM answering strategy, the configuration platform can receive the first user's configuration of the alternative LLM answering strategy, wherein the configuration of the alternative LLM answering strategy includes the second risk type (i.e., hit condition) and the alternative LLM (i.e., external dependency function) corresponding to the alternative LLM answering strategy. The alternative LLM is pre-trained using sample question and answer corpus with the second risk type. The configuration platform can associate the configured alternative LLM answering strategy with the LLM business scenario to be risk controlled.

[0059] When the first user selects the QA proxy strategy as the target flexible risk control strategy, the configuration platform can receive the first user's configuration of the QA proxy strategy, where the configuration of the QA proxy strategy includes the third risk type (i.e., hit condition) and the QA knowledge base (i.e., external dependency function) corresponding to the QA proxy strategy. The configuration platform can associate the configured QA proxy strategy with the LLM business scenario to be risk controlled.

[0060] After the risk control configuration is performed using the above method, the risk control engine can be used as follows: Figure 2The method shown performs risk control on the risk control LLM business scenario. Figure 2 A flow chart of a risk control method provided in an embodiment of this specification specifically includes the following steps:

[0061] S200: Receive question information input by the user into the business large language model LLM.

[0062] In the embodiment of this specification, the following is performed Figure 2 The main device for performing risk control on each business scenario in the method shown can be the server corresponding to the risk control engine (hereinafter referred to as the risk control engine).

[0063] The first user adopts Figure 1 After the method shown configures the LLM business scenario to be risk controlled, when the second user executes business in the LLM business scenario to be risk controlled, since the configuration platform has saved the association relationship between the scenario identifier corresponding to the LLM business scenario to be risk controlled and the risk control engine, the risk control engine is called, and the risk control engine receives the question information input by the user to the business LLM in the LLM business scenario to be risk controlled when executing business in the LLM business scenario to be risk controlled, and can perform risk control on the business corresponding to the question information of the second user in the LLM business scenario to be risk controlled through subsequent steps S202 to S204 according to the entire risk control process configured by the first user on the configuration platform.

[0064] S202: Perform risk identification on the question information to obtain a risk type corresponding to the question information.

[0065] After receiving the question information from the second user through the above step S200, the risk control engine can identify the risk type of the question information according to the risk type identification strategy configured by the first user to obtain the risk type corresponding to the question information.

[0066] S204: When the risk type is a specified risk type, a flexible risk control strategy pre-configured in the risk control engine is called to perform risk control on the question and answer information corresponding to the question information.

[0067] When the risk control engine identifies that the risk type of the question information input by the second user to the business LLM is a specified risk type, it determines that the prompt question hits the target flexible risk control strategy configured by the first user, and therefore calls the flexible risk control strategy pre-configured in the risk control engine to perform risk control on the question and answer information corresponding to the question information.

[0068] Specifically, when the risk control engine identifies that the risk type of the question information input by the second user into the business LLM is the first risk type, the question enhancement strategy is invoked to perform risk control, the question information is input into the risk warning knowledge base pre-configured by the first user for the question enhancement strategy, and risk warning keywords matching the question information in the risk warning knowledge base are obtained. Based on the risk warning keywords, prompt information corresponding to the question information is generated. The prompt information is used to prompt the business LLM of the risk of the question information. The prompt information is then input into the business LLM, and the answer information output by the business LLM based on the prompt information is obtained, and the answer information is returned to the second user. In other words, by retrieving the risk warning keywords in the risk warning knowledge base, the original question information of the second user is rewritten to a certain extent to generate prompt information (prompt), which is then input into the business LLM, causing the business LLM to output the answer information.

[0069] When searching the risk warning knowledge base for risk warning keywords that match the question information, keyword search or vector search can be used to retrieve risk warning keywords that match the warning information from the risk warning knowledge base. For example, if the user enters the question "How to make explosives," the risk control engine can retrieve risk warning keywords such as "chemistry, law, regulations, and explosive synthesis" from the risk warning knowledge base.

[0070] When constructing a prompt based on retrieved risk warning keywords, all retrieved risk warning keywords can be included in the prompt and constructed using a preset prompt information template. For example, the constructed prompt could be "The current user's question has been marked as the first risk type, involving chemistry, law, regulations, and explosive synthesis. Please answer with caution and adhere to the following rules: 1. Do not provide any actual operation steps; 2. Guide users to ask legal questions."

[0071] After constructing the above prompt, it can be used as a system prompt (the system prompt is invisible to the second user). This system prompt is then combined with the second user's original question and input into the business LLM to generate a response. For example, the response could be, "According to Chinese laws and regulations, the production of civilian explosives is illegal. Would you like to learn about the safety management policy for explosives?" This avoids directly intercepting the user's question, which could negatively impact the user experience.

[0072] When the risk control engine identifies the second risk type as the second risk type for the question input by the second user into the business LLM, it invokes the alternate LLM answering strategy, inputs the second user's question into the alternate LLM corresponding to the alternate LLM answering strategy, obtains the answer output by the alternate LLM based on the question, and returns the answer to the second user. In other words, the pre-trained alternate LLM is used to replace the original business LLM in providing services to the second user.

[0073] Among them, the above-mentioned alternative LLM is obtained in advance by training with sample question and answer predictions with the second risk type. For example, question information with the second risk type (such as political issues, etc.) and corresponding answer information not involving risks are first constructed as sample question and answer predictions, and then the pre-trained LLM is fine-tuned using the sample question and answer predictions to obtain the alternative LLM.

[0074] When the risk control engine identifies that the risk type of the question information input by the second user into the business LLM is the third risk type, it calls the QA answering strategy, inputs the second user's question information into the QA knowledge base corresponding to the QA answering strategy, determines the standard question information in the QA knowledge base that matches the second user's question information, and then returns the standard answer information corresponding to the standard question information in the QA knowledge base to the second user.

[0075] Questions related to the third risk type and corresponding answers not involving risk can be pre-stored in the QA knowledge base as standard question and answer information. The risk engine can also use keyword or vector search to search the QA knowledge base for standard questions that match the second user's question, and then return the corresponding standard answers not involving risk to the second user.

[0076] It can be seen that through the above three flexible risk control strategies, we no longer adopt a one-size-fits-all approach of directly blocking users' questions once they are found to be risky. Instead, we can continue to provide LLM business services to users using the above three flexible risk control strategies, which can improve the user experience.

[0077] The above is a risk control configuration method and a risk control method provided in the embodiments of this specification. Based on the same idea, this specification also provides corresponding devices, storage media and electronic devices.

[0078] Figure 3 A schematic diagram of a risk control configuration device provided in an embodiment of this specification, the device comprising:

[0079] Login module 301, configured to display a configuration interface of the risk control engine to a first user in response to a login request from the first user;

[0080] The scenario configuration module 302 is configured to receive the large language model (LLM) business scenario to be risk-controlled configured by the first user on the configuration interface, and to call the flexible risk control strategy plug-in of the configuration platform;

[0081] The flexible policy configuration module 303 is configured to display various optional flexible risk control policies to the first user through the flexible risk control policy plug-in; the flexible risk control policy is a risk control policy that does not intercept the question and answer information of the second user when executing business through the LLM;

[0082] The association module 304 is used to associate the target flexible risk control strategy with the LLM business scenario to be risk controlled in response to the target flexible risk control strategy selected by the first user from various optional flexible risk control strategies, so as to adopt the target flexible risk control strategy to perform risk control on the question and answer information of the LLM business scenario to be risk controlled.

[0083] Optionally, the optional flexible risk control strategy includes: a question enhancement strategy;

[0084] The association module 304 is specifically used to receive the configuration of the question enhancement strategy by the first user; the configuration of the question enhancement strategy includes the first risk type and risk warning knowledge base corresponding to the question enhancement strategy; and associate the configured question enhancement strategy with the LLM business scenario to be risk controlled.

[0085] Optionally, the device further comprises:

[0086] The risk control module 305 is used to identify the risks of the question information input by the second user into the business LLM in the LLM business scenario to be risk controlled, and obtain the risk type corresponding to the question information; if the risk type corresponding to the identified question information is the first risk type, the question information is input into the risk warning knowledge base corresponding to the question enhancement strategy, and the risk warning keywords matching the question information in the risk warning knowledge base are obtained; according to the risk warning keywords, prompt information corresponding to the question information is generated, and the prompt information is used to prompt the business LLM of the risks of the question information; the prompt information is input into the business LLM, and the answer information output by the business LLM according to the prompt information is obtained, and the answer information is returned to the second user.

[0087] Optionally, the optional flexible risk control strategy includes: replacing the LLM proxy answering strategy;

[0088] The association module 304 is specifically used to receive the configuration of the alternative LLM answering strategy by the first user; the configuration of the alternative LLM answering strategy includes the second risk type and the alternative LLM corresponding to the alternative LLM answering strategy; the alternative LLM is pre-trained using sample question and answer corpus with the second risk type; and the configured alternative LLM answering strategy is associated with the LLM business scenario to be risk controlled.

[0089] Optionally, the device further comprises:

[0090] The risk control module 305 is used to identify the risks of the question information input by the second user into the business LLM in the LLM business scenario to be risk controlled, and obtain the risk type corresponding to the question information; if the risk type corresponding to the identified question information is the second risk type, the question information is input into the alternative LLM corresponding to the alternative LLM answering strategy, and the answer information output by the alternative LLM according to the question information is obtained, and the answer information is returned to the second user.

[0091] Optionally, the optional flexible risk control strategy includes: QA proxy answering strategy;

[0092] The association module 304 is specifically used to receive the first user's configuration of the QA answering strategy; the configuration of the QA answering strategy includes the third risk type corresponding to the QA answering strategy and the QA knowledge base; and associate the configured QA answering strategy with the LLM business scenario to be risk controlled.

[0093] Optionally, the device further comprises:

[0094] The risk control module 305 is used to identify the risks of the question information input by the second user into the business LLM in the LLM business scenario to be risk controlled, and obtain the risk type corresponding to the question information; if the risk type corresponding to the identified question information is the third risk type, the question information is input into the QA knowledge base corresponding to the QA answering strategy, and the standard question information in the QA knowledge base that matches the question information is determined; and the standard answer information corresponding to the standard question information in the QA knowledge base is returned to the second user.

[0095] Figure 4 A schematic diagram of a wind control device provided in an embodiment of this specification, the device includes:

[0096] Receiving module 401, for receiving question information input by a user into the business large language model LLM;

[0097] The risk identification module 402 is used to identify the risk of the question information and obtain the risk type corresponding to the question information;

[0098] The risk control module 403 is used to call the flexible risk control strategy pre-configured in the risk control engine when the risk type is a specified risk type, and perform risk control on the question and answer information corresponding to the question information; wherein, the flexible risk control strategy is a risk control strategy that does not intercept the user's question information and answer information.

[0099] Optionally, the specified risk type includes a first risk type;

[0100] The risk control module 403 is specifically used to call the question enhancement strategy pre-configured in the risk control engine when the risk type is the first risk type, input the question information into the risk warning knowledge base corresponding to the question enhancement strategy, and obtain the risk warning keywords matching the question information in the risk warning knowledge base; generate prompt information corresponding to the question information based on the risk warning keywords, and the prompt information is used to prompt the business LLM of the risks of the question information; input the prompt information into the business LLM, obtain the answer information output by the business LLM according to the prompt information, and return the answer information to the user.

[0101] Optionally, the specified risk type includes a second risk type;

[0102] The risk control module 403 is specifically used to call the alternative LLM answering strategy pre-configured in the risk control engine when the risk type is the second risk type, and input the question information into the alternative LLM corresponding to the alternative LLM answering strategy; the alternative LLM is pre-trained using sample question and answer corpus with the second risk type; obtain the answer information output by the alternative LLM based on the question information, and return the answer information to the user.

[0103] Optionally, the specified risk type includes a third risk type;

[0104] The risk control module 403 is specifically used to call the QA answering strategy pre-configured in the risk control engine when the risk type is the third risk type, input the question information into the QA knowledge base corresponding to the QA answering strategy, determine the standard question information in the QA knowledge base that matches the question information; and return the standard answer information corresponding to the standard question information in the QA knowledge base to the user.

[0105] This specification also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute the risk control configuration method and / or risk control method provided above.

[0106] based on Figure 1 The risk control configuration method shown and Figure 2 The risk control method shown in this specification also provides Figure 5 The structural diagram of the electronic device shown in FIG. Figure 5 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other hardware required for its operations. The processor reads the corresponding computer program from the non-volatile storage into the memory and then runs it to implement the aforementioned risk control configuration method and / or risk control method.

[0107] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A risk control configuration method, the method comprising: In response to a login request from a first user, displaying a configuration interface of a risk control engine to the first user; Receive the large language model (LLM) business scenario to be risk-controlled configured by the first user on the configuration interface, and call the flexible risk control strategy plug-in of the configuration platform; Through the flexible risk control strategy plug-in, various optional flexible risk control strategies are displayed to the first user; the flexible risk control strategy is a risk control strategy that does not intercept the question and answer information of the second user when executing business through LLM; In response to the target flexible risk control strategy selected by the first user from the various optional flexible risk control strategies, the target flexible risk control strategy is associated with the LLM business scenario to be risk controlled, so as to adopt the target flexible risk control strategy to perform risk control on the question and answer information of the LLM business scenario to be risk controlled.

2. The method according to claim 1, wherein the optional flexible risk control strategy includes: Questioning enhancement strategies; When the target flexible risk control strategy is the question enhancement strategy, associating the target flexible risk control strategy with the LLM business scenario to be risk controlled specifically includes: receiving a configuration of the question enhancement strategy by the first user; the configuration of the question enhancement strategy includes a first risk type and a risk warning knowledge base corresponding to the question enhancement strategy; The configured question enhancement strategy is associated with the LLM business scenario to be risk-controlled.

3. The method according to claim 2, wherein the target flexible risk control strategy is used to perform risk control on the question and answer information of the LLM business scenario to be risk controlled, specifically comprising: Perform risk identification on the question information of the business LLM input by the second user in the LLM business scenario to be risk controlled, and obtain the risk type corresponding to the question information; If the risk type corresponding to the identified question information is the first risk type, inputting the question information into the risk warning knowledge base corresponding to the question enhancement strategy, and obtaining risk warning keywords in the risk warning knowledge base that match the question information; Generate prompt information corresponding to the question information according to the risk prompt keyword, and the prompt information is used to prompt the business LLM of the risk of the question information; The prompt information is input into the business LLM, answer information output by the business LLM according to the prompt information is obtained, and the answer information is returned to the second user.

4. The method according to claim 1, wherein the optional flexible risk control strategy includes: Alternative LLM answering strategy; When the target flexible risk control strategy is the alternative LLM proxy answering strategy, associating the target flexible risk control strategy with the LLM business scenario to be risk controlled specifically includes: receiving a configuration of the alternative LLM answering strategy by the first user; the configuration of the alternative LLM answering strategy includes a second risk type corresponding to the alternative LLM answering strategy and an alternative LLM; the alternative LLM is pre-trained using a sample question and answer corpus having the second risk type; The configured alternative LLM proxy answering strategy is associated with the LLM business scenario to be risk controlled.

5. The method according to claim 4, wherein the target flexible risk control strategy is used to perform risk control on the question and answer information of the LLM business scenario to be risk controlled, specifically comprising: Perform risk identification on the question information of the business LLM input by the second user in the LLM business scenario to be risk controlled, and obtain the risk type corresponding to the question information; If the risk type corresponding to the identified question information is the second risk type, the question information is input into the alternative LLM corresponding to the alternative LLM answering strategy, the answer information output by the alternative LLM based on the question information is obtained, and the answer information is returned to the second user.

6. The method according to claim 1, wherein the optional flexible risk control strategy includes: QA answering strategy; When the target flexible risk control strategy is the QA proxy answering strategy, associating the target flexible risk control strategy with the LLM business scenario to be risk controlled specifically includes: receiving a configuration of the QA answering strategy by the first user; The configuration of the QA proxy answering strategy includes a third risk type corresponding to the QA proxy answering strategy and a QA knowledge base; Associate the configured QA answering strategy with the LLM business scenario to be risk-controlled.

7. The method according to claim 6, wherein the target flexible risk control strategy is used to perform risk control on the question and answer information of the LLM business scenario to be risk controlled, specifically comprising: Perform risk identification on the question information of the business LLM input by the second user in the LLM business scenario to be risk controlled, and obtain the risk type corresponding to the question information; If the risk type corresponding to the identified question information is the third risk type, inputting the question information into a QA knowledge base corresponding to the QA proxy answering strategy, and determining standard question information in the QA knowledge base that matches the question information; The standard answer information corresponding to the standard question information in the QA knowledge base is returned to the second user.

8. A risk control method, comprising: Receive user input into the business large language model (LLM); Perform risk identification on the question information to obtain a risk type corresponding to the question information; When the risk type is a specified risk type, the flexible risk control strategy pre-configured in the risk control engine is called to perform risk control on the question and answer information corresponding to the question information; wherein, the flexible risk control strategy is a risk control strategy that does not intercept the question information and answer information of the user.

9. The method of claim 8, wherein the specified risk type comprises a first risk type; When the risk type is a specified risk type, the flexible risk control strategy pre-configured in the risk control engine is called to perform risk control on the question and answer information corresponding to the question information, specifically including: When the risk type is the first risk type, calling a question enhancement strategy pre-configured in the risk control engine, inputting the question information into a risk warning knowledge base corresponding to the question enhancement strategy, and obtaining risk warning keywords in the risk warning knowledge base that match the question information; Generate prompt information corresponding to the question information according to the risk prompt keyword, and the prompt information is used to prompt the business LLM of the risk of the question information; The prompt information is input into the business LLM, answer information output by the business LLM according to the prompt information is obtained, and the answer information is returned to the user.

10. The method of claim 8, wherein the specified risk type comprises a second risk type; When the risk type is a specified risk type, the flexible risk control strategy pre-configured in the risk control engine is called to perform risk control on the question and answer information corresponding to the question information, specifically including: When the risk type is the second risk type, calling the alternative LLM proxy answering strategy pre-configured in the risk control engine, and inputting the question information into the alternative LLM corresponding to the alternative LLM proxy answering strategy; The alternative LLM is pre-trained using sample question-answer corpus with the second risk type; Obtain answer information output by the substitute LLM according to the question information, and return the answer information to the user.

11. The method of claim 8, wherein the specified risk type comprises a third risk type; When the risk type is a specified risk type, the flexible risk control strategy pre-configured in the risk control engine is called to perform risk control on the question and answer information corresponding to the question information, specifically including: When the risk type is the third risk type, calling the QA proxy answering strategy pre-configured in the risk control engine, inputting the question information into the QA knowledge base corresponding to the QA proxy answering strategy, and determining the standard question information in the QA knowledge base that matches the question information; The standard answer information corresponding to the standard question information in the QA knowledge base is returned to the user.

12. A risk control configuration device, comprising: a login module, configured to display a configuration interface of the risk control engine to the first user in response to a login request from the first user; A scenario configuration module, configured to receive the large language model (LLM) business scenario to be risk-controlled configured by the first user on the configuration interface, and call the flexible risk control strategy plug-in of the configuration platform; a flexible policy configuration module, configured to display various optional flexible risk control policies to the first user through the flexible risk control policy plug-in; the flexible risk control policy is a risk control policy that does not intercept question and answer information of the second user when executing business through the LLM; An association module is used to associate the target flexible risk control strategy with the LLM business scenario to be risk controlled in response to the target flexible risk control strategy selected by the first user from various optional flexible risk control strategies, so as to adopt the target flexible risk control strategy to perform risk control on the question and answer information of the LLM business scenario to be risk controlled.

13. A wind control device, comprising: A receiving module is used to receive question information input by the user into the business large language model LLM; A risk identification module, configured to perform risk identification on the question information and obtain a risk type corresponding to the question information; The risk control module is used to call the flexible risk control strategy pre-configured in the risk control engine when the risk type is a specified risk type, and perform risk control on the question and answer information corresponding to the question information; wherein, the flexible risk control strategy is a risk control strategy that does not intercept the question information and answer information of the user.

14. A computer-readable storage medium storing a computer program, wherein the computer program implements the method according to any one of claims 1 to 11 when executed by a processor.

15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 11 when executing the program.