Agent reasoning path selection and resource scheduling method and device, equipment and medium
Patent Information
- Application Number
- CN202611328146.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]目前,现有技术方案在决策启动阶段通常依据问题类型或关键词匹配预设固定的推理深度与资源分配规则,这种静态的路由策略难以适应金融风控场景中不同账户风险特征间的验证需求波动,也无法准确预判医疗辅助诊断中各候选病理假设的实际证据增益
[0009]上述智能体推理路径选择与资源调度方法、装置、计算机设备及存储介质所实现的方案中,在接收到推理请求后,先生成包含至少一个候选假设的候选假设集合,并为每个候选假设确定对应的验证成本,从而为后续推理资源的分配提供明确对象和成本参考。进一步地,针对每个候选假设,基于信息增益、决策影响因子和验证成本计算假设价值密度,使验证该候选假设所能获得的决策收益与所需消耗的验证成本之间形成统一的比较基准,由此能够客观衡量不同候选假设在单位验证成本下的资源投入价值。进一步地,根据各候选假设的假设价值密度和验证成本,为各候选假设配置推理模式并分配初始推理资源,使资源分配与实际决策收益相匹配,避免简单问题被过度推理造成时延和费用浪费,也避免高风险问题因验证资源不足而遗漏关键反例。上述各步骤依次提供对象、建立度量、实施分配,共同实现了智能体推理资源在候选假设之间的合理分配。
Smart Images

Figure CN123014204A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, and medium for intelligent agent reasoning path selection and resource scheduling. Background Technology
[0002] In the fields of fintech and healthcare, intelligent agent decision-making processes typically involve verifying multiple candidate hypotheses using various tools to assess the potential risks of different trading behaviors or pathological data. Since the verification cost and potential decision value of each candidate hypothesis vary significantly, how to implement reasonable budget allocation for the inference process under limited resource constraints directly determines the economic efficiency and robustness of the task execution.
[0003] Currently, existing technical solutions typically use pre-defined, fixed inference depths and resource allocation rules based on problem type or keyword matching during the decision-making initiation phase. This static routing strategy struggles to adapt to the fluctuating verification needs of different account risk characteristics in financial risk control scenarios, and also fails to accurately predict the actual evidence gain of each candidate pathological hypothesis in medical auxiliary diagnosis. Furthermore, this rigid resource allocation directly leads to delays in identifying key abnormal behaviors in financial anti-fraud reasoning. In healthcare scenarios, budget shortages for verifying counterexamples of core pathological hypotheses significantly reduce the credibility of the final conclusion, forcing the decision-making process to rely excessively on manual intervention to compensate for computational limitations. Summary of the Invention
[0004] The present invention provides a method, apparatus, device and medium for agent inference path selection and resource scheduling, in order to solve the technical problem of: how to provide a solution that can effectively ensure the rational allocation of agent inference resources.
[0005] Firstly, a method for agent inference path selection and resource scheduling is provided, including: In response to a received inference request, a set of candidate hypotheses is generated, which includes at least one candidate hypothesis and each candidate hypothesis has a corresponding verification cost. For each candidate hypothesis in the candidate hypothesis set, the hypothesis value density of the candidate hypothesis is determined based on the information gain, decision influence factor and verification cost corresponding to the candidate hypothesis. Based on the value density of each hypothesis in the candidate hypothesis set and the verification cost of each hypothesis, an inference mode is configured and initial inference resources are allocated for each candidate hypothesis in the candidate hypothesis set.
[0006] Secondly, an intelligent agent reasoning path selection and resource scheduling device is provided, including: A generation unit is configured to generate a set of candidate hypotheses containing at least one candidate hypothesis in response to a received inference request, wherein the candidate hypothesis has a corresponding verification cost; The determining unit is configured to, for each candidate hypothesis in the candidate hypothesis set, determine the hypothesis value density of the candidate hypothesis based on the information gain, decision influence factor and verification cost corresponding to the candidate hypothesis; The configuration unit is used to configure inference modes and allocate initial inference resources for each candidate hypothesis in the candidate hypothesis set based on the value density of each hypothesis in the candidate hypothesis set and the verification cost of each hypothesis.
[0007] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described agent inference path selection and resource scheduling method.
[0008] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described intelligent agent inference path selection and resource scheduling method.
[0009] In the scheme implemented by the above-mentioned intelligent agent inference path selection and resource scheduling method, device, computer equipment, and storage medium, after receiving a inference request, a set of candidate hypotheses containing at least one candidate hypothesis is first generated, and a corresponding verification cost is determined for each candidate hypothesis, thereby providing a clear object and cost reference for the subsequent allocation of inference resources. Furthermore, for each candidate hypothesis, the hypothesis value density is calculated based on information gain, decision influence factor, and verification cost, establishing a unified comparison benchmark between the decision benefit obtained from verifying the candidate hypothesis and the required verification cost. This allows for an objective measurement of the resource investment value of different candidate hypotheses per unit verification cost. Further, based on the hypothesis value density and verification cost of each candidate hypothesis, an inference mode is configured for each candidate hypothesis and initial inference resources are allocated, ensuring that resource allocation matches actual decision benefits. This avoids over-inference of simple problems, resulting in time delays and cost waste, and also prevents high-risk problems from missing key counterexamples due to insufficient verification resources. The above steps, sequentially providing the object, establishing metrics, and implementing allocation, collectively achieve the rational allocation of intelligent agent inference resources among candidate hypotheses. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of an application environment for an agent reasoning path selection and resource scheduling method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating an agent reasoning path selection and resource scheduling method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a device for intelligent agent reasoning path selection and resource scheduling in one embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device according to one embodiment of the present invention; Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] The agent inference path selection and resource scheduling method provided in this invention can be applied to, for example... Figure 1In this application environment, the client communicates with the server via a network. The server can receive inference requests from the client and generate a set of candidate hypotheses containing at least one candidate hypothesis, each candidate hypothesis having a corresponding verification cost. For each candidate hypothesis in the set, the server determines its hypothesis value density based on its information gain, decision influence factor, and verification cost. Based on the hypothesis value densities and verification costs, the server configures inference modes and allocates initial inference resources for each candidate hypothesis in the set. The server performs verification processing according to the configured inference modes and allocated initial inference resources, obtains the inference conclusion, and feeds it back to the client. In this invention, for the agent inference resource scheduling problem, inference complexity routing is achieved using hypothesis value density. This allows for differentiated resource allocation based on the reduction in decision uncertainty per unit verification cost for each candidate hypothesis, effectively reducing over-inference for simple problems and under-verification for complex problems, thus improving overall inference efficiency and decision accuracy. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The present invention will now be described in detail through specific embodiments.
[0014] Please see Figure 2 , Figure 2 This is a flowchart illustrating the intelligent agent reasoning path selection and resource scheduling method provided in this embodiment of the invention. This method can be applied to reasoning resource scheduling for large language model intelligent agents in scenarios such as fault diagnosis, information verification, and decision support. Further, a large language model is a deep neural network model trained on massive amounts of text data, capable of generating output text that conforms to semantic logic based on input text. Further, an intelligent agent refers to a computer system capable of autonomously reasoning based on perceptual information in a given environment and calling external tools to complete tasks. A large language model intelligent agent refers to an intelligent agent that uses a large language model as its core for reasoning and decision-making. This embodiment of the invention calculates the hypothesis value density for candidate hypotheses and configures reasoning modes and allocates initial reasoning resources for each candidate hypothesis based on the hypothesis value density and verification cost, achieving a balance between reasoning complexity and resource consumption by using the decision uncertainty that can be reduced per unit verification cost as the basis for resource allocation. Specifically, the method includes the following steps: S1, in response to the received inference request, generates a set of candidate hypotheses containing at least one candidate hypothesis, each candidate hypothesis having a corresponding verification cost.
[0015] In specific implementation, in response to a received inference request, a set of candidate hypotheses containing at least one candidate hypothesis is generated, each candidate hypothesis having a corresponding verification cost. The inference request can originate from a user-inputted phenomenon, a fault to be diagnosed, or a decision problem, or it can originate from a task instruction issued by an upper-layer application; this invention does not specifically limit this. The inference request may carry information such as a problem description, contextual information, constraints, and a list of available tools. Further, upon receiving the inference request, one or more candidate hypotheses are generated based on the domain knowledge, historical cases, or internal model knowledge involved in the inference request. A candidate hypothesis is a proposition used to explain the phenomenon to be explained in the inference request or to provide possible decision options. Each candidate hypothesis has a corresponding verification cost. The verification cost represents the amount of resources required to verify the candidate hypothesis. Further, the verification cost may include at least one of tool costs, execution latency, and failure retry costs. Tool costs refer to the cost-based resources required to call the verification tool corresponding to the candidate hypothesis, such as the interface call cost for calling a database monitoring interface. Further, execution latency refers to the time delay between initiating a tool call and obtaining the tool's return result. The cost of retrying after a failure refers to the additional resources consumed when a verification operation fails or the result is unreliable, and the verification operation is re-executed.
[0016] For example, in a production fault diagnosis scenario, candidate hypotheses could include database connection pool exhaustion, downstream interface timeout, and code deadlock. The verification cost of the database connection pool exhaustion hypothesis could include the cost of calling database monitoring tools and the time spent waiting for monitoring results; the verification cost of the downstream interface timeout hypothesis could include the cost of calling interface performance monitoring tools; and the verification cost of the code deadlock hypothesis could include the time and computational overhead of obtaining and analyzing thread dumps. Furthermore, candidate hypotheses can have mutually exclusive, inclusive, or prerequisite relationships. A mutually exclusive relationship means that two hypotheses cannot be true simultaneously; for example, database connection pool exhaustion and code deadlock might be mutually exclusive at the same time. An inclusive relationship means that the validity of one hypothesis includes the validity of another. A prerequisite relationship means that verifying one hypothesis requires verifying another. Furthermore, each candidate hypothesis in the candidate hypothesis set can record a hypothesis identifier, the phenomenon to be explained, prior probability, supporting evidence, counterexamples, a set of verification tools, expected verification cost, loss from incorrect decisions, and scope of application. The hypothesis identifier is used to uniquely identify the candidate hypothesis. The phenomenon to be explained is the phenomenon or problem that the candidate hypothesis attempts to explain. Prior probability is an estimate of the probability of a candidate hypothesis being true based on historical experience or model knowledge before this verification is performed. Supporting evidence consists of confirmed facts or data that support the candidate hypothesis. Counterexamples are confirmed or pending evidence or scenarios that contradict or may refute the candidate hypothesis. The verification toolset is a list of tools that can be used to verify the candidate hypothesis. The estimated verification cost is the estimated value of the resources required to verify the candidate hypothesis. The loss from an incorrect decision is the potential business loss or security risk that may result if the candidate hypothesis is misjudged. The scope of application is the range of conditions under which the candidate hypothesis is true. After generating the candidate hypothesis set, this set serves as input data for subsequent calculations of hypothesis value density.
[0017] S2, for each candidate hypothesis in the candidate hypothesis set, determine the hypothesis value density of the candidate hypothesis based on the information gain, decision influence factor and verification cost corresponding to the candidate hypothesis.
[0018] In specific implementation, for each candidate hypothesis in the candidate hypothesis set, the hypothesis value density of the candidate hypothesis is determined based on the information gain, decision impact factor, and verification cost corresponding to the candidate hypothesis. Information gain refers to the expected reduction in uncertainty of the final decision after verifying or rejecting the candidate hypothesis. The larger the information gain, the more effectively verifying the hypothesis can help distinguish the correct conclusion. Further, information gain can be estimated based on the prior probability of the candidate hypothesis, the reliability of supporting evidence, and the correlation between hypotheses. Further, the decision impact factor is used to reflect the actual impact of the candidate hypothesis on the final decision. When a candidate hypothesis involves irreversible operations, security risks, or high business losses, the decision impact factor of the candidate hypothesis can be increased; when there is already sufficient highly credible evidence to support the current conclusion, the information gain corresponding to new verification can be decreased. Irreversible operations refer to operations that cannot be undone or have extremely high recovery costs once executed. Security risks refer to security threats that verification or decision-making may introduce. Business losses refer to business revenue losses or user trust losses that may result from incorrect decisions. Verification cost is the corresponding verification cost obtained from the candidate hypothesis object. Furthermore, based on the correlation between information gain, decision influence factors, and verification costs, the hypothesis value density of the candidate hypothesis is determined. Hypothesis value density measures the degree of decision uncertainty that the candidate hypothesis can reduce per unit verification cost. A higher hypothesis value density indicates a greater decision benefit obtained by investing the same verification resources. The above calculation process is performed for each candidate hypothesis in the candidate hypothesis set to obtain the hypothesis value density corresponding to each candidate hypothesis. The hypothesis value density generated in this step serves as the basis for subsequent configuration of inference patterns and allocation of initial inference resources.
[0019] In some preferred embodiments, determining the hypothesis value density of each candidate hypothesis in the candidate hypothesis set based on the information gain, decision influence factor, and verification cost corresponding to the candidate hypothesis includes: obtaining the information gain, decision influence factor, tool cost, execution latency, and failure retry cost corresponding to the candidate hypothesis; determining the expected benefit of the candidate hypothesis based on the information gain and the decision influence factor; determining the total verification cost of the candidate hypothesis based on the tool cost, the execution latency, and the failure retry cost; and determining the hypothesis value density of the candidate hypothesis based on the correlation between the expected benefit and the total verification cost.
[0020] In practice, the information gain, decision impact factor, tool cost, execution latency, and failure retry cost corresponding to the candidate hypothesis are obtained. Information gain can be obtained from the candidate hypothesis object; this information gain is an estimate of the reduction in uncertainty after the hypothesis is verified based on existing evidence when generating the candidate hypothesis. Information gain can be estimated based on the change in information entropy in information theory. Information entropy is an indicator of uncertainty; a higher entropy value indicates higher uncertainty. Before the candidate hypothesis is verified, the information entropy of the current decision is the first entropy value; after the hypothesis is verified, the information entropy of the decision is expected to decrease to the second entropy value, and the difference between the first and second entropy values is the information gain. The estimation of information gain can be combined with the prior probability of the candidate hypothesis and the reliability of the verification tool. Furthermore, the decision impact factor is an amplification coefficient set according to the magnitude of irreversible operations, security risks, or business losses involved in the candidate hypothesis. Tool cost refers to the cost-based resources required to call the verification tool corresponding to the candidate hypothesis. Tool cost can be obtained from the tool metadata corresponding to the set of verification tools for the candidate hypothesis. Execution latency refers to the time delay between initiating a tool call and obtaining the tool's return result. Execution latency can be estimated based on the tool's historical response time statistics or latency metrics in the service level agreement. Retry cost refers to the additional resources consumed when re-executing a verification operation if it fails or the result is unreliable. Retry cost can be estimated based on historical failure probabilities and the cost per retry. Historical failure probabilities can be obtained from the tool's historical call records. Once these parameters are obtained, they are used as input data for subsequent calculations of expected benefits and total verification costs.
[0021] Further, the expected return of the candidate hypothesis is determined based on the information gain and the decision impact factor. The expected return characterizes the magnitude of the decision-level benefit that verifying the candidate hypothesis can bring. Information gain reflects the degree to which verifying the hypothesis contributes to reducing decision uncertainty, while the decision impact factor reflects the actual weight of the hypothesis's influence on the final decision. Multiplying the information gain by the decision impact factor yields the expected return. When the decision impact factor involved in the candidate hypothesis is large, even with the same information gain, the expected return of the candidate hypothesis is higher. For example, a high-impact hypothesis involving security risks, even with a moderate information gain, may still have a higher expected return than a low-impact, ordinary hypothesis. The expected return serves as the numerator in calculating the hypothesis value density.
[0022] Further, the total verification cost of the candidate hypothesis is determined based on the tool cost, the execution latency, and the failure retry cost. The total verification cost characterizes the combined cost of various resources required to verify the candidate hypothesis. The total verification cost is obtained by summing the tool cost, the execution latency-converted cost, and the failure retry cost. The execution latency can be converted into a cost unit based on the unit time cost so that it can be added to the tool cost on the same scale. The unit time cost can be preset according to the business's response time requirements. The failure retry cost can be estimated based on historical failure probabilities and single retry costs and then directly included. The total verification cost serves as the denominator in the calculation of the hypothesis value density.
[0023] Further, the hypothesis value density of the candidate hypothesis is determined based on the correlation between the expected return and the total verification cost. This correlation can be the expected return divided by the total verification cost, as shown in the expression above. Dividing the expected return of each candidate hypothesis by the total verification cost yields the hypothesis value density of that candidate hypothesis. This hypothesis value density serves as input data for subsequent configuration of the inference mode and allocation of initial inference resources. In parallel exploration mode, after each round of tool execution, the information gain and verification cost are updated based on the actual evidence gain and failure cost of that round, and the hypothesis value density is recalculated.
[0024] Specifically, in this embodiment, the expression for calculating value density is assumed to be: ValueDensity h = InformationGain h × DecisionImpact h / (ToolCost h +Delay h + FailureCost h ); Among them, ValueDensity h InformationGain represents the hypothesis value density of the h-th candidate hypothesis. h represents the information gain corresponding to the h-th candidate hypothesis, i.e., the expected reduction in uncertainty of the final decision after verifying or rejecting the candidate hypothesis; DecisionImpact h ToolCost represents the decision impact factor corresponding to the h-th candidate hypothesis, i.e., the weight coefficient of the actual impact of this candidate hypothesis on the final decision; h Delay represents the instrument cost corresponding to the h-th candidate hypothesis; h FailureCost represents the execution latency corresponding to the h-th candidate hypothesis. hThis represents the failure retry cost corresponding to the h-th candidate hypothesis. The numerator of this expression is the expected revenue, and the denominator is the total verification cost. Overall, it represents the expected decision revenue that can be obtained per unit of verification cost.
[0025] It should be noted that tool costs, execution latency, and failure retry costs can be standardized or normalized using preset conversion rules. For example, execution latency can be converted into a cost dimension based on unit time cost, and failure retry costs can be converted into a cost dimension based on historical failure probabilities and single retry costs before summing them. Furthermore, the three types of costs can be mapped to dimensionless cost scores, and the sum of the scores can be used as the total verification cost. Through the above processing, the total verification cost can be kept consistent in terms of dimensions, avoiding distortion in the calculation of hypothesis value density due to different units, and improving the accuracy and reliability of value density comparisons between different candidate hypotheses.
[0026] This embodiment incorporates information gain, decision impact factors, tool costs, execution latency, and failure retry costs into a unified value density calculation framework, making the hypothesis value density more closely resemble the benefit-cost relationship in real-world inference environments. Furthermore, the expected benefits consider the actual impact weight of the verification results on the decision, and the total verification cost integrates expenses, latency, and failure costs, thus avoiding the one-sidedness of resource scheduling based solely on information gain or tool costs. Moreover, this calculation method makes subsequent routing and resource allocation more objective, reducing inappropriate resource investment due to cost estimation biases and improving overall budget utilization.
[0027] S3, based on the value density of each hypothesis in the candidate hypothesis set and the verification cost of each hypothesis, configure the inference mode and allocate initial inference resources for each candidate hypothesis in the candidate hypothesis set.
[0028] In specific implementation, based on the value density of each hypothesis in the candidate hypothesis set and the verification cost of each hypothesis, an inference mode is configured and initial inference resources are allocated for each candidate hypothesis. The hypothesis value density and verification cost of each candidate hypothesis are jointly compared to determine the appropriate inference mode for each candidate hypothesis. Further, the inference modes may include a direct response mode, a single-path verification mode, a parallel exploration mode, and a deferred processing mode. The direct response mode is used to output an answer directly without invoking tools or based solely on existing knowledge; the single-path verification mode is used to perform tool verification through a single inference path; the parallel exploration mode is used to perform tool verification in parallel through multiple inference paths; and the deferred processing mode is used to temporarily suspend the verification of candidate hypotheses. Different inference modes are selected for different candidate hypotheses based on their hypothesis value density and verification cost. For example, candidate hypotheses with high value density and low verification cost are suitable for a single-path verification mode to complete verification quickly with low resource consumption; candidate hypotheses with high value density and high verification cost are suitable for a parallel exploration mode to ensure the reliability of verification with sufficient parallel resources; candidate hypotheses with low value density and low verification cost are suitable for a direct response or pruning mode to avoid unnecessary tool calls; and candidate hypotheses with low value density and high verification cost are suitable for a deferred processing mode to prevent inefficient verification from wasting resources.
[0029] Furthermore, initial inference resources are allocated to each candidate hypothesis based on its hypothesis value density. These initial inference resources may include at least one of the following: token budget, tool call count, cost limit, and allowed latency. The token budget refers to the maximum number of tokens that can be used during the large language model inference process. The tool call count refers to the maximum number of times external tools can be called during the verification operation. The cost limit refers to the maximum cost that can be consumed during the verification operation. The allowed latency refers to the maximum execution time allowed for the verification operation. Furthermore, high-value-density candidate hypotheses receive more initial inference resources, high-risk counterexamples retain the minimum verification cost, and low-value-density candidate hypotheses receive fewer or zero initial resources. The allocated initial inference resources serve as the resource basis for subsequent tool verification. After completing the inference mode configuration and initial inference resource allocation, the inference path and resource limit for each candidate hypothesis are determined, and subsequent verification processes can be executed accordingly.
[0030] This embodiment introduces the hypothesis value density metric to quantify both validation benefits and costs. This allows inference path selection to move beyond fixed rules or superficial problem features, focusing instead on the actual reduction in uncertainty of the final decision per unit cost for each candidate hypothesis. This approach reduces over-reasoning on simple problems, avoids increased latency and costs associated with long-chain inference, and provides sufficient validation resources for high-risk problems, preventing the omission of critical counterexamples due to short-path responses. Furthermore, the joint routing of candidate hypothesis value density calculation and validation costs ensures resource allocation matches inference complexity, thereby optimizing overall average tool calls, total task cost, decision accuracy, critical counterexample omission rate, low-value branch budget allocation, average response time, and budget utilization.
[0031] In some preferred embodiments, configuring an inference mode for each candidate hypothesis in the candidate hypothesis set based on the hypothesis value density and the verification cost includes: obtaining the hypothesis value density and the verification cost of the candidate hypothesis; if the hypothesis value density is higher than a first preset density threshold and the verification cost is lower than a first preset cost threshold, then configuring the inference mode of the candidate hypothesis as a single-path verification mode, wherein the single-path verification mode is used to perform tool verification through a single inference path; if the hypothesis value density is higher than the first preset density threshold and the verification cost is higher than the first preset cost threshold, then configuring the inference mode of the candidate hypothesis as a single-path verification mode. The reasoning mode is configured as a parallel exploration mode, which is used to execute tool verification in parallel through multiple inference paths; if the hypothesis value density is lower than the first preset density threshold and the verification cost is lower than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a direct answer or pruning mode, which is used to directly output an answer and disclose uncertainty or eliminate the candidate hypothesis; if the hypothesis value density is lower than the first preset density threshold and the verification cost is higher than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a deferred processing mode, which is used to temporarily suspend the verification of the candidate hypothesis.
[0032] In specific implementation, this embodiment divides candidate hypotheses into four regions based on their value density and verification cost by setting a first preset density threshold and a first preset cost threshold. These regions correspond to single-path verification mode, parallel exploration mode, direct response or pruning mode, and deferred processing mode, respectively, achieving differentiated automatic routing based on inference complexity. This four-quadrant judgment method allows different candidate hypotheses to obtain the most suitable verification strategy based on their own benefit-cost characteristics, avoiding the application of a uniform inference depth to all hypotheses. The specific implementation method is as follows: The hypothesis value density and verification cost of the candidate hypotheses are obtained. The hypothesis value density is the hypothesis value density of each candidate hypothesis calculated above. The verification cost is the verification cost corresponding to the candidate hypothesis. The obtained hypothesis value density is compared with a first preset density threshold, and the verification cost is compared with a first preset cost threshold. The first preset density threshold is used to classify the hypothesis value density as high or low, and the first preset cost threshold is used to classify the verification cost as high or low. These two thresholds can be preset or dynamically adjusted according to the task type, available budget, and deadline, and are not specifically limited in this invention. Available budget refers to the total amount of resources that the current task can consume. Deadline refers to the time limit that the task must be completed. When the available budget is sufficient and the deadline is lenient, the first preset density threshold and the first preset cost threshold can be appropriately lowered to allow more candidate hypotheses to enter the verification process; when the available budget is tight or the deadline is urgent, the first preset density threshold and the first preset cost threshold can be appropriately increased to retain only high-value and low-cost candidate hypotheses for verification.
[0033] Furthermore, if the hypothesis value density is higher than the first preset density threshold and the verification cost is lower than the first preset cost threshold, then the inference mode of the candidate hypothesis is configured as a single-path verification mode. The single-path verification mode is used to execute tool verification through a single inference path. In this mode, the candidate hypothesis has a high unit cost decision benefit and a low verification cost, and can be quickly verified through a single inference path, achieving a high decision benefit with low resource consumption. A single inference path refers to using only one sequence of verification tools corresponding to a candidate hypothesis to perform verification sequentially, without generating parallel branches. For example, a hypothesis with a low verification cost and a significant impact on fault isolation can be directly verified by calling a single tool. After this branch is configured, the single-path verification mode is used as the inference mode result of the candidate hypothesis for subsequent execution of the corresponding verification process.
[0034] Furthermore, if the hypothesis value density is higher than the first preset density threshold and the verification cost is higher than the first preset cost threshold, then the inference mode of the candidate hypothesis is configured as a parallel exploration mode. The parallel exploration mode is used to execute tool verification in parallel through multiple inference paths. In this mode, candidate hypotheses have high unit cost decision benefits but high verification costs, requiring the investment of multiple parallel branches to diversify verification risks and improve verification efficiency. For example, the database connection pool exhaustion hypothesis, although having high verification costs, has the greatest impact on fault isolation decisions; it can be configured as a parallel exploration mode to obtain more tool budget. The parallel exploration mode can also be combined with a budget scheduler for dynamic resource reclamation and reallocation.
[0035] Furthermore, if the hypothesis value density is lower than the first preset density threshold and the verification cost is lower than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as either a direct response or a pruning mode. The direct response or pruning mode is used to directly output an answer and disclose uncertainty or eliminate the candidate hypothesis. In this mode, the unit cost decision benefit of the candidate hypothesis is low, and the verification cost is also low, limiting the benefit of continuing tool verification. An answer can be directly output based on existing knowledge, disclosing uncertainty in the answer; or the candidate hypothesis can be removed from the candidate hypothesis set, and no further verification resources can be allocated to it. Disclosing uncertainty means simultaneously stating the confidence level and potential risks of the answer when outputting it. This branch configuration can reduce the resource consumption of low-value hypotheses.
[0036] Furthermore, if the hypothesis value density is lower than the first preset density threshold and the verification cost is higher than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a deferred processing mode. The deferred processing mode is used to temporarily suspend the verification of the candidate hypothesis. In this mode, the unit cost decision benefit of the candidate hypothesis is low and the verification cost is high, making immediate verification uneconomical. The candidate hypothesis can be deferred, waiting for other high-value hypotheses to be verified, and then a decision on whether to reactivate it can be made based on the remaining budget and remaining uncertainty. The deferred processing mode avoids high-cost, low-value hypotheses crowding out effective verification resources when resources are scarce. Upon reactivation, the hypothesis value density of the candidate hypothesis can be recalculated, and a decision on whether to include it in verification can be made based on the updated result.
[0037] This embodiment achieves differentiated automatic configuration of inference modes through a four-quadrant judgment of value density and verification cost. High-value, low-cost hypotheses are verified quickly using a single path to obtain deterministic benefits with minimal resources; high-value, high-cost hypotheses are explored in parallel to ensure the reliability of key decisions with sufficient parallel resources; low-value, low-cost hypotheses are answered directly or pruned to avoid unnecessary tool calls; low-value, high-cost hypotheses are deferred to prevent inefficient verification and wasted resources. Furthermore, this routing method matches the inference complexity with the actual value of candidate hypotheses, effectively controlling the total task cost and average response time while ensuring decision accuracy.
[0038] In some preferred embodiments, the method further includes: obtaining candidate hypotheses configured for the parallel exploration mode from the candidate hypothesis set; generating corresponding inference branches based on the initial inference resources for the obtained candidate hypotheses and performing tool verification in parallel on the inference branches, and isolating unverified data between the inference branches; measuring the actual evidence gain and failure cost generated in each round of tool verification after each round of execution, and recovering the remaining inference resources of the inference branches below a preset gain threshold based on the actual evidence gain; determining whether a preset shared stopping condition is met; and if the shared stopping condition is met, merging the data from each inference branch. The verification data of the inference branch generates and outputs the inference conclusion and remaining uncertainty; if the shared stopping condition is not met, for the acquired candidate hypothesis, the information gain of the candidate hypothesis is updated based on the actual evidence gain generated in this round, and the verification cost of the candidate hypothesis is updated based on the failure cost generated in this round; based on the updated information gain and the updated verification cost, the hypothesis value density of the candidate hypothesis is re-determined; according to the re-determined hypothesis value density of each candidate hypothesis, the recovered remaining inference resources are redistributed to each of the inference branches, and the step of parallel execution of tool verification on the inference branch is returned.
[0039] In its implementation, this embodiment provides a closed-loop mechanism for dynamic scheduling of parallel branches. This mechanism forms a complete closed loop of resource flow from inefficient branches to efficient branches by establishing a total budget account, allocating the initial budget according to value density, measuring actual evidence gain and failure costs after each round of tool execution, reclaiming remaining resources from low-gain branches, reallocating reclaimed resources based on the updated value density, and determining whether to merge based on shared stopping conditions. This mechanism solves the problem of low-value branches continuously consuming tool calls due to the average budget allocation in existing parallel inference methods. The specific implementation is as follows: Candidate hypotheses configured for the parallel exploration mode are obtained from the candidate hypothesis set. These candidate hypotheses are those identified during routing decisions as having high hypothesis value density and high verification cost. The obtained candidate hypotheses serve as the execution targets for parallel exploration, and their corresponding initial inference resources have been allocated.
[0040] Furthermore, a total budget account is established for the parallel exploration task. This account includes a token budget, tool invocation counts, estimated costs, and allowed latency. The token budget refers to the maximum number of tokens that can be used during the large language model inference process. The tool invocation count refers to the maximum number of times external tools can be invoked during verification operations. The estimated costs are the pre-allocated budget for completing the task. Allowed latency is the maximum allowed execution time for the task. The total budget account serves as the source of the total initial budget allocation for subsequent allocations to candidate hypotheses based on value density. Initial budgets are allocated to candidate hypotheses based on value density, with a minimum verification allowance reserved for high-risk counterexamples. High-risk counterexamples are evidence or scenarios that could overturn key hypotheses and, if overlooked, would result in significant decision-making losses. The minimum verification allowance is the minimum amount of resources reserved for candidate hypotheses even if their value density is low, to ensure that high-risk counterexamples receive the necessary verification.
[0041] Furthermore, for the acquired candidate hypotheses, corresponding inference branches are generated based on the initial inference resources, and tool verification is performed in parallel on these branches. Unverified data between the inference branches is also isolated. Each inference branch corresponds to a candidate hypothesis. On this branch, the corresponding verification tool is invoked to perform the verification operation and collect the verification results. Parallel execution means that multiple inference branches invoke tools simultaneously within the same time window, rather than strictly sequentially. Furthermore, different inference branches are isolated at the data plane and resource plane. Data plane isolation means that each inference branch has an independent evidence set and inference record; unverified branch conclusions cannot be directly written into the evidence set of other branches. Resource plane isolation means that each inference branch has an independent budget account. This isolation method prevents unverified speculations generated by one branch from being cited as facts by other branches.
[0042] Further, after each round of the tool's verification, the actual evidence gain and failure cost generated in this round are measured, and based on the actual evidence gain, the remaining inference resources of the inference branches that are below a preset gain threshold are recovered. Further, the actual evidence gain refers to the actual reduction in the posterior probability of the candidate hypothesis or the uncertainty of the decision generated by this round of verification. The failure cost refers to the additional resources actually consumed by failures, retries, or invalid calls during this round of verification. Further, the actual evidence gain of each inference branch is compared with the preset gain threshold. The preset gain threshold is a pre-set minimum effective evidence gain value. For inference branches whose actual evidence gain is below the preset gain threshold, it indicates that the marginal benefit of continuing to verify this branch is too low, and the remaining inference resources of this branch at the end of the current round are recovered. The recovered remaining inference resources are transferred to the global reallocation pool for subsequent reallocation to high-value branches. Further, for inference branches whose actual evidence gain is not lower than the preset gain threshold, their current remaining inference resources are retained and carried over to the resource account corresponding to this branch for the next round of verification.
[0043] Further, it is determined whether preset shared stopping conditions are met. Shared stopping conditions are used to determine whether parallel exploration has achieved sufficient decision discrimination and whether the remaining risk has been reduced to an acceptable range. Shared stopping conditions may include a difference in posterior confidence of key hypotheses greater than or equal to a first preset threshold and a remaining counterexample risk less than or equal to a second preset threshold, or the highest hypothesis value density among the current candidate hypotheses less than or equal to a third preset threshold. Further, the difference in posterior confidence of key hypotheses refers to the gap in posterior confidence between different key candidate hypotheses. The remaining counterexample risk refers to the level of risk that currently unresolved counterexamples may pose to the final decision. Posterior confidence is an estimate of the probability of a candidate hypothesis being true under the current evidence conditions.
[0044] Further, if the shared stopping condition is met, the verification data of each inference branch are merged to generate and output the inference conclusion and residual uncertainty. Verification data includes supporting evidence and counterexamples collected by each inference branch during the execution tool verification process. The verification data of each branch are summarized and analyzed for consistency to determine the final inference conclusion. Residual uncertainty is used to disclose the degree of uncertainty that remains unresolved after merging. Specifically, after the shared stopping condition is met, the verification evidence in the independent evidence sets of each inference branch can be merged, and conflict detection and consistency verification are performed on the supporting evidence and counterexamples of each candidate hypothesis. If the same fact has contradictory verification results in different branches, the acceptance priority is determined according to the reliability weight of the verification tool or the order of verification time. Based on the merged evidence set, the posterior confidence of each candidate hypothesis is updated, and the candidate hypothesis with the highest posterior confidence and meeting the preset confidence requirements is selected as the final inference conclusion. Further, the residual uncertainty is calculated uniformly in the following way. For each candidate hypothesis, the information entropy is calculated based on the posterior probability distribution of the candidate hypothesis under the current evidence conditions; the larger the information entropy, the higher the uncertainty of the candidate hypothesis. Simultaneously, it iterates through the globally shared region for propositions yet to be verified or refuted by any inference branch using tools. For each proposition, its probability of being true in the prior sense is multiplied by the loss from the incorrect decision if it were true; the result is used as the residual risk contribution of that proposition. If the proposition is only related to a candidate hypothesis, its risk contribution is directly included in the residual uncertainty of that candidate hypothesis; if the proposition is related to multiple candidate hypotheses, it is allocated according to the prior probability or influence weight of each candidate hypothesis. The residual uncertainty of a candidate hypothesis is the sum of its information entropy and the risk contributions of the propositions associated with that candidate hypothesis. Finally, after outputting the inference conclusion and the residual uncertainty, this round of parallel exploration ends.
[0045] If the shared stopping condition is not met, for the acquired candidate hypothesis, the information gain of the candidate hypothesis is updated based on the actual evidence gain generated in this round, and the verification cost of the candidate hypothesis is updated based on the failure cost generated in this round. The updated information gain reflects the actual reduction in remaining uncertainty after this round of verification. The updated verification cost reflects the actual resource consumption, including retrying after failure. Specifically, after each round of tool verification, for branches that do not meet the shared stopping condition, the original information gain estimate can be corrected based on the evidence gain actually observed in this round. The original information gain is the amount of uncertainty reduction predicted before this round of verification based on the prior probability of the candidate hypothesis and the reliability of the verification tool. After this round of verification, the actual evidence gain reflects the actual reduction in uncertainty obtained by the branch under the current evidence conditions. At this time, the actual evidence gain of this round can be used as the amount of remaining uncertainty reduction of the candidate hypothesis, and the realized part can be subtracted from the original information gain to obtain the updated information gain; alternatively, the difference in actual information entropy between the posterior distribution after this round of verification and the original posterior distribution can be used to replace the original information gain. The updated information gain is used to recalculate the hypothesis value density in the next round, thus reflecting the marginal benefit of continuing to validate the candidate hypothesis in the remaining unvalidated space. Furthermore, for validation costs, the actual failure costs incurred in this round are included in the historical validation costs of the candidate hypothesis. The updated validation cost is the sum of the original validation costs and the failure costs of this round. Additionally, the actual tool costs and execution delays consumed in this round can be included according to a preset discounting rule. The updated validation cost reflects the actual accumulated resource consumption of the candidate hypothesis during the validation process and is used for the next round of value density calculation, making resource reallocation more closely aligned with actual execution conditions.
[0046] Further, based on the updated information gain and the updated verification cost, the hypothesis value density of the candidate hypotheses is re-determined. The calculation method for re-determining the hypothesis value density is the same as the aforementioned value density calculation method, but the input parameters are the updated information gain and verification cost. Then, according to the re-determined hypothesis value density of each candidate hypothesis, the recovered remaining inference resources are reallocated to each inference branch, and the step of parallel execution of tool verification on the inference branch is returned to proceed to the next round of verification.
[0047] This embodiment constructs a dynamic scheduling closed loop for parallel branches, enabling inference resources to be dynamically adjusted based on the actual evidence gain and failure cost of each round of verification. Low-gain branches are promptly depleted of resources and stopped, while high-value branches receive more resources to continue verification, avoiding the problem of low-value branches continuously consuming tool calls due to an evenly distributed budget. Furthermore, the isolation of unverified data between branches prevents evidence contamination. The shared stopping condition ensures that parallel explorations converge in a timely manner when decision discrimination is sufficient and remaining risk is controllable, avoiding over-verification. This closed-loop scheduling mechanism can significantly improve budget utilization, reduce the budget proportion of low-value branches, reduce the omission rate of key counterexamples, and improve the accuracy of the final decision.
[0048] In some preferred embodiments, isolating unverified data between the various inference branches includes: for each acquired candidate hypothesis, performing a verification operation in the tool verification to generate verification evidence containing tool call records and inference records, and storing the verification evidence in an independent evidence set corresponding to the tool verification; storing the remaining inference resources corresponding to the tool verification in an independent resource account; marking unverified intermediate conclusions generated by the tool verification during the execution of the verification operation as propositions to be verified, writing the propositions to be verified to a global shared area, and prohibiting the writing of the propositions to be verified to other independent evidence sets of the tool verification.
[0049] In practical implementation, this embodiment achieves dual isolation between parallel inference branches in terms of both the data plane and the resource plane by setting up an independent evidence set and resource account for each inference branch and marking unverified intermediate conclusions as propositions to be verified in a globally shared area. This isolation mechanism prevents unverified speculations generated by one branch from being cited as facts by other branches, thereby avoiding evidence contamination. The specific implementation method is as follows: For each candidate hypothesis obtained, a verification operation is performed in the tool verification process to generate verification evidence containing tool call records and inference records. This verification evidence is then stored in an independent evidence set corresponding to the tool verification. A verification operation refers to the process of calling the verification tool corresponding to the candidate hypothesis and obtaining the returned results. The tool call record records which tools were called by the branch, the parameters of each tool, the returned results, the call time, and the return time. The inference record records the inference chain from the initial hypothesis, based on the tool's returned results, to arrive at the current conclusion. Verification evidence is the facts or data confirmed after tool verification, serving as a reliable basis for supporting the conclusion of the branch. The verification evidence is stored in the independent evidence set corresponding to the branch. This independent evidence set is only visible to the inference branch; other inference branches cannot directly read or write to it. The independent evidence set can be implemented using a set type in data structures, such as a hash table or associative array, with the candidate hypothesis identifier as the key and the verification evidence list as the value.
[0050] Furthermore, the remaining inference resources corresponding to the tool verification are stored in a separate resource account. Remaining inference resources refer to the token budget, tool call counts, cost limits, or allowed latency that the inference branch has not yet consumed after the current round. A separate resource account is maintained for each inference branch, used to record the branch's resource balance and resource consumption history. The resource balance refers to the total amount of resources currently available to the branch. The resource consumption history is a detailed record of the resources consumed by each tool call in the branch. The resource accounts of different inference branches are independent of each other; one branch cannot directly use the resources of another branch. This independent setting of resource accounts ensures isolation between inference branches at the resource level.
[0051] Furthermore, unverified intermediate conclusions generated during the verification process are marked as unverified propositions and written to the global shared area. Writing these unverified propositions to the independent evidence set of other tools is prohibited. An unverified intermediate conclusion refers to a proposition formed by a reasoning branch based on partial evidence or a model during the reasoning process, which has not yet been verified by the tool. For example, a branch might speculate about a timeout issue in a service based on log fragments, but this speculation has not yet been confirmed by calling an interface monitoring tool; this speculation is an unverified intermediate conclusion. These unverified intermediate conclusions are marked as unverified propositions and written to the global shared area. An unverified proposition is a statement existing only in propositional form, and its truth value is not yet determined. The global shared area is a data area visible to all reasoning branches, but it only allows the storage of unverified propositions. Other reasoning branches can view these unverified propositions, but cannot write them as confirmed facts into their own independent evidence set. Only when a branch confirms the unverified proposition as true or false through tool verification can the verification result enter the corresponding branch's independent evidence set. For example, if a deadlock branch fails to generate new evidence for two consecutive rounds, it is pruned. Its unverified intermediate conclusions are retained in the global shared area as unverified propositions, and other branches cannot use these unverified propositions as facts for subsequent reasoning.
[0052] This embodiment achieves dual isolation between parallel inference branches in terms of both the data plane and resource plane by independently managing verified evidence, unverified intermediate conclusions, and remaining inference resources. Verified evidence belongs only to its corresponding branch, while unverified speculations can only exist in the global shared area as propositions to be verified and cannot directly enter the evidence sets of other branches. Furthermore, this mechanism effectively prevents evidence contamination, avoiding the misinterpretation of one branch as factual reference by other branches, thereby improving the traceability and reliability of parallel inference results. Furthermore, independent resource accounts make the resource consumption of each branch clear and controllable, providing a data foundation for subsequent resource reclamation and reallocation based on actual evidence gain.
[0053] In some preferred embodiments, the step of recovering the remaining inference resources of the inference branch that are below a preset gain threshold based on the actual evidence gain includes: after each round of execution of the tool verification, calculating the actual evidence gain produced by the verification operation of each inference branch in the current round; determining whether the actual evidence gain of each inference branch is below a preset gain threshold; if the actual evidence gain is below the preset gain threshold, recovering the remaining inference resources of the inference branch after the current round and transferring the recovered remaining inference resources to the global redistribution pool; if the actual evidence gain is not below the preset gain threshold, retaining the current remaining inference resources of the inference branch and transferring the current remaining inference resources of the inference branch to the resource account corresponding to the inference branch.
[0054] In practice, this embodiment calculates the actual evidence gain of each inference branch in each round of verification, promptly recovering the remaining resources of low-gain branches to the global redistribution pool, while high-gain branches retain their resources, thus achieving dynamic resource flow. This recovery criterion allows resources to automatically flow from branches with insufficient marginal returns to branches with higher marginal returns. The specific implementation method is as follows: After each round of verification by the tool, the actual evidence gain produced by the verification operation of each inference branch in the current round is statistically analyzed. The actual evidence gain can be obtained by comparing the change in the posterior probability or the change in decision uncertainty of the candidate hypothesis corresponding to that inference branch before and after the current round of verification. Further, the posterior probability refers to the estimate of the probability of a candidate hypothesis being true under the existing evidence conditions. For example, in some embodiments, the posterior probability distribution of the candidate hypothesis is recorded before the current round of verification, and a new posterior probability distribution is obtained by Bayesian updating after the tool returns the results in this round. Bayesian updating refers to the method of updating the posterior probability using Bayes' formula based on the new evidence. The difference in information entropy between the two probability distributions can be used as the actual evidence gain. Information entropy is an indicator of uncertainty; a higher entropy value indicates higher uncertainty. The decrease in information entropy after the current round of verification is the actual evidence gain. The statistically obtained actual evidence gain serves as the basis for determining whether to recover resources.
[0055] Further, it is determined whether the actual evidence gain of each inference branch is lower than a preset gain threshold. The preset gain threshold is a pre-set minimum effective evidence gain value. This threshold can be set based on historical verification data, task risk level, and budget flexibility. Historical verification data may include the average evidence gain of each round of verification in similar past tasks. The higher the task risk level, the higher the preset gain threshold can be set to prune inefficient branches earlier and ensure that high-risk branches receive sufficient resources. The higher the budget flexibility, the lower the preset gain threshold can be set to allow more low-gain branches to continue verification, thereby obtaining more sufficient evidence. If the actual evidence gain of an inference branch is lower than the preset gain threshold, it means that the verification operation of this branch in the current round has provided almost no new effective information for the final decision, and the marginal benefit of continuing to invest resources in the next round of verification is extremely low.
[0056] Furthermore, if the actual evidence gain is lower than the preset gain threshold, the remaining inference resources of the inference branch after the current round are reclaimed and transferred to the global reallocation pool. The global reallocation pool is a centralized resource pool maintained to receive reclaimed resources from low-gain branches and to reallocate them when the shared stopping condition is not met in subsequent rounds. After reclamation, the inference branch stops executing tool verification, i.e., it is pruned. The verification evidence already obtained by the pruned branch is still retained in its independent evidence set for final convergence, but its remaining resources are no longer consumed by the branch. The pruning operation ensures that low-value branches no longer occupy resources, and the released resources can flow to high-value branches. For example, if a code deadlock branch does not generate new evidence for two consecutive rounds, its actual evidence gain is lower than the preset gain threshold, and the remaining inference resources of this branch are reclaimed and transferred to the global reallocation pool.
[0057] Furthermore, if the actual evidence gain is not lower than the preset gain threshold, the current remaining inference resources of the inference branch are retained and transferred to the resource account corresponding to the inference branch. The current remaining inference resources refer to the resource balance that the branch has not yet consumed after the current execution round. After the transfer, the branch can continue to use these resources in the next round of tool verification. The branch will not be pruned because it did not meet the recycling conditions in this round and will remain in the active inference branch set. For example, although the database connection pool exhaustion branch has a high verification cost, its actual evidence gain continues to be higher than the preset gain threshold, so resources are retained for continued verification.
[0058] This embodiment uses actual evidence gain as the retrieval criterion to promptly identify and stop inefficient verification branches. Branches with actual evidence gain below a threshold are pruned, and their remaining resources enter the global reallocation pool, preventing low-value branches from continuously consuming tool call budget. Branches with actual evidence gain at or above the threshold retain resources, ensuring that effective verification continues. Furthermore, this retrieval mechanism, in conjunction with subsequent reallocation mechanisms, forms a complete closed loop of resource flow from inefficient to efficient branches, improving overall budget utilization and task execution efficiency while reducing the budget proportion of low-value branches.
[0059] In some preferred embodiments, determining whether a preset sharing stop condition is met includes: obtaining the difference in posterior confidence of key hypotheses and the risk of remaining counterexamples for each inference branch in the candidate hypothesis set; determining whether the difference in posterior confidence of key hypotheses is greater than or equal to a first preset threshold; if the difference in posterior confidence of key hypotheses is greater than or equal to the first preset threshold, further determining whether the risk of remaining counterexamples is less than or equal to a second preset threshold; if the risk of remaining counterexamples is less than or equal to the second preset threshold, determining that the sharing stop condition is met; if the difference in posterior confidence of key hypotheses is less than the first preset threshold, or the risk of remaining counterexamples is greater than the second preset threshold, determining that the sharing stop condition is not met.
[0060] In practice, this embodiment employs a dual-judgment approach, considering both the difference in posterior confidence levels of key hypotheses and the risk of remaining counterexamples. Parallel exploration convergence is triggered when the decision discrimination is sufficient and the remaining risk is controllable. This dual-judgment condition avoids premature or late termination due to relying solely on a fixed number of validation rounds or budget exhaustion. The specific implementation method is as follows: Obtain the key hypothesis posterior confidence difference and residual counterexample risk for each inference branch in the candidate hypothesis set. The key hypothesis posterior confidence difference refers to the gap in posterior confidence between different key candidate hypotheses after synthesizing the verification evidence for each inference branch. Posterior confidence is an estimate of the probability of a candidate hypothesis being true under the current evidence conditions. The larger the key hypothesis posterior confidence difference, the more clearly it can be distinguished which hypothesis is more likely to be true. The residual counterexample risk refers to the level of risk that currently unrejected counterexamples may pose to the final decision. Counterexamples are evidence or scenarios that contradict or may overturn candidate hypotheses. The higher the residual counterexample risk, the greater the likelihood that the final decision will be overturned by overlooked counterexamples. These two indicators can be calculated from the independent evidence set and the current posterior probability distribution for each inference branch. After each round of tool verification, the verification evidence for each inference branch is summarized, the posterior confidence of each key candidate hypothesis is obtained using Bayesian updates, and then the posterior confidence difference is calculated. The risk of remaining counterexamples can be obtained by weighted summation of the prior probabilities of each counterexample in the set of unverified counterexamples and the loss of incorrect decisions.
[0061] Further, it is determined whether the difference in posterior confidence levels of the key hypotheses is greater than or equal to a first preset threshold. The first preset threshold is a preset minimum decision discrimination requirement. If the difference in posterior confidence levels of the key hypotheses is less than the first preset threshold, it indicates that the posterior confidence gap between the key hypotheses is still not large enough, and continued verification may still change the final decision. Therefore, it is determined that the sharing stop condition is not met. In this case, the update and reallocation process for when the stop condition is not met continues.
[0062] Furthermore, if the difference in posterior confidence levels of the key hypotheses is greater than or equal to the first preset threshold, it is further determined whether the remaining counterexample risk is less than or equal to a second preset threshold. The second preset threshold is a preset maximum acceptable level of counterexample risk. If the remaining counterexample risk is less than or equal to the second preset threshold, it indicates that the decision discrimination is sufficient and the remaining counterexample risk has been reduced to an acceptable range, and the shared stopping condition is determined to be met. At this time, the merging and output process when the stopping condition is met is executed.
[0063] Furthermore, if the remaining counterexample risk is greater than the second preset threshold, it indicates that although the distinguishability between the key hypotheses is sufficient, there are still high-risk key counterexamples that have not been effectively eliminated, and further verification is necessary. The sharing stop condition is determined not to be met, and the update and reallocation process for when the stop condition is not met continues.
[0064] Specifically, in this embodiment, the core judgment expression for the shared stopping condition is: Stop = ConfidenceGap ≥ θ1 ∧ ResidualRisk ≤ θ2; In this expression, Stop indicates whether the sharing stop condition is met; ConfidenceGap represents the difference in posterior confidence levels of the key hypotheses; ResidualRisk represents the risk of remaining counterexamples; θ1 is the first preset threshold; θ2 is the second preset threshold; and the symbol ∧ represents a logical AND operation. This expression means that the sharing stop condition is met when the difference in posterior confidence levels of the key hypotheses is greater than or equal to the first preset threshold and the risk of remaining counterexamples is less than or equal to the second preset threshold.
[0065] This embodiment achieves a dual constraint on the stopping condition by first judging the difference in posterior confidence of the key hypothesis and then judging the risk of remaining counterexamples. Parallel exploration only stops and merges when both decision discrimination and remaining risk simultaneously meet the threshold requirements. This approach avoids premature or late stopping caused by relying solely on a fixed number of validation rounds or budget exhaustion. Premature stopping may lead to erroneous conclusions due to insufficient decision discrimination, while late stopping results in wasted resources. This dual-condition judgment mechanism achieves a balance between decision accuracy, key counterexample omission rate, and response time, improving the reliability of conclusions from parallel exploration.
[0066] In some preferred embodiments, the step of reallocating the recovered remaining inference resources to each of the inference branches includes: obtaining the recovered remaining inference resources in the global reallocation pool, and obtaining the hypothesis value density of each candidate hypothesis after redetermination, and the remaining uncertainty of each inference branch; determining whether the hypothesis value density of each candidate hypothesis is higher than a preset density threshold; if the hypothesis value density of the candidate hypothesis is higher than the preset density threshold, then allocating at least a portion of the recovered remaining inference resources to the resource account of the inference branch corresponding to the candidate hypothesis; determining whether the remaining uncertainty of each inference branch is higher than a preset uncertainty threshold; if the remaining uncertainty of the inference branch is higher than the preset uncertainty threshold, then allocating at least a portion of the recovered remaining inference resources to the resource account of the inference branch; and using the amount allocated to the resource account of each inference branch as inference resources for subsequent execution tool verification.
[0067] In practice, this embodiment prioritizes the allocation of recycled resources from the global reallocation pool to inference branches with high value density or high residual uncertainty based on two dimensions: the redefined hypothesis value density and the residual uncertainty of each inference branch. This reallocation strategy ensures that recycled resources flow precisely to the verification directions that are most needed and worthy of continued investment. The specific implementation method is as follows: The remaining inference resources in the global reallocation pool are retrieved, and the hypothesis value density of each candidate hypothesis after redetermining, as well as the remaining uncertainty of each inference branch, are obtained. Retrieved remaining inference resources are resources retrieved from branches with low actual evidence gain and transferred to the global reallocation pool. The redetermined hypothesis value density is a recalculated hypothesis value density based on updating the information gain based on the actual evidence gain of this round and updating the verification cost based on the failure cost. Further, remaining uncertainty refers to the degree of uncertainty of each inference branch that remains unresolved under the latest evidence conditions. After obtaining the above data, they are used as input data for the reallocation decision.
[0068] Determine whether the hypothesis value density of each candidate hypothesis is higher than a preset density threshold. The preset density threshold is used to determine whether the candidate hypothesis still has sufficient unit cost decision benefit. If the hypothesis value density of a candidate hypothesis is higher than the preset density threshold, at least a portion of the recovered remaining inference resources is allocated to the resource account of the inference branch corresponding to the candidate hypothesis. This allocation allows high-value-density branches to obtain more validation resources to continue advancing the validation of key hypotheses. Further, the specific amount allocated can be determined based on the proportion of hypothesis value density among all candidate hypotheses above the threshold. The higher the hypothesis value density, the more allocation is made. After allocation, the resource balance of the corresponding resource account is updated.
[0069] Furthermore, if the value density of the candidate hypothesis is not higher than the preset density threshold, no recovery quota will be allocated to the inference branch corresponding to the candidate hypothesis based on the value density condition. This branch is not eligible for priority in obtaining recovery resources in the value density dimension, but may still obtain resources later due to the high remaining uncertainty.
[0070] Further, it is determined whether the remaining uncertainty of each inference branch exceeds a preset uncertainty threshold. The preset uncertainty threshold is used to determine whether a sufficiently large unresolved space still exists in the inference branch. If the remaining uncertainty of a inference branch exceeds the preset uncertainty threshold, at least a portion of the recovered remaining inference resources is allocated to the resource account of that inference branch. This allocation further ensures that branches with high uncertainty receive resources for continued verification, thereby reducing critical risks. The specific amount allocated can be determined based on the proportion of remaining uncertainty among all inference branches with remaining uncertainty exceeding the threshold. The higher the remaining uncertainty, the larger the allocated amount.
[0071] If the remaining uncertainty of the inference branch is not higher than the preset uncertainty threshold, no recovery quota will be allocated to the inference branch based on the uncertainty condition.
[0072] Furthermore, the allocated resources in the resource accounts of each inference branch are used as inference resources for subsequent tool verification. These newly allocated resources are combined with the existing remaining resources in each branch to form the resources available for the next round of tool verification. After the reallocation is completed, the process returns to the step of performing tool verification in parallel on the inference branches.
[0073] This embodiment allocates recovered resources simultaneously based on two dimensions: the redefined hypothetical value density and the remaining uncertainty. This prioritizes resources for branches with high unit cost decision benefits or high unresolved uncertainty. High-value-density branches receive sufficient resources to verify key hypotheses, while high-uncertainty branches receive resources to mitigate the risk of missing key counterexamples. This allocation mechanism, together with the recovery mechanism, forms a closed loop, ensuring that resources released from inefficient branches are fully utilized by efficient branches. This further improves overall budget utilization, reduces the rate of missing key counterexamples, and enhances the accuracy and reliability of the final decision.
[0074] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0075] The technical solutions of this invention can be applied to fintech and healthcare scenarios. Specific application examples are as follows: In fintech scenarios, after receiving a transaction risk investigation request, the intelligent agent can generate a set of candidate hypotheses containing multiple candidate hypotheses, such as account theft, merchant collusion for cash-out, and normal large-amount user spending. Each candidate hypothesis corresponds to a different verification cost. The account theft hypothesis can be quickly verified through login device fingerprints and frequently used address verification, with a low verification cost; the merchant collusion hypothesis requires calling related transaction graphs and merchant qualification interfaces, with a higher verification cost. For each candidate hypothesis, the hypothesis value density is calculated based on information gain, decision influence factors, and verification cost, with the degree of reduction in risk judgment uncertainty per unit verification cost used as the scheduling criterion. The high-value-density and low-cost account theft hypothesis can be configured in a single-path verification mode for rapid risk confirmation; furthermore, the high-value-density and high-cost merchant collusion hypothesis can be configured in a parallel exploration mode, investing more verification resources; furthermore, low-value-density hypotheses can be directly pruned to reduce ineffective tool calls. Thus, with limited inference resources, the intelligent agent prioritizes the verification of high-risk key hypotheses, avoids over-verification of normal transactions, and improves the efficiency and accuracy of anti-fraud decision-making.
[0076] Furthermore, in healthcare scenarios, after receiving a request for assisted diagnosis, the agent can generate multiple candidate pathological hypotheses, such as infectious diseases, autoimmune diseases, or adverse drug reactions. Different hypotheses correspond to different testing tools and verification costs. Testing tools such as blood routine tests are inexpensive and have short latency, while verification tools such as gene testing or pathological biopsy are costly and time-consuming. By calculating the information gain, decision influence factor, and verification cost of each candidate hypothesis, the hypothesis value density is obtained, and the reduction in diagnostic uncertainty per unit verification cost is used as the basis for resource allocation. High-value-density and low-cost infectious disease hypotheses are rapidly verified using a single path; further, high-value-density and high-cost rare disease hypotheses are explored in parallel, with multiple verification paths configured to proceed simultaneously; further, low-value-density hypotheses are temporarily deferred or pruned. As verification progresses, the remaining inference resources of low-evidence-gain branches are recycled and reallocated to high-uncertainty key hypotheses, thereby avoiding over-examination, preventing the omission of key counterexamples, and improving the reliability of diagnostic conclusions.
[0077] In one embodiment, an agent inference path selection and resource scheduling device is provided, which corresponds one-to-one with the agent inference path selection and resource scheduling method in the above embodiments. For example... Figure 3 As shown, the agent inference path selection and resource scheduling device includes: A generation unit is configured to generate a set of candidate hypotheses containing at least one candidate hypothesis in response to a received inference request, wherein the candidate hypothesis has a corresponding verification cost; The determining unit is configured to, for each candidate hypothesis in the candidate hypothesis set, determine the hypothesis value density of the candidate hypothesis based on the information gain, decision influence factor and verification cost corresponding to the candidate hypothesis; The configuration unit is used to configure inference modes and allocate initial inference resources for each candidate hypothesis in the candidate hypothesis set based on the value density of each hypothesis in the candidate hypothesis set and the verification cost of each hypothesis.
[0078] In some preferred embodiments, the verification cost includes tool costs, execution latency, and failure retry costs. The step of determining the hypothesis value density of each candidate hypothesis in the candidate hypothesis set, based on the information gain, decision influence factor, and verification cost corresponding to the candidate hypothesis, includes: Obtain the information gain, decision impact factor, tool cost, execution latency, and failure retry cost corresponding to the candidate hypothesis; Based on the information gain and the decision influence factor, determine the expected return of the candidate hypothesis; The total verification cost of the candidate hypothesis is determined based on the tool cost, the execution latency, and the failure retry cost. The hypothesis value density of the candidate hypothesis is determined based on the correlation between the expected revenue and the total verification cost.
[0079] In some preferred embodiments, configuring an inference mode for each candidate hypothesis in the candidate hypothesis set based on the value density of each hypothesis in the candidate hypothesis set and the verification cost of each hypothesis includes: Obtain the hypothesis value density of the candidate hypothesis and the verification cost; If the hypothesis value density is higher than the first preset density threshold and the verification cost is lower than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a single-path verification mode, which is used to perform tool verification through a single reasoning path. If the hypothesis value density is higher than the first preset density threshold and the verification cost is higher than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a parallel exploration mode, which is used to perform tool verification in parallel through multiple reasoning paths. If the hypothesis value density is lower than the first preset density threshold and the verification cost is lower than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a direct answer or pruning mode. The direct answer or pruning mode is used to directly output an answer and disclose uncertainty or eliminate the candidate hypothesis. If the hypothesis value density is lower than the first preset density threshold and the verification cost is higher than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a deferred processing mode, which is used to temporarily suspend the verification of the candidate hypothesis.
[0080] In some preferred embodiments, the apparatus further includes an iteration unit, the iteration unit being used to: Retrieve candidate hypotheses configured for the parallel exploration mode from the set of candidate hypotheses; For the acquired candidate hypotheses, corresponding inference branches are generated based on the initial inference resources, and tool verification is performed in parallel on the inference branches, while unverified data between the inference branches is isolated; After each round of the tool verification is completed, the actual evidence gain and failure cost generated in this round are measured, and based on the actual evidence gain, the remaining inference resources of the inference branch that are below a preset gain threshold are recovered. Determine whether the preset sharing stop condition is met; If the shared stopping condition is met, the verification data of each inference branch are combined to generate and output the inference conclusion and the remaining uncertainty; If the shared stopping condition is not met, then for the acquired candidate hypothesis, the information gain of the candidate hypothesis is updated based on the actual evidence gain generated in this round, and the verification cost of the candidate hypothesis is updated based on the failure cost generated in this round; based on the updated information gain and the updated verification cost, the hypothesis value density of the candidate hypothesis is re-determined; according to the re-determined hypothesis value density of each candidate hypothesis, the recovered remaining inference resources are redistributed to each inference branch, and the step of parallel execution of tool verification on the inference branch is returned.
[0081] In some preferred embodiments, isolating unverified data between the inference branches includes: For each of the acquired candidate hypotheses, a verification operation is performed in the tool verification to generate verification evidence containing tool call records and inference records, and the verification evidence is stored in an independent evidence set corresponding to the tool verification; Store the remaining inference resources corresponding to the verification of the aforementioned tool into a separate resource account; The tool verifies unverified intermediate conclusions generated during the verification process as propositions to be verified, and writes the propositions to be verified into a global shared area. It is prohibited to write the propositions to be verified into other independent evidence sets verified by the tool.
[0082] In some preferred embodiments, the step of recovering the remaining inference resources of the inference branch that are below a preset gain threshold based on the actual evidence gain includes: After each round of the tool verification is completed, the actual evidence gain produced by the verification operation of each inference branch in the current round is calculated. Determine whether the actual evidence gain of each reasoning branch is lower than a preset gain threshold; If the actual evidence gain is lower than the preset gain threshold, the remaining inference resources of the inference branch after the end of the current round are reclaimed and transferred to the global redistribution pool. If the actual evidence gain is not lower than the preset gain threshold, then the current remaining inference resources of the inference branch are retained, and the current remaining inference resources of the inference branch are transferred to the resource account corresponding to the inference branch.
[0083] In some preferred embodiments, determining whether a preset sharing stop condition is met includes: Obtain the key hypothesis posterior confidence difference and residual counterexample risk for each inference branch in the candidate hypothesis set; Determine whether the difference in posterior confidence of the key hypothesis is greater than or equal to a first preset threshold; If the difference in the posterior confidence of the key hypothesis is greater than or equal to the first preset threshold, then it is further determined whether the risk of the remaining counterexamples is less than or equal to the second preset threshold. If the remaining counterexample risk is less than or equal to the second preset threshold, then the sharing stop condition is determined to be met; If the difference in the posterior confidence of the key hypothesis is less than the first preset threshold, or the risk of the remaining counterexamples is greater than the second preset threshold, then the sharing stop condition is not met.
[0084] In some preferred embodiments, if the sharing stop condition is not met, the step of reallocating the recovered remaining inference resources to each of the inference branches includes: Obtain the remaining inference resources from the global reallocation pool, and obtain the hypothesis value density of each candidate hypothesis after redeterization, as well as the remaining uncertainty of each inference branch; Determine whether the hypothesis value density of each candidate hypothesis is higher than a preset density threshold; If the hypothesis value density of the candidate hypothesis is higher than the preset density threshold, then at least a portion of the recovered remaining inference resources will be allocated to the resource account of the inference branch corresponding to the candidate hypothesis. Determine whether the remaining uncertainty of each of the inference branches is higher than a preset uncertainty threshold; If the remaining uncertainty of the inference branch is higher than the preset uncertainty threshold, then at least a portion of the recovered remaining inference resources will be allocated to the resource account of the inference branch. The amount allocated to the resource accounts of each inference branch will be used as inference resources for subsequent execution tool verification.
[0085] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. 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 clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side intelligent agent reasoning path selection and resource scheduling method.
[0086] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computational 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 an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of an intelligent agent reasoning path selection and resource scheduling method.
[0087] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of an agent inference path selection and resource scheduling method provided in any of the above method embodiments.
[0088] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of an agent inference path selection and resource scheduling method provided in any of the above method embodiments.
[0089] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0090] Those skilled in the art will understand that all or part of the processes in 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. When executed, the computer program 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 may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of 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.
[0091] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0092] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0093] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for agent inference path selection and resource scheduling, characterized in that, include: In response to a received inference request, a set of candidate hypotheses is generated, which includes at least one candidate hypothesis and each candidate hypothesis has a corresponding verification cost. For each candidate hypothesis in the candidate hypothesis set, the hypothesis value density of the candidate hypothesis is determined based on the information gain, decision influence factor and verification cost corresponding to the candidate hypothesis. Based on the value density of each hypothesis in the candidate hypothesis set and the verification cost of each hypothesis, an inference mode is configured and initial inference resources are allocated for each candidate hypothesis in the candidate hypothesis set.
2. The agent inference path selection and resource scheduling method according to claim 1, characterized in that, The verification cost includes tool costs, execution latency, and failure retry costs. For each candidate hypothesis in the candidate hypothesis set, the hypothesis value density is determined based on the information gain, decision influence factor, and verification cost corresponding to the candidate hypothesis, including: Obtain the information gain, decision impact factor, tool cost, execution latency, and failure retry cost corresponding to the candidate hypothesis; Based on the information gain and the decision influence factor, determine the expected return of the candidate hypothesis; The total verification cost of the candidate hypothesis is determined based on the tool cost, the execution latency, and the failure retry cost. The hypothesis value density of the candidate hypothesis is determined based on the correlation between the expected revenue and the total verification cost.
3. The agent inference path selection and resource scheduling method according to claim 1, characterized in that, The step of configuring inference modes for each candidate hypothesis in the candidate hypothesis set based on the value density of each hypothesis in the candidate hypothesis set and the verification cost of each hypothesis includes: Obtain the hypothesis value density of the candidate hypothesis and the verification cost; If the hypothesis value density is higher than the first preset density threshold and the verification cost is lower than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a single-path verification mode, which is used to perform tool verification through a single reasoning path. If the hypothesis value density is higher than the first preset density threshold and the verification cost is higher than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a parallel exploration mode, which is used to perform tool verification in parallel through multiple reasoning paths. If the hypothesis value density is lower than the first preset density threshold and the verification cost is lower than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a direct answer or pruning mode. The direct answer or pruning mode is used to directly output an answer and disclose uncertainty or eliminate the candidate hypothesis. If the hypothesis value density is lower than the first preset density threshold and the verification cost is higher than the first preset cost threshold, then the reasoning mode of the candidate hypothesis is configured as a deferred processing mode, which is used to temporarily suspend the verification of the candidate hypothesis.
4. The agent inference path selection and resource scheduling method according to claim 3, characterized in that, The method further includes: Retrieve candidate hypotheses configured for the parallel exploration mode from the set of candidate hypotheses; For the acquired candidate hypotheses, corresponding inference branches are generated based on the initial inference resources, and tool verification is performed in parallel on the inference branches, while unverified data between the inference branches is isolated; After each round of the tool verification is completed, the actual evidence gain and failure cost generated in this round are measured, and based on the actual evidence gain, the remaining inference resources of the inference branch that are below a preset gain threshold are recovered. Determine whether the preset sharing stop condition is met; If the shared stopping condition is met, the verification data of each inference branch are combined to generate and output the inference conclusion and the remaining uncertainty; If the shared stopping condition is not met, then for the acquired candidate hypothesis, the information gain of the candidate hypothesis is updated based on the actual evidence gain generated in this round, and the verification cost of the candidate hypothesis is updated based on the failure cost generated in this round; based on the updated information gain and the updated verification cost, the hypothesis value density of the candidate hypothesis is re-determined; according to the re-determined hypothesis value density of each candidate hypothesis, the recovered remaining inference resources are redistributed to each inference branch, and the step of parallel execution of tool verification on the inference branch is returned.
5. The agent inference path selection and resource scheduling method according to claim 4, characterized in that, The isolation of unverified data between each of the inference branches includes: For each of the acquired candidate hypotheses, a verification operation is performed in the tool verification to generate verification evidence containing tool call records and inference records, and the verification evidence is stored in an independent evidence set corresponding to the tool verification; Store the remaining inference resources corresponding to the verification of the aforementioned tool into a separate resource account; The tool verifies unverified intermediate conclusions generated during the verification process as propositions to be verified, and writes the propositions to be verified into a global shared area. It is prohibited to write the propositions to be verified into other independent evidence sets verified by the tool.
6. The agent inference path selection and resource scheduling method according to claim 4, characterized in that, The step of recovering remaining inference resources for inference branches that are below a preset gain threshold based on the actual evidence gain includes: After each round of the tool verification is completed, the actual evidence gain produced by the verification operation of each inference branch in the current round is calculated. Determine whether the actual evidence gain of each reasoning branch is lower than a preset gain threshold; If the actual evidence gain is lower than the preset gain threshold, the remaining inference resources of the inference branch after the end of the current round are reclaimed and transferred to the global redistribution pool. If the actual evidence gain is not lower than the preset gain threshold, then the current remaining inference resources of the inference branch are retained, and the current remaining inference resources of the inference branch are transferred to the resource account corresponding to the inference branch.
7. The agent inference path selection and resource scheduling method according to claim 6, characterized in that, The determination of whether the preset sharing stop condition is met includes: Obtain the key hypothesis posterior confidence difference and residual counterexample risk for each inference branch in the candidate hypothesis set; Determine whether the difference in posterior confidence of the key hypothesis is greater than or equal to a first preset threshold; If the difference in the posterior confidence of the key hypothesis is greater than or equal to the first preset threshold, then it is further determined whether the risk of the remaining counterexamples is less than or equal to the second preset threshold. If the remaining counterexample risk is less than or equal to the second preset threshold, then the sharing stop condition is determined to be met; If the difference in the posterior confidence of the key hypothesis is less than the first preset threshold, or the risk of the remaining counterexamples is greater than the second preset threshold, then it is determined that the sharing stop condition is not met. And / or, the redistribution of the recovered remaining inference resources to each of the inference branches includes: Obtain the remaining inference resources from the global reallocation pool, and obtain the hypothesis value density of each candidate hypothesis after redeterization, as well as the remaining uncertainty of each inference branch; Determine whether the hypothesis value density of each candidate hypothesis is higher than a preset density threshold; If the hypothesis value density of the candidate hypothesis is higher than the preset density threshold, then at least a portion of the recovered remaining inference resources will be allocated to the resource account of the inference branch corresponding to the candidate hypothesis. Determine whether the remaining uncertainty of each of the inference branches is higher than a preset uncertainty threshold; If the remaining uncertainty of the inference branch is higher than the preset uncertainty threshold, then at least a portion of the recovered remaining inference resources will be allocated to the resource account of the inference branch. The amount allocated to the resource accounts of each inference branch will be used as inference resources for subsequent execution tool verification.
8. A device for intelligent agent reasoning path selection and resource scheduling, characterized in that, include: A generation unit is configured to generate a set of candidate hypotheses containing at least one candidate hypothesis in response to a received inference request, wherein the candidate hypothesis has a corresponding verification cost; The determining unit is configured to, for each candidate hypothesis in the candidate hypothesis set, determine the hypothesis value density of the candidate hypothesis based on the information gain, decision influence factor and verification cost corresponding to the candidate hypothesis; The configuration unit is used to configure inference modes and allocate initial inference resources for each candidate hypothesis in the candidate hypothesis set based on the value density of each hypothesis in the candidate hypothesis set and the verification cost of each hypothesis.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the agent inference path selection and resource scheduling method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the agent reasoning path selection and resource scheduling method as described in any one of claims 1 to 7.
