Task decomposition bias evaluation-based browsing agent query planning method and device
By constructing a directed acyclic graph and dynamic query planning, the redundant search problem of browsing agents in complex tasks is solved, achieving efficient and logically coherent information acquisition and improving task execution efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-30
AI Technical Summary
Existing browsing agents lack strategic planning capabilities when handling complex tasks, resulting in ineffective redundant and parallel searches. They are unable to adapt to dynamic network environments and lack quantitative evaluation criteria for query tasks, leading to rigid retrieval paths and wasted resources.
By constructing a directed acyclic graph, decomposing the query using a large language model, selecting the subquery with the highest information gain per unit cost, dynamically updating the query plan, managing subquery dependencies, stopping unnecessary searches in a timely manner, and optimizing the query path.
It enables browsing agents to acquire information efficiently, logically coherently, and with high relevance in complex network environments, reducing invalid search interactions and improving task execution efficiency and accuracy.
Smart Images

Figure CN122309842A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of large model task planning technology, and more specifically, it relates to a browsing agent query planning method and device based on task decomposition deviation evaluation. Background Technology
[0002] With the development of Large Language Models (LLMs), browsing agents (BAs) integrating search engines have been widely used to answer complex questions requiring real-time information. However, existing browsing agents often employ static decomposition methods for task planning when handling complex tasks. This means that a fixed list of steps is generated at the start of the task, and queries are performed according to this fixed list. This results in rigid retrieval paths that are difficult to adapt to complex and ever-changing network environments. Summary of the Invention
[0003] The purpose of this application is to provide a query planning method and apparatus for browsing agents based on task decomposition deviation evaluation, so as to solve one or more technical problems in the background art, and enable the large language model of the browsing agent to adapt to the complex and ever-changing network environment.
[0004] A first aspect of this application provides a query planning method for a browsing agent based on task decomposition deviation evaluation, comprising: performing the following query planning operation: The target query is decomposed into multiple subqueries using a large language model, and these subqueries are combined into a subquery set. A directed acyclic graph is constructed based on the subqueries in the subquery set and the logical relationships between them. Select target subqueries from the directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph; The directed acyclic graph (DAG) is updated based on the target subquery to obtain a new DAG. The new DAG is then returned. The target subquery is selected from the DAG based on the unit cost information gain score of each subquery in the DAG, until the DAG is empty or all subqueries in the subquery set have been selected as the target subquery.
[0005] A second aspect of this application provides a query planning device for a browsing agent based on task decomposition deviation evaluation, comprising: The graph construction module is used to decompose the target query into multiple subqueries using a large language model and combine the multiple subqueries into a subquery set. Based on the subqueries in the subquery set and the logical relationships between the subqueries, a directed acyclic graph is constructed. The selection module is used to select a target subquery from a directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph. The query module is used to update the directed acyclic graph (DAG) based on the target subquery, obtain a new DAG, and return the target subquery selected from the DAG based on the unit cost information gain score of each subquery in the DAG, until the DAG is empty or all subqueries in the subquery set have been selected as the target subquery.
[0006] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the above-described browsing agent query planning method based on task decomposition deviation evaluation.
[0007] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described browsing agent query planning method based on task decomposition deviation evaluation.
[0008] The beneficial effects of the browsing agent query planning method and apparatus based on task decomposition deviation evaluation provided in this application are as follows: This application embodiment uses hierarchical query decomposition, that is, using a large language model to decompose the target query into multiple subqueries, and processes multiple subqueries, so that the browsing agent no longer blindly performs a semantically overloaded single search, but obtains information in an orderly manner like a human expert, reducing invalid search interactions.
[0009] Furthermore, by constructing a dynamic directed acyclic graph, the embodiments of this application allow the agent to update the nodes and target information set of the directed acyclic graph based on new search results in complex network environments, adjust the query plan in a timely manner, or stop unnecessary searches in a timely manner when the directed acyclic graph is empty or each subquery in the subquery set has been selected as the target subquery, thereby adapting to the dynamically changing network environment.
[0010] Finally, compared to parallel redundant search schemes, the embodiments of this application manage the dependencies between subqueries through a directed acyclic graph, ensuring that subsequent searches are executed only after the search results are obtained based on the previous target subquery, thus guaranteeing the logical coherence and high relevance of the search results. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart illustrating a query planning method for a browsing agent based on task decomposition deviation evaluation, provided in an embodiment of this application. Figure 2 A structural block diagram of a browsing agent query planning device based on task decomposition deviation evaluation provided in an embodiment of this application; Figure 3 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0014] In related technologies, large language models lack strategic planning capabilities when performing query planning, often engaging in ineffective redundant and parallel searches. Furthermore, they lack dynamic adjustment mechanisms and cannot quantify the evaluation criteria for query tasks. Specifically: (1) Lack of strategic planning ability: When faced with complex queries involving multiple dimensions and steps, the agents of existing large language models often cannot decompose tasks as effectively as human experts. They tend to adopt a "query compression" strategy, attempting to compress multiple different information needs into a semantically overloaded single search, resulting in poor relevance of the search engine results and an inability to construct a complete chain of answers.
[0015] (2) Ineffective redundant search and parallel search: The agent lacks awareness of the dependencies between subtasks and often generates a large number of disordered parallel search requests. Without obtaining prior information (such as specific terminology definitions or background data), it blindly executes subsequent searches, resulting in a large number of redundant searches that do not contribute to the final answer, causing a waste of computing resources and application programming interface (API) call costs.
[0016] (3) Lack of dynamic adjustment mechanism: Most existing task planning methods are static decomposition, that is, a fixed list of steps is generated at the beginning of the task. However, the network environment is dynamic, and the information initially retrieved may change the subsequent search requirements. Existing technologies cannot dynamically reconstruct the remaining query plan based on intermediate search results, resulting in path rigidity.
[0017] (4) Inability to quantify the evaluation criteria for query tasks: Existing technologies mainly focus on the correctness of the final answer, ignoring the "reasonableness of the tool usage process". There is a lack of an indicator that can quantify the difference between the agent's planned path and the efficient path of human experts (i.e., task decomposition deviation), which makes it impossible to optimize the agent's planning strategy in a targeted manner.
[0018] To address the problems existing in the prior art, and to clarify the purpose, technical solution, and advantages of this application, the following will describe the specific embodiments in conjunction with the accompanying drawings.
[0019] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a browsing agent query planning method based on task decomposition deviation evaluation provided in an embodiment of this application. The method may include steps S101 to S103.
[0020] S101: Use a large language model to decompose the target query into multiple subqueries and combine the multiple subqueries into a subquery set. Construct a directed acyclic graph based on the subqueries in the subquery set and the logical relationships between the subqueries.
[0021] In this embodiment, the target query Q is the currently ongoing query task, such as "comparing the average monthly temperature and unemployment rate in cities A, B, and C in 2024". This embodiment can utilize the reasoning capabilities of a large language model to decompose the target query Q into multiple subqueries, and then combine these subqueries into a subquery set. , These represent the nth subquery, where n is the total number of subqueries.
[0022] In this embodiment, a directed acyclic graph (DAG) G = (V, E) , E Nodes representing the direction of information dependency are subqueries, and directed edges represent the logical dependencies between subqueries. For example, you must first find the "specific name of a location" before you can find the "weather at that location". In a directed acyclic graph, there is no path that starts from a node, follows a directed edge, and eventually returns to itself; that is, there is no circular dependency.
[0023] S102: Select the target subquery from the directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph.
[0024] In one embodiment, the unit cost information gain score of the subquery is calculated as follows: The total information gain of subqueries is calculated based on uncertainty metrics; The execution cost of a subquery is calculated based on the explicit and implicit costs of the agent's query and decision-making processes. Explicit costs are the data directly monitored when the agent performs the action, while implicit costs are the data not directly monitored when the agent performs the action. The unit cost information gain score of a subquery is calculated based on its total information gain and execution cost.
[0025] In this embodiment, the total information gain of a subquery is essentially an estimate of the reduction in uncertainty the agent has about the original problem (target query Q) after executing the subquery. Total information gain = uncertainty before executing the subquery. Uncertainty following the execution of a subquery. The uncertainty is measured by entropy, which quantifies the degree of "unknown" status regarding the answer to the question.
[0026] When the uncertainty measure is entropy, then the total information gain of the subquery The greater the total information gain, the more significantly the subquery can reduce the uncertainty of the answer to the question.
[0027] , , .
[0028] This indicates uncertainty before executing the subquery. This indicates uncertainty after executing the subquery. This represents all possible answers to Q based on the target information set I. The estimated probability, This represents the result obtained after executing the subquery q. Indicates based on target information set I and For all possible answers to Q The estimated probability, j Indicates the number of answers, target information set. I It needs to be initialized and can be used to store content retrieved in subsequent searches.
[0029] In one embodiment, explicit costs include at least one of the following: number of application programming interface (API) calls, execution time, computational resource consumption, and data transfer volume. Implicit costs include at least one of response delay and decision bias caused by the introduction of information noise.
[0030] In this embodiment, the parameters corresponding to explicit and implicit costs are all normalized parameters. For example, the number of API calls, 50 times, corresponds to a normalized value of 50 / 158=0.32; the execution time, 120ms, corresponds to a normalized value of 120 / 400=0.30; the computing resource usage is 15%=0.15; and the data transfer volume is 26Mb, corresponding to a normalized value of 26 / 112=0.23.
[0031] If only one type of explicit cost is selected, the normalized value can be used directly for calculation. If at least two costs are selected, the two costs are weighted and then included in the calculation. The calculation method for implicit costs in the following text is similar and will not be elaborated here.
[0032] In this embodiment, decision bias caused by information noise refers to the systematic error or performance loss that occurs when the agent executes a subquery to obtain information. This is because irrelevant, erroneous, redundant, or misleading information is mixed into the returned results, causing subsequent inferences about Q to deviate from the true optimal solution. The decision bias is quantified by the decrease in task accuracy, the deviation of the inference path, or the information utility decay rate. The information utility decay rate indicates that the lower the proportion of effective information, the greater the bias caused by noise.
[0033] This embodiment calculates the execution cost of the subquery. When calculating the information gain score, explicit and implicit costs need to be normalized and then weighted. The weighting coefficients for explicit and implicit costs can be set empirically, for example, both can be 0.5. The unit cost information gain score of a subquery is the ratio of the total information gain of the subquery to its execution cost.
[0034] target subquery , This represents a set of subqueries or a set of processed subqueries.
[0035] This embodiment uses the unit cost information gain score as the selection criterion for the target subquery, and comprehensively weighs the total information gain and execution cost. It can prioritize the target subquery that contributes the most to reducing the uncertainty of the target query and has the best resource consumption from multiple candidate subqueries, thus avoiding the inefficiency caused by blind execution or random selection of subqueries.
[0036] In addition, this embodiment quantifies the decision bias caused by the introduction of information noise as an implicit cost, which can effectively suppress the priority execution of subqueries with high information gain but high noise and easy to mislead reasoning. This reduces the interference of erroneous, redundant and irrelevant information on subsequent decisions, reduces the risk of reasoning path deviation and task accuracy decline, and improves the reliability of the overall reasoning results of the browsing agent.
[0037] Finally, this embodiment combines explicit and implicit costs through normalization and weighted fusion, which can flexibly adjust the weights according to different task scenarios. This makes the subquery selection strategy independent of fixed rules and has the ability to adapt to different scenarios, thus maintaining stable and efficient planning performance in complex and ever-changing query tasks.
[0038] S103: Update the directed acyclic graph based on the target subquery to obtain a new directed acyclic graph. Return the result and select the target subquery from the directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph until the directed acyclic graph is empty or all subqueries in the subquery set have been selected as the target subquery.
[0039] In this embodiment, after the target subquery is executed, the node corresponding to the target subquery in the directed acyclic graph (DAG) needs to be deleted, and the nodes in the DAG are updated based on the in-degree of the remaining nodes. Based on the updated DAG, a new target subquery is selected, allowing the agent to execute it. After execution, the target subquery is deleted again. This process is repeated until the DAG is empty or all subqueries in the subquery set have been selected as the target subquery.
[0040] As can be seen from the above, this embodiment decomposes the target query into multiple subqueries by using a large language model, and processes these subqueries so that the browsing agent no longer blindly performs a semantically overloaded single search, but instead obtains information in an orderly manner like a human expert, reducing invalid search interactions.
[0041] In addition, this embodiment constructs a dynamic directed acyclic graph, allowing the agent to update the nodes and target information set of the directed acyclic graph based on new search results in complex network environments, adjust the query plan in a timely manner, or stop unnecessary searches in a timely manner when the directed acyclic graph is empty or each subquery in the subquery set has been selected as the target subquery, thereby adapting to the dynamically changing network environment.
[0042] Secondly, compared to parallel redundant search schemes, this embodiment manages the dependencies between subqueries through a directed acyclic graph, ensuring that subsequent searches are executed only after the search results are obtained based on the previous target subquery, thus guaranteeing the logical coherence and high relevance of the search results.
[0043] In one embodiment of this application, selecting a target subquery from a directed acyclic graph (DAG) based on the unit cost information gain score of each subquery in the DAG includes: From the directed acyclic graph, select the subqueries corresponding to the nodes with an in-degree of zero to obtain multiple candidate subqueries, and combine the multiple candidate subqueries into a candidate set; The highest unit cost information gain score is determined based on the unit cost information gain score of each candidate subquery in the candidate set, and the candidate subquery corresponding to the highest unit cost information gain score is taken as the target subquery.
[0044] In this embodiment, a node with an in-degree of zero indicates that the subquery has no prerequisites and does not need to wait for other subqueries to complete, so it can be executed immediately. Filtering the subqueries corresponding to nodes with an in-degree of zero to form a candidate set, and then selecting the target subquery from the candidate set, ensures that the selected target subquery is legally executable in terms of dependencies, preventing errors such as execution before dependencies are completed.
[0045] This embodiment selects the subquery with the highest unit cost information gain score from each subquery in the candidate set as the target subquery. This ensures that the agent prioritizes executing the subquery with the optimal ratio of information gain to execution cost in each decision step. Thus, under the premise of satisfying dependency constraints, the overall optimal query planning path is achieved, improving task execution efficiency and decision accuracy.
[0046] In one embodiment of this application, updating a directed acyclic graph based on a target subquery to obtain a new directed acyclic graph includes: The target information set is updated based on the search results obtained from the target subquery. The target information set is used to store the search results obtained by the agent based on the target subquery. Based on the updated target information set, the necessity of the remaining subqueries in the directed acyclic graph, excluding the target subquery, is evaluated using context learning. A new directed acyclic graph is obtained by redundancy processing of the directed acyclic graph based on the necessity evaluation results of each subquery in the remaining subqueries.
[0047] In this embodiment, the search results obtained by the browsing agent based on the target subquery are added to the target information set. I To target information set I The update is then performed. Based on the updated target information set, the remaining subqueries can be pruned, meaning that the remaining subqueries can be checked to see if any can be obtained using the current information. I If the answer is obtained through direct reasoning (no further searching is needed), then the necessity of the subquery is considered less than the necessity threshold, and it needs to be removed from the directed acyclic graph to avoid redundant searches; otherwise, the necessity of the subquery is considered greater than or equal to the necessity threshold, and it does not need to be removed from the directed acyclic graph.
[0048] This embodiment evaluates the necessity of each subquery in the remaining subqueries, which can promptly delete subqueries that do not need to be retrieved, reducing the complexity of the browsing agent in processing the target query task, and improving query planning capabilities and work efficiency.
[0049] In one embodiment of this application, updating a directed acyclic graph based on a target subquery to obtain a new directed acyclic graph includes: The target information set is updated based on the search results obtained from the target subquery. The target information set is used to store the search results obtained by the agent based on the target subquery. Based on the updated target information set, context learning is used to determine if a query task different from the remaining subqueries other than the target subquery needs to be added. If so, the query task is treated as a new subquery, and the necessity of the remaining subqueries other than the target subquery and the new subqueries in the directed acyclic graph is evaluated. Based on the necessity evaluation results of each subquery in the remaining subqueries and the new subquery, the directed acyclic graph is expanded to obtain a new directed acyclic graph.
[0050] In this embodiment, the agent can use context learning to analyze the currently accumulated information (i.e., the target information set) to determine whether there are still information gaps that have not been covered. If it is found that the existing subqueries (including the target subquery and the remaining subqueries) cannot meet the newly emerging and necessary information needs, a new query task needs to be introduced to fill this gap.
[0051] In this embodiment, the large language model adds new subtasks to the directed acyclic graph (DAG) according to their relationships with the remaining subtasks. Then, it performs a necessity evaluation on the remaining subqueries (excluding the target subquery) and the new subqueries in the DAG. In this embodiment, because the new subquery is newly added, its necessity needs to be evaluated. If the necessity of other subqueries is less than a necessity threshold, they need to be deleted from the DAG to avoid redundant searches; if their necessity is greater than or equal to the necessity threshold, they do not need to be deleted from the DAG.
[0052] This embodiment adds new query tasks to the directed acyclic graph based on context learning, ensuring that the path of the agent is dynamically updated when performing retrieval queries, thus making the final query results more accurate.
[0053] In one embodiment of this application, the browsing agent query planning method further includes: The task decomposition deviation value is obtained by calculating the difference between the actual number of operation steps corresponding to the target query and the preset number of operation steps. If the absolute value of the task decomposition deviation is greater than the preset threshold, the model parameters of the large language model will be adjusted based on the standard task decomposition dataset and the task decomposition deviation.
[0054] In this embodiment, the preset number of operation steps is determined based on expert experience. The task decomposition deviation value represents the difference in the number of operation steps between a human expert and a large language model when processing the same task. The closer the absolute value of this difference is to 0, the closer the large language model's task planning ability for browsing the agent is to expert experience.
[0055] The standard task decomposition dataset is a dataset obtained by decomposing data based on expert experience. In this embodiment, when the absolute value of the difference is greater than a preset threshold, it indicates that the large language model browsing agent has over-decomposed or has insufficient decomposition ability. At this time, the model parameters of the large language model are adjusted based on the standard task decomposition dataset and the task decomposition deviation value, so that the task decomposition deviation value of the adjusted large language model when processing the target query is equal to 0 or less than a sufficiently small value ε.
[0056] In this embodiment, the number of actual operation steps corresponding to the target query represents the number of times tools need to be invoked for all subqueries corresponding to the target query. These tools include information retrieval tools, calculation and reasoning tools, data analysis and analysis tools, and multimodal interaction tools. Information retrieval tools can be, for example, search engines, knowledge base query tools, or document retrieval tools; calculation and reasoning tools can be, for example, mathematical calculators, symbol conversion tools, or logical derivation tools; data analysis and analysis tools can be, for example, data cleaning tools, statistical analysis tools, or visualization tools; and multimodal interaction tools can be, for example, image recognition tools, speech-to-text tools, or OCR tools.
[0057] Corresponding to the browsing agent query planning method based on task decomposition deviation evaluation in the above embodiment, Figure 2 This is a structural block diagram of a browsing agent query planning device based on task decomposition deviation evaluation, provided in one embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 2 The browsing agent query planning device 20 based on task decomposition deviation evaluation includes: a graph construction module 21, a selection module 22, and a query module 23.
[0058] Among them, the graph construction module 21 is used to decompose the target query into multiple subqueries using a large language model and form a subquery set from the multiple subqueries, and construct a directed acyclic graph based on each subquery in the subquery set and the logical relationship between each subquery. Selection module 22 is used to select a target subquery from a directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph; The query module 23 is used to update the directed acyclic graph based on the target subquery to obtain a new directed acyclic graph. It returns the target subquery selected from the directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph, until the directed acyclic graph is empty or all subqueries in the subquery set have been selected as the target subquery.
[0059] In one embodiment of this application, the query module is specifically used for: From the directed acyclic graph, select the subqueries corresponding to the nodes with an in-degree of zero to obtain multiple candidate subqueries, and combine the multiple candidate subqueries into a candidate set; The highest unit cost information gain score is determined based on the unit cost information gain score of each candidate subquery in the candidate set, and the candidate subquery corresponding to the highest unit cost information gain score is taken as the target subquery.
[0060] In one embodiment of this application, the query module 23 is specifically used to calculate the unit cost information gain score of the subquery as follows: The total information gain of subqueries is calculated based on uncertainty metrics; The execution cost of a subquery is calculated based on the explicit and implicit costs of the agent's query and decision-making processes. Explicit costs are the data directly monitored when the agent performs the action, while implicit costs are the data not directly monitored when the agent performs the action. The unit cost information gain score of a subquery is calculated based on its total information gain and execution cost.
[0061] In one embodiment of this application, the uncertainty measure is entropy; explicit costs include at least one of the following: number of application programming interface (API) calls, execution time, computational resource consumption, and data transfer volume. Implicit costs include at least one of response delay and decision bias caused by the introduction of information noise.
[0062] In one embodiment of this application, when the graph construction module 21 updates the directed acyclic graph based on the target subquery to obtain a new directed acyclic graph, it is specifically used for: The target information set is updated based on the search results obtained from the target subquery. The target information set is used to store the search results obtained by the agent based on the target subquery. Based on the updated target information set, the necessity of the remaining subqueries in the directed acyclic graph, excluding the target subquery, is evaluated using context learning. A new directed acyclic graph is obtained by redundancy processing of the directed acyclic graph based on the necessity evaluation results of each subquery in the remaining subqueries.
[0063] In one embodiment of this application, when the graph construction module 21 updates the directed acyclic graph based on the target subquery to obtain a new directed acyclic graph, it is specifically used for: The target information set is updated based on the search results obtained from the target subquery. The target information set is used to store the search results obtained by the agent based on the target subquery. Based on the updated target information set, context learning is used to determine if a query task different from the remaining subqueries other than the target subquery needs to be added. If so, the query task is treated as a new subquery, and the necessity of the remaining subqueries other than the target subquery and the new subqueries in the directed acyclic graph is evaluated. Based on the necessity evaluation results of each subquery in the remaining subqueries and the new subquery, the directed acyclic graph is expanded to obtain a new directed acyclic graph.
[0064] In one embodiment of this application, the browsing agent query planning device 20 based on task decomposition deviation evaluation further includes a model optimization module; The model optimization module is used to calculate the difference between the actual number of operation steps and the preset number of operation steps corresponding to the target query to obtain the task decomposition deviation value; If the absolute value of the task decomposition deviation is greater than the preset threshold, the model parameters of the large language model will be adjusted based on the standard task decomposition dataset and the task decomposition deviation.
[0065] See Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 3 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned device embodiments, for example... Figure 2 The diagram shows the functions of the graph construction module 21, selection module 22, and query module 23.
[0066] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0067] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.
[0068] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store device type information.
[0069] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation method described in the browsing intelligent agent query planning method based on task decomposition deviation evaluation provided in the embodiments of this application, or they can execute the implementation method of the electronic device described in the embodiments of this application, which will not be repeated here.
[0070] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0071] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0072] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0074] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or modules, or it may be an electrical, mechanical, or other form of connection.
[0075] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0076] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0077] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A query planning method for a browsing agent based on task decomposition deviation evaluation, characterized in that, This includes performing the following query planning operations: The target query is decomposed into multiple subqueries using a large language model, and these multiple subqueries are combined into a subquery set. A directed acyclic graph is constructed based on each subquery in the subquery set and the logical relationships between them. The target subquery is selected from the directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph. The directed acyclic graph is updated based on the target subquery to obtain a new directed acyclic graph. Then, the process of selecting a target subquery from the directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph is returned until the directed acyclic graph is empty or all subqueries in the subquery set have been selected as target subqueries.
2. The method as described in claim 1, characterized in that, The selection of a target subquery from the directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph includes: Multiple candidate subqueries are obtained by filtering the subqueries corresponding to nodes with an in-degree of zero from the directed acyclic graph, and the multiple candidate subqueries are combined into a candidate set. The highest unit cost information gain score is determined based on the unit cost information gain score of each candidate subquery in the candidate set, and the candidate subquery corresponding to the highest unit cost information gain score is taken as the target subquery.
3. The method as described in claim 1, characterized in that, The unit cost information gain score of the subquery is calculated as follows: The total information gain of the subquery is calculated based on the uncertainty metric. The execution cost of the subquery is calculated based on the explicit and implicit costs of the agent's query and decision-making processes. The explicit costs are data directly monitored when the agent performs the action, and the implicit costs are data not directly monitored when the agent performs the action. The unit cost information gain score of the subquery is calculated based on the total information gain and execution cost of the subquery.
4. The method as described in claim 3, characterized in that, The uncertainty measure is entropy; The explicit costs include at least one of the following: number of application programming interface (API) calls, execution time, computational resource consumption, and data transfer volume; The implicit costs include at least one of response delay and decision bias caused by the introduction of information noise.
5. The method as described in claim 1, characterized in that, The step of updating the directed acyclic graph based on the target subquery to obtain a new directed acyclic graph includes: The target information set is updated based on the search results obtained from the target subquery, and the target information set is used to store the search results obtained by the agent based on the target subquery; Based on the updated target information set, the necessity of the remaining subqueries in the directed acyclic graph, excluding the target subquery, is evaluated using context learning. Based on the necessity evaluation results of each subquery in the remaining subqueries, the directed acyclic graph is subjected to redundancy processing to obtain a new directed acyclic graph.
6. The method as described in claim 1, characterized in that, The step of updating the directed acyclic graph based on the target subquery to obtain a new directed acyclic graph includes: The target information set is updated based on the search results obtained from the target subquery, and the target information set is used to store the search results obtained by the agent based on the target subquery; Based on the updated target information set, context learning is used to determine if a query task different from the remaining subqueries other than the target subquery needs to be added. If so, the query task is treated as a new subquery, and the necessity of the remaining subqueries other than the target subquery and the new subquery in the directed acyclic graph is evaluated. Based on the necessity evaluation results of each subquery in the remaining subqueries and the new subquery, the directed acyclic graph is expanded to obtain a new directed acyclic graph.
7. The method as described in claim 1, characterized in that, Also includes: The task decomposition deviation value is obtained by calculating the difference between the actual number of operation steps corresponding to the target query and the preset number of operation steps. If the absolute value of the task decomposition deviation is greater than a preset threshold, the model parameters of the large language model are adjusted based on the standard task decomposition dataset and the task decomposition deviation.
8. A query planning device for a browsing intelligent agent based on task decomposition deviation evaluation, characterized in that, include: The graph construction module is used to decompose the target query into multiple subqueries using a large language model and form the multiple subqueries into a subquery set. Based on each subquery in the subquery set and the logical relationship between each subquery, a directed acyclic graph is constructed. The selection module is used to select a target subquery from the directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph. The query module is used to update the directed acyclic graph based on the target subquery to obtain a new directed acyclic graph, and return the target subquery selected from the directed acyclic graph based on the unit cost information gain score of each subquery in the directed acyclic graph, until the directed acyclic graph is empty or all subqueries in the subquery set have been selected as the target subquery.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the 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 a processor, it implements the steps of the method as described in any one of claims 1 to 7.