An insurance recommendation method, system, device and medium based on a large language model and a satisfiability modulo theory solver
Patent Information
- Application Number
- CN202611124827.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-20
AI Technical Summary
然而,纯大语言模型方案在保险推荐中存在根本性缺陷,大语言模型作为概率生成模型,在涉及多约束组合优化问题时缺乏严格的逻辑推理能力,容易产生幻觉导致推荐方案在实质上不可行,例如推荐的保险产品组合超出用户预算或包含用户因健康原因无法投保的产品
本申请通过大语言模型将自然语言表述的保险需求信息提取为结构化约束数据,使得非结构化的用户需求转化为可被形式化处理的标准化数据,将所述结构化约束数据转化为可满足性模理论求解器可识别的逻辑约束问题,使得保险推荐问题成为可被严格逻辑验证的形式化问题,调用可满足性模理论求解器对所述逻辑约束问题进行求解,由于可满足性模理论求解器基于形式化逻辑推理进行判定,其判定过程具有严格的逻辑完备性,输出结果经过逻辑验证,不存在概率生成模型固有的不确定性问题,因此当求解结果包含最优解模型时,根据所述最优解模型生成的保险推荐方案在逻辑上严格满足所有约束条件,在实质上可行。当求解结果包含不可满足核心约束时,通过对所述不可满足核心约束执行约束松弛与迭代调整,能够消解约束冲突并生成可行保险推荐方案。因此,无论求解结果为包含最优解模型还是包含不可满足核心约束,系统均能够输出在逻辑上严格满足约束条件且在实质上可行的保险推荐方案,从而能够利用人工智能技术对保险进行推荐,得到可用的保险推荐方案。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the interdisciplinary field of artificial intelligence and insurance technology, and in particular to an insurance recommendation method, system, device and medium based on the collaboration of a large language model and a satisfiability model theory solver. Background Technology
[0002] Insurance recommendation is a highly complex decision-making task that requires balancing multiple dimensions. It is necessary to determine a reasonable insurance configuration plan under the coupling of multiple conditions such as budget constraints, insurance type matching, health disclosure constraints, product mutual exclusion and compatibility rules, and individual characteristics of the insured.
[0003] With the development of artificial intelligence technology, existing solutions can utilize large language models for insurance recommendations, understanding user needs and generating recommendations through natural language interaction. However, pure large language model solutions have fundamental flaws in insurance recommendations. As probabilistic generative models, large language models lack rigorous logical reasoning capabilities when dealing with multi-constraint combinatorial optimization problems, easily leading to illusions that result in practically infeasible recommendations. For example, recommended insurance product combinations may exceed the user's budget or include products that the user cannot insure due to health reasons.
[0004] Therefore, how to use artificial intelligence technology to recommend insurance and obtain usable insurance recommendations has become a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0005] This application provides an insurance recommendation method, system, device, and medium based on the collaboration of a large language model and a satisfiability model theory solver, which can utilize artificial intelligence technology to recommend insurance and obtain usable insurance recommendation schemes.
[0006] To achieve the above objectives, this application adopts the following technical solution: Firstly, this application provides an insurance recommendation method based on the collaboration of a large language model and a solver for satisfiability model theory, including: Obtain information about users' insurance needs expressed in natural language; The insurance demand information is extracted into structured constraint data based on a large language model; The structured constraint data is transformed into a logical constraint problem that can be recognized by the satisfiability modular theory solver; The satisfiability model theory solver is invoked to solve the logical constraint problem, and the solution results are obtained; the solution results include the optimal solution model or the unsatisfiable core constraints. When the solution result contains an optimal solution model, an insurance recommendation scheme is generated based on the optimal solution model. When the solution result contains unsatisfiable core constraints, constraint relaxation and iterative adjustment are performed based on the unsatisfiable core constraints to generate a feasible insurance recommendation scheme.
[0007] Optionally, the step of transforming the structured constraint data into a logical constraint problem recognizable by the satisfiability modular theory solver includes: Define a set of decision variables and a set of value ranges for each decision variable in the set of decision variables based on the structured constraint data. Each constraint is encoded into a logical assertion statement based on the set of decision variables and the set of value ranges. Define the objective function based on the set of decision variables and the set of value ranges; Based on the set of decision variables, the set of value ranges, the logical assertion statements, and the objective function, obtain the logical constraint problems that the satisfiability modular theory solver can identify.
[0008] Optionally, encoding each constraint condition into a logical assertion statement based on the set of decision variables and the set of value ranges includes: The budget constraints in the structured constraint data are encoded as arithmetic constraints that ensure the total premium does not exceed the budget limit. The health disclosure constraints in the structured constraint data are encoded as Boolean constraints in which the corresponding product selection variable is false when a specific past medical history exists; The mutual exclusion constraints of insurance types in the structured constraint data are encoded as logical constraints that mutual exclusion product selection variables cannot be true at the same time. Logical assertion statements are obtained based on the arithmetic constraints, the Boolean constraints, and the logical constraints.
[0009] Optionally, the step of calling the satisfiability modular theory solver to solve the logical constraint problem and obtain the solution result includes: The logical constraint problem is input into the satisfiability modular theory solver, and satisfiability determination is performed. When the determination result is satisfactory, the optimal solution model that satisfies all constraints is extracted as the solution result; When the determination result is unsatisfiable, the subset of unsatisfiable core constraints is extracted as the solution result.
[0010] Optionally, when the determination result is unsatisfiable, extracting a subset of unsatisfiable core constraints as the solution result includes: The unsatisfiable core extraction function of the satisfiability modular theory solver is invoked to obtain the smallest subset of unsatisfiable core constraints that cause constraint conflicts; the smallest subset of unsatisfiable core constraints satisfies the critical condition that the remaining constraints become satisfiable after removing any one constraint. The minimum subset of unsatisfiable core constraints is taken as the solution result.
[0011] Optionally, when the solution result contains an optimal solution model, generating an insurance recommendation scheme based on the optimal solution model includes: The decision variables in the optimal solution model are assigned and mapped to configuration parameters for product selection, coverage amount, and payment period; Based on the configuration parameters, a natural language insurance recommendation scheme is generated, which includes a list of recommended products, premium details, and coverage descriptions.
[0012] Optionally, when the solution result contains unsatisfiable core constraints, constraint relaxation and iterative adjustment are performed based on the unsatisfiable core constraints to generate a feasible insurance recommendation scheme, including: Priority quantification is performed on unsatisfiable core constraints to obtain priority labels for each constraint; According to the priority labels in ascending order, the corresponding constraints are relaxed sequentially to obtain the relaxed constraint set. Based on the relaxed constraint set, the satisfiability model theory solver is called again for iterative solution until the returned solution contains the optimal solution model or the maximum number of iterations is reached, and the iterative solution result is obtained. Based on the iterative solution results, a feasible insurance recommendation scheme is generated.
[0013] Secondly, this application provides an insurance recommendation system based on the collaboration of a large language model and a solver for satisfiability model theory, including: The insurance demand acquisition module is used to acquire information about users' insurance demands expressed in natural language. The structured constraint extraction module is used to extract the insurance demand information into structured constraint data based on a large language model; The constraint transformation module is used to transform the structured constraint data into a logical constraint problem that can be recognized by the satisfiability modular theory solver; The solution module is used to call the satisfiability model theory solver to solve the logical constraint problem and obtain the solution result; the solution result includes the optimal solution model or the unsatisfiable core constraint. The result generation module is used to generate an insurance recommendation scheme based on the optimal solution model when the solution result contains the optimal solution model; and to perform constraint relaxation and iterative adjustment based on the unsatisfiable core constraints when the solution result contains the unsatisfiable core constraints, thereby generating a feasible insurance recommendation scheme.
[0014] Thirdly, this application provides a computing device, including a memory and a processor; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the computing device performs the method as described in any one of the first aspects.
[0015] Fourthly, this application provides a computer-readable storage medium for storing a computer program for performing the method as described in any one of the first aspects.
[0016] As can be seen from the above technical solution, this application has at least the following beneficial effects: This application extracts insurance demand information expressed in natural language into structured constraint data through a large language model, transforming unstructured user needs into standardized data that can be formally processed. This structured constraint data is then transformed into a logical constraint problem recognizable by a satisfiability modular theory solver, making the insurance recommendation problem a rigorously logically verifiable formal problem. The satisfiability modular theory solver solves this logical constraint problem. Because the solver is based on formal logical reasoning, its decision-making process has strict logical completeness, and the output result is logically verified, avoiding the inherent uncertainty of probabilistic generation models. Therefore, when the solution result contains an optimal solution model, the insurance recommendation scheme generated based on the optimal solution model logically strictly satisfies all constraints and is practically feasible. When the solution result contains unsatisfiable core constraints, constraint relaxation and iterative adjustment can be performed on these unsatisfiable core constraints to resolve constraint conflicts and generate a feasible insurance recommendation scheme. Therefore, regardless of whether the solution contains an optimal solution model or contains unsatisfactory core constraints, the system can output insurance recommendation schemes that are logically strictly satisfied and practically feasible. Thus, it can use artificial intelligence technology to recommend insurance and obtain usable insurance recommendation schemes.
[0017] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description
[0018] Figure 1 A schematic diagram of an insurance recommendation method based on the collaboration of a large language model and a solver of satisfiability model theory is provided for an embodiment of this application. Figure 2 A schematic diagram of an insurance recommendation system structure based on the collaboration of a large language model and a solver of satisfiability model theory is provided for an embodiment of this application. Figure 3 This is a schematic diagram of a computing device provided in an embodiment of this application. Detailed Implementation
[0019] The terms "first," "second," and "third," etc., used in this application specification and accompanying drawings are used to distinguish different objects, not to limit a specific order.
[0020] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0021] This application provides an insurance recommendation method based on the collaboration of a large language model and a satisfiability model theory solver. This method can be executed by a processing device. The processing device can be a terminal or a server. Terminals include, but are not limited to, smartphones, tablets, laptops, personal digital assistants, or smart wearable devices. The server can be a cloud server, such as a central server in a central cloud computing cluster or an edge server in an edge cloud computing cluster. Alternatively, the server can be a server in a local data center. A local data center refers to a data center directly controlled by the user.
[0022] To make the technical solution of this application clearer and easier to understand, the following describes, in conjunction with the accompanying drawings, an insurance recommendation method based on the collaboration of a large language model and a solver of satisfiability model theory, provided by an embodiment of this application. Figure 1 As shown in the figure, this is a schematic flowchart of an insurance recommendation method based on the collaboration of a large language model and a satisfiability model theory solver, provided in an embodiment of this application. The method includes: S101, Obtain insurance demand information expressed by the user in natural language.
[0023] In the embodiments provided in this application, users input their insurance needs through a human-computer interaction interface. The insurance need information may include the user's basic information, budget constraints, insurance preferences, health status, and protection requirements. As an optional implementation, the basic information includes the user's age, gender, occupation, annual income, and family structure; the budget constraints include the annual premium budget ceiling and the average monthly disposable premium; the insurance preferences include the desired insurance types and priorities, including medical insurance, critical illness insurance, accident insurance, term life insurance, and annuity insurance; the health status includes past medical history, abnormal physical examination indicators, and family medical history; and the protection requirements include the expected coverage amount, coverage period, and whether it includes specific diseases or accident scenarios. It should be noted that the above natural language requirement information is presented in unstructured text form. For example, if a user inputs "I am 35 years old this year, with an annual income of 300,000 yuan, and I want to configure a family protection plan for my family of three, with an annual premium budget controlled within 20,000 yuan, and I have mild hypertension," the system will obtain insurance need information including age, income, family structure, budget constraints, and health status.
[0024] It should be noted that all user data obtained in this application embodiment must be used with the user's authorization. As an optional implementation, the user's data processing authorization consent can be obtained before the step of obtaining the user's insurance demand information expressed in natural language. Specifically, a data processing authorization agreement can be displayed to the user through a user interface. The data processing authorization agreement should at least clearly state the following: the type of data to be collected, including the user's basic information, health status, family structure, and financial information; the purpose of data collection, i.e., to generate insurance recommendation plans; the scope of data use, i.e., only used in the insurance recommendation service process and not disclosed to third parties; and the method and consequences of the user withdrawing authorization. The user expresses explicit consent by actively checking the consent option or clicking the confirmation button, and the system records the timestamp and device identifier of the consent operation as a compliance certificate. Only after obtaining the user's explicit consent can the step of obtaining the user's insurance demand information expressed in natural language be executed.
[0025] As another alternative implementation method, the data processing authorization agreement can be presented in a layered manner. The first layer displays summary information, including a summary of the data usage and a description of the core rights. The second layer displays the complete terms. Users can browse through each layer. After fully understanding the terms, users can complete the authorization confirmation through electronic signature or biometric verification.
[0026] As another optional implementation, the system allows users to withdraw data processing authorization at any time through the account settings interface. After authorization is withdrawn, the system stops collecting new insurance demand information and deletes the collected personal information after the preset data retention period expires. The preset data retention period does not exceed the reasonable period necessary to complete the insurance recommendation service. By obtaining the user's data processing authorization consent, the process of collecting insurance demand information complies with the legal requirements of personal information protection regulations, ensuring that data acquisition is based on the user's autonomous will.
[0027] S102, based on the large language model, extracts the insured demand information into structured constraint data.
[0028] Specifically, the constraint extraction process can be defined as an end-to-end mapping from unformatted natural language queries to a structured constraint space, mathematically expressed as:
[0029] in, For structured constraint data; The mapping function for the large language model outputs standardized structured constraint data. ; For insurance needs information expressed in natural language by the user; This is a set of hints containing several examples of standard query and structured constraint mappings.
[0030] In the embodiments provided in this application, as an example, the temperature parameter of the large language model can be set to 0 to ensure the reproducibility of the output results; the cache validity period can be set to 24 hours, and it will be automatically refreshed after expiration.
[0031] As an optional implementation, the structured constraint data is presented in JSON format, including field names, field values, constraint types, and priority tags. Further, the structured constraint data includes at least one of the following types: budget constraints, health disclosure constraints, insurance type exclusivity constraints, insured age constraints, occupational category constraints, and coverage period constraints. It should be explained that budget constraints limit the upper limit of premium expenditure; health disclosure constraints filter eligible insurance products based on the user's health status; insurance type exclusivity constraints prevent products with overlapping coverage or underwriting restrictions from being selected simultaneously; insured age constraints limit the age requirements of each insurance product for the insured; occupational category constraints limit the occupational category requirements of each insurance product; and coverage period constraints limit the coverage period range of each insurance product. By extracting natural language demand information into structured constraint data, unstructured user input is transformed into standardized data with clearly defined field definitions and type identifiers, providing a standardized input basis for formal transformation and improving the accuracy and consistency of constraint extraction.
[0032] S103 transforms structured constraint data into logical constraint problems that can be recognized by the satisfiability modular theory solver.
[0033] It should be noted that the Satisfiability Modular Theory is a first-order logic decision framework that extends the theories of arithmetic, arrays, and bit vectors based on Boolean satisfiability determination. Its solver can automatically determine and optimize the satisfiability of logic formulas containing multiple theoretical fragments. The Satisfiability Modular Theory solver is also known as the SMT solver.
[0034] Specifically, the transformation process includes defining a set of decision variables and a set of value ranges for each decision variable in the structured constraint data; encoding each constraint condition into a logical assertion statement based on the set of decision variables and the set of value ranges; defining an objective function based on the set of decision variables and the set of value ranges; and obtaining a logical constraint problem recognizable by the SMT solver based on the set of decision variables, the set of value ranges, the logical assertion statements, and the objective function.
[0035] In the embodiments provided in this application, the multi-constraint insurance recommendation problem can be formalized as a constraint satisfaction problem with an optimization objective, which is mathematically defined as:
[0036] in, for; It represents a set of decision variables, including configurable elements such as insurance type selection, coverage amount allocation, payment period, and designation of the policyholder or insured. , which is the set of value ranges corresponding to each decision variable; This is a set of constraints, covering budget constraints, health disclosure constraints, mutual exclusion of insurance types, age restrictions for insured individuals, and occupational category restrictions, etc. The default optimization objective is either "maximizing coverage while satisfying all constraints" or "minimizing total premiums given coverage requirements".
[0037] As an optional implementation, a set of decision variables and a set of value ranges corresponding to each decision variable in the set of decision variables are defined based on the structured constraint data, including: for each candidate insurance product Define Boolean variables As a variable for insurance product selection, it indicates whether or not the product is selected; for products with selectable coverage ranges, it is defined as either an integer or a continuous variable. As a variable for coverage allocation, it represents the insured amount; an enumerated variable is defined. As a variable representing the payment period, it indicates the choice of payment years; in scenarios with multiple insured persons, it defines a mapping variable. As a variable designated by the policyholder or the insured, it represents the allocation to the insured. The set of values... This refers to the range of values for each decision variable; for example, the range of a Boolean variable is... The range of integer variables is the set of coverage tiers supported by the product, and the range of enumerated variables is the set of payment periods supported by the product.
[0038] As an optional implementation, each constraint condition is encoded into a logical assertion statement based on the set of decision variables and the set of value ranges, including: encoding the budget constraint in the structured constraint data into an arithmetic constraint that the total premium does not exceed the budget limit, the mathematical expression of which is:
[0039] in For products The premium, The upper limit of the user's insurance premium budget; the health disclosure constraints in the structured constraint data are encoded as Boolean constraints where the corresponding product selection variable is false when a specific pre-existing medical history exists, i.e., for products with strict health disclosure requirements. If the user has a specific medical history ,but The mutual exclusion constraints of insurance types in the structured constraint data are encoded as logical constraints that prevent both product selection variables from being true simultaneously. and If there is overlap in coverage or underwriting restrictions, then ; Based on the arithmetic constraints, Boolean constraints, and logical constraints, logical assertion statements are obtained. It should be explained that the general paradigm of the above encoding process is:
[0040] in For a set of structured constraints; Standard method calls in the SMT solver programming interface; This is a constraint encoding function used to convert constraints into first-order logic formulas; This serves as a unique label for the constraint, used to precisely locate the core that cannot be satisfied. By encoding budget constraints, health disclosure constraints, and insurance type mutual exclusion constraints as arithmetic constraints, Boolean constraints, and logical constraints respectively, various business constraints are transformed into standardized logical expressions that the solver can recognize, improving the standardization of constraint encoding and the compatibility of solver processing.
[0041] As an optional implementation, an objective function is defined based on the set of decision variables and the set of value ranges, including: the default optimization objective is to minimize the total premium while satisfying all constraints, and its mathematical expression is:
[0042] As another alternative implementation method, users can also customize optimization goals, such as maximizing critical illness coverage within a given budget.
[0043] Based on the set of decision variables, the set of value ranges, the logical assertions, and the objective function, a logical constraint problem recognizable by the SMT solver is obtained. This involves integrating the variable definitions, value range definitions, constraint codes, and objective function into a script file or program interface call parameter that can be directly read and executed by the SMT solver. By transforming structured constraint data into a logical constraint problem, the insurance recommendation problem is converted into a formal problem with a rigorous mathematical definition. This provides a formal basis for the solver's rigorous logical judgment, ensuring the precise expression and logical consistency of the constraints.
[0044] S104, call the satisfiability modular theory solver to solve the logic constraint problem and obtain the solution result.
[0045] Specifically, the solution process includes: inputting the logical constraint problem into the SMT solver and performing a satisfiability determination; when the determination result is satisfiable, extracting the optimal solution model that satisfies all constraints as the solution result; when the determination result is unsatisfiable, extracting the subset of unsatisfiable core constraints as the solution result.
[0046] It should be noted that the main decision-making logic of the SMT solver is as follows:
[0047] in, For the set of all logical constraints; middle, This refers to an instantiated SMT solver object (such as the Solver instance in Z3), which has all decision variables, range sets, logical assertion statements, and objective functions defined in the preceding steps loaded internally. This is the standard decision method for the SMT solver object, used to automatically determine the satisfiability of the input constraint set. After this method is invoked, the SMT solver will use its internal logical reasoning engine to determine whether there exists at least one set of decision variable assignments that allows... All logical assertions in the statement are true simultaneously. To execute The result state value returned by the method typically includes the following three values: sat (satisfiable), indicating that there exists at least one set of decision variable assignments that can simultaneously satisfy the following conditions. All constraints in the equation, i.e., the existence of a feasible solution, are represented by unsat (unsatisfiable), indicating that no decision variable assignments can simultaneously satisfy the condition. All constraints in the constraint set, i.e., the constraint set, have logical conflicts, no feasible solutions, or are unknown, indicating that the solver cannot complete the determination within the preset time or resource limits, and the result is undetermined.
[0048] As an optional implementation, the logical constraint problem is input into the SMT solver to perform a satisfiability determination, including: inputting the encoded logical assertion statements and objective function into the SMT solver through a program interface, triggering the solver's satisfiability determination process. The solver's maximum runtime can be dynamically adjusted according to the problem complexity: 60 seconds for simple scenarios, 120 seconds for medium scenarios, and 180 seconds for complex scenarios.
[0049] As an optional implementation, when the determination result is satisfactory, the optimal solution model that satisfies all constraints is extracted as the solution result, including: the solver outputting the optimal solution model. ,in To find the optimal insurance recommendation that satisfies all constraints and fulfills the objective function, we need to include complete information such as specific product selection, coverage amount, and payment plan. The decision variables in this optimal solution model correspond to the selection status, coverage amount, and payment period for each insurance product.
[0050] As an optional implementation, when the determination result is unsatisfiable, a subset of unsatisfiable core constraints is extracted as the solution result, including: calling the unsatisfiable core extraction function of the SMT solver, whereby the SMT solver... The function retrieves the smallest subset of unsatisfiable core constraints that lead to constraint conflicts. .
[0051] The minimum unsatisfiable core constraint subset satisfies the critical condition that removing any one constraint makes the remaining constraints satisfiable; this minimum unsatisfiable core constraint subset is used as the solution result. It should be explained that the minimum unsatisfiable core constraint subset has two key characteristics: first, it is itself a set of unsatisfiable constraints; second, removing any one constraint from it makes the remaining constraint set satisfiable. These two characteristics can accurately locate the key constraints that lead to an unsolvable recommendation, providing a clear direction for constraint adjustment. By calling the unsatisfiable core extraction function to obtain the minimum unsatisfiable core constraint subset, the system can accurately identify the minimum set of constraints causing constraint conflicts, avoiding invalid calculations caused by blindly adjusting non-conflicting constraints, and improving the efficiency and accuracy of constraint adjustment. By calling the SMT solver, the solver's strict logical judgment capability ensures the correctness and completeness of the solution results. When a feasible solution exists, it can find the optimal solution that satisfies all constraints; when no feasible solution exists, it can accurately locate the root cause of the conflict, providing an accurate basis for constraint adjustment.
[0052] S105, determine whether the solution result contains the optimal solution model or cannot satisfy the core constraints.
[0053] It should be noted that when the solution result contains the optimal solution model, step S106 is executed; while when the solution result contains unsatisfactory core constraints, step S107 is executed.
[0054] S106, Generate insurance recommendation schemes based on the optimal solution model.
[0055] Specifically, the generation process includes: mapping the decision variables in the optimal solution model to configuration parameters for product selection, coverage amount configuration, and premium payment period; and generating a natural language insurance recommendation scheme based on the configuration parameters, which includes a list of recommended products, premium details, and coverage description.
[0056] As an optional implementation, the decision variables in the optimal solution model are mapped to configuration parameters for product selection, coverage amount allocation, and payment period. This includes: reading each Boolean variable in the optimal solution model. The assignment of values will include the products corresponding to variables with a value of 1 in the recommended product list; read the configuration variables for each coverage amount. Assign values to determine the insured amount for the corresponding product; read the variables for each payment period. The assigned value determines the payment period for the corresponding product.
[0057] As an optional implementation, a natural language insurance recommendation scheme containing a list of recommended products, premium details, and coverage description is generated based on the configuration parameters. This includes: completing a natural language mapping from a structured model to a readable insurance scheme using a large language model, the mathematical expression of which is:
[0058] in Example hints generated for the solution; Generate a mapping function for the large language model of the scheme; The final output of the natural language insurance recommendation scheme includes a complete information such as a list of recommended products, the coverage amount and premium for each product, the total annual premium, a description of the coverage scope, and precautions for purchasing insurance. By generating insurance recommendation schemes based on the optimal solution model, the formal optimal solution output by the solver is converted into a user-understandable natural language description, realizing the automatic conversion from formal solution results to user-readable schemes, improving the usability of the schemes and the user experience.
[0059] S107: Based on the unsatisfiable core constraints, perform constraint relaxation and iterative adjustment to generate feasible insurance recommendation schemes.
[0060] Specifically, the process includes: prioritizing unsatisfactory core constraints to obtain priority labels for each constraint; relaxing the corresponding constraints sequentially from low to high according to the priority labels to obtain a relaxed constraint set; iteratively solving the SMT solver again based on the relaxed constraint set until the returned solution contains the optimal solution model or reaches the maximum number of iterations to obtain the iterative solution result; and generating a feasible insurance recommendation scheme based on the iterative solution result.
[0061] As an optional implementation, the unsatisfiable core constraints are prioritized to obtain priority labels for each constraint, including prioritizing each constraint in the following ways:
[0062]
[0063]
[0064]
[0065]
[0066] in These are core constraints, including non-negotiable hard conditions such as user age and legal eligibility for insurance. These are hard constraints, including budget limits and mandatory insurance types. This is a soft constraint, including specific insurance company preferences and secondary coverage items. The higher the priority value, the greater the degree to which the constraint can be relaxed.
[0067] As an optional implementation, the corresponding constraints are relaxed sequentially according to the priority labels from low to high to obtain a relaxed constraint set, including: entering an iterative optimization phase for dynamic constraint relaxation based on the SMT solver, with the iteration form as follows:
[0068] in This represents the number of iterations. For the first The constraints to be relaxed in wheel selection For the first Relaxed constraints on wheel selection; For the first The set of all logical constraints for round selection; For the first The set of all logical constraints for round selection.
[0069] As an alternative implementation, the relaxation measures include increasing the budget cap by 10% to 20%, changing mandatory insurance types to optional ones, or lowering the coverage amount requirements for specific coverage items.
[0070] Based on the relaxed constraint set, the SMT solver is called again for iterative solution until the returned solution contains the optimal solution model or the maximum number of iterations is reached. The iterative solution result includes: re-inputting the relaxed constraint set into the SMT solver to perform a satisfiability determination; if the determination result is still unsatisfiable, then selecting the next priority constraint for relaxation and solving again, iterating until the determination result is satisfiable or the maximum number of iterations is reached. , The default setting is 20 times.
[0071] As an optional implementation, a feasible insurance recommendation scheme is generated based on the iterative solution results. This includes: when the iterative solution results contain an optimal solution model, generating a feasible insurance recommendation scheme according to the aforementioned method of generating an insurance recommendation scheme based on the optimal solution model; the feasible insurance recommendation scheme may include modification suggestions in natural language, clearly informing the user which original requirements have been adjusted, the reasons for the adjustments (i.e., which constraints conflict), and the differences between the adjusted scheme and the original requirements. The user can choose to accept the adjusted scheme or re-enter the requirements. By performing constraint relaxation and iterative adjustment based on unsatisfiable core constraints, the system can automatically locate the root cause of the conflict when user requirements cannot be met, generate feasible schemes through orderly constraint relaxation, and provide clear modification suggestions to the user. This allows the system to still provide meaningful recommendation services in unsolvable scenarios, improving the system's usability and user satisfaction.
[0072] In the embodiments provided in this application, a multi-agent collaborative architecture can be adopted to reduce system operating costs during the execution of the above steps. Specifically, the traditional single-agent architecture can be divided into multiple dedicated agents, such as a Parser Agent, Encoder Agent, Solver Orchestrator, and Token Optimizer. The Parser Agent is responsible for parsing the user's natural language input and extracting structured constraints; the Encoder Agent is responsible for converting structured constraints into SMT solution code; the Solver Orchestrator is responsible for scheduling the SMT solver execution, monitoring the solution status and results; and the Token Optimizer is responsible for token optimization tasks such as prompt word compression, cache management, and output field filtering. The agents communicate through a standardized interface protocol to achieve parallel processing of tasks and fault isolation.
[0073] As an optional implementation, token optimization can include at least one of the following strategies: hierarchical structured compression of prompt words, which organizes the prompt information of the insurance recommendation task into four levels: task metadata, core constraints, auxiliary constraints, and output format, and uses key-value pairs, classification coding, and symbol mapping to replace natural language descriptions, reducing redundant tokens; constraint clustering and inference reuse, which clusters and merges similar constraints, forcing the large language model to generate a shared inference conclusion for constraints within the same cluster, avoiding token waste caused by repeated inference; and tool output field filtering and caching, which retains only the key fields required by the SMT solver, filters redundant descriptive information, and caches tool call results with the same parameters to avoid repeated queries. Experiments in this application show that the above strategies can reduce the use of prompt word tokens by 35% to 40%, and the overall token consumption of the system is reduced by approximately 45% to 50% compared to the pure large language model solution.
[0074] As an optional implementation method, the method described in this application can be deployed in the following hardware and software environments: a hardware environment using Intel Xeon or Core series CPUs, NVIDIA RTX series GPUs with at least 8GB of video memory and 64GB or more of RAM; and a software environment using Python 3.9 or later, Z3 SMT Solver 4.12 or later, and compatible with mainstream large language model APIs.
[0075] In the embodiments provided in this application, to better illustrate the method described herein, a 35-year-old male user with an annual income of 300,000 yuan, married with one child, who wishes to configure a family protection plan, with an annual premium budget of less than 20,000 yuan, a focus on critical illness and medical protection, and mild hypertension is used as an example. The process of executing the method described herein is as follows: The Parser Agent parses the user input and extracts the structured constraints of age 35, gender male, annual income of 300,000 yuan, family structure of 3 people, budget not exceeding 20,000 yuan per year, preference for critical illness and medical protection, and health abnormality of hypertension; the Encoder... The Agent encodes the above constraints into SMT logic formulas, defines product selection variables and coverage variables for each type of insurance, and encodes budget constraints, health disclosure constraints (i.e., patients with hypertension cannot purchase certain medical insurance products with strict health disclosures), age constraints, etc. The SolverOrchestrator calls the Z3 solver to solve the problem. If the budget constraint and health disclosure constraint can be satisfied simultaneously, the optimal product combination is output. If hypertension narrows the range of available products and the budget cannot cover all protection needs, the system enters the unsatisfiable handling process, extracts the unsatisfiable core constraints, and prioritizes and relaxes the budget constraint or protection need constraint until a feasible solution is generated. Finally, the system outputs a complete recommended solution including specific product names, coverage amounts, premiums, and insurance precautions, along with an explanation of the reasons for the solution selection.
[0076] Based on the above description, this application has the following beneficial effects: This application extracts structured constraint data from users' insurance needs expressed in natural language using a large language model. This structured constraint data is then transformed into logical constraint problems recognizable by a satisfiability modular theory solver. The solver is then invoked for rigorous logical solving, ensuring that insurance recommendations strictly satisfy all constraints. Specifically, because the satisfiability modular theory solver determines constraint satisfaction based on formal logical reasoning, its output undergoes rigorous logical verification and avoids the illusion problem inherent in probabilistic generation models. Therefore, when the solution contains an optimal solution model, the insurance recommendations generated based on this model strictly satisfy constraints in terms of budget, health disclosure, and mutual exclusion of insurance types, thus improving recommendation accuracy. Furthermore, when the solution contains unsatisfiable core constraints, by performing constraint relaxation and iterative adjustments on these unsatisfiable core constraints, the system can automatically identify conflicting constraints and generate feasible insurance recommendations, allowing users to obtain effective recommendations even in constraint conflict scenarios. Furthermore, by formalizing the insurance recommendation problem as a constraint satisfaction problem with an optimization objective, the satisfiability model theory solver searches globally for the optimal product combination that satisfies all constraints, thus avoiding suboptimal results caused by local decisions.
[0077] The above text combined Figure 1 This application provides a detailed description of an insurance recommendation method based on the collaboration of a large language model and a satisfiability model theory solver. The system and equipment provided in this application will be described below with reference to the accompanying drawings.
[0078] like Figure 2 As shown in the figure, this is a schematic diagram of an insurance recommendation system structure based on the collaboration of a large language model and a satisfiability module theory solver, according to an embodiment of this application. The insurance recommendation system 200 based on the collaboration of a large language model and a satisfiability module theory solver includes: The insurance demand acquisition module 210 is used to acquire insurance demand information expressed by users in natural language; The structured constraint extraction module 220 is used to extract the insurance demand information into structured constraint data based on a large language model; The constraint transformation module 230 is used to transform the structured constraint data into a logical constraint problem that can be recognized by the satisfiability modular theory solver; The solution module 240 is used to call the satisfiability model theory solver to solve the logical constraint problem and obtain the solution result; the solution result includes the optimal solution model or the unsatisfiable core constraint. The result generation module 250 is used to generate an insurance recommendation scheme based on the optimal solution model when the solution result contains the optimal solution model; and to perform constraint relaxation and iterative adjustment based on the unsatisfiable core constraints when the solution result contains the unsatisfiable core constraints to generate a feasible insurance recommendation scheme.
[0079] Optional, constraint transformation module 230, specifically used for: Define a set of decision variables and a set of value ranges for each decision variable in the set of decision variables based on the structured constraint data. Each constraint is encoded into a logical assertion statement based on the set of decision variables and the set of value ranges. Define the objective function based on the set of decision variables and the set of value ranges; Based on the set of decision variables, the set of value ranges, the logical assertion statements, and the objective function, obtain the logical constraint problems that the satisfiability modular theory solver can identify.
[0080] Optionally, the constraint transformation module 230 is also specifically used for: The budget constraints in the structured constraint data are encoded as arithmetic constraints that ensure the total premium does not exceed the budget limit. The health disclosure constraints in the structured constraint data are encoded as Boolean constraints in which the corresponding product selection variable is false when a specific past medical history exists; The mutual exclusion constraints of insurance types in the structured constraint data are encoded as logical constraints that mutual exclusion product selection variables cannot be true at the same time. Logical assertion statements are obtained based on the arithmetic constraints, the Boolean constraints, and the logical constraints.
[0081] Optional, solver module 240, specifically used for: The logical constraint problem is input into the satisfiability modular theory solver, and satisfiability determination is performed. When the determination result is satisfactory, the optimal solution model that satisfies all constraints is extracted as the solution result; When the determination result is unsatisfiable, the subset of unsatisfiable core constraints is extracted as the solution result.
[0082] Optionally, solver module 240 is also specifically used for: The unsatisfiable core extraction function of the satisfiability modular theory solver is invoked to obtain the smallest subset of unsatisfiable core constraints that cause constraint conflicts; the smallest subset of unsatisfiable core constraints satisfies the critical condition that the remaining constraints become satisfiable after removing any one constraint. The minimum subset of unsatisfiable core constraints is taken as the solution result.
[0083] Optional, the result generation module 250 is specifically used for: The decision variables in the optimal solution model are assigned and mapped to configuration parameters for product selection, coverage amount, and payment period; Based on the configuration parameters, a natural language insurance recommendation scheme is generated, which includes a list of recommended products, premium details, and coverage descriptions.
[0084] Optionally, the result generation module 250 is also specifically used for: Priority quantification is performed on unsatisfiable core constraints to obtain priority labels for each constraint; According to the priority labels in ascending order, the corresponding constraints are relaxed sequentially to obtain the relaxed constraint set. Based on the relaxed constraint set, the satisfiability model theory solver is called again for iterative solution until the returned solution contains the optimal solution model or the maximum number of iterations is reached, and the iterative solution result is obtained. Based on the iterative solution results, a feasible insurance recommendation scheme is generated.
[0085] According to the embodiments of this application, an insurance recommendation system based on the collaboration of a large language model and a satisfiability modular theory solver can be implemented by performing the method described in the embodiments of this application. Furthermore, the other operations and / or functions of each module / unit of the insurance recommendation system based on the collaboration of a large language model and a satisfiability modular theory solver are respectively for the purpose of implementing… Figure 1 For the sake of brevity, the corresponding processes of each method in the illustrated embodiments will not be described in detail here.
[0086] This application also provides a computing device.
[0087] like Figure 3 As shown in the figure, this is a schematic diagram of a computing device provided in an embodiment of this application. The computing device 300 includes a bus 301, a processor 302, a communication interface 303, and a memory 304. The processor 302, the memory 304, and the communication interface 303 communicate with each other via the bus 301.
[0088] Bus 301 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0089] The processor 302 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).
[0090] Communication interface 303 is used for communication with external devices.
[0091] Memory 304 may include volatile memory, such as random access memory (RAM). Memory 304 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0092] The memory 304 stores executable code, which the processor 302 executes to perform the aforementioned insurance recommendation method based on the collaboration of a large language model and a satisfiability model theory solver.
[0093] Specifically, in achieving Figure 2 In the case of the illustrated embodiment, and Figure 2 In the embodiment of the insurance recommendation system based on the collaboration of a large language model and a satisfiability model theory solver, if each module or unit is implemented in software, the execution... Figure 2 The software or program code required for the functions of each module / unit can be partially or entirely stored in memory 304. Processor 302 executes the program code corresponding to each unit stored in memory 304, and executes the aforementioned insurance recommendation method based on the collaboration of a large language model and a satisfiability model theory solver.
[0094] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the aforementioned insurance recommendation method based on the collaboration of a large language model and a satisfiability model theory solver.
[0095] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.
[0096] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.
Claims
1. An insurance recommendation method based on the collaboration of a large language model and a solver of satisfiability model theory, characterized in that, The method includes: Obtain information about users' insurance needs expressed in natural language; The insurance demand information is extracted into structured constraint data based on a large language model; The structured constraint data is transformed into a logical constraint problem that can be recognized by the satisfiability modular theory solver; The satisfiability model theory solver is invoked to solve the logical constraint problem, and the solution results are obtained; the solution results include the optimal solution model or the unsatisfiable core constraints. When the solution result contains an optimal solution model, an insurance recommendation scheme is generated based on the optimal solution model. When the solution result contains unsatisfiable core constraints, constraint relaxation and iterative adjustment are performed based on the unsatisfiable core constraints to generate a feasible insurance recommendation scheme.
2. The method according to claim 1, characterized in that, The process of transforming the structured constraint data into a logical constraint problem recognizable by a satisfiability modular theory solver includes: Define a set of decision variables and a set of value ranges for each decision variable in the set of decision variables based on the structured constraint data. Each constraint is encoded into a logical assertion statement based on the set of decision variables and the set of value ranges. Define the objective function based on the set of decision variables and the set of value ranges; Based on the set of decision variables, the set of value ranges, the logical assertion statements, and the objective function, obtain the logical constraint problems that the satisfiability modular theory solver can identify.
3. The method according to claim 2, characterized in that, The step of encoding each constraint condition into a logical assertion statement based on the set of decision variables and the set of value ranges includes: The budget constraints in the structured constraint data are encoded as arithmetic constraints that ensure the total premium does not exceed the budget limit. The health disclosure constraints in the structured constraint data are encoded as Boolean constraints in which the corresponding product selection variable is false when a specific past medical history exists; The mutual exclusion constraints of insurance types in the structured constraint data are encoded as logical constraints that the mutual exclusion product selection variables cannot be true at the same time. Logical assertion statements are obtained based on the arithmetic constraints, the Boolean constraints, and the logical constraints.
4. The method according to claim 1, characterized in that, The process of calling the satisfiability modular theory solver to solve the logical constraint problem and obtaining the solution results includes: The logical constraint problem is input into the satisfiability modular theory solver, and satisfiability determination is performed. When the determination result is satisfactory, the optimal solution model that satisfies all constraints is extracted as the solution result; When the determination result is unsatisfiable, the subset of unsatisfiable core constraints is extracted as the solution result.
5. The method according to claim 4, characterized in that, When the determination result is unsatisfiable, the extraction of a subset of unsatisfiable core constraints as the solution result includes: The unsatisfiable core extraction function of the satisfiability modular theory solver is invoked to obtain the smallest subset of unsatisfiable core constraints that cause constraint conflicts; the smallest subset of unsatisfiable core constraints satisfies the critical condition that the remaining constraints become satisfiable after removing any one constraint. The minimum subset of unsatisfiable core constraints is taken as the solution result.
6. The method according to claim 1, characterized in that, When the solution result contains an optimal solution model, generating an insurance recommendation scheme based on the optimal solution model includes: The decision variables in the optimal solution model are assigned and mapped to configuration parameters for product selection, coverage amount, and payment period; Based on the configuration parameters, a natural language insurance recommendation scheme is generated, which includes a list of recommended products, premium details, and coverage descriptions.
7. The method according to claim 1, characterized in that, When the solution result contains unsatisfiable core constraints, constraint relaxation and iterative adjustment are performed based on the unsatisfiable core constraints to generate a feasible insurance recommendation scheme, including: Priority quantification is performed on unsatisfiable core constraints to obtain priority labels for each constraint; According to the priority labels in ascending order, the corresponding constraints are relaxed sequentially to obtain the relaxed constraint set. Based on the relaxed constraint set, the satisfiability model theory solver is called again for iterative solution until the returned solution contains the optimal solution model or the maximum number of iterations is reached, and the iterative solution result is obtained. Based on the iterative solution results, a feasible insurance recommendation scheme is generated.
8. An insurance recommendation system based on the collaboration of a large language model and a solver of satisfiability model theory, characterized in that, The system includes: The insurance demand acquisition module is used to acquire information about users' insurance demands expressed in natural language. The structured constraint extraction module is used to extract the insurance demand information into structured constraint data based on a large language model; The constraint transformation module is used to transform the structured constraint data into a logical constraint problem that can be recognized by the satisfiability modular theory solver; The solution module is used to call the satisfiability model theory solver to solve the logical constraint problem and obtain the solution result; the solution result includes the optimal solution model or the unsatisfiable core constraint. The result generation module is used to generate an insurance recommendation scheme based on the optimal solution model when the solution result contains the optimal solution model; and to perform constraint relaxation and iterative adjustment based on the unsatisfiable core constraints when the solution result contains the unsatisfiable core constraints, thereby generating a feasible insurance recommendation scheme.
9. A computing device, characterized in that, Including memory and processor; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the computing device performs the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the method as described in any one of claims 1 to 7.