A multi-source knowledge fragment-oriented response output quality guarantee method and system

CN122925562APending Publication Date: 2026-10-16SHENZHEN ZHONGCHEN HUAYI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611238353.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-15
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]然而,基于多来源知识片段生成应答时,现有方案至少存在如下不足:(1)现有生成多直接按通用模板组织检索命中的知识片段,缺乏对输出内容在"结论完备性"与"解释充分性"两个维度的系统性判定,容易产生结论缺失或解释不充分的不完整应答;(2)多来源知识片段之间、以及生成内容与知识片段之间可能存在语义冲突或口径不一致,现有方案多为简单串联或事后抽查,缺乏对冲突片段的主动屏蔽与消解机制;(3)即便部分方案引入多来源一致性处理,其处理方式为预先获得彼此一致的证据集合后再由模型自由生成,并未涉及对缺失维度的定向补全,更未引入"客户专属来源"这类具有行业价值差异性的最高优先级补全机制,因而仍无法解决输出在结论/解释维度上的完备性问题;(4)现有输出内容未依据对话请求所属领域与当前平台的合规口径进行动态适配,存在合规风险

Benefits of technology

[0013]Compared with the prior art, the present invention achieves the following beneficial effects: (1) By judging the completeness of the response content from the two dimensions of "conclusion and explanation" and giving a quantifiable completeness calculation method, the defects of incomplete conclusions and insufficient explanations in the splicing output of multiple sources are overcome, and the completeness of the output is calculable and judgeable; (2) By performing conflict detection, conflict shielding and conflict resolution on the knowledge fragments and their generated content from multiple sources, and determining the resolution rules according to the priority of the source type, the contradiction problem caused by the inconsistency of the multiple sources is overcome, and the consistency of the output is guaranteed; (3) By accurately completing the missing dimensions and giving the customer's exclusive source the highest priority, the missing content is filled in by high-value customer-exclusive knowledge first, which is different from the existing scheme of "obtaining a consistent evidence set and then freely generating", taking into account both completeness and private domain value; (4) By adapting the output content after completion according to the preset output strategy, the output after completion meets the compliance requirements while being complete and consistent. In particular, this invention decouples the conclusion dimension from the explanation dimension and calculates coverage separately, solving the technical bias of existing multi-source splicing responses that "emphasize conclusions over explanations, or that conclusions and explanations are disconnected." This refines the response completeness evaluation from a single overall assessment to a two-dimensional quantitative evaluation, representing a technical improvement addressing a long-standing problem rather than a simple index splitting. More crucially, the aforementioned two-dimensional completeness determination, dual conflict detection, and dimension-based closed-loop completion are interconnected through a process structure: pre-process resolution eliminates contradictions between sources before generation, preventing conflicting content from being introduced; the second semantic conflict detection after completion verifies the consistency between the completed output and the source, preventing contradictory content from being added; and the re-determination after completion ensures that output is only generated when both the conclusion and explanation dimensions are complete. The absence of any one of these steps will cause subsequent steps to lose reliable input or triggering conditions, thus forming a double closed-loop structure of "judgment-completion-rejudgment, verification-resolution-reverification". This double closed-loop structure can reduce invalid completion iterations, avoid adding contradictory or inconsistent content to the output, and ensure that the customer's proprietary source knowledge always maintains the highest priority in each stage of conflict resolution and completion. Thus, it achieves an overall technical effect that cannot be achieved by a single verification or single completion scheme in terms of output completeness and source consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122925562A_ABST
    Figure CN122925562A_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-source knowledge fragment-oriented response output quality guarantee method and system.The method includes: obtaining multiple knowledge fragments and marking source type, carrying out first semantic conflict detection and eliminating conflict according to source priority;Response content is generated based on the knowledge fragment after elimination, and completeness is judged from conclusion dimension and explanation dimension, and two-dimensional completeness is calculated by structured analysis and template matching;When any dimension is missing, complete the missing content from the unselected candidate fragments, carry out second semantic conflict detection on the completed output and all source knowledge fragments and eliminate conflict according to source priority, re-determine completeness, close-loop iteration until two dimensions pass or reach the maximum iteration number, and customer knowledge fragment completion priority is highest;According to the preset strategy, adapt output.The application guarantees the integrity, consistency and compliance of response under multi-source knowledge splicing through the cooperative mechanism of double conflict detection, two-dimensional completeness judgment and dimension-closed-loop completion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence and natural language processing technology, specifically relating to a method and system for ensuring the quality of response output for multi-source knowledge fragments. Background Technology

[0002] With the widespread application of large language models in vertical industry scenarios such as intelligent question answering, intelligent customer service, and knowledge services, retrieval augmented generation (RAG) and multi-source knowledge splicing have become common methods for integrating private domain and professional knowledge into generated content. The retrieved knowledge fragments often come from multiple different sources, such as customer-specific materials, industry-specific general knowledge, and public compliance information.

[0003] However, existing solutions for generating responses based on multi-source knowledge fragments have at least the following shortcomings: (1) Existing solutions often directly organize the retrieved knowledge fragments according to a general template, lacking a systematic assessment of the output content in terms of "completeness of conclusion" and "sufficiency of explanation," which can easily lead to incomplete responses with missing conclusions or insufficient explanations; (2) There may be semantic conflicts or inconsistencies between multi-source knowledge fragments and between the generated content and the knowledge fragments. Existing solutions often involve simple chaining or post-event sampling, lacking a mechanism for actively shielding and resolving conflicting fragments; (3) Even if some solutions introduce multi-source consistency processing, the processing method is to obtain a set of evidence that is consistent with each other in advance and then generate the model freely. It does not involve targeted completion of missing dimensions, nor does it introduce the highest priority completion mechanism with industry value differences such as "customer-specific sources." Therefore, it still cannot solve the problem of the completeness of the output in terms of conclusion / explanation; (4) Existing output content is not dynamically adapted according to the domain of the dialogue request and the compliance standards of the current platform, which poses a compliance risk. (5) Furthermore, even when conflict detection and quality assessment are involved in existing solutions, they are usually only single-stage detection followed by repair or general scoring-triggered correction. They do not distinguish between the dual verification layers of knowledge fragments before and after generation, nor do they have a structured two-dimensional completeness determination that matches conclusion elements and explanation elements with preset templates. Moreover, they have not formed a dual closed-loop collaborative mechanism of "determination-completion-re-determination, verification-resolution-re-verification". Therefore, how to systematically ensure the quality and compliance of response output in multi-source knowledge splicing scenarios through a collaborative mechanism of completeness determination, conflict shielding, dimension-based completion, and output adaptation is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for ensuring the quality of response output for multi-source knowledge fragments. This method organizes multi-source knowledge fragments into a unified quality assurance mechanism that is decidable, complete, adaptable, and compliant with regulations, systematically improving the completeness, consistency, and compliance of response output. This invention achieves this through the coordinated linkage of acquisition and classification, two-dimensional completeness determination, dual conflict detection and handling, dimensional closed-loop completion, and output adaptation, thus ensuring output completeness, consistency, supplementation of missing information, and content compliance in multi-source knowledge scenarios.

[0005] To achieve the above objectives, the first aspect of the present invention provides a method for ensuring the quality of response output for multi-source knowledge fragments, comprising: acquiring multiple knowledge fragments retrieved in response to a current dialogue request, and labeling each knowledge fragment with a source type (including at least customer-specific sources and public knowledge sources); performing a first semantic conflict detection on the multiple knowledge fragments, and performing conflict masking or conflict resolution processing on knowledge fragments with semantic conflicts according to the priority of source type, to obtain resolved knowledge fragments; generating response content based on the resolved knowledge fragments, and determining the completeness of the response content from a conclusion dimension and an explanation dimension, wherein the completeness determination includes performing structured element parsing on the response content, extracting conclusion elements and explanation elements, and matching them with a preset completeness determination template to obtain the conclusion dimension completeness and the explanation dimension completeness; when the conclusion... When the conclusion dimension or the explanation dimension is missing, the content of the corresponding missing dimension is supplemented from the pool of unselected candidate knowledge fragments recalled in this retrieval. A second semantic conflict detection is performed between the supplemented output content and all source knowledge fragments, including the supplemented candidate fragments. Conflict masking or conflict resolution processing is performed on the content with semantic conflicts according to the priority of the source type. The priority of the supplementation is that knowledge fragments from customer-specific sources take precedence over knowledge fragments from public general knowledge sources. The completeness judgment is re-executed on the supplemented output content, forming a double closed-loop quality control process of "judgment - supplementation - re-judgment, verification - resolution - re-verification" until both the conclusion dimension and the explanation dimension pass the completeness judgment and there are no conflicts to be resolved, or the preset maximum number of iterations is reached. The supplemented output content is then output after output adaptation according to the preset output strategy.

[0006] Preferably, the structured element parsing is implemented using an extraction-based parsing model based on sequence labeling or a large language model to extract conclusion elements and explanatory elements from the response content. The completeness of the conclusion dimension is calculated based on the coverage rate of the conclusion elements to a preset conclusion element template, and the completeness of the explanatory dimension is calculated based on the coverage rate of the explanatory elements to a preset explanatory element template. For example, the completeness of the conclusion dimension can be expressed as the ratio of the number of hit conclusion elements in the response content to the number of conclusion elements required by the preset conclusion element template, and the completeness of the explanatory dimension can be expressed as the ratio of the number of hit explanatory elements to the number of explanatory elements required by the preset explanatory element template.

[0007] Preferably, when the completeness of the conclusion dimension is lower than a first threshold, or the completeness of the explanation dimension is lower than a second threshold, it is determined that the corresponding dimension is missing. The first threshold and the second threshold are adaptively determined based on the type of the dialogue request, the type of the source, or the compliance standard. For example, the thresholds can be dynamically adjusted according to the professional requirements of the field to which the dialogue request belongs. The higher the professional requirements of the field, the higher the corresponding first threshold and second threshold, to ensure that the conclusion is more complete and the explanation is more sufficient.

[0008] Preferably, the conflict detection includes: calculating the semantic vector similarity (e.g., cosine similarity based on sentence vectors) between each pair of knowledge fragments and between the response content and each knowledge fragment; when the semantic vector similarity is higher than a preset conflict threshold, further contradiction determination is performed based on factual point comparison, wherein the factual point comparison is to compare the source type of each knowledge fragment and its factual points to determine whether there is a semantic conflict.

[0009] Preferably, the conflict resolution process is performed according to the source type priority, wherein the source type priority is: customer-specific sources are higher than niche professional general knowledge sources, niche professional general knowledge sources are higher than public general knowledge sources; the content of knowledge fragments with higher priority is retained, and the content of knowledge fragments with lower priority that conflict with each other is removed.

[0010] Preferably, the completion of missing content includes: splicing together additional knowledge fragments related to the dialogue request and corresponding to the missing dimension, and re-performing the completeness determination on the completed output content; when both the conclusion dimension and the explanation dimension pass the completeness determination, or reach the preset maximum number of iterations, or the incremental coverage of the candidate knowledge fragments returned by the retrieval for the missing dimension is lower than a preset threshold, the completion is stopped.

[0011] Preferably, the method further includes: triggering manual intervention or transferring the case to manual review when the confidence level of the response content, the result of the conflict detection, or the confidence level of the completed output content is lower than a preset confidence level threshold; the confidence level is determined by the completeness judgment score of each stage of the completeness judgment, the conflict detection and the output adaptation, and the conflict detection result and the output adaptation result weighted according to preset weights, rather than by the model supplementing external knowledge itself.

[0012] Preferably, the preset output strategy includes dynamic compliance adaptation based on the compliance criteria of the domain to which the dialogue request belongs. The compliance criteria are divided into compliance scales according to the domain to which the dialogue request belongs. The compliance scales include at least risk level, violation category range, and number of sensitive words hit. The compliance criteria are compiled into an executable decision table and a detection graph. The detection graph consists of a domain sentence encoder and compliance rule nodes, and is used to determine the compliance of the output content.

[0013] Compared with the prior art, the present invention achieves the following beneficial effects: (1) By judging the completeness of the response content from the two dimensions of "conclusion and explanation" and giving a quantifiable completeness calculation method, the defects of incomplete conclusions and insufficient explanations in the splicing output of multiple sources are overcome, and the completeness of the output is calculable and judgeable; (2) By performing conflict detection, conflict shielding and conflict resolution on the knowledge fragments and their generated content from multiple sources, and determining the resolution rules according to the priority of the source type, the contradiction problem caused by the inconsistency of the multiple sources is overcome, and the consistency of the output is guaranteed; (3) By accurately completing the missing dimensions and giving the customer's exclusive source the highest priority, the missing content is filled in by high-value customer-exclusive knowledge first, which is different from the existing scheme of "obtaining a consistent evidence set and then freely generating", taking into account both completeness and private domain value; (4) By adapting the output content after completion according to the preset output strategy, the output after completion meets the compliance requirements while being complete and consistent. In particular, this invention decouples the conclusion dimension from the explanation dimension and calculates coverage separately, solving the technical bias of existing multi-source splicing responses that "emphasize conclusions over explanations, or that conclusions and explanations are disconnected." This refines the response completeness evaluation from a single overall assessment to a two-dimensional quantitative evaluation, representing a technical improvement addressing a long-standing problem rather than a simple index splitting. More crucially, the aforementioned two-dimensional completeness determination, dual conflict detection, and dimension-based closed-loop completion are interconnected through a process structure: pre-process resolution eliminates contradictions between sources before generation, preventing conflicting content from being introduced; the second semantic conflict detection after completion verifies the consistency between the completed output and the source, preventing contradictory content from being added; and the re-determination after completion ensures that output is only generated when both the conclusion and explanation dimensions are complete. The absence of any one of these steps will cause subsequent steps to lose reliable input or triggering conditions, thus forming a double closed-loop structure of "judgment-completion-rejudgment, verification-resolution-reverification". This double closed-loop structure can reduce invalid completion iterations, avoid adding contradictory or inconsistent content to the output, and ensure that the customer's proprietary source knowledge always maintains the highest priority in each stage of conflict resolution and completion. Thus, it achieves an overall technical effect that cannot be achieved by a single verification or single completion scheme in terms of output completeness and source consistency.

[0014] Furthermore, the aforementioned effects of this invention form a clear synergistic causal chain, rather than a simple superposition: the classification results based on source type provide a structured basis for conflict resolution and completion priority—knowledge fragments from client-specific sources and public general knowledge sources are treated differently in conflict resolution sorting and completion priority; the missing dimension indicated by the completeness judgment directly triggers the dimension-by-dimensional completion step and serves as its completion object, while the completed content is fed back to the completeness judgment loop for verification, forming a closed loop of "judgment—completion—re-judgment"; conflict detection and conflict resolution eliminate contradictions between sources before completion, avoiding the introduction of conflicting content during the completion process; the completed and conflict-resolved content then undergoes unified output adaptation to avoid compliance risks brought by the added content. Furthermore, if the output adaptation finds that the completed output content has a conflict tendency or hits a violation category during the output adjustment process, the content is returned to the conflict detection and processing step for conflict resolution again, realizing the reverse feedback of the output adaptation to the upstream step. Furthermore, the first semantic conflict detection pre-resolves contradictions between source knowledge fragments before generation, and the second semantic conflict detection performs a second check on the completed output content against the source after completion. Together, they constitute a dual conflict verification before and after generation, ensuring that the completed output content is self-consistent at the source level. It is evident that the five stages—acquisition and classification, completeness determination, conflict detection and handling, dimension-based completion, and output adaptation—are not unidirectional pipelines, but rather constitute a unified closed-loop system with mutual feedback. The absence of any stage will break the output quality assurance loop, thereby achieving an overall technical effect that could not be expected by implementing any single technical feature individually, thus forming a unified inventive concept. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating the response output quality assurance method provided in an embodiment of the present invention.

[0016] Figure 2 This is a schematic diagram illustrating the structure of knowledge fragment source classification and two-dimensional completeness determination provided in an embodiment of the present invention.

[0017] Figure 3 This is a schematic diagram illustrating the semantic conflict detection and dynamic adaptation of compliance standards provided in an embodiment of the present invention.

[0018] Figure 4 This is a schematic diagram of the module structure of the response output quality assurance system provided in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. The embodiments of this invention are applied to multi-source knowledge Q&A and intelligent customer service scenarios in vertical industries (such as medical aesthetics, health, and beauty skincare), and can also be applied to other scenarios requiring multi-source knowledge splicing and output quality control, and are not limited thereto.

[0020] Fragment Acquisition and Classification Stage. The system receives the user's current dialogue request, performs a search from the corresponding knowledge base, and obtains multiple knowledge fragments that match the dialogue request. The search can be implemented using a dense vector search engine, a sparse keyword search engine, or a combination thereof; each knowledge fragment matched by the search is labeled with a source type. The source type is identified by recognizing the knowledge level to which the knowledge fragment belongs and the corresponding source tag. The knowledge level includes at least a customer-specific level, a sub-field professional general knowledge level, and a public general knowledge level; where customer-specific sources correspond to customer private data (such as the customer's product manual, pricing information, historical scripts, user profiles, etc.), and public general knowledge sources correspond to general professional general knowledge or public compliance knowledge. The source type is recorded in the metadata of the knowledge fragment as a structured source tag (e.g., field or tag bit) for subsequent conflict resolution and completion priority sorting. It should be understood that the source type is not limited to the above-mentioned customer-specific, sub-field professional general knowledge, and public general knowledge division, and can also be based on continuous quantitative indicators such as credibility scores and weight values ​​for source classification, as long as it can provide a structured source hierarchy basis for conflict resolution and completion priority.

[0021] The generation and completeness assessment stage involves generating the response content based on multiple knowledge fragments retrieved through retrieval. The generation process can organize prompts according to the source type of the knowledge fragments, ensuring the generated content is organized within the scope of those knowledge fragments. Subsequently, the completeness of the response content is assessed from both conclusion and explanation dimensions. This completeness assessment includes: using a sequence-label-based knowledge extraction model or a large language model for extractive parsing to perform structured element analysis on the response content, extracting conclusion elements (such as explicit answer conclusions and key conclusion points) and explanation elements (such as reasons, evidence, examples, and limiting conditions supporting the conclusions); and matching the extracted conclusion elements and explanation elements with a preset completeness assessment template. The completeness of the conclusion dimension can be expressed as: C_c = n_c / N_c, where n_c is the number of conclusion elements hit in the response content, and N_c is the number of conclusion elements required by the preset conclusion element template; the completeness of the explanation dimension can be expressed as: C_e = n_e / N_e, where n_e is the number of explanation elements hit, and N_e is the number of explanation elements required by the preset explanation element template. In one embodiment, the preset conclusion element template requires that the hit conclusion elements include at least direct conclusions, key conclusion points, key data, and limiting conditions; the preset explanation element template requires that the hit explanation elements include at least principle basis, reasons, examples, preconditions, and source basis. When the completeness of the conclusion dimension C_c is lower than a first threshold, or the completeness of the explanation dimension C_e is lower than a second threshold, it is determined that the corresponding dimension is missing. The first threshold and the second threshold are adaptively determined according to the type of the dialogue request, the source type, or the compliance scale. It should be understood that the two-dimensional division of the conclusion dimension and the explanation dimension is only an exemplary implementation method. Other combinations of dimensions, such as core viewpoints and supporting arguments, factual statements and reasoning processes, can also be used, as long as the structured integrity control of the response content can be achieved, and none of them depart from the concept of the present invention.

[0022] The first semantic conflict detection stage (pre-generation verification) involves performing pre-generation conflict detection on the semantics of each pair of knowledge fragments before generating the response content. This first semantic conflict detection includes: calculating the semantic vector similarity between each pair of knowledge fragments, for example, based on the cosine similarity of sentence vectors; when the semantic vector similarity is higher than a preset conflict threshold, further conflict determination is performed, i.e., comparing the source type and factual points of each knowledge fragment to determine whether a semantic conflict exists. Specifically, the factual point comparison can be achieved as follows: using a model based on sequence labeling or extractive question answering, structured factual points are extracted from the knowledge fragments (e.g., represented as a set of points in the form of subject-attribute-predicate-value / qualification); subsequently, the source points involving the same factual object are compared, and when there are inconsistencies in numerical values, qualifying conditions, or subject references, a semantic conflict is determined. The point extraction and comparison can be implemented using a lightweight model based on a pre-trained language model, or the extraction capabilities of a large language model can be reused; those skilled in the art can choose according to the actual scenario.

[0023] Conflict resolution phase. For knowledge fragments determined to have semantic conflicts, conflict masking or conflict resolution is performed. The conflict resolution process is executed according to the source type priority, which is: client-specific sources take precedence over niche-domain professional general knowledge sources, and niche-domain professional general knowledge sources take precedence over public general knowledge sources. The content of higher-priority knowledge fragments is retained, while the content of lower-priority knowledge fragments that conflict with each other is removed. This mechanism avoids contradictions between knowledge from multiple sources in the output and ensures the authority of client-specific sources. The second semantic conflict detection stage (post-completion verification) involves performing a second semantic conflict verification between the completed output content and all source knowledge fragments, including the candidate fragments to be added. The second semantic conflict detection uses the same detection rules as the first: calculating the semantic vector similarity between the completed output content and each resolved knowledge fragment; if the similarity exceeds a preset conflict threshold, further comparing factual points to confirm the existence of semantic conflicts; for content with conflicts, conflict masking or conflict resolution is performed according to the priority of the same source type to ensure that the added content is consistent with the existing knowledge source standards.

[0024] Dimensional Completion Phase. When the completeness determination indicates that the conclusion dimension or the explanation dimension is missing, the missing content is completed from the retrieval candidates outside the multiple knowledge fragments, based on the missing dimension. The priority order of the completion is: knowledge fragments from customer-specific sources take precedence over knowledge fragments from public general knowledge sources, that is, customer-specific sources that are related to the missing dimension and the dialogue request are preferentially selected from the retrieval candidates. The completion of missing content includes: splicing the additional knowledge fragments related to the dialogue request and corresponding to the missing dimension, and performing a second semantic conflict detection between the completed output content and all source knowledge fragments, including the supplemented candidate fragments, performing conflict masking or conflict resolution on the conflict content according to the source type priority, and then re-performing the completeness determination on the completed output content, forming a double closed-loop cycle of "determination-completion-re-determination, verification-resolution-re-verification". In a reproducible embodiment, for a current dialogue request, when the completeness determination indicates that the explanation dimension is missing, the missing completion module selects additional knowledge fragments from the search candidates that are customer-specific and related to the missing dimension and the dialogue request, and concatenates them to generate the completed response content. The completeness determination is then re-executed on the completed response content until the completeness of the explanation dimension reaches the second threshold. If the coverage increment of the candidate knowledge fragments returned by the search after reaching the maximum iteration count or a preset number of consecutive iterations is lower than the preset threshold, manual review is triggered. Completion stops when both the conclusion dimension and the explanation dimension pass the completeness determination, or when the preset maximum iteration count is reached, or when the coverage increment of the candidate knowledge fragments returned by the search after a preset number of consecutive iterations is lower than the preset threshold. The maximum iteration count is a preset configurable engineering parameter that can be dynamically calculated based on non-performance parameters such as the dialogue round of the dialogue request and the number of search candidates. For example, it can be calculated as follows: Maximum iteration count = Base value + Number of search candidates × Weight coefficient. When the confidence level of the response content, the result of the conflict detection, or the confidence level of the completed output content is lower than a preset confidence threshold, manual intervention or transfer to manual review is triggered, rather than the model automatically supplementing external knowledge. The confidence level is determined by weighting the completeness judgment score, the conflict detection result, and the output adaptation result according to preset weights.

[0025] Output Adaptation Phase. The completed output content is adapted according to a preset output strategy before being output. This preset output strategy includes dynamic compliance adaptation based on the compliance criteria of the domain to which the dialogue request belongs, as a specific implementation of the output adaptation. The compliance criteria are divided into compliance standards based on the domain to which the dialogue request belongs. These compliance standards include at least risk level, violation category range, and the number of sensitive words hit; for example, a higher compliance standard is used in the medical aesthetics field, and a lower compliance standard is used in relatively standard fields such as cosmetics, with further fine-tuning based on platform, region, and other dimensions. The compliance criteria are compiled into an executable decision table and a detection graph. Each row of the executable decision table defines the following mapping relationship: [Risk Level, Violation Category, Number of Sensitive Word Hit] → [Handling Action]. The handling actions include compliance replacement, compliance blocking, or transfer to manual review. In one embodiment, one row of the compliance decision table can be configured as follows: when the field is medical aesthetics, the risk level is high, the violation category is exaggerated efficacy claims, and the level of sensitive words hit is 2, the action is compliance replacement (deleting exaggerated statements and adding risk warnings); another action is: when the field is big health, the risk level is medium, the violation category is unverified efficacy promises, and the level of sensitive words hit is 1, the action is compliance blocking (downgrading the sentence and transferring it for manual review). The above field definitions and actions are only examples, and those skilled in the art can expand or adjust them according to the actual compliance standards. The detection graph consists of a field sentence encoder and compliance rule nodes. The field sentence encoder performs semantic encoding on the completed output content, and the compliance rule nodes perform compliance judgment based on the encoding results and the decision table. When a violation category or sensitive word is detected, compliance replacement or blocking is performed on the corresponding content, and then compliant response content is output.

[0026] System Implementation Example. The response output quality assurance system of the present invention includes: a fragment acquisition and classification module (401), used to acquire multiple knowledge fragments retrieved in response to the current dialogue request, and to label the source type of each knowledge fragment; a generation and completeness determination module (402), used to generate response content based on the resolved knowledge fragments, and to determine the completeness of the response content from the conclusion dimension and the explanation dimension, wherein the completeness determination includes performing structured element parsing and matching with a preset completeness determination template to calculate a two-dimensional completeness; and a conflict detection and processing module (403), used to perform a first semantic conflict detection between the multiple knowledge fragments, and to perform a second semantic conflict detection between the completed output content and all source knowledge fragments, including the supplemented candidate fragments, and to execute the content with conflict according to the priority of the source type. Conflict masking or conflict resolution enables dual verification before and after generation; the missing completion module (404) is used to complete the missing content according to the missing dimension when the conclusion dimension or the explanation dimension is missing, and triggers the re-execution of the completeness judgment on the completed output content, and returns to the conflict detection and processing module for the second semantic conflict detection, forming a closed loop of judgment-completion-re-judgment, verification-resolution-re-verification, until the conclusion dimension and the explanation dimension both pass the completeness judgment and there are no conflicts to be resolved, or the preset maximum number of iterations is reached, and the knowledge fragment from the customer's exclusive source has the highest completion priority; the output adaptation module (405) is used to output the completed output content after output adaptation according to the preset output strategy, the preset output strategy at least includes compliance dynamic adaptation based on compliance standards. The above modules are connected through data interfaces and can be implemented by software modules, hardware modules or a combination thereof. In one embodiment, the first threshold and the second threshold can be set in the range of 0.6~0.9 and 0.5~0.8 respectively, the preset conflict threshold can be set in the range of 0.7~0.95, and the weight coefficient in the calculation of the maximum number of iterations can be set in the range of 0.01~0.1. The above values ​​are only engineering examples and can be routinely adjusted by those skilled in the art according to the professional requirements of the field, output quality goals and performance constraints, and do not constitute a limitation on the necessary technical features of the present invention.

Claims

1. A method for ensuring the quality of response output for knowledge fragments from multiple sources, characterized in that, include: Obtain multiple knowledge fragments that are retrieved in response to the current dialogue request, and label the source type of each knowledge fragment. The source type includes at least customer-specific sources and public knowledge sources. A first semantic conflict detection is performed between the multiple knowledge segments. For the knowledge segments that are determined to have semantic conflicts, conflict masking or conflict resolution is performed according to the priority of source type to obtain the resolved knowledge segments. Based on the resolved knowledge fragments, response content is generated, and the completeness of the response content is determined from the conclusion dimension and the explanation dimension. The completeness determination includes: performing structured element parsing on the response content, extracting conclusion elements and explanation elements, and matching the conclusion elements and explanation elements with a preset completeness determination template to obtain the conclusion dimension completeness and the explanation dimension completeness. When the conclusion dimension or the explanation dimension is missing, the missing content is filled in from the pool of unselected candidate knowledge fragments recalled in this retrieval. The priority of the filling is that the knowledge fragments from the customer-specific source take precedence over the knowledge fragments from the public general knowledge source. A second semantic conflict detection is performed between the filled output content and all source knowledge fragments, including the candidate fragments to be filled in. Conflict masking or conflict resolution is performed on the content that is determined to have semantic conflicts according to the priority of the source type. The completeness determination is then re-executed on the filled output content. If there are still missing dimensions or conflicts that need to be resolved, the process returns to filling, forming a closed loop of "determination - filling - re-determination, verification - resolution - re-verification" until both the conclusion dimension and the explanation dimension pass the completeness determination and there are no conflicts to be resolved, or the preset maximum number of iterations is reached. The completed output content is adapted and then output according to the preset output strategy.

2. A response output quality assurance system for multi-source knowledge fragments, characterized in that, include: The fragment acquisition and classification module is used to acquire multiple knowledge fragments that are retrieved in response to the current dialogue request, and to label the source type of each knowledge fragment. The source type includes at least customer-specific sources and public knowledge sources. The generation and completeness determination module is used to generate response content based on the resolved knowledge fragments, and to determine the completeness of the response content from the conclusion dimension and the explanation dimension. The completeness determination includes parsing the structured elements of the response content and matching the extracted conclusion elements and explanation elements with the preset completeness determination templates to calculate the completeness of the conclusion dimension and the completeness of the explanation dimension. The conflict detection and handling module is used to perform a first semantic conflict detection between the multiple knowledge fragments and perform conflict masking or conflict resolution processing according to the priority of the source type, and is used to perform a second semantic conflict detection between the completed output content and all source knowledge fragments, including the supplemented candidate fragments, and perform conflict masking or conflict resolution processing according to the priority of the source type. The missing completion module is used to complete the missing content according to the missing dimension when the conclusion dimension or the explanation dimension is missing, and to trigger the re-execution of the completeness determination and return to the conflict detection and processing module for the second semantic conflict detection on the completed output content, until the conclusion dimension and the explanation dimension both pass the completeness determination and there are no conflicts to be resolved, or the preset maximum number of iterations is reached, and the knowledge fragment from the customer's exclusive source has the highest completion priority; The output adaptation module is used to adapt the completed output content according to a preset output strategy before outputting it.

3. The method according to claim 1, characterized in that, The structured element parsing is implemented using an extraction-based parsing model based on sequence labeling or a large language model; the completeness of the conclusion dimension is calculated based on the coverage rate of the conclusion elements to the preset conclusion element template, and the completeness of the explanation dimension is calculated based on the coverage rate of the explanation elements to the preset explanation element template.

4. The method according to claim 1, characterized in that, When the completeness of the conclusion dimension is lower than the first threshold, or the completeness of the explanation dimension is lower than the second threshold, it is determined that the corresponding dimension is missing; the first threshold and the second threshold are adaptively determined according to the type of the dialogue request, the source type, or the compliance scale.

5. The method according to claim 1, characterized in that, Both the first semantic conflict detection and the second semantic conflict detection include: calculating the semantic vector similarity between the corresponding parties; when the semantic vector similarity is higher than a preset conflict threshold, further performing a contradiction determination based on the comparison of factual key points to determine whether a semantic conflict exists.

6. The method according to claim 1, characterized in that, The conflict resolution process is performed based on the priority of the source type, which is as follows: customer-specific sources take precedence over niche-specific professional general knowledge sources, and niche-specific professional general knowledge sources take precedence over public general knowledge sources; the content of knowledge fragments with higher priority is retained, and the content of knowledge fragments with lower priority that conflict with each other is removed.

7. The method according to claim 1, characterized in that, The triggering conditions for stopping completion also include: the incremental coverage of the missing dimension by the candidate knowledge fragments returned by the retrieval for a preset number of consecutive times is less than a preset threshold; the maximum number of iterations is dynamically calculated and determined based on the dialogue round of the dialogue request and the number of the candidate knowledge fragment pool, and the calculation method is: the maximum number of iterations is equal to the base value plus the number of the candidate knowledge fragment pool multiplied by the weight coefficient.

8. The method according to claim 1, characterized in that, The method further includes: when the confidence level of the response content, the result of the conflict detection, or the confidence level of the completed output content is lower than a preset confidence level threshold, triggering manual intervention or transferring the case to manual review; the confidence level is determined by weighting the completeness judgment score, the conflict detection result, and the output adaptation result according to preset weights.

9. The method according to claim 1, characterized in that, The preset output strategy includes dynamic compliance adaptation based on the compliance criteria of the domain to which the dialogue request belongs; the compliance criteria are divided into compliance scales according to the domain to which the dialogue request belongs, and the compliance scales include at least risk level, violation category range and number of hit sensitive words, and the compliance criteria are compiled into an executable decision table and a detection graph; the detection graph consists of a domain sentence encoder and compliance rule nodes, and is used to make compliance determinations on the output content.

10. The method according to claim 1, characterized in that, The labeling of the source type is achieved by identifying the knowledge level to which the knowledge fragment belongs and the corresponding source tag. The knowledge level includes at least the customer-specific level, the subdivided professional general knowledge level, and the public general knowledge level.