An insurance field intelligent question and answer method and device based on incremental training and a medium
By constructing a compliance knowledge base and incrementally training a large model, the problem of inaccurate answers caused by the homogenization of insurance terms was solved, achieving high accuracy and compliance in the intelligent question-answering system for the insurance field.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ZHIBAO HUIZHONG DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2026-03-14
- Publication Date
- 2026-06-12
Smart Images

Figure CN122196129A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, specifically to an intelligent question-answering method, device, and medium in the insurance field based on incremental training. Background Technology
[0002] With the rapid development of artificial intelligence technology and the deepening digital transformation of the insurance industry, intelligent customer service systems based on large language models are gradually becoming standard equipment for insurance institutions. Users are increasingly accustomed to consulting about insurance product details, claims processes, and coverage through natural language interaction. At the same time, insurance-related document data (such as product terms, underwriting rules, and regulatory policies) is experiencing explosive growth and extremely high update frequency. These documents typically contain a large number of technical terms, complex legal logic, and subtle version differences, placing extremely high demands on the semantic understanding capabilities and information accuracy of automated question-and-answer systems.
[0003] Currently, most mainstream intelligent question-answering solutions rely on general-purpose large models or simple retrieval enhancement generation techniques. However, in practical applications in the insurance field, these existing technologies have revealed significant shortcomings: On the one hand, insurance terms are highly homogeneous, and different versions of products or different plans of the same product often differ only in minor numerical differences such as deductibles and reimbursement ratios. General-purpose models lacking domain-specific incremental training and refined difference recognition mechanisms are easily confused by these highly similar texts, leading to incorrect answers. Therefore, existing intelligent question-answering solutions suffer from low accuracy. Summary of the Invention
[0004] This application provides an intelligent question-answering method, device, and medium for the insurance field based on incremental training, which improves the accuracy of intelligent question-answering in the insurance field.
[0005] The first aspect of this application provides an intelligent question-answering method for the insurance field based on incremental training. The method includes: acquiring original authoritative documents in the insurance field and constructing a compliance knowledge base based on the original authoritative documents, the compliance knowledge base including multiple knowledge fragments and corresponding knowledge identifiers and difference identifiers for each knowledge fragment; incrementally training a preset large model based on the compliance knowledge base to obtain a large model for the insurance field; receiving a user's natural language question and identifying the questioning intent of the natural language question; retrieving from the compliance knowledge base a target knowledge fragment corresponding to the questioning intent, as well as a target knowledge identifier and a target difference identifier corresponding to the target knowledge fragment; constructing prompt words based on the target knowledge identifier, the target knowledge fragment, the target difference identifier, and a preset combination of compliance constraint instructions; and inputting the prompt words into the large model for the insurance field to generate a final answer.
[0006] By adopting the above technical solutions, a compliance knowledge base containing knowledge fragments, knowledge identifiers, and difference identifiers was constructed, achieving structured management and precise positioning of knowledge in the insurance field. Knowledge identifiers provide a unique identity for each knowledge fragment, enabling the system to accurately track and reference specific insurance clause content. The introduction of difference identifiers solves the problem of severe homogenization in insurance product clauses, allowing the system to accurately distinguish similar but different clause content. Incremental training of a pre-set large model based on the compliance knowledge base enables the large insurance model to understand and apply structured insurance knowledge. After receiving user questions, the accuracy and relevance of the answer are ensured by identifying the question's intent and retrieving the target knowledge fragment and its identifier. Constructing prompts containing target knowledge identifiers, target knowledge fragments, target difference identifiers, and pre-set compliance constraint instructions provides precise reasoning guidance for the large model, avoiding knowledge confusion and misreference. The final generated answer accurately reflects the target knowledge content and strictly adheres to the compliance requirements of the insurance industry, improving the professionalism and reliability of the intelligent question-answering system in the insurance field. This technical solution effectively addresses the challenges of highly homogenized insurance clauses, difficulty in identifying subtle semantic differences, and insufficient compliance in responses by introducing a large-scale insurance domain model based on incremental training, combined with the construction and dynamic updating of a compliance knowledge base. Through refined management of knowledge fragments, their identifiers, and difference identifiers, the model's accurate understanding of complex insurance documents is ensured. By combining target knowledge fragments and compliance constraint instructions to generate prompts, the accuracy and compliance of responses are guaranteed, thereby significantly improving the semantic accuracy, version difference identification capability, and compliance of the intelligent question-answering system.
[0007] Optionally, the compliance knowledge base also includes verification rules corresponding to each knowledge fragment. The construction of the compliance knowledge base based on the original authoritative document specifically includes: segmenting the original authoritative document according to independent clauses, definitions, or key sentences to form multiple knowledge fragments; assigning a corresponding knowledge identifier to each knowledge fragment, and assigning a corresponding difference identifier to each knowledge fragment based on the text similarity between the knowledge fragments. The knowledge identifier adopts a structured encoding format and includes a combination of document type, insurance type identifier, version year, and serial number; attaching verification rules to knowledge fragments involving preset compliance content. The verification rules define warnings, qualifiers, and compliance expression templates that must be included when referencing the knowledge fragment; and constructing the compliance knowledge base by combining each knowledge fragment with its corresponding knowledge identifier, difference identifier, and verification rules.
[0008] By employing the aforementioned technical solutions, original authoritative documents are segmented according to independent clauses, definitions, or key sentences, achieving fine-grained management of insurance knowledge. This ensures that each knowledge fragment maintains semantic integrity and independence, facilitating precise retrieval and citation. Knowledge fragments are assigned structured, coded knowledge identifiers. By incorporating combinations of document type, insurance type identifier, version year, and serial number, multi-dimensional labeling and version control of knowledge are achieved, ensuring the accuracy of knowledge tracing. Difference identifiers are assigned based on text similarity, effectively identifying and labeling differences in homogeneous knowledge fragments, resolving the confusion caused by highly similar insurance clauses. Verification rules are attached to knowledge fragments involving pre-defined compliance content, ensuring that necessary warnings, qualifiers, and compliance expression templates are automatically included when referencing this knowledge, guaranteeing the compliance of generated content from the source. By integrating knowledge fragments, identifiers, and verification rules to construct a compliance knowledge base, a complete and verifiable insurance knowledge management system is formed, providing a high-quality knowledge foundation for subsequent model training and inference.
[0009] Optionally, assigning corresponding difference identifiers to the knowledge segments based on the text similarity between each knowledge segment specifically includes: calculating the text edit distance between the first knowledge segment and the second knowledge segment, and calculating the text similarity based on the text edit distance, wherein the first knowledge segment and the second knowledge segment are any two knowledge segments from a plurality of knowledge segments; if the text similarity is greater than a preset confusion threshold, and the first knowledge identifier corresponding to the first knowledge segment and the second knowledge identifier corresponding to the second knowledge segment are inconsistent, then the first knowledge segment and the second knowledge segment are marked as homogeneous segments that interfere with each other; extracting the difference keywords between the first knowledge segment and the second knowledge segment, and using the difference keywords as the difference identifier.
[0010] By employing the aforementioned technical solutions, the text edit distance and text similarity between knowledge fragments are calculated, enabling a quantitative assessment of the similarity of insurance clauses and providing an objective numerical basis for identifying homogeneous content. When the text similarity exceeds a preset confusion threshold and the knowledge identifiers are inconsistent, the knowledge fragments are marked as mutually interfering homogeneous fragments, accurately capturing pairs of similar clauses that are prone to confusion, laying the foundation for subsequent differentiation processing. Extracting difference keywords as difference identifiers precisely locates the core differences between homogeneous fragments, enabling the system to accurately grasp the subtle but important differences between similar clauses of different insurance products. This difference identification mechanism allows the system to accurately identify and emphasize key differences when faced with highly similar insurance clauses, avoiding the incorrect application of one product's clause content to another, significantly improving the accuracy and professionalism of insurance consultation. Through systematic homogeneous fragment identification and difference marking, a knowledge management system capable of accurately distinguishing similar content has been constructed.
[0011] Optionally, retrieving the target knowledge fragment corresponding to the question intent, as well as the target knowledge identifier and target difference identifier corresponding to the target knowledge fragment, from the compliance knowledge base specifically includes: retrieving the knowledge fragment with the highest initial matching score from the compliance knowledge base as the target knowledge fragment according to the question intent; querying whether the target knowledge fragment is associated with a corresponding homogeneous fragment; if the target knowledge fragment is associated with a corresponding homogeneous fragment, then obtaining the target difference identifier corresponding to the target knowledge fragment.
[0012] By employing the aforementioned technical solution, the system retrieves the knowledge fragment with the highest initial matching score from the compliance knowledge base based on the user's question intent. This ensures the system can quickly locate the insurance clause content most relevant to the user's question, improving the accuracy and efficiency of the retrieval. By querying whether the target knowledge fragment is associated with similar fragments, the system proactively identifies potential knowledge confusion risks, preparing for the generation of accurate and unambiguous answers. When similar fragments are found, a target difference identifier is obtained, enabling the system to clearly understand the unique characteristics of that knowledge fragment and providing key information for generating differentiated and accurate answers. This retrieval mechanism not only focuses on the matching degree of the knowledge fragment itself but also considers its relationship within the entire knowledge base, especially the need to differentiate it from similar fragments, ensuring the completeness and usability of the retrieval results. By obtaining the target knowledge identifier and the target difference identifier, complete knowledge positioning information is provided for the subsequent construction of prompts, ensuring that the final generated answer accurately reflects the specific clause content of a particular insurance product.
[0013] Optionally, the step of constructing prompt words based on the combination of the target knowledge identifier, the target knowledge fragment, the target difference identifier, and preset compliance constraint instructions specifically includes: extracting the target difference identifier from the target knowledge fragment and generating a positive reinforcement instruction, wherein the positive reinforcement instruction requires the generated answer to contain the text content corresponding to the difference identifier; extracting the interference difference identifier from the potential interference fragment and generating a negative exclusion instruction, wherein the negative exclusion instruction requires the generated answer to be prohibited from containing the text content corresponding to the interference difference identifier, wherein the potential interference fragment is a homogeneous fragment corresponding to the target knowledge fragment; and integrating the target knowledge fragment, the positive reinforcement instruction, and the negative exclusion instruction according to the preset compliance constraint instructions to form the prompt words.
[0014] By employing the aforementioned technical solutions, target difference identifiers are extracted to generate positive reinforcement instructions, ensuring that the large model must include key differentiated content when generating answers. This forcibly highlights the unique characteristics of the target knowledge fragments, avoiding vague or generic expressions. Interference difference identifiers of potential interfering fragments are extracted to generate negative exclusion instructions, explicitly prohibiting the large model from including easily confused content in its answers. This negative constraint further guarantees the accuracy and relevance of the answers. The dual constraint mechanism of positive reinforcement and negative exclusion forms a precise content generation boundary, enabling the large model to accurately select and express the correct content among similar knowledge fragments, while proactively avoiding erroneous or confusing information. By integrating target knowledge fragments, positive reinforcement instructions, negative exclusion instructions, and preset compliance constraint instructions, a comprehensive set of constraint prompts is constructed. This provides a foundation of knowledge content, clarifies expression requirements and prohibitions, and ensures the implementation of compliance requirements. This refined prompt construction method enables the large model to generate professional answers that are both accurate and compliant, highlighting key points while avoiding confusion.
[0015] Optionally, before incrementally training the preset large model based on the compliance knowledge base, the method further includes: constructing a relational graph between knowledge fragments, identifying and labeling the logical dependencies between main insurance clauses and supplementary insurance clauses, insurance liabilities and exclusions, and definition clauses and application clauses; generating context-enhanced sequences for knowledge fragments based on the relational graph; recording the creation time, update history, and expiration status of each knowledge fragment, and generating a version difference comparison report; and supplementing the logical dependencies, context-enhanced sequences, and difference comparison reports to the compliance knowledge base.
[0016] By employing the aforementioned technical solutions, a relational graph of knowledge fragments is constructed, accurately identifying the logical dependencies between primary and supplementary insurance, insured liabilities and exclusions, and definitions and applications. This enables the system to understand the inherent connections between insurance clauses, avoiding the isolated understanding and application of individual clauses. Context-enhanced sequences are generated based on the relational graph, ensuring that each knowledge fragment can be correctly understood and applied within its necessary context, improving the completeness and accuracy of knowledge application. The temporal dimension information of knowledge fragments is recorded, including creation time, update history, and expiration status, achieving version management and timeliness control of knowledge, ensuring that the system always uses the latest and most valid insurance clause content. Comparison reports of version differences are generated, enabling the system to accurately grasp the evolution of clauses and precisely explain the differences between clauses at different times when needed. This relational information is supplemented into the compliance knowledge base, forming a multi-dimensional and comprehensive knowledge management system that includes not only the knowledge content itself but also key information such as the relationships between knowledge, historical evolution, and applicable conditions, providing a richer and more complete knowledge foundation for subsequent incremental training.
[0017] Optionally, the incremental training of the preset large model based on the compliance knowledge base specifically includes: constructing conditional activation training samples based on the knowledge identifiers, wherein the conditional activation training samples contain a five-tuple structure of question, knowledge identifier, knowledge fragment content, difference identifier, and expected answer; implementing a phased incremental training plan for the preset large model, wherein the first phase trains the model to learn the mapping relationship between knowledge identifiers and knowledge fragments, the second phase trains the expressive ability based on difference identifiers, and the third phase trains the conditional generation ability under compliance constraints.
[0018] By employing the aforementioned technical solution, conditional activation training samples containing a five-tuple structure were constructed, achieving the structuring and standardization of training data. This enabled the model to learn the precise correspondence between questions, knowledge identifiers, knowledge content, difference identifiers, and expected answers, improving the model's understanding and application of structured knowledge. A phased incremental training plan was implemented, gradually enhancing the model's capabilities and avoiding the learning confusion and poor results that might result from one-time training. The first phase trained the mapping relationship between knowledge identifiers and knowledge fragments, enabling the model to accurately locate and extract corresponding knowledge content based on identifiers, establishing a precise knowledge indexing capability. The second phase trained the ability to express information based on difference identifiers, enabling the model to learn to accurately use differentiated expressions in similar content, improving its ability to distinguish and express homogeneous content. The third phase trained the conditional generation capability under compliance constraints, ensuring that the model automatically complies with the compliance requirements of the insurance industry when generating content, achieving an organic combination of professionalism and compliance. Through this phased incremental training, the final large-scale insurance model possesses precise knowledge location capabilities, accurate differentiated expression capabilities, and strict compliance generation capabilities.
[0019] Secondly, embodiments of this application provide an intelligent question-answering device for the insurance field based on incremental training. The intelligent question-answering device for the insurance field based on incremental training includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the intelligent question-answering device for the insurance field based on incremental training to perform the method described in the first aspect and any possible implementation thereof.
[0020] Thirdly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on an insurance-related intelligent question-answering device based on incremental training, cause the device to perform the method described in the first aspect and any possible implementation thereof.
[0021] Fourthly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on an insurance-related intelligent question-answering device based on incremental training, causes the insurance-related intelligent question-answering device based on incremental training to perform the method described in the first aspect and any possible implementation thereof.
[0022] In summary, one or more technical solutions provided in this application have at least the following technical effects or advantages: 1. Improved the accuracy and difference identification capabilities of intelligent question answering in the insurance field: By constructing a compliance knowledge base containing knowledge identifiers, difference identifiers, and verification rules, and combining text similarity calculation and difference keyword extraction, it can effectively identify subtle differences between highly homogeneous insurance clauses, avoid incorrect answers caused by content confusion, and significantly improve the model's accurate understanding and semantic differentiation capabilities of insurance documents.
[0023] 2. Ensures the compliance and rigor of intelligent question-and-answer content: By adding verification rules to knowledge fragments involving compliant content and introducing positive reinforcement instructions and negative exclusion instructions in the prompts, it ensures that the generated answers strictly comply with legal requirements and industry norms, avoids generating illusory content that lacks legal rigor, and thus meets the high standards of compliance required by the insurance industry.
[0024] 3. Enhanced the dynamic adaptability and scenario scalability of the intelligent question-answering system: By dynamically updating the compliance knowledge base, constructing a logical dependency graph between knowledge fragments and context-enhanced sequences, and generating inter-version difference comparison reports, the system can ensure that it can quickly adapt to changes in new policies and clauses, while supporting contextual reasoning in complex question scenarios, further improving the system's practicality and scalability. Attached Figure Description
[0025] Figure 1 This is a flowchart illustrating an intelligent question-answering method for the insurance field based on incremental training, as disclosed in an embodiment of this application. Figure 2 This is another flowchart illustrating an intelligent question-answering method in the insurance field based on incremental training disclosed in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an intelligent question-answering device in the insurance field based on incremental training, provided in an embodiment of this application.
[0026] Explanation of reference numerals in the attached drawings: 301, Central Processing Unit; 302, Read-Only Memory; 303, Random Access Memory; 304, Bus; 305, Input / Output Interface; 306, Input Section; 307, Output Section; 308, Storage Section; 309, Communication Section; 310, Driver; 311, Removable Media. Detailed Implementation
[0027] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0028] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0029] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple system devices refer to two or more system devices, and multiple screen terminals refer to two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0030] This application provides an intelligent question-answering method for the insurance field based on incremental training, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an intelligent question-answering method for the insurance field based on incremental training, provided in an embodiment of this application. The method is applied to a server, and the device can execute an intelligent question-answering program for the insurance field based on incremental training. The method includes steps S101 to S106, as follows: Step S101: Obtain original authoritative documents in the insurance field and build a compliance knowledge base based on the original authoritative documents. The compliance knowledge base includes multiple knowledge fragments and knowledge identifiers and difference identifiers corresponding to each knowledge fragment.
[0031] In step S101, the original authoritative documents in the insurance field refer to legally binding or industry-mandated textual materials officially released by insurance regulatory agencies, insurance companies, or industry associations. These original authoritative documents encompass various types, including insurance policy documents, regulatory documents, product brochures, and claims guidelines. The compliance knowledge base refers to a knowledge storage system formed by structuring the original authoritative documents, allowing for retrieval and citation. A knowledge fragment refers to the smallest semantic unit obtained from the original authoritative documents by segmenting them according to independent clauses, definitions, or key sentences. Each knowledge fragment carries complete and indivisible insurance knowledge points. A knowledge identifier is used to represent the unique location code of a knowledge fragment in the compliance knowledge base. The knowledge identifier adopts a structured encoding format and includes a combination of document type, insurance type identifier, version year, and serial number. A difference identifier is used to represent the difference keywords extracted from two knowledge fragments when they have high textual similarity but belong to different knowledge identifiers. The difference identifier is used to mark and distinguish homogeneous fragments that are easily confused.
[0032] Specifically, the server collects original authoritative documents in the insurance field from the official databases of insurance regulatory agencies, the product management systems of insurance companies, and the document publishing platforms of industry associations. The server performs text parsing and preprocessing on the collected original authoritative documents, removing formatting marks, headers, footers, and non-text content, and extracting the main text. The server segments the main text at the granularity of independent clauses, definitions, or key sentences, breaking it down into multiple knowledge fragments with independent semantics. The server assigns a corresponding knowledge identifier to each knowledge fragment. The generation rule for the knowledge identifier is to concatenate and combine the document type, insurance type identifier, version year, and serial number according to a preset structured encoding format, so that each knowledge fragment has a globally unique positioning code in the compliance knowledge base. After completing the assignment of knowledge identifiers, the server iterates through all pairwise combinations of knowledge fragments in the compliance knowledge base, calculates the text edit distance between any two knowledge fragments, and calculates the text similarity between the two knowledge fragments based on the text edit distance. When the text similarity is greater than a preset confusion threshold, and the knowledge identifiers corresponding to the two knowledge fragments are inconsistent, the server marks the two knowledge fragments as mutually interfering homogeneous fragments. The server performs word-by-word comparisons on knowledge fragments marked as homogeneous, extracts semantically different keywords between two homogeneous fragments, and assigns these different keywords as difference identifiers to the corresponding knowledge fragments. The server then associates and stores all knowledge fragments, along with their corresponding knowledge identifiers and difference identifiers, to construct a compliance knowledge base.
[0033] In one possible implementation, the compliance knowledge base also includes verification rules corresponding to each knowledge fragment. The compliance knowledge base is constructed based on the original authoritative document, specifically including: segmenting the original authoritative document into multiple knowledge fragments according to independent clauses, definitions, or key sentences; assigning a corresponding knowledge identifier to each knowledge fragment, and assigning a corresponding difference identifier to each knowledge fragment based on the text similarity between the fragments. The knowledge identifier adopts a structured encoding format and includes a combination of document type, insurance type identifier, version year, and serial number; attaching verification rules to knowledge fragments involving preset compliance content. The verification rules define the warnings, qualifiers, and compliance expression templates that must be included when referencing the knowledge fragment; and constructing the compliance knowledge base by combining each knowledge fragment with its corresponding knowledge identifier, difference identifier, and verification rules.
[0034] Specifically, the server first obtains original authoritative documents in the insurance field, which mainly include insurance product terms and conditions, regulatory documents issued by regulatory authorities, product manuals, etc. The server reads these documents through a document parsing module and identifies their internal structure.
[0035] For segmenting original authoritative documents, the server employs a combination of rule-based and semantic understanding methods. The server first identifies structured markers in the document, such as clause markers like "Article X" and "Section X," and definition markers like "Definitions:" and "Interpretations:." For each identified structural unit, the server analyzes its semantic integrity to ensure that the segmented knowledge fragments retain independent meaning. For example, when processing a critical illness insurance clause, the server will segment "Article 3 Critical Illness: refers to a disease that the insured has been clearly diagnosed by a specialist doctor as meeting the definition of a critical illness stipulated in this contract" as a complete knowledge fragment. For longer clauses, the server will further subdivide them according to key sentences, such as segmenting each exclusion clause into an independent knowledge fragment.
[0036] In the knowledge identifier allocation process, the server generates a unique structured code for each knowledge fragment. The server automatically constructs the identifier based on the document's metadata information, ensuring the uniqueness and traceability of the identifier. Taking the tenth exclusion clause of a 2024 version of Ping An Fu Whole Life Insurance as an example, the server will generate the knowledge identifier "CLAUSE_PAF_2024_010", where CLAUSE indicates that this is a knowledge fragment of the clause type, PAF represents the Ping An Fu insurance product identifier, 2024 indicates the version year of the clause, and 010 is the sequence number of the clause in the document.
[0037] To generate difference identifiers, the server runs a text similarity calculation algorithm, comparing all knowledge fragments in the knowledge base pairwise. The server calculates the text edit distance and semantic similarity between fragments. When the text similarity between two knowledge fragments exceeds a preset confusion threshold (e.g., 85%), the server extracts the key difference keywords between the two fragments as difference identifiers. For example, if the terms of a critical illness insurance product A stipulate "the waiting period for malignant tumors is 90 days," while a similar term in a critical illness insurance product B stipulates "the waiting period for malignant tumors is 180 days," the server will identify "90 days" and "180 days" as key differences and set them as difference identifiers for their respective knowledge fragments.
[0038] During the attachment of verification rules, the server scans the text content of each knowledge fragment using pre-defined compliance content recognition rules. The server maintains a compliance keyword library containing sensitive words such as "returns," "guarantee," "commitment," "disclaimer," and "exclusions." When these keywords appear in a knowledge fragment, the server attaches the corresponding verification rules based on predefined rule templates. For example, when a knowledge fragment contains the phrase "expected annualized rate of return," the server automatically attaches the verification rule: "When mentioning returns, warnings such as 'returns are uncertain' and 'past returns do not guarantee future performance' must be included." Simultaneously, the server also attaches a compliance statement template that "must prominently display disclaimer content" for knowledge fragments involving disclaimers.
[0039] Finally, the server integrates all processed knowledge fragments and their associated information to build a compliance knowledge base. The server creates a complete record for each knowledge fragment in the database, including fields such as the text content, knowledge identifier, difference identifier (if homogeneous fragments exist), and verification rules (if compliant content is involved). The server also establishes a multi-indexing mechanism to support functions such as precise queries based on knowledge identifiers, full-text search based on content, and related queries on homogeneous fragments based on difference identifiers. After construction is complete, the server generates a knowledge base statistics report, displaying key indicators such as the total number of knowledge fragments, the number of homogeneous fragment pairs, and the number of fragments with attached verification rules, providing a structured and standardized knowledge foundation for subsequent incremental model training and real-time inference.
[0040] In one possible implementation, a corresponding difference identifier is assigned to each knowledge fragment based on the text similarity between the fragments. Specifically, this includes: calculating the text edit distance between the first knowledge fragment and the second knowledge fragment, and calculating the text similarity based on the text edit distance, wherein the first knowledge fragment and the second knowledge fragment are any two knowledge fragments from a plurality of knowledge fragments; if the text similarity is greater than a preset confusion threshold, and the first knowledge identifier corresponding to the first knowledge fragment and the second knowledge identifier corresponding to the second knowledge fragment are inconsistent, then the first knowledge fragment and the second knowledge fragment are marked as homogeneous fragments that interfere with each other; extracting the difference keywords between the first knowledge fragment and the second knowledge fragment, and using the difference keywords as difference identifiers.
[0041] Specifically, the server performs a systematic similarity analysis on all knowledge fragments in the compliance knowledge base to identify potentially confusing homogeneous content and assign it a difference identifier.
[0042] The server first initiates the text similarity calculation module, performing pairwise comparisons of knowledge fragments in the knowledge base. For each pair of knowledge fragments (the first and second knowledge fragments), the server calculates the text edit distance between them. The text edit distance reflects the minimum number of editing operations required to convert one text into another, including insertion, deletion, and replacement of characters. Based on the calculated edit distance and the lengths of the two fragments, the server uses a similarity formula to calculate a percentage value of text similarity. For example, when the server compares the knowledge fragments "If the insured fails to fulfill the obligation of truthful disclosure due to gross negligence, affecting the insurance premium rate, the insurer has the right to terminate the contract" and "If the insured fails to fulfill the obligation of truthful disclosure due to intentional misconduct, affecting the insurance premium rate, the insurer has the right to terminate the contract," the server will identify that they differ only in the words "gross negligence" and "intentional misconduct," and the calculated text similarity may be as high as 95%.
[0043] When the server detects that the text similarity between two knowledge fragments exceeds a preset obfuscation threshold (usually set to 85%), it further verifies whether the two fragments come from different knowledge sources. The server makes this determination by comparing the first knowledge identifier of the first knowledge fragment and the second knowledge identifier of the second knowledge fragment. If the two identifiers are inconsistent, it indicates that the two highly similar fragments come from different documents or terms, and the server will mark them as homogeneous fragments that interfere with each other. For example, although the fragment with the knowledge identifier "CLAUSE_PA_2023_015" and the fragment with the identifier "CLAUSE_TK_2024_008" have similar content, they come from the terms of different insurance products, and the server will identify them as a homogeneous fragment pair.
[0044] After confirming the homogeneous segments, the server initiates the differential keyword extraction module. This module uses a text comparison algorithm to precisely locate the differences between the two segments. The server employs sequence alignment technology to compare the two segments word by word, identifying the different text paragraphs. In the examples of "gross negligence" and "intentional" mentioned above, the server accurately extracts these two differential keywords. The server also analyzes the semantic importance of the differential keywords within the entire sentence to ensure that the extracted keywords represent the core differences that truly affect the meaning.
[0045] The server stores the extracted discrepancy keywords as discrepancy identifiers for the corresponding knowledge fragments. In the database, the server records the discrepancy identifier "gross negligence" for the first knowledge fragment and "intentional" for the second knowledge fragment. Simultaneously, the server establishes a relationship between these two fragments in the database, marking them as homogeneous fragments to facilitate ambiguity resolution during the subsequent reasoning phase.
[0046] The server also handles more complex discrepancies. For example, when two knowledge fragments differ in multiple places, the server extracts all key differences and combines them into a discrepancy identifier. If fragment A specifies "waiting period of 90 days, payment ratio of 50%" and fragment B specifies "waiting period of 180 days, payment ratio of 100%", the server will use "90 days - 50%" and "180 days - 100%" as the combined discrepancy identifiers for the two fragments, respectively.
[0047] In this way, the server configures precise difference identifiers for each knowledge fragment that may cause confusion. These identifiers play a key role in the subsequent model training and inference process, helping the system to accurately distinguish similar but different insurance clauses and avoid misquoting or confusion caused by homogenized content, thereby improving the compliance and accuracy of the entire system.
[0048] Step S102: Based on the compliance knowledge base, perform incremental training on the preset large model to obtain a large model for the insurance field.
[0049] In step S102, the pre-set large model refers to a basic language model pre-trained on a large-scale general corpus, possessing general natural language understanding and generation capabilities. Incremental training refers to targeted parameter optimization and knowledge injection into the pre-set large model using professional training data from the insurance field, while ensuring that the original parameters of the pre-set large model are not completely covered. The insurance field large model refers to a language model that, after incremental training, possesses the ability to understand professional knowledge in the insurance field and generate compliant expressions.
[0050] Specifically, the server constructs conditional activation training samples for incremental training based on knowledge fragments, knowledge identifiers, and difference identifiers stored in the compliance knowledge base. Each conditional activation training sample contains a five-tuple structure: question, knowledge identifier, knowledge fragment content, difference identifier, and expected answer. The question simulates a natural language question that a user might ask; the knowledge identifier specifies the knowledge source upon which the answer is based; the knowledge fragment content provides the factual basis for the answer; the difference identifier marks the distinguishing information that needs to be emphasized in the answer; and the expected answer is a standard response text that meets compliance requirements. The server implements a phased incremental training plan for the pre-defined large model. In the first phase, the server trains the pre-defined large model using paired data of knowledge identifiers and knowledge fragment content, enabling the pre-defined large model to learn the mapping relationship between knowledge identifiers and knowledge fragments. Given a knowledge identifier, the pre-defined large model can accurately locate and understand the corresponding knowledge fragment content. In the second phase, the server trains the pre-defined large model using contrastive training samples containing difference identifiers, enabling the pre-defined large model to learn the ability to make accurate representations based on difference identifiers. When faced with knowledge fragments containing homogeneous fragments, the pre-defined large model can generate response text that accurately reflects the semantics of the target knowledge fragment and avoids confusing the content of homogeneous fragments based on the difference identifier. In the third stage, the server embeds compliance constraints into the training samples, training the pre-defined large model's ability to generate conditions under compliance constraints. This enables the pre-defined large model to automatically attach necessary warnings, qualifiers, and compliance expression templates when generating responses involving compliance content. After completing the three stages of incremental training, the server obtains a large model for the insurance domain.
[0051] Please refer to Figure 2 In one possible implementation, before incrementally training the pre-defined large model based on the compliance knowledge base, the method further includes steps S201-S204, as follows: Step S201: Construct a relationship graph between knowledge fragments, identify and label the logical dependencies between the main insurance clause and the supplementary insurance clause, the insurance liability and the exclusion liability, and the definition clause and the application clause.
[0052] In step S201, the relationship graph refers to a networked data structure built with knowledge fragments as nodes and logical connections between knowledge fragments as edges. The main insurance clause refers to an insurance contract text that can be insured independently and does not depend on other types of insurance. The supplementary insurance clause refers to a supplementary contract text that cannot be insured independently and must be attached to the main insurance clause to take effect. Insurance liability refers to the items in the insurance contract that the insurer is liable to compensate or pay insurance benefits. Exclusions refer to the scope of liability for compensation or payment of insurance benefits listed in the insurance contract. Definition clauses refer to texts that explain or clarify professional terms, disease names, or specific concepts appearing in the contract. Application clauses refer to texts that stipulate specific execution rules such as claims procedures, payment methods, and contract termination. Logical dependency refers to the inclusion, premise, mutual exclusion, or causal relationship between different knowledge fragments.
[0053] Specifically, the server utilizes natural language processing technology to perform semantic analysis on all knowledge fragments in the compliance knowledge base. The server identifies keywords indicating subordinate relationships within the knowledge fragments, establishing the primary insurance clause as the parent node and supplementary insurance clauses as child nodes, thus creating a master-slave dependency relationship. The server analyzes the semantic attributes of the clause content, distinguishing between insurance liabilities describing coverage and exclusions describing exclusions, and establishing a limiting relationship between exclusions and insurance liabilities. The server extracts defined terms from the definition clauses and retrieves these terms from the application clauses, thereby establishing an interpretative support relationship between the definition clauses and the application clauses. The server stores the identified nodes and relationships in a graph database format, completing the construction of the relationship graph.
[0054] Step S202: Generate context-enhanced sequences of knowledge fragments based on the relationship graph.
[0055] In step S202, the context-enhanced sequence refers to an ordered set of texts formed after expanding the target knowledge fragments based on the association graph. This set contains the target knowledge fragments and their associated background knowledge.
[0056] Specifically, the server traverses the relationship graph. For any target knowledge fragment, the server searches the relationship graph for its directly connected parent node and its predecessor dependent nodes. Following a logical hierarchy, the server concatenates the text content of the parent node, the text content of the predecessor dependent node, and the text content of the target knowledge fragment itself. The server then performs deduplication and fluent processing on the concatenated text to generate a context-enhanced sequence corresponding to the target knowledge fragment, ensuring that the sequence fully represents the applicable context of the target knowledge fragment.
[0057] Step S203: Record the creation time, update history and expiration status of each knowledge fragment, and generate a comparison report of differences between versions.
[0058] In step S203, the creation time refers to the timestamp when the knowledge fragment was first entered into the compliance knowledge base. The update history refers to the operation log of changes to the knowledge fragment's content. The expiration status is a Boolean value label indicating whether the knowledge fragment still has current legal effect. The version difference comparison report is a structured document detailing the textual additions, deletions, and modifications to the same knowledge fragment in different versions at different times.
[0059] Specifically, the server monitors the data source of the original authoritative document. When an update to the original authoritative document is detected, the server retrieves the new version of the document and segments it to generate new knowledge fragments. The server records the current system time of the new knowledge fragment as its creation time. By comparing the clause codes of the old and new documents, the server identifies the replaced old knowledge fragments, marks the old knowledge fragments as invalid, and records the change operations in the update history. The server uses a text comparison algorithm to calculate the differences between the old and new knowledge fragments, extracts newly added, deleted, and modified text, and generates a version difference comparison report.
[0060] Step S204: Add logical dependencies, context-enhanced sequences, and difference comparison reports to the compliance knowledge base.
[0061] In step S204, the server writes the logical dependencies marked in the relationship graph, the context-enhanced sequences corresponding to each knowledge fragment, and the difference comparison report as supplementary information into the compliance knowledge base.
[0062] Specifically, the server stores the logical dependencies between various knowledge fragments in the relationship graph in the compliance knowledge base as structured relationship records. Each relationship record contains the knowledge identifier of the source knowledge fragment, the knowledge identifier of the target knowledge fragment, and the type label of the logical dependency, enabling the compliance knowledge base to perform relationship queries between knowledge fragments. The server binds and stores the context enhancement sequence corresponding to each knowledge fragment with the knowledge identifier of the knowledge fragment. The context enhancement sequence records the knowledge identifiers and their order of the upstream and downstream knowledge fragments, enabling the compliance knowledge base to synchronously obtain the context enhancement sequence of the target knowledge fragment when retrieving it later. The server binds and stores the creation time, update history, expiration status, and difference comparison report of each knowledge fragment with the knowledge identifier of the knowledge fragment, so that each knowledge fragment in the compliance knowledge base has complete version management information. After the server completes the writing of the above supplementary information, each knowledge fragment in the compliance knowledge base not only includes the text content, knowledge identifier, and difference identifier of the knowledge fragment, but also the logical dependencies, context enhancement sequence, creation time, update history, failure status, and difference comparison report of the knowledge fragment. The completeness of knowledge representation and the richness of semantic association in the compliance knowledge base are enhanced, providing a more sufficient knowledge foundation for subsequent incremental training and knowledge retrieval.
[0063] In one possible implementation, based on a compliance knowledge base, incremental training is performed on a pre-defined large model. Specifically, this includes: constructing conditional activation training samples based on knowledge identifiers, wherein the conditional activation training samples contain a five-tuple structure of question, knowledge identifier, knowledge fragment content, difference identifier, and expected answer; implementing a phased incremental training plan for the pre-defined large model, wherein the first phase trains the model to learn the mapping relationship between knowledge identifiers and knowledge fragments, the second phase trains the expressive ability based on difference identifiers, and the third phase trains the conditional generation ability under compliance constraints.
[0064] Specifically, the server first systematically constructs training samples. It extracts knowledge fragments and their associated information from the compliance knowledge base to build conditionally activated training samples. Each training sample adopts a five-tuple structure, containing five elements: question, knowledge identifier, knowledge fragment content, difference identifier, and expected answer.
[0065] When constructing training samples, the server generates multiple questions from different angles for each knowledge fragment. For example, for the critical illness insurance waiting period clause with the knowledge identifier "CLAUSE_YK_2024_015", the server will generate questions such as "How long is the waiting period for Youkangbao critical illness insurance?" and "How long after purchasing Youkangbao can I apply for critical illness compensation?" The server combines these questions with the corresponding knowledge identifier "CLAUSE_YK_2024_015", the knowledge fragment content "The waiting period for critical illness insurance liability is 90 days", the difference identifier "90 days", and the expected answer "The waiting period for Youkangbao critical illness insurance is 90 days, calculated from the effective date of the contract" to form a complete five-tuple training sample.
[0066] For cases with homogeneous segments, the server specifically constructs comparative training samples. For example, assuming another product has a waiting period of 180 days, the server will construct questions that explicitly target the product, ensuring the model learns the ability to accurately distinguish between them based on knowledge identifiers and difference identifiers. The server will also construct some confusing questions to train the model to identify and request clarification of the specific product when faced with ambiguous inquiries.
[0067] In the first phase of incremental training, the server focuses on training the model to learn the mapping relationship between knowledge identifiers and knowledge fragments. The server uses knowledge identifiers from the training samples as conditional input, requiring the model to accurately output the corresponding knowledge fragment content. In this phase, the server uses a large number of positive and negative examples to ensure that the model not only matches correctly but also rejects incorrect identifier mappings. For example, when the input is "CLAUSE_YK_2024_015", the model should accurately output the corresponding waiting period clause; when a non-existent identifier is input, the model should provide feedback that "no corresponding knowledge fragment was found".
[0068] In the second phase of training, the server focuses on enhancing the model's ability to accurately express differences based on distinguishing identifiers. The training samples constructed by the server specifically emphasize the use of distinguishing identifiers in responses. Through comparative training, the server teaches the model how to accurately use distinguishing identifiers in similar content. For example, faced with two clauses that differ only in the number of waiting days, the model needs to learn to accurately cite distinguishing identifiers such as "90 days" or "180 days," rather than using vague expressions like "a certain period." The server also trains the model to identify the product reference in the question and select the correct distinguishing identifier for the response accordingly.
[0069] The third phase of training focuses on the ability to generate responses under compliance constraints. The server incorporates various compliance constraints into the training samples, and the training model automatically adheres to these constraints when generating answers. For example, when training samples involve content related to benefits, the server includes necessary risk warnings in the expected answer, and the training model learns to automatically add compliance statements such as "benefits are uncertain" when mentioning benefits. The server also constructs negative samples that violate compliance requirements, strengthening the model's compliance awareness through comparative learning.
[0070] Throughout the incremental training process, the server employs a progressive training strategy. Each training phase builds upon the previous one, gradually increasing the model's complexity. The server performs evaluation tests at the end of each phase to ensure the model has fully mastered the training objectives before moving to the next phase. The server also maintains a certain percentage of the dataset as a validation set to monitor for overfitting or forgetting previously learned content during training.
[0071] Through this phased, incremental training, the server gradually enables the pre-built large model to accurately understand knowledge identifiers, precisely use difference identifiers, and strictly adhere to compliance constraints. Once trained, the model can generate accurate and compliant professional answers in the insurance field based on the input knowledge identifiers and difference identifiers in real-world applications.
[0072] Step S103: Receive the user's natural language question and identify the question's intent.
[0073] In step S103, a natural language question refers to a user's inquiry about insurance business entered in everyday language. The question intent refers to the user's core needs and query direction parsed from the natural language question, including semantic elements such as the type of insurance the user is interested in, the business scenario, and the type of terms.
[0074] Specifically, the server receives natural language questions input by users through a question-and-answer interface. The server performs word segmentation and semantic parsing on the natural language questions, extracting key entity words and intent feature words. Key entity words include insurance-specific terms such as insurance product names, insurance types, and coverage items mentioned in the natural language questions. Intent feature words include verbs and interrogative words expressing the query action and focus of attention. The server inputs the extracted key entity words and intent feature words into a pre-defined intent recognition model. The intent recognition model performs semantic classification and summarization of the key entity words and intent feature words to determine the insurance type, business scenario, and clause type referred to by the natural language question, comprehensively generating the question intent. The question intent is encoded in a structured semantic representation, facilitating accurate retrieval and matching in the compliance knowledge base later.
[0075] Step S104: Retrieve from the compliance knowledge base the target knowledge fragment corresponding to the question intent, as well as the target knowledge identifier and target difference identifier corresponding to the target knowledge fragment.
[0076] In step S104, the target knowledge fragment refers to the knowledge fragment in the compliance knowledge base that best matches the question intent. The target knowledge identifier refers to the knowledge identifier corresponding to the target knowledge fragment in the compliance knowledge base. The target difference identifier refers to the difference identifier associated with the target knowledge fragment, which records the difference keywords between the target knowledge fragment and homogeneous fragments.
[0077] Specifically, the server converts the query intent into a semantic retrieval vector and calculates the similarity between this vector and the semantic vectors of various knowledge fragments in the compliance knowledge base, obtaining an initial matching score between each knowledge fragment and the query intent. The server sorts the knowledge fragments according to their initial matching scores from highest to lowest, selects the knowledge fragment with the highest initial matching score as the target knowledge fragment, and obtains the target knowledge identifier corresponding to the target knowledge fragment. The server further queries whether the target knowledge fragment is associated with any corresponding homogeneous fragments in the compliance knowledge base. If the target knowledge fragment is associated with homogeneous fragments, the server obtains the target difference identifier corresponding to the target knowledge fragment. The target difference identifier contains the difference keywords between the target knowledge fragment and the homogeneous fragments, and is used to clearly distinguish the semantic boundary between the target knowledge fragment and the homogeneous fragments when generating subsequent answers. If the target knowledge fragment is not associated with any homogeneous fragments, the server sets the target difference identifier to an empty value, indicating that the target knowledge fragment does not have any homogeneous content that needs to be distinguished.
[0078] In one possible implementation, retrieving the target knowledge fragment corresponding to the question intent, as well as the target knowledge identifier and target difference identifier corresponding to the target knowledge fragment, from the compliance knowledge base specifically includes: retrieving the knowledge fragment with the highest initial matching score from the compliance knowledge base as the target knowledge fragment based on the question intent; querying whether the target knowledge fragment is associated with a corresponding homogeneous fragment; and if the target knowledge fragment is associated with a corresponding homogeneous fragment, obtaining the target difference identifier corresponding to the target knowledge fragment.
[0079] Specifically, after receiving a user's question intent, the server immediately initiates a knowledge retrieval process to accurately locate the relevant target knowledge fragments from the compliance knowledge base.
[0080] The server first runs a semantic matching engine to calculate the relevance of the query intent to all knowledge fragments in the compliance knowledge base. The server employs a multi-dimensional matching strategy, including keyword matching, semantic similarity calculation, and contextual relevance assessment. For each knowledge fragment, the server calculates its overall matching score with the query intent. For example, when a user asks "What is the waiting period for critical illness insurance?", the server will score all knowledge fragments in the knowledge base containing related terms such as "critical illness insurance," "waiting period," and "duration." The server evaluates the importance of keywords using a term frequency-inverse document frequency algorithm and simultaneously uses a semantic vector model to calculate the overall semantic similarity, ultimately generating a matching score between 0 and 1 for each candidate fragment.
[0081] After calculating the matching scores for all knowledge fragments, the server sorts the scores and selects the knowledge fragment with the highest initial matching score as the target knowledge fragment. For example, if the server identifies the fragment "The waiting period for critical illness insurance is 90 days, calculated from the contract's effective date" with the knowledge identifier "CLAUSE_HD_2024_012" as having the highest matching score of 0.95, the server will identify it as the target knowledge fragment. Simultaneously, the server will record the target knowledge identifier "CLAUSE_HD_2024_012" corresponding to this target knowledge fragment.
[0082] Once the target knowledge fragment is identified, the server immediately queries the homogeneous fragment association table in the database to check if there are any homogeneous fragments marked as interfering with the target knowledge fragment. The server performs a precise query in the association table using the target knowledge identifier to retrieve whether there is a matching homogeneous record. This query process is completed quickly through the database's indexing mechanism, ensuring that the overall response speed is not affected by association queries.
[0083] When the server detects that a target knowledge fragment is indeed associated with a homogeneous fragment, it will further retrieve the target difference identifier corresponding to the target knowledge fragment. Continuing the example above, suppose the server finds in the association table that the target knowledge fragment with the identifier "CLAUSE_HD_2024_012" and another knowledge fragment with the identifier "CLAUSE_TK_2023_008" form a homogeneous fragment pair, and the difference identifier of "CLAUSE_HD_2024_012" is "90 days", while the difference identifier of the homogeneous fragment is "180 days". The server will extract and record the target difference identifier "90 days", which clearly indicates the core difference between the target knowledge fragment and its homogeneous fragment.
[0084] The server also handles more complex homogenization scenarios. For example, when a target knowledge fragment is homogenized with multiple other fragments, the server will obtain all relevant difference identifier information. If a target knowledge fragment regarding "accidental injury disclaimer" is homogenized with similar clauses of three different products, differing in "high-risk sports range," "disclaimer ratio," and "claim processing time," the server will fully obtain the combined difference identifiers of the target knowledge fragment, such as "excluding diving - full disclaimer - report within 24 hours."
[0085] By acquiring the target difference identifier, the server can accurately grasp the uniqueness of the target knowledge fragment, which is crucial for generating accurate and unambiguous responses. The server will pass the retrieved target knowledge fragment, target knowledge identifier, and target difference identifier as a complete knowledge unit to the subsequent response generation module, ensuring that the system can generate compliant and accurate answers based on correct knowledge content and differentiating information. This precise retrieval and difference identification mechanism effectively avoids knowledge confusion caused by homogeneous content, improving the reliability and professionalism of the entire question-and-answer system.
[0086] Step S105: Construct prompt words based on the target knowledge identifier, target knowledge fragment, target difference identifier, and preset compliance constraint instruction combination.
[0087] In step S105, the preset compliance constraint instruction set refers to a predefined set of instructions used to constrain the generation behavior of the insurance domain large model. The preset compliance constraint instruction set specifies the compliance expression norms and content restrictions that must be followed when generating an answer. The prompt word refers to the input text formed by integrating the target knowledge identifier, target knowledge fragment, target difference identifier, and the preset compliance constraint instruction set according to a preset template structure. The prompt word serves as the complete instruction input for the insurance domain large model to generate the final answer.
[0088] Specifically, the server first extracts the target difference identifier from the target knowledge fragment. Based on the target difference identifier, it generates a positive reinforcement instruction. The positive reinforcement instruction explicitly requires the insurance domain large model to include the text content corresponding to the target difference identifier when generating an answer, ensuring that the generated answer accurately reflects the unique semantics of the target knowledge fragment. The server then obtains homogeneous fragments corresponding to the target knowledge fragment as potential interference fragments. From these potential interference fragments, it extracts interference difference identifiers and generates a negative exclusion instruction. The negative exclusion instruction explicitly requires the insurance domain large model to prohibit the inclusion of the text content corresponding to the interference difference identifier when generating an answer, preventing the generated answer from being mixed with the semantic information of homogeneous fragments. The server then combines and integrates the complete text content of the target knowledge fragment, the encoded information of the target knowledge identifier, the positive reinforcement instruction, the negative exclusion instruction, and the preset compliance constraint instruction according to a preset template structure to form a complete prompt. In the prompt, the target knowledge fragment provides the factual basis for the answer, the target knowledge identifier indicates the source and version attribution of the knowledge, the positive reinforcement instruction and the negative exclusion instruction jointly define the semantic boundaries of the answer, and the preset compliance constraint instruction combination specifies the compliant expression standards for the answer.
[0089] In one possible implementation, a prompt word is constructed based on a combination of target knowledge identifiers, target knowledge fragments, target difference identifiers, and preset compliance constraint instructions. Specifically, this includes: extracting target difference identifiers from target knowledge fragments and generating positive reinforcement instructions, which require the generated answer to contain the text content corresponding to the difference identifier; extracting interference difference identifiers from potential interference fragments and generating negative exclusion instructions, which require the generated answer to be prohibited from containing the text content corresponding to the interference difference identifier, where potential interference fragments are homogeneous fragments corresponding to the target knowledge fragments; and integrating the target knowledge fragments, positive reinforcement instructions, and negative exclusion instructions according to preset compliance constraint instructions to form the prompt word.
[0090] Specifically, after obtaining the target knowledge fragment and its related identifiers, the server begins to construct precise prompts for reasoning using the large language model. This construction process follows a rigorous structured procedure to ensure that the generated answers are both accurate and compliant.
[0091] The server first processes the target difference identifier and generates a positive reinforcement instruction. The server parses the target difference identifier in the target knowledge fragment and converts it into explicit content requirements. For example, when the target knowledge fragment relates to the waiting period clause of a critical illness insurance product, and its target difference identifier is "90 days," the server will generate a positive reinforcement instruction: "The answer must clearly state that the waiting period for this critical illness insurance product is 90 days; vague expressions or other time limits are not allowed." If the target difference identifier is in a combined form, such as "90 days - first diagnosis," the server will generate a more detailed positive reinforcement instruction: "The answer must accurately state that the waiting period is 90 days and clearly indicate that it is calculated from the date of the first diagnosis; both elements are indispensable."
[0092] Next, the server queries the compliance knowledge base for homogeneous fragments corresponding to the target knowledge fragment; these homogeneous fragments are the potential interference fragments. The server extracts the interference difference identifier for each potential interference fragment and generates a negative exclusion instruction accordingly. Continuing the example above, if the server finds a homogeneous fragment with an interference difference identifier of "180 days," the server will generate a negative exclusion instruction: "It is forbidden to mention the 180-day waiting period in the response to avoid confusion with other product terms." When multiple potential interference fragments exist, the server will generate a corresponding exclusion instruction for each interference difference identifier, such as "A 30-day waiting period must not be mentioned" or "The time starting point of 'contract effective date' must not be used," etc.
[0093] After generating positive reinforcement and negative exclusion instructions, the server begins integrating the various components of the prompt words. First, the server places the complete content of the target knowledge fragment to ensure the large language model can reason based on accurate knowledge sources. Then, the server adds various instructions according to a preset priority order. Positive reinforcement instructions are placed in key positions, emphasizing their importance through specific markers. Negative exclusion instructions follow closely, explicitly listing all content that needs to be avoided.
[0094] The server also supplements and optimizes the prompts based on preset compliance constraints. These compliance constraints include general compliance requirements such as "answers must be objective and neutral, and must not contain misleading statements" and "when involving benefits or compensation amounts, specific applicable conditions must be stated." The server selectively adds relevant compliance constraints based on the content type of the target knowledge fragment. For example, when the target knowledge fragment involves disclaimers, the server automatically adds the compliance constraint "the importance of disclaimers must be clearly highlighted."
[0095] During the integration process, the server uses a structured prompt template to ensure the logical clarity of each component. A complete prompt may contain the following structure: "Basic knowledge content: [Full text of the target knowledge fragment]; Mandatory inclusion elements: [List of positive reinforcement instructions]; Prohibited inclusion elements: [List of negative exclusion instructions]; Compliance requirements: [Applicable compliance constraint instructions]; Response requirements: Generate an accurate, professional, and compliant response based on the above knowledge content and constraints."
[0096] The server also validates the constructed prompts to ensure that all necessary elements are included and that there are no logical conflicts between instructions. For example, the server checks for contradictions between positive reinforcement instructions and negative exclusion instructions to ensure that target difference identifiers are not incorrectly included in the exclusion scope. Through these carefully crafted prompts, the server can guide the large language model to generate high-quality answers that accurately reflect the content of the target knowledge fragments while effectively avoiding homogenization confusion, thereby improving the professionalism and reliability of the entire insurance question-answering system.
[0097] Step S106: Input the prompt words into the insurance domain big data model to generate the final answer.
[0098] In step S106, the final answer refers to the user-oriented response text generated by the insurance domain big data model based on all the information and constraints in the prompt words. The final answer simultaneously meets the requirements of factual accuracy and compliant expression.
[0099] Specifically, the server passes the constructed prompts as input to the insurance domain big data model. The model analyzes the target knowledge fragments, target knowledge identifiers, positive reinforcement instructions, negative exclusion instructions, and pre-set compliance constraint instructions within the prompts, generating text based on the facts provided by the target knowledge fragments. The model integrates the text content corresponding to the target difference identifiers into the answer statement according to the positive reinforcement instructions, while actively avoiding text content corresponding to the difference identifiers based on the negative exclusion instructions. It also adds necessary warnings, limiting words, and compliance expression templates to the answer according to the requirements of the pre-set compliance constraint instruction combination. After the insurance domain big data model completes text generation, the server returns the final answer to the user through a question-and-answer interaction interface. The final answer contains accurate knowledge content and complete compliance elements, effectively responding to the user's natural language questions.
[0100] The following describes the intelligent question-answering device for the insurance field based on incremental training in the embodiments of this invention from the perspective of hardware processing. Please refer to [link / reference]. Figure 3 This is a schematic diagram of the structure of the intelligent question-answering device in the insurance field based on incremental training in the embodiments of this application.
[0101] It should be noted that, Figure 3 The structure of the insurance-related intelligent question-answering device based on incremental training shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0102] like Figure 3 As shown, the insurance-related intelligent question-answering device based on incremental training includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in Read-Only Memory (ROM) 302 or a program loaded from storage portion 308 into Random Access Memory (RAM) 303, such as executing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for device operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.
[0103] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0104] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the various functions defined in the present invention.
[0105] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.
[0107] Specifically, the insurance-related intelligent question-answering device based on incremental training in this embodiment includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, it implements the insurance-related intelligent question-answering method based on incremental training provided in the above embodiment.
[0108] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the insurance-domain intelligent question-answering device based on incremental training described in the above embodiments; or it may exist independently and not assembled into the insurance-domain intelligent question-answering device based on incremental training. The storage medium carries one or more computer programs, which, when executed by a processor of the insurance-domain intelligent question-answering device based on incremental training, enable the insurance-domain intelligent question-answering device based on incremental training and IoT data encryption transmission as provided in the above embodiments.
Claims
1. An intelligent question-answering method for the insurance field based on incremental training, characterized in that, The method includes: Obtain original authoritative documents in the insurance field, and build a compliance knowledge base based on the original authoritative documents. The compliance knowledge base includes multiple knowledge fragments and knowledge identifiers and difference identifiers corresponding to each knowledge fragment. Based on the aforementioned compliance knowledge base, incremental training is performed on the preset large model to obtain a large model for the insurance field. Receive natural language questions from users and identify the intent behind the natural language questions; Retrieve from the compliance knowledge base the target knowledge fragment corresponding to the question intent, as well as the target knowledge identifier and target difference identifier corresponding to the target knowledge fragment; Based on the target knowledge identifier, the target knowledge fragment, the target difference identifier, and the preset compliance constraint instruction combination, a prompt word is constructed; The prompt words are input into the large insurance model to generate the final answer.
2. The method according to claim 1, characterized in that, The compliance knowledge base also includes verification rules corresponding to each knowledge fragment. The construction of the compliance knowledge base based on the original authoritative document specifically includes: The original authoritative document is segmented according to independent clauses, definitions, or key sentences to form multiple knowledge fragments; Each knowledge fragment is assigned a corresponding knowledge identifier, and a corresponding difference identifier is assigned to each knowledge fragment based on the text similarity between the knowledge fragments. The knowledge identifier adopts a structured encoding format and includes a combination of document type, insurance type identifier, version year, and serial number. Attach verification rules to knowledge fragments involving preset compliance content. The verification rules define warnings, qualifiers, and compliance expression templates that must be included when referencing the knowledge fragments. The compliance knowledge base is constructed by constructing each knowledge fragment and the corresponding knowledge identifier, difference identifier, and verification rule for each knowledge fragment.
3. The method according to claim 2, characterized in that, The process of assigning corresponding difference identifiers to the knowledge segments based on the text similarity between each knowledge segment specifically includes: Calculate the text edit distance between the first knowledge segment and the second knowledge segment, and calculate the text similarity based on the text edit distance, wherein the first knowledge segment and the second knowledge segment are any two knowledge segments from a plurality of knowledge segments; If the text similarity is greater than a preset confusion threshold, and the first knowledge identifier corresponding to the first knowledge fragment and the second knowledge identifier corresponding to the second knowledge fragment are inconsistent, then the first knowledge fragment and the second knowledge fragment are marked as homogeneous fragments that interfere with each other. Extract the difference keywords between the first knowledge fragment and the second knowledge fragment, and use the difference keywords as the difference identifier.
4. The method according to claim 1, characterized in that, The step of retrieving the target knowledge fragment corresponding to the question intent, as well as the target knowledge identifier and target difference identifier corresponding to the target knowledge fragment, from the compliance knowledge base specifically includes: Based on the stated question intent, the knowledge fragment with the highest initial matching score is retrieved from the compliance knowledge base as the target knowledge fragment; Query whether the target knowledge fragment is associated with a corresponding homogeneous fragment; If the target knowledge fragment is associated with a corresponding homogeneous fragment, then the target difference identifier corresponding to the target knowledge fragment is obtained.
5. The method according to claim 4, characterized in that, The construction of prompt words based on the combination of the target knowledge identifier, the target knowledge fragment, the target difference identifier, and preset compliance constraint instructions specifically includes: Extract target difference identifiers from the target knowledge fragments and generate positive reinforcement instructions. The positive reinforcement instructions require that the generated answers contain the text content corresponding to the difference identifiers. Extract interference difference identifiers from potential interference fragments and generate negative exclusion instructions. The negative exclusion instructions require that the generated answers must not contain the text content corresponding to the interference difference identifiers. The potential interference fragments are homogeneous fragments corresponding to the target knowledge fragments. The target knowledge fragment, the positive reinforcement instruction, and the negative exclusion instruction are integrated according to the preset compliance constraint instructions to form the prompt word.
6. The method according to claim 5, characterized in that, Before incrementally training the preset large model based on the compliance knowledge base, the method further includes: Construct a relationship graph among knowledge fragments to identify and label the logical dependencies between main insurance clauses and supplementary insurance clauses, insurance liabilities and exclusions, and definition clauses and application clauses; Based on the aforementioned relationship graph, a context-enhanced sequence of knowledge fragments is generated; Record the creation time, update history, and expiration status of each knowledge fragment, and generate a comparison report of differences between versions; The logical dependencies, context-enhanced sequences, and difference comparison reports are added to the compliance knowledge base.
7. The method according to claim 6, characterized in that, The incremental training of the preset large model based on the compliance knowledge base specifically includes: Construct conditional activation training samples based on the knowledge identifier, wherein the conditional activation training samples contain a five-tuple structure of question, knowledge identifier, knowledge fragment content, difference identifier and expected answer; The preset large model is implemented through a phased incremental training plan. The first phase trains the model to learn the mapping relationship between knowledge identifiers and knowledge fragments. The second phase trains the model's representation ability based on difference identifiers. The third phase trains the model's ability to generate conditions under compliance constraints.
8. An intelligent question-answering device for the insurance field based on incremental training, characterized in that, The insurance-related intelligent question-answering device based on incremental training includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the insurance-related intelligent question-answering device based on incremental training to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on the insurance-related intelligent question-answering device based on incremental training, the insurance-related intelligent question-answering device based on incremental training performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on an insurance-related intelligent question-answering device based on incremental training, the insurance-related intelligent question-answering device performs the method as described in any one of claims 1-7.