Layered collaborative reasoning progressive refinement method and system based on quality assessment

By employing a hierarchical collaborative reasoning approach, the system generates initial answers using a local model and performs multidimensional evaluation, along with targeted routing and local refinement. This approach addresses the issues of high-cost ineffective calls and inconsistent multi-round corrections in existing technologies, thereby improving the stability and resource utilization efficiency of long document comprehension tasks.

CN122905080BActive Publication Date: 2026-11-20FUDAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611406497.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-20
Estimated Expiration
2046-09-11

AI Technical Summary

Technical Problem

Existing collaborative reasoning methods suffer from high-cost ineffective calls, inconsistent results from multiple rounds of correction, and a lack of multi-dimensional quality assessment in long document comprehension tasks, making it difficult to meet the accuracy and stability requirements of high-value scenarios.

Method used

A hierarchical collaborative reasoning method based on quality assessment is adopted. Initial answers are generated through a local language model, and the accuracy of facts, completeness of content, and quality of citations are assessed. A defect vector is constructed, and the vector is routed to the target model for local refinement. An incremental fusion mechanism is adopted, and the iteration terminates based on the comprehensive quality score and budget control.

Benefits of technology

It reduces invalid calls to high-cost models, improves the stability and interpretability of long document comprehension tasks, and achieves dynamic quality balance under resource constraints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122905080B_ABST
    Figure CN122905080B_ABST
Patent Text Reader

Abstract

This invention relates to the field of artificial intelligence technology, and in particular to a hierarchical collaborative reasoning progressive refinement method and system based on quality assessment. The method includes: generating an initial answer from a local language model based on chunked context blocks; performing a multi-dimensional quality assessment from three dimensions—factual accuracy, content completeness, and citation quality—and constructing a defect vector; locating defective segments based on the defect vector and routing them to the corresponding target model for local refinement; merging the enhanced and corrected segments with the current answer increment and re-evaluating, then deciding whether to terminate or continue based on three conditions: quality, round number, and budget; This method can reduce ineffective calls to high-cost models while meeting different quality requirements, improve the stability, controllability, and deployment feasibility in complex question-answering and document reasoning tasks, and enhance adaptability to different task difficulties and user preferences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a hierarchical collaborative reasoning progressive refinement method and system based on quality assessment. Background Technology

[0002] As the application of large language models expands in high-value scenarios such as financial question answering, medical information retrieval, and scientific literature analysis, systems not only need to generate natural language answers but also need to achieve higher standards in terms of factual accuracy, information completeness, and evidence traceability. Especially in long document understanding tasks, the input context often spans multiple chapters, tables, and appendices. A single inference attempt must handle a large-scale context while balancing inference depth and response cost, making the traditional "one-time generation" inference method increasingly inadequate for practical deployment requirements. To alleviate the problems of high cost, high latency, and strong privacy constraints in calling high-performance models, the industry has gradually developed technical approaches such as collaboration between local small models and cloud-based large models, model distribution based on task difficulty, and post-processing refinement of results. Existing technical solutions can be broadly categorized into three types: The first type is the fixed-model direct inference solution, where a single large model directly handles long-context reading, reasoning, and answering. This solution is simple to implement but typically relies on expensive remote computing power. The second type is the model cascading and cost-sensitive routing solution, which selects models with different capabilities and costs based on problem difficulty or confidence level. For example, FrugalGPT reduces inference costs through cascading calls while maintaining overall performance under certain conditions. The third type is the multi-round feedback and result refinement solution, which first generates an initial answer and then revises the content based on feedback signals. For example, Self-Refine uses an iterative mechanism of "generation-feedback-rewriting" to improve output quality. Furthermore, for long documents and local data processing scenarios, Minions decomposes tasks into shorter context subtasks, which are executed in parallel by local models and then aggregated by cloud models to improve the cost-effectiveness of local and cloud collaboration. Overall, existing solutions cover the main paths of single-model inference, cost-sensitive routing, iterative feedback, and hierarchical collaboration. Their basic principle is to find an acceptable balance between quality, latency, and computational overhead.

[0003] While existing technologies have made progress in collaborative reasoning and cost control, several shortcomings remain. First, fixed-model direct reasoning or one-time routing schemes typically only select the model at the initial stage. If the initial answer does not meet the target quality, the system often has to be regenerated entirely, making it difficult to address localized issues such as missing facts, weak arguments, or insufficient citations, leading to increased costs. Second, many cascading methods primarily rely on overall difficulty or a single confidence signal to determine whether to upgrade the model, lacking a joint assessment of multi-dimensional indicators such as factual accuracy, content completeness, and citation quality. Therefore, they cannot precisely match the differentiated requirements of different users for answer quality. Third, existing multi-round refining methods often focus on the self-feedback within the same model, or... Focusing solely on text quality rewriting lacks sufficient support for collaborative correction across models and levels, making it difficult to fully leverage the complementary advantages of small models handling local tasks at low cost and large models handling complex reasoning. Furthermore, long document collaborative solutions typically emphasize task decomposition and result aggregation, but lack clear phased stopping criteria for "which parts need further refinement and which parts are already sufficiently reliable," easily leading to problems such as over-calling of strong models or premature termination. In addition, existing technologies generally have weak incremental fusion mechanisms for the results of multiple rounds of revisions, and improvements from different rounds can easily overlap or introduce new inconsistencies, thereby affecting the stability and interpretability of the final answer.

[0004] Therefore, traditional collaborative reasoning methods often suffer from high-cost model ineffective calls and inconsistent results across multiple rounds of correction because they typically only perform a one-time coarse-grained model split in the initial stage. This lacks multi-dimensional joint evaluation of factual accuracy, content completeness, and citation quality, as well as targeted correction and gradual convergence control mechanisms for local defects. Summary of the Invention

[0005] In order to solve the above-mentioned technical problems, a hierarchical collaborative reasoning progressive refinement method and system based on quality assessment is provided, which can reduce the invalid calls of high-cost models and improve the stability, controllability and deployment feasibility in complex question answering and document reasoning tasks.

[0006] A hierarchical collaborative reasoning incremental refinement method based on quality assessment, the method comprising:

[0007] The document context and quality target threshold input by the user are obtained, and the document context is structured and segmented based on a preset segmentation strategy to generate each context block. The local language model is used to generate initial candidate fragments for each context block, and all the initial candidate fragments are combined into an initial answer.

[0008] The initial answer is used as the current answer. The current answer is evaluated for factual accuracy, content completeness, and citation quality. Scores for each dimension are obtained and weighted and fused to obtain a comprehensive quality score. A defect vector is constructed based on the difference between the scores of each dimension and the corresponding quality target threshold.

[0009] Based on the defect vector, locate the defective segment to be corrected in the current answer, route the defective segment to the corresponding target model, generate local correction instructions for each defective segment, use the target model to perform local refinement based on the local correction instructions, record the cost of this round of refinement, and obtain the enhanced corrected segment.

[0010] The enhanced and corrected fragment is incrementally fused with the current answer to obtain an updated answer, and the overall quality score is recalculated based on the updated answer;

[0011] If the updated overall quality score reaches the quality target threshold, or the number of refinement rounds reaches the preset maximum number of rounds, or the cumulative cost reaches the budget limit, then refinement is terminated and the updated answer is output as the final answer; otherwise, the updated answer is used as the new current answer, and the next round of refinement begins.

[0012] In one embodiment, the document context and quality target threshold input by the user are obtained, and the document context is structurally segmented based on a preset segmentation strategy to generate various context blocks, including:

[0013] The system obtains user input for task requests, document sets, quality target thresholds, budget limits, and collaboration parameter sets, including block strategy parameters, single-round task parameters, sampling parameters, and local batch processing capacity.

[0014] The document set is structurally segmented according to the segmentation strategy parameters to generate a context block set; wherein, the segmentation strategy parameters include segmentation by chapter, segmentation by page, and segmentation by paragraph;

[0015] The upper limit of the first round of tasks is determined based on the single-round task parameters and sampling parameters, and a set of candidate tasks for the first round is generated based on the context block set and the upper limit of the first round of tasks.

[0016] In one embodiment, an initial candidate fragment is generated for each of the context blocks using a local language model, and all the initial candidate fragments are combined into an initial answer, including:

[0017] The local model is invoked to independently generate initial candidate fragments for each job in the first round of candidate job set, and when parallel batch processing is enabled, the number of batches in the first round is determined according to the local batch processing capacity and the number of jobs in the first round of candidate job set;

[0018] All the initial candidate fragments are arranged and deduplicated, and combined into an initial answer. The remaining budget for the first round is calculated based on the budget limit and the cost of generating the initial answer.

[0019] In one embodiment, the initial answer is used as the current answer, and the current answer is evaluated for factual accuracy, content completeness, and citation quality. Scores for each dimension are obtained and weighted and fused to obtain a comprehensive quality score, including:

[0020] The current answer is structured and parsed to extract a set of factual statements. Each factual statement is then validated against the document context for consistency. A factual accuracy score is calculated based on the proportion of statements that are validated as correct.

[0021] Based on the task request input by the user, a set of mandatory information units is extracted according to the task request. Each mandatory information unit is checked to see if it has been covered by the current answer. The content integrity score is calculated based on the proportion of mandatory information units that have been covered.

[0022] Extract a set of references from the current answer, calculate the alignment degree of each reference with the document context, and calculate the reference quality score based on the mean of the alignment degree;

[0023] The accuracy score, completeness score, and citation quality score are weighted and summed based on preset weights to obtain a comprehensive quality score.

[0024] In one embodiment, a defect vector is constructed by obtaining the difference between the scores of each dimension and the corresponding quality target threshold, including:

[0025] Target thresholds corresponding to the fact accuracy score, content completeness score, and citation quality score are obtained respectively, and the fact accuracy score, content completeness score, and citation quality score are compared with the corresponding target thresholds to obtain the difference in each dimension;

[0026] Arrange the differences of each dimension in order to construct a defect vector containing the defect values ​​of each dimension.

[0027] In one embodiment, the defective segments to be corrected in the current answer are located based on the defect vector, the defective segments are routed to the corresponding target model, and local correction instructions are generated for each defective segment, including:

[0028] Based on the values ​​of each dimension in the defect vector, the defect type of the current answer is determined, and the corresponding quality assessment record is traced to locate the defect fragments to be corrected, forming a set of defect fragments for the current round.

[0029] For each defect fragment in the defect fragment set, based on the unit cost of each candidate model, the defect type corresponding to the defect fragment, and the estimated residual error of each candidate model in processing the defect fragment, the candidate model that minimizes the weighted sum of the unit cost and the estimated residual error is selected as the target model.

[0030] Based on the defect type of each defect segment, a local context subset corresponding to the defect segment is extracted, and based on the defect type and the local context subset, a local correction instruction corresponding to each defect segment is generated.

[0031] In one embodiment, the target model is used to perform local refinement according to the local correction instructions, the cost of this round of refinement is recorded, and an enhanced correction fragment is obtained, including:

[0032] Each of the aforementioned local correction instructions is sent to the corresponding target model, which then performs local refinement to generate enhanced correction fragments for each of the defective fragments.

[0033] Summarize the costs incurred by calling each target model during this round of refining as the refining cost for this round, and update the remaining budget based on the budget cap.

[0034] In one embodiment, the enhanced and corrected fragment is incrementally fused with the current answer to obtain an updated answer, and the overall quality score is recalculated based on the updated answer, including:

[0035] The set of fusion rules is determined based on a weighted optimization objective of information coverage, citation fidelity, and internal conflict.

[0036] The enhanced and corrected fragments are aligned with the current answer by semantic segments using an incremental fusion operator, and local replacement, splicing expansion, or reference writing are performed according to the fusion rule set. Only the defective fragments are replaced and the verified content is retained to obtain the updated answer.

[0037] Calculate the internal consistency coefficient of the updated answer, and when the internal consistency coefficient is lower than a preset threshold, write back the conflict position to the set of tasks to be refined to trigger coordination correction;

[0038] From the updated answers, the set of factual statements, the set of required information units, and the set of citations are extracted again. Consistency verification, coverage detection, and alignment calculation are performed with the document context to obtain the updated factual accuracy score, content completeness score, and citation quality score, and thus the updated overall quality score.

[0039] In one embodiment, if the updated overall quality score reaches the quality target threshold, or the number of refinement rounds reaches the preset maximum number of rounds, or the cumulative cost reaches the budget limit, then the refinement is terminated and the updated answer is output as the final answer; otherwise, the updated answer is used as the new current answer, and the next round of refinement begins, including:

[0040] The updated overall quality score is compared numerically with the quality target threshold, the number of refining rounds currently executed is compared with the preset maximum number of rounds, and the updated remaining budget is compared with zero.

[0041] If the updated overall quality score reaches or exceeds the quality target threshold, or the number of refinement rounds currently executed reaches or exceeds the preset maximum number of rounds, or the remaining budget is not greater than zero, then refinement is terminated and the updated answer is output as the final answer.

[0042] If the updated overall quality score does not reach the quality target threshold, the number of currently executed refining rounds does not reach the preset maximum number of rounds, and the remaining budget is greater than zero, then the updated answer will be used as the new current answer, the refining round counter will be incremented, and the multidimensional quality assessment and defect localization will be re-executed to enter the next refining iteration.

[0043] A hierarchical collaborative reasoning incremental refining system based on quality assessment, the system comprising:

[0044] The local solution module is used to obtain the document context and quality target threshold input by the user, and to perform structured segmentation of the document context based on a preset segmentation strategy to generate various context blocks. The local language model is used to generate initial candidate fragments for each context block, and all the initial candidate fragments are combined into an initial answer.

[0045] The defect localization module is used to take the initial answer as the current answer, evaluate the current answer in terms of factual accuracy, content completeness, and citation quality, obtain scores for each dimension, and weight and fuse them to obtain a comprehensive quality score. Based on the difference between the scores of each dimension and the corresponding quality target threshold, a defect vector is constructed.

[0046] The remote enhancement solution module is used to locate the defect segment to be corrected in the current answer according to the defect vector, route the defect segment to the corresponding target model, generate local correction instructions for each defect segment, and use the target model to perform local refinement according to the local correction instructions, record the refinement cost of this round, and obtain the enhanced correction segment.

[0047] The result fusion module is used to incrementally fuse the enhanced and corrected fragment with the current answer to obtain an updated answer, and recalculate the overall quality score based on the updated answer;

[0048] The control decision module is used to terminate the refining process and output the updated answer as the final answer if the updated comprehensive quality score reaches the quality target threshold, the number of refining rounds reaches the preset maximum number of rounds, or the cumulative cost reaches the budget limit; otherwise, the updated answer is used as the new current answer, and the process proceeds to the next round of refining.

[0049] The aforementioned hierarchical collaborative reasoning progressive refinement method and system based on quality assessment utilizes a local language model to generate initial candidate fragments in parallel from structured segmented context blocks and combine them into the initial answer. This prioritizes the allocation of long document reasoning pressure to the local side, reducing the initial call pressure on high-cost cloud models. By independently evaluating and weighting the three dimensions of factual accuracy, content completeness, and citation quality, a precise defect vector is constructed, which can accurately identify local weaknesses in the answer. Only defective fragments are routed to the target model at the corresponding capability level for local refinement, and local correction instructions are generated, which can reduce the number of invalid calls to high-capability models. An incremental fusion mechanism is used to incorporate enhanced correction fragments into the current answer according to semantic segments, replacing only defective areas and retaining verified content. Combined with consistency constraint detection, this effectively suppresses the common problem of new content overwriting old correct content in multi-round corrections, improving the structural stability and interpretability of the final answer. Through triple termination condition control based on comprehensive quality score, refinement rounds, and budget limit, iteration can be stopped in a timely manner after quality targets are met, or the system can be safely exited before resources are exhausted, achieving a dynamic balance between reasoning quality and call cost. Attached Figure Description

[0050] Figure 1 This is a diagram illustrating the application environment of a hierarchical collaborative reasoning progressive refinement method based on quality assessment in one embodiment.

[0051] Figure 2 This is a flowchart illustrating a hierarchical collaborative reasoning incremental refinement method based on quality assessment in one embodiment.

[0052] Figure 3 This is a block diagram of a hierarchical collaborative reasoning incremental refining system based on quality assessment in one embodiment.

[0053] Figure 4 This is a schematic diagram of the overall structure of a hierarchical collaborative reasoning progressive refining system based on quality assessment in one embodiment.

[0054] Figure 5 This is a schematic diagram of the structure of the directional refining module in one embodiment;

[0055] Figure 6 This is an interaction sequence diagram of the hierarchical collaborative reasoning incremental refinement method and system based on quality assessment in one embodiment during an actual solution process;

[0056] Figure 7 This is a flowchart of a progressive quality refinement collaborative scenario applied to financial research report Q&A within an enterprise intranet, as shown in one embodiment.

[0057] Figure 8 This is a flowchart of a local priority collaboration scenario applied to the joint review of hospital guidelines and medical records in one embodiment;

[0058] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0060] The hierarchical collaborative reasoning incremental refining method based on quality assessment provided in this application can be applied to, for example... Figure 1 The application environment shown. For example... Figure 1As shown, the application environment includes computer device 110. Computer device 110 can acquire the document context and quality target threshold input by the user, and perform structured segmentation of the document context based on a preset segmentation strategy to generate various context blocks. It then uses a local language model to generate initial candidate fragments for each context block, and combines all initial candidate fragments into an initial answer. Computer device 110 can use the initial answer as the current answer, and evaluate the current answer for factual accuracy, content completeness, and citation quality, obtaining scores for each dimension and weighted fusion to obtain a comprehensive quality score. Based on the differences between each dimension score and the corresponding quality target threshold, a defect vector is constructed. Computer device 110 can then locate the defective fragments to be corrected in the current answer based on the defect vector. The defective fragments are routed to the corresponding target model, generating local correction instructions for each defective fragment. The target model is then used to perform local refinement based on these instructions, recording the cost of this refinement round and obtaining an enhanced corrected fragment. The computer device 110 can incrementally fuse the enhanced corrected fragment with the current answer to obtain an updated answer, and recalculate the overall quality score based on the updated answer. If the updated overall quality score reaches the quality target threshold, the number of refinement rounds reaches the preset maximum number of rounds, or the cumulative cost reaches the budget limit, the computer device 110 can terminate the refinement and output the updated answer as the final answer; otherwise, the updated answer is used as the new current answer, and the next round of refinement begins. The computer device 110 can be, but is not limited to, various personal computers, laptops, smartphones, robots, unmanned aerial vehicles, tablets, and other devices.

[0061] In one embodiment, a hierarchical collaborative reasoning incremental refinement method based on quality assessment (QRC) is provided. This method addresses scenarios where local and cloud models collaboratively process long-context question answering, document understanding, and multi-step reasoning tasks. It employs a process of low-cost generation, localized improvement based on defects, and incremental fusion to reduce the number of high-cost model calls while meeting user-defined quality targets. Specifically, QRC comprises three core modules: first, a quality-goal-driven initial collaborative generation module, used to generate initial candidate answers based on task text, document context, and chunking strategies; second, a multi-dimensional quality assessment and defect localization module, used to determine whether the current answer meets the standards based on factual accuracy, content completeness, and citation sufficiency, and to identify local weaknesses requiring further correction; and third, an incremental refinement and incremental aggregation module, used to map defects to targeted correction tasks, schedule higher-capacity models to perform local reinforcement, and determine whether to stop early after each round based on quality thresholds, budget thresholds, and the maximum number of rounds. Compared to a one-time overall rewrite solution, QRC only sends the segments that truly affect output quality to the high-capacity processing chain, thereby reducing cloud-side overhead and improving answer stability. The input to the method in this application includes a task request. Context set User-defined quality objectives Budget ceiling And the set of collaborative parameters; the output is the final answer that satisfies the target quality. The corresponding referenced segments and process logs.

[0062] In one embodiment, such as Figure 2 As shown, a hierarchical collaborative reasoning incremental refinement method based on quality assessment is provided, including the following steps:

[0063] Step 202: Obtain the document context and quality target threshold input by the user, and perform structured segmentation of the document context based on the preset segmentation strategy to generate each context block. Use the local language model to generate initial candidate fragments for each context block, and combine all initial candidate fragments into the initial answer.

[0064] The computer device can first read the task request, document context and metadata description, and then form a context unit suitable for local model processing through a configurable chunking strategy, and generate the first round of candidate processing plans based on the maximum number of rounds, the number of tasks in a single round, the number of samplings and the upper limit of job capacity.

[0065] In one embodiment, a hierarchical collaborative reasoning incremental refinement method based on quality assessment may further include a process of structurally segmenting the document context and generating a first-round candidate job set. The specific process includes: obtaining user-inputted task requests, document sets, quality target thresholds, budget limits, and a set of collaborative parameters, whereby the collaborative parameter set includes block segmentation strategy parameters, single-round task parameters, sampling parameters, and local batch processing capacity; structurally segmenting the document set according to the block segmentation strategy parameters to generate a context block set; wherein, the block segmentation strategy parameters include segmentation by chapter, segmentation by page, and segmentation by paragraph; determining the first-round job limit based on the single-round task parameters and sampling parameters, and generating a first-round candidate job set based on the context block set and the first-round job limit.

[0066] The computer device can acquire user-input task requests, document sets, quality target thresholds, budget limits, and collaboration parameter sets. The collaboration parameter set includes chunking strategy parameters, single-round task parameters, sampling parameters, and local batch processing capacity. The computer device can perform metadata parsing on the document set, identifying document chapter heading levels, page number distribution, and paragraph separators, and then write the task request, document set, quality target threshold, budget limit, and collaboration parameter set into the task orchestration queue.

[0067] Next, the computer device can read the chunking strategy parameters and perform structured segmentation of the document collection according to the chunking strategy parameters to generate a set of context blocks. The chunking strategy parameters include three types: chapter-based chunking, page-based chunking, and paragraph-based chunking. When the chunking strategy parameter is chapter-based chunking, chapter boundaries can be identified based on the chapter heading hierarchy in the document, with each independent chapter forming a semantically complete context block, ensuring thematic coherence within a single context block and preventing breaks across chapters. When the chunking strategy parameter is page-based chunking, segmentation can be performed based on the physical page number boundaries of the document, with each page or several consecutive pages constituting a context block. When the chunking strategy parameter is paragraph-based chunking, segmentation can be performed based on paragraph separators, with each paragraph or several consecutive semantically related paragraphs constituting a context block.

[0068] The computer equipment can read the single-round task parameters and sampling parameters, and determine the upper limit of the first round of operations based on the number of slots specified in the single-round task parameters and the number of samples per task specified in the sampling parameters. Specifically, the computer equipment can multiply the number of slots in the single-round task by the number of samples per task to obtain the theoretical value of the number of jobs allowed to be generated in the first round, and compare the theoretical value with the preset upper limit of job capacity, taking the smaller value as the upper limit of the first round of operations.

[0069] The computer device can generate a first-round candidate job set based on a set of context blocks, where each candidate job corresponds to a context block and a sampling index. The computer device can prune the first-round candidate job set to ensure that the number of retained candidate jobs does not exceed the first-round job limit, and finally output the first-round candidate job set. When the number of context blocks multiplied by the number of samples per task does not exceed the first-round job limit, all candidate jobs are retained; when the first-round job limit is exceeded, the candidate jobs can be sorted according to the priority of the context blocks in the original document or the relevance of the task request, and the candidate jobs with higher rankings are retained.

[0070] Specifically, in this embodiment, the computer device can first perform structured segmentation of the context according to preset segmentation strategy parameters. When the segmentation strategy is chapter-based, semantically complete segments are generated first based on chapter boundaries; when the segmentation strategy is page-based or segment-based, the segments are divided by page or segment respectively to adapt to different document structures. The number of segments can be expressed as: (1); where, Indicates the number of context blocks. Indicates the total number of document units to be processed. Indicates the target capacity that a single context block is allowed to carry.

[0071] For the Each context block defines the block segmentation result as follows: (2); where, Indicates the first A context block, This represents the block operator specified by the block strategy parameters. After block division, the computer can construct the job limit based on the single-round task unfolding parameters: (3); among which, Indicates the first The number of jobs allowed to be generated in a round. Indicates the upper limit of a single round of work. Indicates the first Number of task slots in the wheel, This indicates the number of samples for each task. To avoid overexpansion in the first round, the set of schedulable jobs can be further limited: (4); among which, Indicates the first Round the candidate job set, Notation representing different sampling indices for the same task Indicates that the final retention will not exceed Each task can be decomposed locally on the computer device, and the results can be passed to the subsequent candidate generation process, so that subsequent corrections are based on traceable and locatable context units.

[0072] In one embodiment, a hierarchical collaborative reasoning incremental refinement method based on quality assessment may further include a local solution process, which specifically includes: calling a local model to independently generate initial candidate fragments for each job in the first round of candidate job set, and when parallel batch processing is enabled, determining the number of batches in the first round based on the local batch processing capacity and the number of jobs in the first round of candidate job set; arranging and deduplicating all initial candidate fragments to form an initial answer, and calculating the remaining budget for the first round based on the budget ceiling and the cost consumed in generating the initial answer.

[0073] The computer device can receive the initial candidate job set output by the task orchestration unit. Specifically, the computer device can invoke the local language model to independently generate initial candidate fragments for each job in the initial candidate job set. For each job, the computer device can take the context block corresponding to the job as input, and the user-submitted task request as the generation guide, and send it to the local language model to perform inference. The local language model then generates initial candidate fragments for that context block. These initial candidate fragments include factual statements, inference conclusions, and candidate reference positions for that context block. After each initial candidate fragment is generated, the local solving unit attaches a corresponding context block identifier and job identifier to it, establishing a mapping relationship between the initial candidate fragment and the original document position.

[0074] When parallel batch processing is enabled, the computer device can determine the number of batches in the first round based on the local batch processing capacity and the number of jobs in the initial candidate job set. Specifically, the computer device can divide the number of jobs in the initial candidate job set by the local batch processing capacity, round the result up, and use this as the number of batches in the first round. Subsequently, the computer device can divide all jobs into multiple batches corresponding to the number of batches in the first round, with each batch containing no more than the local batch processing capacity, and send each batch in parallel to the local language model for inference, thereby shortening the overall time of the first round generation. When parallel batch processing is not enabled, the computer device can send each job sequentially to the local language model for inference.

[0075] Next, the computer device can collect all initial candidate fragments and then perform arrangement and deduplication processing on them. First, the computer device can sort all initial candidate fragments according to the position order of their corresponding context blocks in the original document. Second, the computer device can deduplicate initial candidate fragments with duplicate content; when two or more initial candidate fragments express the same fact or conclusion, the statement with higher information density and stronger evidence binding is retained, while the remaining redundant and duplicate fragments are deleted. Third, the computer device can structure the deduplicated initial candidate fragments according to three levels: factual statements, conclusion summaries, and candidate citation positions, making each fragment logically coherent and clearly structured in the initial answer. After arrangement, the computer device can combine all initial candidate fragments into the initial answer.

[0076] While generating the initial answer, the computer device can calculate the cost incurred in generating the initial answer, which includes at least one of the following: token consumption, number of model calls, and response latency. The computer device can calculate the remaining budget for the first round based on the user-defined budget limit and the cost incurred in generating the initial answer; that is, it deducts the cost incurred in generating the initial answer from the budget limit to obtain the remaining budget for the first round.

[0077] In this embodiment, after obtaining the job set, the local model can independently generate candidate fragments for each job. The local generation function is defined as: (5); among which, Indicates the first The candidate fragments generated by the local model, Represents the local inference function. Indicates local model parameters, This indicates a description of the document's metadata.

[0078] If parallel batch processing is enabled, the number of batches processed locally in the first round will satisfy: (6); among which, Indicates the first Number of batches, Indicates the number of operations in the first round. This indicates the local batch processing capacity. After the local model completes fragment generation, the computer device can merge the candidate fragments into an initial answer. (7); among which, This represents the initial answer. This represents the candidate segment arrangement and deduplication operator. This represents the set of indexes formed by combining the subqueries generated in the initial stage with their corresponding data sources. Indicates the first element in the set. Subqueries and their associated first Data source shards.

[0079] Meanwhile, to facilitate subsequent quality control, a budget margin can be defined for the initial state of each round: (8); among which, This indicates the remaining budget after the first round of processing. This indicates that the user sets a total budget. This represents the cost of generating the initial answer, which can be calculated from token cost, number of calls, or latency. In this embodiment, the computer device may not directly hand over the entire task to the cloud model, but instead use a low-cost local model to provide an initial result with a structural basis, and then trigger higher-level refinement only when necessary.

[0080] Step 204: Take the initial answer as the current answer, evaluate the current answer for factual accuracy, content completeness, and citation quality, obtain scores for each dimension, and weight and fuse them to obtain a comprehensive quality score. Construct a defect vector based on the difference between the scores of each dimension and the corresponding quality target threshold.

[0081] The computer device can construct three basic scores for the current answer: factual accuracy, content completeness, and citation quality, and combine them with the user's target quality to form a comprehensive criterion; if the comprehensive score does not meet the standard, it will further output a defect vector and a set of defect fragments to provide clear input for subsequent targeted refinement.

[0082] In one embodiment, a hierarchical collaborative reasoning progressive refinement method based on quality assessment may further include a process for calculating a comprehensive quality score. The specific process includes: performing structured parsing on the current answer, extracting a set of factual statements, verifying the consistency of each factual statement with the document context, and calculating a factual accuracy score based on the proportion of statements verified as correct; extracting a set of mandatory information units based on the user-input task request, checking whether each mandatory information unit has been covered by the current answer, and calculating a content completeness score based on the proportion of covered mandatory information units; extracting a set of citations from the current answer, calculating the alignment degree of each citation with the document context, and calculating a citation quality score based on the average of the alignment degrees; and weighting and summing the factual accuracy score, content completeness score, and citation quality score based on preset weights to obtain a comprehensive quality score.

[0083] The computer device can set the initial answer as the current answer and evaluate it separately from three dimensions: factual accuracy, content completeness, and citation quality. The scores from these three dimensions are then weighted and merged to obtain a comprehensive quality score. Specifically, the computer device can perform structured parsing of the current answer, identifying assertive statements about objective facts, data, or conclusions, and extracting all assertive statements to form a set of factual statements. Then, for each factual statement in the set, a search is performed within the document's context blocks to find supporting original textual evidence and to determine consistency between the factual statement and the retrieved contextual evidence. When a factual statement can find corresponding evidence in the context and the expression is consistent, the factual statement is verified as correct; when a factual statement cannot find corresponding evidence in the context or contradicts the contextual evidence, the factual statement is marked as unsupported, and its position in the current answer is recorded. The computer device can count the number of verified correct factual statements, calculate their proportion of the total number of factual statements in the set, and use this proportion as the factual accuracy score.

[0084] Computer equipment can read user-input task requests, perform semantic parsing, and extract key information slots necessary to complete the task, forming a set of mandatory information units. These mandatory information units include key entities, key data, key conclusions, and necessary reasoning steps involved in the task request. The computer equipment can then check each mandatory information unit in the set to see if it has been explicitly covered by the current answer. Explicit coverage means that the current answer contains a clear description of the mandatory information unit, rather than only vaguely mentioning or indirectly implying it. When a mandatory information unit is explicitly described in the current answer, it is determined that the mandatory information unit has been covered; when a mandatory information unit does not appear in the current answer or is only vaguely mentioned without explicit content, it is marked as a missing information unit, and its corresponding task requirement description is recorded. The computer equipment can count the number of covered mandatory information units, calculate its proportion of the total number of mandatory information units in the set, and use this proportion as a content completeness score.

[0085] The computer device can extract all cited fragments from the current answer to form a citation set. These citation fragments include quotations, data, and evidence markers from the current answer that are indicated as originating from the document context. For each citation in the citation set, the computer device can locate its original source within the document context and calculate the alignment degree between the citation and the document context. The alignment degree is judged from three aspects: whether the citation actually exists in the context, whether the citation's location is accurate, and whether the content of the citation matches the statement using the citation in the current answer. When all three aspects are satisfied, the citation's alignment degree is the highest level; when some aspects are satisfied, the alignment degree is the corresponding intermediate level; when the citation does not exist, its location is severely offset, or its content is completely mismatched, the alignment degree is the lowest level. For citations whose alignment degree does not meet the preset requirements, the computer device can mark them as unaligned citations and record their location and expected source in the current answer. The computer device can calculate the average alignment degree of all citations and use this average as the citation quality score.

[0086] Next, the computer device can read preset weight parameters, which include the weights for factual accuracy, content completeness, and citation quality. The sum of the weights for these three dimensions is one. The computer device can then multiply the factual accuracy score by its corresponding weight, the content completeness score by its corresponding weight, and the citation quality score by its corresponding weight, and finally sum these three scores to obtain the overall quality score.

[0087] Specifically, in this embodiment, the computer device can calculate a score based on the consistency between the statements in the answer and the contextual evidence: (9); among which, Indicates the first Score for the factual accuracy of the answer. This represents the set of factual statements extracted from the answer. This represents any specific statement taken from the set. Expressing a statement proposition Can it be evidenced by context? The supported verification operators, This indicates an indicator function.

[0088] Regarding content integrity, computer equipment can determine whether the key information slots required by the examination task have been covered: (10); among which, Indicates the completeness score. Indicates according to the task request The set of extracted mandatory information units, This represents any specific information unit in the set. This indicates that the information unit has been covered in the answer.

[0089] To assess citation quality, computer devices can examine how well a cited fragment in an answer is bound to its original context: (11); among which, This indicates the citation quality score. This represents the set of references in the answer. Indicates a reference Alignment with contextual evidence (its function return value) (Continuous alignment score within the interval). In this embodiment, the comprehensive quality score is defined as: (12); among which, Indicates the first Overall quality score , , Represents the weights of the three dimensions, and satisfies .

[0090] In one embodiment, a hierarchical collaborative reasoning progressive refinement method based on quality assessment may further include a process of constructing a defect vector. The specific process includes: obtaining the target thresholds corresponding to the fact accuracy score, content integrity score, and citation quality score, respectively, and comparing the fact accuracy score, content integrity score, and citation quality score with the corresponding target thresholds to obtain the difference in each dimension; arranging the differences in each dimension in order to construct a defect vector containing the defect values ​​of each dimension.

[0091] The computer device can obtain target thresholds for factual accuracy score, content completeness score, and citation quality score, respectively. These target thresholds are set by the user when submitting the task request and include three sub-thresholds: factual accuracy target threshold, content completeness target threshold, and citation quality target threshold. When the user does not independently set a threshold for any sub-item, the computer device can use a default threshold preset according to the application scenario. The three sub-thresholds are independent of each other, and users can set different threshold levels according to the emphasis different tasks place on factual reliability, information coverage, and evidence traceability.

[0092] The computer device can compare the factual accuracy score, content completeness score, and citation quality score with their respective target thresholds to obtain the difference for each dimension. Specifically, for the factual accuracy dimension, the computer device can subtract the factual accuracy score from the factual accuracy target threshold to obtain the factual accuracy dimension difference; for the content completeness dimension, it can subtract the content completeness score from the content completeness target threshold to obtain the content completeness dimension difference; for the citation quality dimension, it can subtract the citation quality score from the citation quality target threshold to obtain the citation quality dimension difference. The physical meaning of each dimension's difference is as follows: when the difference for a certain dimension is greater than zero, it indicates that the actual score for that dimension has not yet reached the target threshold requirement, and that the dimension has a defect; the larger the difference, the more severe the defect. When the difference for a certain dimension is less than or equal to zero, it indicates that the actual score for that dimension has reached or exceeded the target threshold, and that the dimension has met the standard and no further correction is needed.

[0093] Finally, the computer device can arrange the differences in factual accuracy, content completeness, and citation quality dimensions in a fixed order, constructing a defect vector containing defect values ​​across these three dimensions. After constructing the defect vector, the computer device can determine the priority defect dimensions to be repaired based on the magnitude of each component. The dimension with the largest difference is designated as the highest priority dimension for repair, with the remaining dimensions ordered according to their differences. Simultaneously, the computer device can combine this information with the location information of unsupported facts, missing information units, and misaligned citations marked during the three-dimensional evaluation process to locate the content segments in the current answer that require correction, and output the defect vector along with the location information of the content segments to be corrected to the defect location unit.

[0094] In this embodiment, after obtaining the multidimensional quality score, the computer device can construct a defect vector: (13); among which, Indicates the first Wheel defect vector, , , These represent the target thresholds for fact, completeness, and citation quality, respectively.

[0095] Step 206: Locate the defective segments to be corrected in the current answer based on the defect vector, route the defective segments to the corresponding target model, generate local correction instructions for each defective segment, and use the target model to perform local refinement based on the local correction instructions. Record the cost of this round of refinement and obtain the enhanced corrected segments.

[0096] In one embodiment, a hierarchical collaborative reasoning incremental refinement method based on quality assessment may further include a process of generating local correction instructions. The specific process includes: determining the defect type of the current answer based on the values ​​of each dimension in the defect vector, tracing the corresponding quality assessment record, locating the defect segment to be corrected, and forming a set of defect segments for the current round; for each defect segment in the defect segment set, selecting the candidate model that minimizes the weighted sum of the unit cost and the estimated residual error of each candidate model in processing the defect segment, based on the unit cost of each candidate model, the defect type corresponding to the defect segment, and the estimated residual error of each candidate model in processing the defect segment; extracting a subset of local context corresponding to each defect segment based on the defect type and the local context subset, and generating local correction instructions corresponding to each defect segment based on the defect type and the local context subset.

[0097] The computer device can determine the defect type of the current answer based on the values ​​of each dimension in the defect vector. Specifically, when the value of the factual accuracy dimension in the defect vector is greater than zero, the current answer is determined to have a factual defect; when the value of the content integrity dimension is greater than zero, it is determined to have an integrity defect; and when the value of the citation quality dimension is greater than zero, it is determined to have a citation defect. Subsequently, the computer device can trace the quality assessment records corresponding to each defect type: for factual defects, it traces the location records of unsupported facts marked during the factual accuracy assessment; for integrity defects, it traces the location records of missing information units marked during the content integrity assessment; and for citation defects, it traces the location records of misaligned citations marked during the citation quality assessment. Based on the above location records, the computer device can accurately locate each defect segment to be corrected in the current answer and record the defect type, start and end positions in the current answer, corresponding context block identifier, and defect severity for each defect segment. When multiple defect types exist at the same location, the computer device can merge them into a composite defect segment and record all defect types it contains. Finally, the defect localization unit forms the defect segment set for the current round.

[0098] The computer device can maintain a candidate model set, which includes a local language model and one or more higher-capability cloud-based language models. For each defect fragment in the defect fragment set, the computer device can query the unit call cost of each candidate model in the candidate model set; based on the defect type corresponding to the defect fragment, it evaluates the estimated residual error of each candidate model in processing the defect fragment, where the estimated residual error reflects the degree of defect that may remain after the candidate model processes the defect; the computer device can use the weighted sum of unit cost and estimated residual error as the selection criterion, where unit cost and estimated residual error are multiplied by their respective weight coefficients and then summed, selecting the candidate model that minimizes the weighted sum as the target model for the defect fragment. Through this selection mechanism, when the defect severity is high and the remaining budget is sufficient, the more capable but more expensive cloud model is selected because it has a lower estimated residual error; when the defect is of the representation optimization type and has low requirements for model capability, the less expensive model is selected because it has a lower unit cost, thus achieving a balance between cost and quality.

[0099] For each defective fragment in a set of defective fragments, the computer device can extract a subset of local context corresponding to that defective fragment based on its defect type. Specifically, for factual defects, it extracts the context block near the defective fragment and the context content of the location of relevant evidence; for integrity defects, it extracts the context block content related to the missing information unit; and for citation defects, it extracts the context block content near the expected source of the citation. The local context subset only contains the context content directly related to the defective fragment, rather than the complete answer or the entire document context, to reduce data transmission volume and lower the risk of privacy exposure. Subsequently, the computer device can generate a local correction instruction corresponding to the defective fragment based on the defect type and the local context subset. The local correction instruction includes a description of the defect type, the original text of the defective fragment, the local context subset, the expected correction target, and output format constraints.

[0100] In this embodiment, the computer device can locate the set of subtasks that need to be corrected based on the defect vector: (14); among which, Indicates the first A group of players awaiting refining tasks. This represents the routing function for generating local correction tasks based on defect type, context location, and task objective. This applies to the set of items to be corrected generated during the aforementioned quality assessment phase. Any specific item to be corrected in Computer devices can select the appropriate processing level: (15); among which, Indicates the first The model level selection results corresponding to each correction item Represents a set of optional models. Represents the first element in the set. One optional model, This indicates the index of the model that minimizes the joint objective function within the parentheses. Indicates calling the first The unit cost of each model Indicates the first Each model processes correction items The estimated residual error, This represents the cost-quality balance coefficient. Subsequently, local correction instructions for the target model are generated: (16); among which, This indicates the generated and packaged local correction instructions (i.e., the prompt word). This indicates the prompt word assembly and formatting encapsulation operator, used to concatenate the task to be corrected, the format specifications of the target model, and the local context into executable instructions. Representation and Modification Term The relevant local context subset.

[0101] In one embodiment, a hierarchical collaborative reasoning incremental refinement method based on quality assessment may further include a process of obtaining enhanced correction fragments. The specific process includes: sending each local correction instruction to the corresponding target model, whereby the target model performs local refinement to generate enhanced correction fragments for each defective fragment; summarizing the costs incurred by calling each target model during this round of refinement as the cost of this round of refinement, and updating the remaining budget according to the budget ceiling.

[0102] The computer device can send each local correction instruction in the local correction instruction set to the corresponding target model based on its corresponding target model identifier. Upon receiving the local correction instruction, the target model performs local refinement only on the defective segment specified in the instruction, generating an enhanced correction segment for that defective segment, without regenerating the complete answer. During the refinement process, the target model performs supplementary evidence, supplementary answers, or expression convergence processing on the defective segment based on the local context subset carried in the local correction instruction: for factual defects, the target model completes or corrects erroneous factual statements and binds evidence sources; for completeness defects, the target model supplements missing mandatory information units; for citation defects, the target model corrects offset citation positions or supplements missing citation segments. The target model generates enhanced correction segments under preset temperature parameters and maximum output length constraints to control the diversity and length of the output. After each enhanced correction segment is generated, the computer device can attach a corresponding task identifier to be refined and a defective segment position identifier to it, establishing a mapping relationship between the enhanced correction segment and the defective position of the original answer. When multiple local correction instructions correspond to the same target model, the computer can send multiple local correction instructions to the target model in batches for parallel processing, thereby shortening the overall time of this round of refining. The computer can collect all enhancement correction fragments to form an enhancement correction fragment set.

[0103] Next, while performing local refinement, the computer device can record the cost of each target model call, including at least one of token consumption, model call count, and response latency. For each target model call, the computer device can record the target model identifier, input token amount, output token amount, call count, and response latency. After all target model calls in this round are completed, the computer device can summarize the costs of each call to obtain the refinement cost for this round. Subsequently, the computer device can update the remaining budget according to the budget limit, that is, deduct the refinement cost for this round from the current remaining budget to obtain the updated remaining budget. When the updated remaining budget is insufficient to support the minimum cost of the next round of refinement, the computer device can notify the task orchestration unit of the budget shortage status, and the task orchestration unit can trigger the budget exhaustion termination condition in the termination judgment stage. Finally, the computer device can output the set of enhancement correction fragments, the defect location mapping relationship corresponding to each enhancement correction fragment, the refinement cost for this round, and the updated remaining budget to the result fusion unit for incremental fusion and termination judgment.

[0104] In this embodiment, for the first Given a set of items to be corrected, the computer can generate enhanced output for each correction item: (17); among which, Indicates the first Round The enhancement results of each correction term, This indicates the selected cloud-based or higher-capability model inference function. This represents the corresponding model parameters. The refining cost for this round is calculated as follows: (18); among which, Indicates the first Refining costs Indicates processing of correction items The call cost for the selected tier. Budget margin is updated with each round as follows: (19); among which, Indicates the first The remaining budget before the start of the round. The early termination condition of the system is defined as: (20); among which, Indicates the first Does the wheel stop? This indicates that the user sets comprehensive quality goals. This indicates the maximum number of refining cycles.

[0105] Step 208: Incrementally merge the enhanced and corrected fragments with the current answer to obtain the updated answer, and recalculate the overall quality score based on the updated answer.

[0106] The computer device can trigger round-by-round refinement based on the aforementioned set of defects, and at the end of each round, it can use the budget, round number, and overall quality to decide whether to continue; if it continues, it can only merge the newly added improved fragments without rewriting the entire answer, thereby maintaining the existing reliable content.

[0107] In one embodiment, a hierarchical collaborative reasoning incremental refinement method based on quality assessment may further include a process of updating the overall quality score. The specific process includes: determining a set of fusion rules based on a weighted optimization objective of information coverage, citation fidelity, and internal conflict; aligning the enhanced correction fragments with the current answer according to semantic segments using an incremental fusion operator, and performing local replacement, splicing expansion, or citation write-back according to the fusion rule set, replacing only defective fragments and retaining verified content to obtain an updated answer; calculating the internal consistency coefficient of the updated answer, and when the internal consistency coefficient is lower than a preset threshold, writing back the conflicting positions to the set of tasks to be refined to trigger coordinated correction; re-extracting the set of fact statements, the set of required information units, and the set of citations from the updated answer, and performing consistency verification, coverage detection, and alignment calculation with the document context respectively to obtain updated fact accuracy scores, content completeness scores, and citation quality scores, thus obtaining an updated overall quality score.

[0108] The computer device can read preset fusion target weights, which include information coverage weights, citation fidelity weights, and internal conflict weights. The computer device can determine the fusion rule set based on a weighted optimization objective of information coverage, citation fidelity, and internal conflict. Specifically, information coverage requires the fused answer to cover all valid information in the original answer and the enhanced / corrected fragments, avoiding the loss of valid information; citation fidelity requires that the binding relationship between the cited fragments and the original context in the fused answer is not broken, avoiding citation misalignment or loss; internal conflict requires that there are no contradictions between statements in the fused answer, avoiding inconsistencies in expression. The computer device can multiply information coverage, citation fidelity, and internal conflict degree by their respective weights, sum them, and take the rule combination that achieves the optimal weighted sum as the fusion rule set. The fusion rule set defines the applicable conditions and execution order of three types of operations—local replacement, splicing expansion, and reference write-back—during the subsequent incremental fusion process.

[0109] Next, the computer device can align the enhanced / corrected fragments with the current answer according to semantic segments using an incremental fusion operator. Specifically, the computer device can locate the corresponding semantic segment in the current answer based on the defective fragment location identifier attached to each enhanced / corrected fragment, establishing an alignment relationship between the enhanced / corrected fragment and the semantic segment of the current answer. Subsequently, the computer device can perform one or more of the following operations on each alignment position according to the fusion rule set: local replacement, i.e., replacing the corresponding defective segment in the current answer with the enhanced / corrected fragment; splicing expansion, i.e., splicing the new information into the corresponding semantic segment of the current answer when the enhanced / corrected fragment contains new information that is not present in the current answer; and reference writing back, i.e., writing back the corrected reference to the corresponding reference position in the current answer when the enhanced / corrected fragment contains a corrected reference fragment. Throughout the incremental fusion process, the computer device can replace only the defective fragments in the current answer, while all verified content in the current answer that is not marked as defective remains unchanged, without rewriting or adjustment. After fusion is completed, the result fusion unit generates the updated answer.

[0110] The computer device can extract all statements from the updated answers, forming a set of statement pairs; it then checks each statement pair in the set to see if they contradict each other; it calculates the proportion of non-contradictory statement pairs to the total number of statement pairs, using this proportion as the internal consistency coefficient. When the internal consistency coefficient is below a preset threshold, the computer device can write back the positions of contradictory statement pairs to the set of tasks to be refined, marking them as consistency conflict defects to trigger the next round of targeted coordination and correction; when the internal consistency coefficient reaches or exceeds the preset threshold, no conflict write-back is triggered.

[0111] Next, the computer device can re-extract the set of factual statements from the updated answers, verify the consistency of each factual statement with the document context, and obtain an updated factual accuracy score based on the proportion of statements verified as correct. Secondly, the computer device can re-extract the set of mandatory information units according to the task request, check whether each mandatory information unit has been covered by the updated answers, and obtain an updated content integrity score based on the proportion of covered mandatory information units. The computer device can re-extract the set of citations from the updated answers, calculate the alignment degree of each citation with the document context, and obtain an updated citation quality score based on the average of the alignment degrees. The computer device can then perform a weighted summation of the updated factual accuracy score, content integrity score, and citation quality score based on preset weights to obtain an updated comprehensive quality score, and reconstruct the defect vector based on the difference between each dimension's score and the corresponding target threshold. The computer device can output the updated comprehensive quality score, the reconstructed defect vector, and the location information of newly identified non-compliant items to the task orchestration unit for termination judgment or use in the next round of refinement.

[0112] In this embodiment, after obtaining the corrected result, the computer device does not reconstruct the entire answer, but instead uses an incremental aggregation mechanism to incorporate the new content into the old answer. (21); among which, Indicates the first The updated answer, Indicates the previous round (the first round) The basic answer text generated by (round) Indicates the incremental fusion operator, This represents the set of rules for this round of fusion.

[0113] The fusion rules can be obtained through the following objectives: (22); among which, This indicates the search for a set of fusion strategy parameters that maximizes the objective function of the subsequent combinatorial optimization. Indicates information coverage. Indicates the fidelity of the reference. Indicates the degree of internal conflict. , , These represent the hyperparameter weights of the corresponding evaluation indicators.

[0114] To further ensure internal consistency of the answer after multiple rounds of revision, a consistency coefficient is defined: (23); among which, The coefficient of consistency of answers is represented by the coefficient of consistency of answers. Indicates the first The set of semantic statement proposition pairs extracted from the round-response text. This represents a contrast pair consisting of any two semantic statements taken from this set. This indicates an indicator operator used to determine whether the statements contradict each other.

[0115] Step 210: If the updated overall quality score reaches the quality target threshold, or the number of refinement rounds reaches the preset maximum number of rounds, or the cumulative consumption cost reaches the budget limit, then the refinement is terminated and the updated answer is output as the final answer; otherwise, the updated answer is used as the new current answer, and the next round of refinement begins.

[0116] In one embodiment, a hierarchical collaborative reasoning progressive refinement method based on quality assessment may further include a process for determining whether to terminate the refinement. This process specifically includes: comparing the updated overall quality score with a quality target threshold, comparing the number of refinement rounds currently executed with a preset maximum number of rounds, and comparing the updated remaining budget with zero. If the updated overall quality score reaches or exceeds the quality target threshold, or the number of refinement rounds currently executed reaches or exceeds the preset maximum number of rounds, or the remaining budget is not greater than zero, then the refinement is terminated, and the updated answer is output as the final answer. If the updated overall quality score does not reach the quality target threshold, and the number of refinement rounds currently executed does not reach the preset maximum number of rounds, and the remaining budget is greater than zero, then the updated answer is used as the new current answer, the refinement round counter is incremented, and the multidimensional quality assessment and defect localization are re-executed to enter the next refinement iteration.

[0117] The computer device can read the user-defined quality target threshold, the preset maximum number of refinement rounds, the current number of refinement rounds, and the updated remaining budget. Then, the computer device can compare the updated overall quality score with the quality target threshold to determine if the current answer's quality meets the user's requirements; it can compare the current number of refinement rounds with the preset maximum number of rounds to determine if the number of refinement rounds has reached the system's allowed limit; and it can compare the updated remaining budget with zero to determine if the budget has been exhausted.

[0118] When any of the three comparisons mentioned above meets the termination condition—that is, the updated overall quality score reaches or exceeds the quality target threshold, the number of refinement rounds executed reaches or exceeds the preset maximum number of rounds, or the remaining budget is not greater than zero—the computer device can determine the currently updated answer as the final answer. It then extracts all reference identifiers from the final answer and retrieves the corresponding reference fragments from the document context based on the context block identifiers associated with each reference identifier, forming a reference fragment set. The device also summarizes the processing log, which includes changes in the overall quality score for each round, the model identifiers called in each round and their corresponding costs, the defect types and locations fixed in each round, and the type of condition that ultimately triggers termination. The computer device can record the specific type of condition that triggers termination and submits the final answer, the reference fragment set, and the process log to the request access unit, which then returns the results to the user.

[0119] When none of the above three comparisons meet the termination conditions—that is, the updated overall quality score does not reach the quality target threshold, the number of refinement rounds already executed does not reach the preset maximum number of rounds, and the remaining budget is greater than zero—the task orchestration unit determines to continue refinement. The computer device can set the updated answer as the new current answer, increment the refinement round counter (i.e., increment the number of refinement rounds already executed), and update the cumulative cost based on the cost of this round of refinement. The computer device can then send the new current answer, the reconstructed defect vector, the updated remaining budget, and the incremented number of refinement rounds back to the multidimensional quality assessment and defect localization stage, returning to re-execute the multidimensional quality assessment and defect localization, and entering the next round of refinement iteration. The next round of refinement begins with the defect localization step, sequentially executing defect fragment localization, target model selection, local correction instruction generation, target model local refinement, incremental fusion, and re-quality assessment, without repeating the initial context segmentation and local candidate generation steps, thus avoiding redundant computation and maintaining processing efficiency.

[0120] In one embodiment, for quality assessment, a lightweight classifier, rule-based discriminator, or self-assessment prompter can be used instead of the aforementioned unified scorer. When there is sufficient labeled data for the scenario, a supervised classifier can be prioritized to improve discrimination stability. When the scenario shifts frequently or there is a lack of labeled data, a self-assessment prompt method can be used to directly extract quality signals from the answers. In terms of model architecture, the local processing layer can use an open-source model on the edge, a privately deployed model, or an enterprise intranet model, while the cloud processing layer can use a single high-capability model or a candidate set composed of multiple specialized models. When the task emphasizes privacy protection, the proportion of local processing can be increased, and only the defect summary is uploaded to the remote end. When the task emphasizes ultimate quality, more high-capability models can be allowed to participate in the refinement. In terms of routing strategy, the aforementioned joint selection based on cost and residual error can be replaced with rule routing based on uncertainty threshold, user preference template, or business priority. For factual question answering, corrections for missing evidence can be prioritized and sent to a strong retrieval model. For expression optimization defects, they can be handled by a lower-cost model. Fourth, in terms of budget control, the total cost budget can be expanded into a multi-dimensional budget, such as limiting the fact correction budget, the reference correction budget, and the total round budget separately, to adapt to the different requirements of different businesses for accuracy and latency.

[0121] This application provides a hierarchical collaborative reasoning incremental refinement method based on quality assessment. It first generates initial results using a highly efficient small model, then evaluates the current output from dimensions such as factual accuracy, content completeness, and citation quality using a lightweight classifier or self-assessment prompts. When a local defect is detected, the corresponding refinement task is only routed to a higher-capacity model for execution, rather than rewriting the entire answer. After each round of refinement, newly added information is incrementally aggregated, and the method determines whether to terminate early based on quality compliance and budget constraints. This application combines whether to upgrade the model with what content to upgrade and fix, allowing high-cost models to primarily address key defects that truly affect quality, thus balancing inference quality, invocation cost, and response stability. This method is clearly necessary for scenarios requiring highly reliable question answering, such as finance, healthcare, and scientific research, and provides a more granular, configurable, and scalable quality control mechanism for hierarchical model collaborative systems.

[0122] In one embodiment, the implementation effect of QRC is summarized by combining quality target-driven generation, multi-dimensional quality assessment, and incremental refining aggregation mechanism. Specifically, to demonstrate the actual benefits of this application in a quality control-level collaborative scenario, the following provides the implementation effect verification results from four aspects: task quality, reference reliability, processing cost, and parameter configuration. Specific data are shown in Table 1.

[0123] Table 1. Comparison of overall performance on the FinanceBench long-context question answering benchmark.

[0124]

[0125] As shown in Table 1, QRC maintains the best performance in terms of completeness and citation consistency, while approaching the accuracy of a single remote rewrite scheme, and compresses the number of cloud calls to 2.6, making it suitable for implementation scenarios that require a balance between quality and cost. The results in Table 1 cover three types of long-context tasks: financial document understanding, longitudinal medical record question answering, and scientific paper question answering, reflecting the comprehensive processing performance of this application under different knowledge densities and evidence structures. The configuration methods for the core parameters are shown in Table 2.

[0126] Table 2 shows the parameter configuration for this embodiment of QRC.

[0127]

[0128] Table 2 shows the configuration of the core parameters of QRC. It can be seen that this application does not rely on the improvement of a single model capability, but achieves stable technical results through structured partitioning, quality gating and progressive scheduling.

[0129] In this embodiment, a hierarchical collaborative reasoning progressive refinement method based on quality assessment is provided. Through an initial collaborative generation and missing answer location mechanism driven by quality goals, a relatively complete answer skeleton can be formed in the first round, and only gaps need to be filled in subsequent rounds. As shown in Table 1, the completeness rate of QRC reaches 84.1%, which is higher than 75.8% for FedAvg-style collaboration and 78.1% for LocalAdam-style collaboration. Citation quality is included in the independent scoring dimension, and misaligned fragments are re-sent into the targeted refinement link to reduce the disconnect between the answer and the original data. As shown in Table 1, the citation consistency rate of QRC reaches 83.6%, which is significantly higher than 76.2% for FedProx-style collaboration. Instead of repeatedly rewriting the entire answer, only the defective fragments are locally upgraded. As shown in Table 1, the number of cloud calls per task is reduced to 2.6, which is significantly lower than 5.0 times for a single remote rewrite scheme, thereby reducing the call pressure on the high-cost model. Through fact, completeness, and citation quality groups The system uses defect vectors for routing decisions, allowing different questions to enter different refinement paths. This enables more effective completion of key content and avoids the repeated rewriting of irrelevant segments. Incremental aggregation, rather than overwriting, is employed to retain verified content while introducing local enhancements, thereby reducing conflicts between statements and maintaining answer structure stability. Through multi-dimensional quality assessment and local evidence review mechanisms, QRC can limit factual errors to local corrections, preventing repeated perturbations of the overall answer and making it more suitable for high-fidelity output in long document question-and-answer scenarios. Integrating budget limits, maximum rounds, and stop-on-reach rules into the control process allows the system to promptly stop refining after quality targets are met, making it more suitable for resource-constrained edge-cloud collaborative deployments. As shown in Table 2, QRC implementation relies on the collaborative work of four types of parameters: chunking, task deployment, quality gating, and refinement control. These parameters can be flexibly adjusted according to document structure, budget targets, and task complexity, making it suitable for various scenarios such as long document understanding, complex question-and-answer, and evidence constraint generation.

[0130] It should be understood that although the steps in the flowchart above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart above may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0131] In one embodiment, such as Figure 3As shown, a hierarchical collaborative reasoning progressive refinement system based on quality assessment is provided, including: a local solution module 310, a defect localization module 320, a remote enhanced solution module 330, a result fusion module 340, and a control decision module 350, wherein:

[0132] The local solution module 310 is used to obtain the document context and quality target threshold input by the user, and to perform structured segmentation of the document context based on the preset segmentation strategy to generate each context block. The local language model is used to generate initial candidate fragments for each context block, and all initial candidate fragments are combined into the initial answer.

[0133] The defect localization module 320 is used to take the initial answer as the current answer, evaluate the factual accuracy, content completeness and citation quality of the current answer, obtain scores for each dimension, and weight and fuse them to obtain a comprehensive quality score. Based on the difference between the scores of each dimension and the corresponding quality target threshold, a defect vector is constructed.

[0134] The remote enhancement solution module 330 is used to locate the defect segments to be corrected in the current answer based on the defect vector, route the defect segments to the corresponding target model, generate local correction instructions for each defect segment, and use the target model to perform local refinement based on the local correction instructions, record the cost of this round of refinement, and obtain the enhanced and corrected segments.

[0135] The result fusion module 340 is used to incrementally fuse the enhanced and corrected fragments with the current answer to obtain the updated answer, and recalculate the overall quality score based on the updated answer;

[0136] The control decision module 350 is used to terminate the refining process and output the updated answer as the final answer if the updated comprehensive quality score reaches the quality target threshold, the number of refining rounds reaches the preset maximum number of rounds, or the cumulative cost reaches the budget limit; otherwise, the updated answer is used as the new current answer, and the process proceeds to the next round of refining.

[0137] In one embodiment, the local solver module 310 is further configured to acquire user-input task requests, document sets, quality target thresholds, budget limits, and collaboration parameter sets, the collaboration parameter sets including block strategy parameters, single-round task parameters, sampling parameters, and local batch processing capacity; perform structured segmentation of the document set according to the block strategy parameters to generate a context block set; wherein, the block strategy parameters include block segmentation by chapter, block segmentation by page, and block segmentation by segment; determine the first-round job limit based on the single-round task parameters and sampling parameters, and generate a first-round candidate job set based on the context block set and the first-round job limit.

[0138] In one embodiment, the local solver module 310 is further configured to call the local model to independently generate initial candidate fragments for each job in the first round candidate job set, and when parallel batch processing is enabled, determine the number of batches in the first round based on the local batch processing capacity and the number of jobs in the first round candidate job set; arrange and deduplicate all initial candidate fragments, combine them into an initial answer, and calculate the remaining budget for the first round based on the budget limit and the cost consumed in generating the initial answer.

[0139] In one embodiment, the defect localization module 320 is further configured to perform structured parsing of the current answer, extract a set of factual statements, verify the consistency of each factual statement with the document context, and calculate a factual accuracy score based on the proportion of statements verified as correct; extract a set of mandatory information units based on the task request input by the user, check one by one whether each mandatory information unit has been covered by the current answer, and calculate a content integrity score based on the proportion of covered mandatory information units; extract a set of citations from the current answer, calculate the alignment degree of each citation with the document context, and calculate a citation quality score based on the average of the alignment degree; and perform a weighted sum of the factual accuracy score, content integrity score, and citation quality score based on preset weights to obtain a comprehensive quality score.

[0140] In one embodiment, the defect localization module 320 is further configured to obtain the target thresholds corresponding to the fact accuracy score, content integrity score, and citation quality score, respectively, and compare the fact accuracy score, content integrity score, and citation quality score with the corresponding target thresholds to obtain the difference in each dimension; and arrange the differences in each dimension in order to construct a defect vector containing the defect values ​​of each dimension.

[0141] In one embodiment, the remote enhancement solving module 330 is further configured to determine the defect type of the current answer based on the values ​​of each dimension in the defect vector, trace the corresponding quality assessment record, locate the defect segment to be corrected, and form a defect segment set for the current round; for each defect segment in the defect segment set, based on the unit cost of each candidate model, the defect type corresponding to the defect segment, and the estimated residual error of each candidate model in processing the defect segment, select the candidate model that minimizes the weighted sum of the unit cost and the estimated residual error as the target model; extract the local context subset corresponding to the defect segment according to the defect type of each defect segment, and generate local correction instructions corresponding to each defect segment based on the defect type and the local context subset.

[0142] In one embodiment, the remote enhancement solving module 330 is further configured to send each local correction instruction to the corresponding target model, and the target model performs local refinement to generate enhanced correction fragments for each defective fragment; summarize the cost incurred by calling each target model during this round of refinement as the cost of this round of refinement, and update the remaining budget according to the budget limit.

[0143] In one embodiment, the result fusion module 340 is further configured to determine a set of fusion rules based on a weighted optimization objective of information coverage, citation fidelity, and internal conflict; align the enhanced correction fragments with the current answer according to semantic segments using an incremental fusion operator, and perform local replacement, splicing expansion, or citation write-back according to the set of fusion rules, replacing only the defective fragments and retaining the verified content to obtain the updated answer; calculate the internal consistency coefficient of the updated answer, and when the internal consistency coefficient is lower than a preset threshold, write the conflict position back to the set of tasks to be refined to trigger coordinated correction; re-extract the set of fact statements, the set of required information units, and the set of citations from the updated answer, and perform consistency verification, coverage detection, and alignment calculation with the document context respectively to obtain the updated fact accuracy score, content completeness score, and citation quality score, and obtain the updated comprehensive quality score.

[0144] In one embodiment, the control decision module 350 is further configured to compare the updated comprehensive quality score with the quality target threshold, compare the number of currently executed refining rounds with the preset maximum number of rounds, and compare the updated remaining budget with zero. If the updated comprehensive quality score reaches or exceeds the quality target threshold, or the number of currently executed refining rounds reaches or exceeds the preset maximum number of rounds, or the remaining budget is not greater than zero, then the refining is terminated, and the updated answer is output as the final answer. If the updated comprehensive quality score does not reach the quality target threshold, and the number of currently executed refining rounds does not reach the preset maximum number of rounds, and the remaining budget is greater than zero, then the updated answer is used as the new current answer, the refining round counter is incremented, and the multidimensional quality assessment and defect localization are re-executed to enter the next refining iteration.

[0145] In one embodiment, the overall structure of a hierarchical collaborative reasoning incremental refining system based on quality assessment is as follows: Figure 4As shown, the request access unit is responsible for receiving user questions, document context, and configurable quality objectives, and sending task metadata to the task orchestration unit. The task orchestration unit determines the initial solution strategy based on question complexity, context size, and budget ceiling. On one hand, it assigns the segmented subtasks and document fragments to the local lightweight solution unit; on the other hand, it sends the target accuracy, completeness requirements, and reference constraints to the quality assessment unit. The local lightweight solution unit generates a low-cost draft answer based on the device-side model. The defect localization unit then combines the scoring results generated by the quality assessment unit to identify missing facts, weak reasoning, and expression gaps, forming targeted correction requirements. The remote enhancement solution unit only performs high-cost refinement on defective fragments, rather than rewriting the entire solution, thereby controlling cloud call overhead. The result fusion unit combines the local draft and the remotely corrected fragments into a stage answer and submits it again to the quality assessment unit for verification. If the current overall quality score... If the target threshold is still not reached, the evaluation result will be sent back to the task orchestration unit to trigger the next round of refining; if the remaining budget... If the target requirements are met within the specified scope, the system will return the final draft to the requesting access unit for output completion. This feedback loop enables hierarchical collaboration that allows for on-demand upgrades, round-by-round corrections, and cost-controlled processes.

[0146] In one embodiment, the directional refining module structure is as follows: Figure 5 As shown, the input answer cache stores candidate answers and their source fragments for the current round, serving as a baseline for subsequent corrections. The defect identifyr reads candidate answers, question objectives, and evaluation feedback, identifying defect types such as factual omissions, insufficient evidence, missing citations, or structural inconsistencies, and forming a defect set. The Refinement Task Generator is based on... Only local correction instructions are constructed, such as completing specific entity descriptions, strengthening a reasoning link, or rewriting reference expressions, thus avoiding the redundant costs of full regeneration. The model router selects an appropriate far-end augmentation solver based on the severity of the defect, remaining budget, and context length, ensuring that high-cost models only process the parts that require upgrades. After the augmentation solver returns the corrected fragments, the incremental fusion unit aligns them with the original answer according to semantic segments, retaining the validated content and replacing only the defective fragments to obtain a new answer version. The quality checker then remeasures accuracy, completeness, and format consistency; if the result passes the threshold, the new version is written back to the input answer cache for the next stage of output; if it still fails, the reason for failure is sent directly back to the refinement task generator to rebuild a more focused correction task. This architecture achieves a three-level collaboration of local awareness, targeted upgrades, and closed-loop review.

[0147] In one embodiment, a hierarchical collaborative reasoning incremental refinement method and system based on quality assessment is provided, wherein the interaction sequence in an actual solution process is as follows: Figure 6 As shown. First, the user interface submits the problem, context access request, and target quality level to the task orchestrator. The task orchestrator first performs self-processing, parsing the budget, maximum refining rounds, and allowed solver resources to generate the first round of task plan. Subsequently, the local solver performs the first round of low-cost inference on the device-side model and self-processes to generate an initial draft answer and a summary of source fragments, which are then sent back to the task orchestrator. The task orchestrator submits the draft to the quality evaluator, which outputs a comprehensive quality score based on correctness, completeness, sufficiency of evidence, and format consistency. With the defect list. If If the target threshold is not reached, the task orchestrator only sends the defect-related fragments to the remote refiner instead of resending the entire problem, thus reducing cloud computing overhead. The remote refiner focuses on generating local correction results for weak inference segments, insufficient citation segments, or missing information segments, and then passes the results to the result fusion unit. The result fusion unit performs a second self-processing step, fusing the new fragments with the old draft according to semantic segments to form an updated answer version. The quality evaluator re-verifies the fused version; if it meets the user-defined target, the task orchestrator immediately outputs the final version to the user interface; if it still does not meet the target, it returns suggestions for the next round and triggers a new local task. Through this sequential mechanism of low-cost initial solution and subsequent defect-based upgrades, the system can utilize the remaining budget. Gradually approach the target quality under controllable conditions.

[0148] In one embodiment, a hierarchical collaborative reasoning progressive refinement method and system based on quality assessment is deployed in the intranet environment of an enterprise research department. A local language model is configured on the terminal side to handle high-frequency research report Q&A, while a high-capacity language model is configured on the cloud side to enhance complex reasoning and evidence binding. The constraints of this scenario include sensitive internal documents, dense long texts, and limited bandwidth. The goal is to achieve target thresholds in factual accuracy, content completeness, and sufficiency of citations in the answers without uploading the entire original material. And limit high-cost calls to necessary segments, the specific process is as follows: Figure 7 As shown:

[0149] M1: Request for Access and Quality Target Registration: Registering the issues submitted by researchers Document collection Target quality threshold With budget cap Write to the orchestration queue, register the calling permissions of the local model and the cloud model, and output a collaborative task list with priority tags.

[0150] M2: Chapter Segmentation and Initial Task Deployment: Based on the chapter-priority segmentation strategy shown in Table 2, the main text, appendices, and table descriptions of the research report are structurally segmented, and then divided according to the single-round task slots. The number of samples per task is The parameter configuration generates the first round of task sets. It outputs a semantically complete context block and a list of jobs to be processed.

[0151] M3: Local Draft Generation: Feeds each context block into the local model to generate candidate fragments. Then, the initial answer is synthesized by combining keywords and evidence locations. The output includes a first draft containing factual statements, a summary of conclusions, and candidate citation locations.

[0152] M4: Multidimensional Quality Assessment: Combining the accuracy, completeness, and citation consistency indicators in Table 1, the initial answer is calculated. , and Identify content segments that do not meet the standards and output a comprehensive quality score. With defect vector .

[0153] M5: Defect-Oriented Routing: Creates local correction instructions for missing entities, insufficient arguments, and misaligned citations. Only relevant paragraph summaries and evidence indexes are extracted and uploaded to the remote link, outputting a locally refined request set for high-capacity models. .

[0154] M6: Cloud-based Local Refinement: The cloud-based model performs supplementary verification, supplementary response, and representation convergence processing on each local request, with the temperature parameter being... And the maximum output length is Returning the corrected fragment under the constraints It outputs an enhanced content package with source mapping relationships.

[0155] M7: Incremental Fusion and Consistent Write-back: The enhanced content package is fused back to the answer cache according to semantic segments, replacing only the defective segments and retaining the verified content to form the updated answer. Simultaneously calculate the consistency coefficient. It also outputs the version status after the write-back.

[0156] M8: Standard Assessment and Final Output: The number of further refinements is controlled based on the maximum number of rounds and the "stop when standard is met" rule. If the remaining budget is insufficient, stop immediately and output the final draft, evidence binding list, and processing log; if the target is not met, feed back the defect summary to M2 to trigger the next round of local processing.

[0157] In this enterprise intranet deployment, the performance boundaries shown in Table 1 can be directly reused in this embodiment. Overall quality remains at accuracy. Completeness rate Citation consistency rate At the same time, the number of cloud calls per task has been reduced. Compared to a single remote rewrite solution, this reduces the pressure of high-cost calls and is more suitable for long-term online Q&A services.

[0158] In one embodiment, a hierarchical collaborative reasoning progressive refinement method and system based on quality assessment can be deployed in a two-layer environment consisting of a hospital intranet and a controlled cloud channel. Departmental terminals first process medical record summaries, guideline entries, and examination reports using a local model, and then, when necessary, submit defective summaries to a cloud-based model for high-quality enhancement. The main constraints of this scenario are strict privacy protection, significant differences in document structures among newly connected departments, and the inadvisability to frequently transmit original documents during the cold start period. The goal is to quickly generate reviewable responses while prioritizing local processing and minimizing upgrades to missing parts; the specific process is as follows: Figure 8 As shown:

[0159] M1: Departmental Task Registration: Writes medical record summaries, guideline excerpts, doctor questions, and departmental permission identifiers into the collaboration portal to generate task objects with privacy settings. The output is subject to processing constraints that only allow partial summaries to be transmitted.

[0160] M2: Local Priority Block Modeling: Based on the block organization and first-round task deployment method in Table 2, guide items and medical record descriptions are segmented according to chapter and paragraph boundaries, and the maximum number of refinement rounds is set to... Single batch size is To ensure that the results of each round are traceable, a lightweight processing queue is output to the local end.

[0161] M3: End-to-End Candidate Response Generation: Using a local model, three categories of candidate content are generated in advance: explanation of the condition, location of evidence, and items to be confirmed, forming an initial response. The output is a structured draft containing labels for the evidence to be supplemented.

[0162] M4: Cold Start Quality Screening: Combining three dimensions—factual accuracy, content completeness, and citation consistency—to perform the first round of screening on the draft, identifying factual conflicts, missed check items, and citation gaps, and outputting a set of defects. And the priority order of repair.

[0163] M5: Partial Summary Upload: For each defect, only the necessary symptom description, guideline number, and evidence index are extracted to form a summary package, without uploading the complete medical record text. A set of locally processed instructions is output. .

[0164] M6: Cloud-based targeted enhancement: The cloud-based model performs high-capability inference on the summary package, supplementing the diagnostic basis, examination recommendations, and corresponding evidence, and returns the local enhancement results. The output can be directly mapped back to the reinforcement fragment of the original answer slot.

[0165] M7: Personalized Fusion Rewrite: This function merges the supplementary fragments with the original departmental response by paragraph slot, prioritizing the retention of locally confirmed specialist expressions, updating only defective areas, and outputting a final candidate answer adapted to the current departmental document style. .

[0166] M8: Review Termination and Output: Based on the citation consistency rate target in Table 1, a termination judgment is executed. When the completeness and citation quality meet the target, a review response is output; if the target is not met, the conflict summary of this round is fed back to M2 to start the next round of local priority correction.

[0167] In this deployment within the hospital, this embodiment focuses more on defect repair and personalized write-back during the cold start phase. Referring to Table 1, the reference consistency rate can be stabilized at... It reduces the number of remote rewrites while maintaining a high integrity rate, making it suitable for collaborative review processes in new departments that require privacy protection and rapid deployment.

[0168] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a hierarchical collaborative reasoning incremental refinement method based on quality assessment. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0169] Those skilled in the art will understand that Figure 9The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0170] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, implements steps of a hierarchical collaborative reasoning incremental refinement method based on quality assessment.

[0171] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of a hierarchical collaborative reasoning incremental refinement method based on quality assessment.

[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0174] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A hierarchical collaborative reasoning incremental refinement method based on quality assessment, characterized in that, The method includes: The document context and quality target threshold input by the user are obtained, and the document context is structured and segmented based on a preset segmentation strategy to generate each context block. The local language model is used to generate initial candidate fragments for each context block, and all the initial candidate fragments are combined into an initial answer. The initial answer is used as the current answer. The current answer is evaluated for factual accuracy, content completeness, and citation quality. Scores for each dimension are obtained and weighted and fused to obtain a comprehensive quality score. A defect vector is constructed based on the difference between the scores of each dimension and the corresponding quality target threshold. Based on the defect vector, locate the defective segment to be corrected in the current answer, route the defective segment to the corresponding target model, generate local correction instructions for each defective segment, use the target model to perform local refinement based on the local correction instructions, record the cost of this round of refinement, and obtain the enhanced corrected segment. The enhanced and corrected fragment is incrementally fused with the current answer to obtain an updated answer, and the overall quality score is recalculated based on the updated answer; If the updated overall quality score reaches the quality target threshold, or the number of refinement rounds reaches the preset maximum number of rounds, or the cumulative cost reaches the budget limit, then refinement is terminated and the updated answer is output as the final answer; otherwise, the updated answer is used as the new current answer, and the next round of refinement begins.

2. The hierarchical collaborative reasoning incremental refinement method based on quality assessment according to claim 1, characterized in that, Obtain the document context and quality target threshold input by the user, and perform structured segmentation of the document context based on a preset segmentation strategy to generate various context blocks, including: The system obtains user input for task requests, document sets, quality target thresholds, budget limits, and collaboration parameter sets, including block strategy parameters, single-round task parameters, sampling parameters, and local batch processing capacity. The document set is structurally segmented according to the segmentation strategy parameters to generate a context block set; wherein, the segmentation strategy parameters include segmentation by chapter, segmentation by page, and segmentation by paragraph; The upper limit of the first round of tasks is determined based on the single-round task parameters and sampling parameters, and a set of candidate tasks for the first round is generated based on the context block set and the upper limit of the first round of tasks.

3. The hierarchical collaborative reasoning incremental refinement method based on quality assessment according to claim 2, characterized in that, Initial candidate segments are generated for each of the aforementioned context blocks using a local language model. All of these initial candidate segments are then combined into an initial answer, including: The local model is invoked to independently generate initial candidate fragments for each job in the first round of candidate job set, and when parallel batch processing is enabled, the number of batches in the first round is determined according to the local batch processing capacity and the number of jobs in the first round of candidate job set; All the initial candidate fragments are arranged and deduplicated, and combined into an initial answer. The remaining budget for the first round is calculated based on the budget limit and the cost of generating the initial answer.

4. The hierarchical collaborative reasoning incremental refinement method based on quality assessment according to claim 1, characterized in that, Using the initial answer as the current answer, the current answer is evaluated for factual accuracy, content completeness, and citation quality. Scores for each dimension are obtained and weighted together to obtain a comprehensive quality score, including: The current answer is structured and parsed to extract a set of factual statements. Each factual statement is then validated against the document context for consistency. A factual accuracy score is calculated based on the proportion of statements that are validated as correct. Based on the task request input by the user, a set of mandatory information units is extracted according to the task request. Each mandatory information unit is checked to see if it has been covered by the current answer. The content integrity score is calculated based on the proportion of mandatory information units that have been covered. Extract a set of references from the current answer, calculate the alignment degree of each reference with the document context, and calculate the reference quality score based on the mean of the alignment degree; The accuracy score, completeness score, and citation quality score are weighted and summed based on preset weights to obtain a comprehensive quality score.

5. The hierarchical collaborative reasoning incremental refinement method based on quality assessment according to claim 4, characterized in that, Based on the scores of each dimension, a defect vector is constructed by comparing the scores with the corresponding quality target thresholds, including: Target thresholds corresponding to the fact accuracy score, content completeness score, and citation quality score are obtained respectively, and the fact accuracy score, content completeness score, and citation quality score are compared with the corresponding target thresholds to obtain the difference in each dimension; Arrange the differences of each dimension in order to construct a defect vector containing the defect values ​​of each dimension.

6. The hierarchical collaborative reasoning incremental refinement method based on quality assessment according to claim 1, characterized in that, Based on the defect vector, locate the defective segments to be corrected in the current answer, route the defective segments to the corresponding target model, and generate local correction instructions for each defective segment, including: Based on the values ​​of each dimension in the defect vector, the defect type of the current answer is determined, and the corresponding quality assessment record is traced to locate the defect fragments to be corrected, forming a set of defect fragments for the current round. For each defect fragment in the defect fragment set, based on the unit cost of each candidate model, the defect type corresponding to the defect fragment, and the estimated residual error of each candidate model in processing the defect fragment, the candidate model that minimizes the weighted sum of the unit cost and the estimated residual error is selected as the target model. Based on the defect type of each defect segment, a local context subset corresponding to the defect segment is extracted, and based on the defect type and the local context subset, a local correction instruction corresponding to each defect segment is generated.

7. The hierarchical collaborative reasoning incremental refinement method based on quality assessment according to claim 6, characterized in that, Using the target model, local refinement is performed according to the local correction instructions, the cost of this round of refinement is recorded, and an enhanced correction fragment is obtained, including: Each of the aforementioned local correction instructions is sent to the corresponding target model, which then performs local refinement to generate enhanced correction fragments for each of the defective fragments. Summarize the costs incurred by calling each target model during this round of refining as the refining cost for this round, and update the remaining budget based on the budget cap.

8. The hierarchical collaborative reasoning incremental refinement method based on quality assessment according to claim 1, characterized in that, The enhanced and corrected fragment is incrementally fused with the current answer to obtain an updated answer. The overall quality score is then recalculated based on the updated answer, including: The set of fusion rules is determined based on a weighted optimization objective of information coverage, citation fidelity, and internal conflict. The enhanced and corrected fragments are aligned with the current answer by semantic segments using an incremental fusion operator, and local replacement, splicing expansion, or reference writing are performed according to the fusion rule set. Only the defective fragments are replaced and the verified content is retained to obtain the updated answer. Calculate the internal consistency coefficient of the updated answer, and when the internal consistency coefficient is lower than a preset threshold, write back the conflict position to the set of tasks to be refined to trigger coordination correction; From the updated answers, the set of factual statements, the set of required information units, and the set of citations are extracted again. Consistency verification, coverage detection, and alignment calculation are performed with the document context to obtain the updated factual accuracy score, content completeness score, and citation quality score, and thus the updated overall quality score.

9. The hierarchical collaborative reasoning incremental refinement method based on quality assessment according to claim 1, characterized in that, If the updated overall quality score reaches the quality target threshold, or the number of refining rounds reaches the preset maximum number of rounds, or the cumulative cost reaches the budget limit, then the refining will be terminated and the updated answer will be output as the final answer. Otherwise, the updated answer will be used as the new current answer and proceed to the next round of refinement, including: The updated overall quality score is compared numerically with the quality target threshold, the number of refining rounds currently executed is compared with the preset maximum number of rounds, and the updated remaining budget is compared with zero. If the updated overall quality score reaches or exceeds the quality target threshold, or the number of refinement rounds currently executed reaches or exceeds the preset maximum number of rounds, or the remaining budget is not greater than zero, then refinement is terminated and the updated answer is output as the final answer. If the updated overall quality score does not reach the quality target threshold, the number of refinement rounds currently executed does not reach the preset maximum number of rounds, and the remaining budget is greater than zero, then the updated answer will be used as the new current answer, the refinement round counter will be incremented, and the multidimensional quality assessment and defect localization will be re-executed to enter the next refinement iteration.

10. A hierarchical collaborative reasoning progressive refining system based on quality assessment, characterized in that, The system includes: The local solution module is used to obtain the document context and quality target threshold input by the user, and to perform structured segmentation of the document context based on a preset segmentation strategy to generate various context blocks. The local language model is used to generate initial candidate fragments for each context block, and all the initial candidate fragments are combined into an initial answer. The defect localization module is used to take the initial answer as the current answer, evaluate the current answer in terms of factual accuracy, content completeness, and citation quality, obtain scores for each dimension, and weight and fuse them to obtain a comprehensive quality score. Based on the difference between the scores of each dimension and the corresponding quality target threshold, a defect vector is constructed. The remote enhancement solution module is used to locate the defect segment to be corrected in the current answer according to the defect vector, route the defect segment to the corresponding target model, generate local correction instructions for each defect segment, and use the target model to perform local refinement according to the local correction instructions, record the refinement cost of this round, and obtain the enhanced correction segment. The result fusion module is used to incrementally fuse the enhanced and corrected fragment with the current answer to obtain an updated answer, and recalculate the overall quality score based on the updated answer; The control decision module is used to terminate the refining process and output the updated answer as the final answer if the updated comprehensive quality score reaches the quality target threshold, the number of refining rounds reaches the preset maximum number of rounds, or the cumulative cost reaches the budget limit; otherwise, the updated answer is used as the new current answer, and the process proceeds to the next round of refining.

Citation Information

Patent Citations

  • Method and system for generating questions and answers through retrieval enhancement based on combination of large language model and multi-agent collaborative mechanism

    CN121561056A

  • Knowledge graph entity duplicate removal and cross-document fusion method and device

    CN122285889A