Query result updating method and device, computer equipment and storage medium
By displaying inference nodes and alternative action information, users can backtrack and execute alternative actions to re-infer, thus solving the problem of wasted computer resources when large language models regenerate query results, achieving resource conservation and enhanced interactivity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-03
AI Technical Summary
When users are not satisfied with the query results, large language models need to be regenerated from scratch, resulting in a waste of computer resources.
By displaying inference nodes and alternative action information, users can backtrack to a specific inference step and execute alternative actions to re-infer and obtain updated query results.
It saves computer resources, enhances human-computer interaction, and transforms the reasoning process from a black box to a white box, allowing users to actively manage it.
Smart Images

Figure CN121787580A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for updating query results. Background Technology
[0002] With the development of science and technology, artificial intelligence technology has emerged. Users can interact with large language models based on artificial intelligence technology, submit query requests to the large language models, and then the large language models can generate corresponding query results and display them to the users.
[0003] Currently, when a large language model receives a user's query, it can perform inference based on the query to obtain the query results. However, when the user is not satisfied with the query results and needs the large language model to regenerate them, the large language model must start processing from scratch, resulting in a significant waste of computer resources. Summary of the Invention
[0004] Therefore, it is necessary to provide a query result updating method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can save computer resources to address the above-mentioned technical problems.
[0005] Firstly, this application provides a method for updating query results, the method comprising:
[0006] Display at least one inference node, each inference node representing an action performed in the inference step, wherein the inference step is a step in the inference process of generating query results based on query content;
[0007] In response to a triggering operation on the inference node, alternative action information is displayed for the alternative actions that were not executed in the inference step corresponding to the triggered inference node.
[0008] In response to a backtracking operation triggered by the alternative action information, the system returns to the reasoning step where the alternative action is located, executes the alternative action to perform re-reasoning, and obtains updated query results.
[0009] In one embodiment, the method further includes:
[0010] If a reasoning error occurs during the re-reasoning process, return to the reasoning step that caused the error and re-reason.
[0011] Secondly, this application also provides a query result updating device, the device comprising:
[0012] The node display module is used to display at least one inference node. Each inference node represents an action that has been performed in the inference step, which is a step in the inference process of generating query results based on query content.
[0013] An action information display module is used to respond to a trigger operation on the inference node and display the alternative action information of the alternative actions that were not executed in the inference step corresponding to the triggered inference node.
[0014] The re-inference module is used to respond to a backtracking operation triggered by the alternative action information, return to the inference step where the alternative action is located, execute the alternative action, and perform re-inference to obtain updated query results.
[0015] In one embodiment, the action information display module is further configured to display an information display area in response to a trigger operation on the inference node; display an action list in the information display area, and display alternative action information of alternative actions that were not executed in the inference step corresponding to the triggered inference node in the action list.
[0016] In one embodiment, the action list also displays the alternative action execution elements corresponding to the alternative action information; the re-inference module is further configured to, in response to a trigger operation on the alternative action execution element, return to the inference step where the alternative action is located and execute the alternative action.
[0017] In one embodiment, the re-inference module is further configured to, in response to a triggering operation for the inference node, display the re-execution element of the inference step; and, in response to a triggering operation for the re-execution element of the inference step, return to the inference step corresponding to the triggered inference node, regenerate at least one action, and execute at least some of the regenerated at least one action to perform re-inference and obtain updated query results.
[0018] In one embodiment, the at least one inference node is a node in an inference trajectory tree; the re-inference module is further configured to add an inference node representing the alternative action in the inference trajectory tree in response to a backtracking operation triggered for the alternative action information.
[0019] In one embodiment, the re-inference module is further configured to display the inference nodes on the path that needs to be pruned due to the execution of the alternative action in the inference trajectory tree in a preset style.
[0020] Thirdly, this application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in any of the query result update methods provided in the embodiments of this application.
[0021] Fourthly, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in any of the query result update methods provided in the embodiments of this application.
[0022] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the query result update methods provided in the embodiments of this application.
[0023] The aforementioned query result update method, apparatus, computer device, storage medium, and computer program product, by displaying at least one inference node, can, in response to a triggering operation on the inference node, display alternative action information for alternative actions that were not executed in the inference step corresponding to the triggered inference node. By displaying the alternative action information, in response to a backtracking operation triggered by the alternative action information, the system can return to the inference step where the alternative action is located, execute the alternative action, and perform re-inference to obtain updated query results. Because it is possible to return to a specific inference step in the inference process for re-inference, compared to the traditional method of reprocessing from scratch, it can significantly save computer resources.
[0024] Furthermore, since users can choose the reasoning steps to return to and the alternative actions to try to execute, the reasoning process changes from a black box to a white box, allowing users to move from passive observation to active management, greatly enhancing the interactivity between humans and machines.
[0025] Firstly, this application provides a method for updating query results, the method comprising:
[0026] Obtain the query content and perform inference based on the query content;
[0027] For each reasoning step in the reasoning process, at least one initial action is determined based on the reasoning goal and context information of the reasoning step;
[0028] Execute at least some of the actions in the at least one initial action to obtain the action execution result, and perform the next inference based on the action execution result until the query result of the query content is obtained;
[0029] The receiver terminal sends a backtracking request and determines the alternative actions that were not executed in the reasoning steps indicated by the backtracking request.
[0030] Execute the alternative action to re-infer from the inference step where the alternative action is located and obtain an updated query result.
[0031] Secondly, this application provides a query result updating device, the device comprising:
[0032] The query result generation module is used to obtain query content and perform inference based on the query content; for each inference step in the inference process, at least one initial action is determined according to the inference goal and context information of the inference step; at least some of the actions in the at least one initial action are executed to obtain the action execution result, and the next inference is performed according to the action execution result until the query result of the query content is obtained;
[0033] The request receiving module is used to receive a backtracking request sent by the terminal and determine the alternative actions that were not executed in the reasoning steps indicated by the backtracking request.
[0034] The action execution module is used to execute the alternative actions to re-infer from the inference step where the alternative actions are located and obtain updated query results.
[0035] In one embodiment, the query result generation module is further configured to, when multiple initial actions are obtained, filter out at least one candidate action from the multiple initial actions; and execute each of the candidate actions.
[0036] In one embodiment, the query result generation module is further configured to obtain multi-dimensional action filtering rules, and filter out multiple filtering actions from the multiple initial actions according to the multi-dimensional action filtering rules; predict the execution effect of each filtering action to obtain a pre-execution prediction result; and determine at least one candidate action from the multiple filtering actions according to the pre-execution prediction result.
[0037] In one embodiment, the query result generation module is further configured to, for each filtering action, determine a first association between the filtering action and the overall task objective of the inference process, and determine a second association between the filtering action and the context information of the inference step; determine an estimated probability value for the successful execution of the filtering action; determine an estimated execution efficiency for executing the filtering action; and determine a pre-execution estimated result of the filtering action based on the first association, the second association, the estimated probability value, and the estimated execution efficiency.
[0038] In one embodiment, the pre-execution estimation result is an estimated score; the query result generation module is further configured to determine the distribution of each estimated score; determine the current remaining resource amount; determine the number of candidate actions based on the distribution and the current remaining resource amount; and select the number of candidate actions from the plurality of filtering actions.
[0039] In one embodiment, the query result generation module is further configured to obtain multi-dimensional target action determination rules; determine a target action from each of the candidate actions based on the multi-dimensional target action determination rules and the action execution results of the candidate actions already executed in the at least one initial action; update the context information of the reasoning step based on the action execution results of the target action, and perform the next reasoning step based on the updated context information.
[0040] In one embodiment, the query result generation module is further configured to, when the target action cannot be determined based on the multi-dimensional target action determination rules, call a large language model to evaluate the candidate actions and obtain the post-execution evaluation results of the candidate actions; and determine the target action from each of the candidate actions based on the post-execution evaluation results.
[0041] In one embodiment, the unexecuted alternative actions in the at least one initial action are stored in a candidate pool; the query result generation module is further configured to determine supplementary candidate actions based on the alternative actions in the candidate pool when the action execution result indicates that all the candidate actions executed in the at least one initial action have failed; execute the supplementary candidate actions to obtain the supplementary action execution result; and perform the next step of reasoning based on the supplementary action execution result until the query result of the query content is obtained.
[0042] In one embodiment, the backtracking request is a request generated by the terminal in response to a triggering operation on the inference node; the request receiving module is further configured to determine the inference node identifier carried in the backtracking request; obtain a list of alternative actions corresponding to the inference node identifier from the candidate pool; the list of alternative actions records alternative actions that were not executed in the inference steps corresponding to the node identifier.
[0043] In one embodiment, the action execution module is further configured to return the alternative action information recorded in the alternative action list to the terminal to instruct the terminal to display the alternative action information; receive an alternative action execution request sent by the terminal; the action execution request is a request generated by the terminal in response to a backtracking operation triggered by the alternative action information; obtain context information of the alternative action indicated by the alternative action execution request; and execute the alternative action indicated by the alternative action execution request according to the obtained context information.
[0044] Thirdly, this application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in any of the query result update methods provided in the embodiments of this application.
[0045] Fourthly, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in any of the query result update methods provided in the embodiments of this application.
[0046] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the query result update methods provided in the embodiments of this application.
[0047] The aforementioned query result update method, apparatus, computer device, storage medium, and computer program product, by acquiring query content, can perform inference based on the query content. In determining the inference steps during the inference process, at least one initial action is determined based on the inference objective and context information of the inference step; at least some of the actions in the at least one initial action are executed to obtain the action execution result; and further inference is performed based on the action execution result until the query result of the query content is obtained. Since at least one initial action can be generated in the inference step, and at least some of the actions in the at least one initial action are attempted to obtain the execution result, and then further inference is performed based on the execution result, compared to only being able to generate one action, this embodiment can try multiple possibilities, thus making the final adopted action more accurate, and consequently making the generated query result more accurate. Furthermore, since a backtracking request can be received, the process can return to a certain inference step for re-inference, saving computer resources compared to the traditional method of reprocessing from scratch. Attached Figure Description
[0048] Figure 1 This is an application environment diagram of the query result update method in one embodiment;
[0049] Figure 2 This is a flowchart illustrating a query result update method in one embodiment;
[0050] Figure 3 This is a schematic diagram of an inference node in one embodiment;
[0051] Figure 4 This is a schematic diagram of the inference trajectory tree in one embodiment;
[0052] Figure 5This is a schematic diagram of the page navigation in one embodiment;
[0053] Figure 6 This is a schematic diagram illustrating the addition of an inference node in one embodiment;
[0054] Figure 7 This is a schematic diagram of inference trajectory tree update in one embodiment;
[0055] Figure 8 This is a flowchart illustrating the query result update method in another embodiment;
[0056] Figure 9 This is a schematic diagram illustrating the determination of a target action in one embodiment;
[0057] Figure 10 This is a schematic diagram illustrating the determination of candidate actions in one embodiment;
[0058] Figure 11 This is an overall schematic diagram of the query results generated in one embodiment;
[0059] Figure 12 This is an overall schematic diagram of the query results generated in another embodiment;
[0060] Figure 13 This is an overall schematic diagram of query result updates in yet another embodiment;
[0061] Figure 14 This is a structural block diagram of a query result update device in one embodiment;
[0062] Figure 15 This is a structural block diagram of a query result updating device in another embodiment;
[0063] Figure 16 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0065] The query result update method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed on the cloud or other servers. Both terminal 102 and server 104 can be used independently to execute the query result update method provided in this embodiment. Terminal 102 and server 104 can also be used collaboratively to execute the query result update method provided in this embodiment. Taking the example of terminal 102 and server 104 collaboratively executing the query result update method provided in this embodiment, terminal 102 can display at least one inference node. When a user triggers an inference node, terminal 102 can determine the triggered inference node and obtain from server 104 the alternative action information of the alternative actions not executed in the inference steps corresponding to the triggered inference node, and then display the alternative action information. Users can trigger a backtracking operation for alternative action information. Terminal 102 responds to this backtracking operation by generating an alternative action execution request and sending it to server 104. Server 104 then returns to the reasoning step where the alternative action is located, executes the alternative action for re-reasoning, and obtains updated query results. Terminal 102 can then obtain and display the updated query results.
[0066] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers. The server 104 can also be a cloud server.
[0067] It should be noted that the terms "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Unless the context clearly indicates otherwise, the singular forms "a," "one," or "the," etc., do not indicate a quantity limitation, but rather indicate the presence of at least one. The quantities of "multiple" or "multiple copies" mentioned in the embodiments of this application all refer to a quantity of "at least two," for example, "multiple" means "at least two," and "multiple copies" means "at least two copies."
[0068] In order to clearly describe the technical solution of this application and facilitate understanding of the technical solution of this application, the key concepts involved in this application will be explained below.
[0069] The query can include any area where you want to get answers, such as healthcare, education, office work, and shopping. For example, it could be "Extract screenshots from PPT videos and identify the title document".
[0070] The reasoning process refers to the reasoning process used to generate query results based on the query content. A reasoning process may include multiple reasoning steps.
[0071] A reasoning step refers to the process of reasoning based on the reasoning objective and contextual information to obtain at least one action, executing at least some of the actions to obtain the action execution result, and determining the final action to be adopted based on the action execution result. For example, when the user inputs the query "Please find the main competitors of Company A's latest mobile phone", and the first reasoning step has determined that Company A's latest mobile phone is model B, then in the second reasoning step, based on the user input query and the action execution result of the first reasoning step, the reasoning objective of the second reasoning step can be determined as "Identify the competitors of model B mobile phone", and the contextual information of the second reasoning step can be determined as "The first reasoning step has been completed, and it has been determined that Company A's latest mobile phone is model B mobile phone". At this time, based on the reasoning objective and contextual information of the second reasoning step, three actions can be generated: "Directly search for competitors of model B mobile phone from the network", "Find competitors of model B mobile phone from technology news", and "Directly crawl Company A's press releases". After generating multiple actions, at least some actions can be selected from the multiple actions to be executed, the action execution results can be obtained, and the final adopted action can be determined based on the action execution results. Thus, the third step of reasoning can be performed based on the final adopted action and the action execution result of that action.
[0072] Inference nodes are used to represent the actions performed in the inference steps. For example, in the example above, when the actions "directly search for competitors of model B mobile phone from the network" and "find competitors of model B mobile phone from technology news" are performed in the second inference step, inference node 1 representing "directly search for competitors of model B mobile phone from the network" and inference node 2 representing "find competitors of model B mobile phone from technology news" can be generated.
[0073] Inference nodes can record information such as the represented action, the result of the represented action, and the relationships between them and other inference nodes. Inference nodes can be displayed in the form of a text stream, for example, by describing the performed action, the result of the action, the execution status, etc. Alternatively, inference nodes can also be displayed as nodes in the inference trajectory tree.
[0074] A reasoning trajectory tree is a data structure that records all actions performed during the reasoning process and their results in a tree-like structure. A reasoning trajectory tree includes multiple reasoning nodes. Each reasoning node has its own action to perform; that is, each reasoning node represents an action, and the hierarchical relationship between nodes in the reasoning trajectory tree indicates the order in which the reasoning steps are executed.
[0075] Large Language Model (LLM) is an artificial intelligence model trained on massive amounts of text data. Its core uses a huge number of parameters to capture language rules, knowledge logic and expression habits. It has powerful natural language understanding and generation capabilities. It does not need to be trained separately for specific tasks. It can understand users' natural language intentions and generate logically coherent text content in multiple scenarios. It can also complete complex language-related tasks such as translation, summarization, question answering, code generation and requirement transformation.
[0076] Backtracking is the ability of a user or system to return to a specific reasoning step based on the displayed reasoning nodes and to restart the execution of actions that were not adopted at that time.
[0077] Pruning is the process of eliminating low-value, high-cost, or failed actions based on their execution results, while retaining the best actions to continue execution.
[0078] The main trunk is the path in the execution trajectory tree that is currently considered optimal by the system and is being continuously executed with resources invested.
[0079] An intelligent agent is an intelligent agent built on a large language model (LLM) and possesses the ability to autonomously understand, perceive, plan, remember, and use tools. In the embodiments of this disclosure, the intelligent agent can be implemented as a single intelligent agent based on a large language model, or it can be implemented by multiple intelligent agents based on a large language model cooperating with each other.
[0080] In one embodiment, such as Figure 2 As shown, a query result update method is provided, which can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps:
[0081] Step 202: Display at least one inference node. Each inference node represents an action that has been performed in the inference step. The inference step is a step in the inference process of generating query results based on query content.
[0082] Specifically, when a user needs to backtrack, the terminal can display at least one inference node, where each inference node represents an action performed in the inference step. For example, when the user clicks the "Backtrack" button, the terminal can determine the inference steps that have been executed, and for each executed inference step, it can display an inference node representing the action performed in that inference step.
[0083] In one embodiment, the terminal may display a backtracking button, and when the user clicks the backtracking button, the terminal displays at least one inference node.
[0084] In one embodiment, reference Figure 3 , Figure 3 A schematic diagram of an inference node in one embodiment is shown. The inference node can display information about the action it represents, as well as the inference step in which the represented action occurs. For example, when inference node 301 represents the "web search" action performed in the second inference step, then inference node 301 displays the words "Step 2" and "web search".
[0085] In one embodiment, reference Figure 4 The terminal can display, for example Figure 4 The inference trajectory tree shown includes multiple inference nodes. It is readily understood that since at least one action can be performed in a inference step, there is at least one inference node corresponding to each inference step, and each inference node represents an action performed in that inference step. For example, refer to... Figure 4 In reasoning step 3, two actions, "information extraction" and "deep analysis", are performed. Therefore, reasoning step 3 has two reasoning nodes. Reasoning node 401 represents "information extraction" in reasoning step 3, and reasoning node 402 represents "deep analysis" in reasoning step 3. Figure 4 A schematic diagram of an inference trajectory tree in one embodiment is shown.
[0086] Step 204: In response to the triggering operation for the inference node, display the alternative action information of the alternative actions that were not executed in the inference step corresponding to the triggered inference node.
[0087] Specifically, when at least one inference node is displayed, the user can determine the inference step to which they need to backtrack based on the actions represented by each inference node. Then, based on the inference step to which they need to backtrack, the user can determine the inference node to be triggered and trigger that inference node. Triggering operations include, but are not limited to, click operations, long-press operations, etc. Further, in response to the triggering operation on the inference node, the terminal can determine the inference step corresponding to the triggered inference node and obtain alternative action information for any alternative actions not executed in that inference step. Alternative actions refer to actions not executed in the inference step. Alternative action information refers to information about the alternative actions. Further, when the alternative action information is obtained, the terminal displays the alternative action information. For example, the terminal can display the alternative action name, the inference step in which the alternative action is located, the action description of the alternative action, etc.
[0088] In one embodiment, reference Figure 5 When the user clicks on the inference node 501 in the inference trajectory tree, the terminal can display an action list. Since the inference node 501 corresponds to the second inference step, the alternative action information of the alternative actions that were not executed in the second inference step can be displayed in area 502 of the action list. Figure 5 A schematic diagram of a page rewinding in one embodiment is shown.
[0089] In one embodiment, the inference node may be a node in the inference trajectory tree, which may include a trunk branch and pruned branches. When a user triggers an operation on an inference node located on a trunk branch, the terminal responds to the triggering operation of the inference node located on the trunk branch by displaying alternative action information of the alternative actions that were not executed in the inference steps corresponding to the triggered inference node.
[0090] In one embodiment, when the mouse hovers over an inference node, the terminal can determine whether there are any unexecuted alternative actions in the inference steps corresponding to that node. If so, a prompt message can be displayed to inform the user that there are unexecuted alternative actions in the inference steps corresponding to that node. If the user wishes to view the alternative action information for the unexecuted alternative action, the user can click on the inference node, and the terminal can then display the corresponding alternative action information.
[0091] Step 206: In response to the backtracking operation triggered by the alternative action information, return to the reasoning step where the alternative action is located, execute the alternative action, and perform re-reasoning to obtain updated query results.
[0092] Specifically, when a user wants to perform a certain alternative action, the user can trigger a backtracking operation based on the alternative action information. Then, the terminal can respond to the backtracking operation triggered by the alternative action information, return to the reasoning step where the corresponding alternative action is located, execute the alternative action, and perform re-reasoning to obtain updated query results.
[0093] In one embodiment, the candidate action execution element corresponding to the candidate action information can be displayed, thereby treating the triggering operation against the candidate action execution element as a backtracking operation. The candidate action execution element may include a button, a command input box, etc., for example, see... Figure 5 The specific action to be executed can be a "Try to Execute" button. Therefore, the terminal can display the "Try to Execute" button 503 corresponding to the action information 502 in the action list. When the user clicks the "Try to Execute" button 503, since the action information records the action as "web crawling of Company A's press release" and that "web crawling of Company A's press release" belongs to the second reasoning step, the terminal can return to the second reasoning step and execute the action "web crawling of Company A's press release" in the second reasoning step to obtain the action execution result. Based on the action execution result, subsequent reasoning steps are performed until the updated query result is obtained.
[0094] In one implementation, to better understand this embodiment, the overall process of updating the query results is briefly described below. An intelligent agent system can be deployed. When a user inputs query content, the intelligent agent system can perform multiple inference steps on the query content. In the current inference step, it generates at least one action based on the inference target and context information, and executes at least some of the actions. For example, when generating multiple actions, it can execute some of the multiple actions; when generating only one action, it executes that action to obtain the action execution result. Based on the action execution result, it can select the final adopted action from the executed actions and proceed to the next inference step based on the final adopted action. This process iterates until the query result for the query content is obtained. When the user wants to update the query results, the user can trigger the intelligent agent system to display at least one inference node. For example, for each action executed in the executed inference steps, a inference node representing that action can be displayed. Furthermore, the user can determine the actions executed in each step through the displayed inference nodes, and thus determine the inference node to be triggered. When a user triggers a certain inference node, the intelligent agent system can respond to the trigger operation by displaying alternative action information for the unexecuted alternative actions in the inference step corresponding to the triggered inference node. When the user determines that the corresponding alternative action needs to be executed based on the displayed alternative action information, the user can trigger a backtracking operation for that alternative action information. The intelligent agent system can then return to the inference step corresponding to that alternative action information to perform inference, execute the alternative action corresponding to that alternative action information in the returned inference step, obtain the action inference result, and perform the next inference step based on the action inference result until a new query result is obtained.
[0095] In one embodiment, when the intelligent agent system makes a reasoning error, it can automatically return to the reasoning step at a certain reasoning node for re-reasoning.
[0096] In the above query result update method, by displaying at least one inference node, in response to a triggering operation on the inference node, alternative action information of the candidate actions that were not executed in the inference step corresponding to the triggered inference node can be displayed. By displaying the alternative action information, in response to a backtracking operation triggered by the alternative action information, the system can return to the inference step where the alternative action is located, execute the alternative action, and perform re-inference to obtain updated query results. Since it is possible to return to a certain inference step in the inference process for re-inference, compared to the traditional method of reprocessing from scratch, computer resources can be greatly saved.
[0097] Furthermore, since users can choose the reasoning steps to return to and the alternative actions to try to execute, the reasoning process changes from a black box to a white box, allowing users to move from passive observation to active management, greatly enhancing the interactivity between humans and machines.
[0098] In one embodiment, in response to a triggering operation on an inference node, displaying alternative action information for alternative actions that were not executed in the inference step corresponding to the triggered inference node includes: displaying an information display area in response to a triggering operation on the inference node; displaying an action list in the information display area, and displaying alternative action information for alternative actions that were not executed in the inference step corresponding to the triggered inference node in the action list.
[0099] Specifically, when a trigger operation is initiated for a specific inference node, the terminal can display an information display area, such as a reference. Figure 5 The terminal can display an information display area on the right side of the inference trajectory tree. Furthermore, an action list can be displayed in the information display area, and this action list will show alternative action information for any unexecuted alternative actions in the inference step corresponding to the triggered inference node. For example, refer to... Figure 5 It can display a list of actions and information on alternative actions in the information display area.
[0100] In one embodiment, the displayed alternative action information may include the action name, core execution parameters, action description, and pre-evaluation score given by the evaluator.
[0101] In one embodiment, in addition to displaying candidate action information for unexecuted alternative actions in the inference step corresponding to the triggered inference node in the action list, the action list may also display information on actions already executed in the inference step corresponding to the triggered inference node. For ease of description, the information on executed actions will be referred to as executed action information below. For example, refer to... Figure 5 Different executed action information can be displayed in areas 504 and 505 of the action list. This information may include the action name, core execution parameters, action description, and the pre-evaluation score given by the evaluator. To facilitate viewing the execution results of executed actions, an "Action Execution Result View" button can also be displayed in the action list, allowing users to view the corresponding action execution results.
[0102] In the above embodiments, by displaying an action list, alternative action information can be shown in the action list, making it easier for users to identify all unexecuted alternative actions corresponding to the triggered inference node without manual searching, thus significantly improving the efficiency of identifying alternative actions. Furthermore, presenting alternative action information in the action list helps users quickly assess the potential value and feasibility of each alternative action, avoiding blind selection and improving the accuracy of branch switching decisions.
[0103] In one embodiment, the action list also displays the alternative action execution element corresponding to the alternative action information; in response to the backtracking operation triggered for the alternative action information, returning to the inference step where the alternative action is located and executing the alternative action includes: in response to the triggering operation for the alternative action execution element, returning to the inference step where the alternative action is located and executing the alternative action.
[0104] Specifically, in addition to displaying candidate action information, the action list can also display the corresponding candidate action execution element. For example, it can also display an "Attempt Execution" button. When the user triggers a candidate action execution element, the terminal can respond to the trigger operation on the candidate action execution element and return to the inference step where the candidate action is located to execute the candidate action. For example, when the user clicks the "Attempt Execution" button, it can return to the inference step where the candidate action is located and execute the candidate action.
[0105] In this embodiment, by simply performing an element trigger operation on the candidate action, the system can return to the reasoning step where the corresponding candidate action is located and re-perform the reasoning, executing the candidate action during the re-reasoning. This achieves the goal of one-click backtracking, greatly improving the efficiency of backtracking.
[0106] In one embodiment, the method further includes: in response to a triggering operation on an inference node, displaying an inference step re-execution element; in response to a triggering operation on an inference step re-execution element, returning to the inference step corresponding to the triggered inference node, regenerating at least one action, and executing at least some of the regenerated at least one action to perform re-inference and obtain updated query results.
[0107] Specifically, users can choose to attempt alternative actions in the returned inference step, or they can choose to regenerate at least one action in the returned inference step and execute a portion of the regenerated action. More specifically, when a user initiates a trigger operation for a specific inference node, the terminal can display the inference step re-execution element. For example, refer to... Figure 5 The terminal can display a "Re-execute" button 506.
[0108] Furthermore, when a user triggers the re-execution of the inference step, the system can return to the inference step corresponding to the triggered inference node, determine the inference target and context information of the inference step, regenerate multiple actions based on the inference target and context information, and execute some of the regenerated actions to obtain the action execution results. Based on the action execution results, the system determines the final adopted action and proceeds to the next inference step based on the final adopted action until a new query result is obtained.
[0109] In one embodiment, reference Figure 5When the user clicks the "Re-execute" button 506, the process returns to the second reasoning step, where at least one action is regenerated, at least some of the regenerated actions are executed, the final action is determined based on the action execution results, and the third reasoning step is performed based on the final action until the updated query results are obtained.
[0110] In the above embodiments, when a user finds that the actions generated by the original inference step have deviations, poor execution results, or new requirements have been adjusted, there is no need to restart the entire task process from scratch. Simply triggering the inference step re-execution element can quickly backtrack to the inference step of the corresponding inference node and re-perform the inference, which greatly saves the time cost of repetitive operations and significantly conserves computer resources.
[0111] In one embodiment, at least one inference node is a node in the inference trajectory tree; the method further includes: in response to a backtracking operation triggered for alternative action information, adding an inference node representing an alternative action in the inference trajectory tree.
[0112] Specifically, an inference node can be a node in the inference trajectory tree. Each inference node is a detailed data structure that records {the node identifier of the inference node, the node identifier of the parent node, the action it represents, the action parameters, the action execution result, the task status, the amount of resources consumed in the action execution, and context information}. Among these, the context information is crucial, as it captures the complete inference context when the inference node is reached. This is the data foundation for implementing the backtracking function.
[0113] When responding to a backtracking operation triggered by alternative action information, the inference node representing the alternative action can be determined, the context information at the time of reaching the inference node can be obtained, the alternative action can be executed based on the obtained context information, and an inference node representing the alternative action can be added to the inference trajectory tree. For example, refer to Figure 6 When returning to the second reasoning step and executing the alternative action of "directly crawling Company A's press release" in the second reasoning step, a reasoning node 601 representing "directly crawling Company A's press release" can be added to the reasoning trajectory tree. Figure 6 A schematic diagram of adding an inference node is shown in one embodiment.
[0114] In this embodiment, the reasoning trajectory tree can store all the actions explored during the reasoning process. When the user triggers the backtracking operation of the alternative action, by adding a reasoning node representing the alternative action in the reasoning trajectory tree, the entire reasoning path map can be made more complete and traceable, providing a clear basis for subsequent review and facilitating the optimization of reasoning decision logic.
[0115] In one embodiment, the method further includes: displaying the inference nodes on the path as a preset style for paths in the inference trajectory tree that need to be pruned due to the execution of alternative actions.
[0116] Specifically, when a user triggers a backtracking operation for an alternative action and initiates its execution, for paths in the inference trajectory tree that are no longer main branches due to the execution of the current alternative action and require pruning, the inference nodes on these paths can be displayed in a preset style. For example, displaying a pruning indicator in the inference node, highlighting the inference node in red, etc. For example, refer to... Figure 7 The inference trajectory tree 701 is the inference trajectory tree before the backtracking was performed. Inference nodes 702 corresponding to alternative actions can be added to the inference trajectory tree 701. Since the inference step corresponding to inference node 702 is the second inference step, starting from the second step, inference nodes located on the main branch can be used as inference nodes on the path to be pruned. For example, inference nodes 703 and 704 can both be used as inference nodes on the path to be pruned. Furthermore, once the inference nodes on the path to be pruned are determined, the word "prune" can be added to the inference nodes on the path to be pruned, and the inference node can be selected with a red box to obtain the updated inference trajectory tree 705. Figure 7 A schematic diagram of inference trajectory tree update in one embodiment is shown.
[0117] In a straightforward manner, each action performed during the backtracking process adds a new inference node to the inference trajectory tree, until the updated query result is obtained, resulting in the final updated inference trajectory tree.
[0118] In the above embodiments, by displaying the inference nodes on the paths to be pruned in the inference trajectory tree in a preset style, the new main branches determined based on the currently executed alternative actions and the branches that have failed can be intuitively and clearly distinguished. This avoids users from confusing the execution status of different paths in a complex trajectory tree, and significantly improves the efficiency and accuracy of path recognition. In addition, since no inference nodes on the pruned path are deleted, but all inference nodes are completely preserved in a special style, the integrity of the inference trajectory tree is not destroyed, and a complete basis is provided for subsequent review of the execution logic of different paths and comparison of the effect differences between alternative actions and original actions.
[0119] In one embodiment, such as Figure 8 As shown, a method for updating query results is provided. Taking the application of this method to a computer device as an example, the computer device can provide... Figure 1 The terminal or server in the process includes the following steps:
[0120] Step 802: Obtain the query content and perform inference based on the query content.
[0121] Specifically, a computer device deploys an intelligent agent system, which in turn deploys intelligent agents. When the intelligent agent system obtains the query content, it can reason based on the query content in the direction of generating query results.
[0122] Step 804: For each reasoning step in the reasoning process, determine at least one initial action based on the reasoning goal and context information of the reasoning step.
[0123] Specifically, let's take the current inference step as an example. For the current inference step among multiple inference steps, the intelligent agent system can determine the inference goal and the context information of the current inference step. Based on the determined inference goal and context information, it generates at least one initial action that can be executed in the current inference step. For example, when the user inputs the query "Please find the main competitors of Company A's latest mobile phone", and it has been determined in the first inference step that Company A's latest mobile phone is model B, then in the second inference step, based on the user input query and the execution result of the action in the first inference step, the inference goal of the second inference step can be determined as "Identify the competitors of model B mobile phone", and the context information of the second inference step can be determined as "The first inference step has been completed, and it has been determined that Company A's latest mobile phone is model B". At this time, based on the inference goal and context information of the second inference step, three initial actions can be generated: "Directly search for competitors of model B mobile phone from the network", "Find competitors of model B mobile phone from technology news", and "Directly crawl Company A's press releases".
[0124] Step 806: Execute at least some of the actions in at least one initial action, obtain the action execution result, and perform the next inference based on the action execution result until the query result of the query content is obtained.
[0125] Specifically, the intelligent agent system can execute at least some of the actions in at least one initial action. For example, when multiple initial actions are generated, some of the actions in the multiple initial actions can be executed; when only one initial action is generated, only that action can be executed. When at least some of the actions in at least one initial action have been executed, the action execution result can be obtained. Based on the action execution result, the final adopted action is determined, and the next step of reasoning is performed based on the final adopted action until the query result of the query content is obtained.
[0126] In one embodiment, the optimal action execution result can be determined, and the action corresponding to the optimal action execution result can be taken as the final adopted action. For example, refer to Figure 9When initial actions 1, 2, and 3 are generated, they can be pre-evaluated to determine the actions to be executed. If initial actions 1 and 2 are determined to be executed, the execution result 1 for initial action 1 and the execution result 2 for initial action 2 can be obtained. If execution result 2 is better than execution result 1, then initial action 2 is adopted as the final action, and further reasoning is performed based on execution result 2. Figure 9 A schematic diagram illustrating the determination of a target action is shown in one embodiment.
[0127] In one embodiment, when the final adopted action is determined, the context information of the current inference step can be updated based on the execution result of the final adopted action to obtain the context information of the next inference step. Thus, in the next inference step, at least one initial action that can be executed in the next inference step can be determined based on the context information of the next inference step. For example, if the execution result of the final adopted action in the first inference step is: Company A's latest mobile phone is model B, then the context information of the second inference step updated based on this action execution result would be "The first inference step has been completed, and it has been determined that Company A's latest mobile phone is model B."
[0128] Step 808: Receive a backtracking request sent by the terminal and determine the alternative actions that were not executed in the reasoning steps indicated by the backtracking request.
[0129] Specifically, when a user triggers the terminal to display at least one inference node and triggers a trigger operation for the inference node, the terminal can generate a backtracking request. In turn, the intelligent agent system can respond to the backtracking request and determine the alternative actions that were not executed in the inference steps indicated by the backtracking request.
[0130] In one embodiment, the intelligent agent system can determine a list of candidate actions based on the inference node identifier carried in the backtracking request, the list of candidate actions containing candidate actions.
[0131] Step 810: Execute the alternative action to re-infer from the inference step where the alternative action is located and obtain the updated query result.
[0132] Specifically, the intelligent agent system can return to the reasoning step where the alternative action is located, execute the alternative action, and then perform re-reasoning to obtain updated query results.
[0133] In this embodiment, by obtaining the query content, inference can be performed based on the query content. During the inference process, at least one initial action is determined according to the inference objective and context information. At least some of the initial actions are executed to obtain the action execution result. The next inference step is then performed based on the action execution result until the query result of the query content is obtained. Since at least one initial action can be generated in the inference step, and at least some of the initial actions are attempted to obtain the execution result, the next inference step is then performed based on the execution result. Compared to generating only one action, this embodiment can try multiple possibilities, thus making the final adopted action more accurate, and consequently, the generated query result more accurate. Furthermore, since a backtracking request can be received, the process can return to a certain inference step for re-inference, saving computer resources compared to traditional methods that start from scratch.
[0134] In one embodiment, the method further includes: parsing the query content to obtain the overall task objective of the reasoning process; and performing task planning on the query content based on the overall task objective to obtain at least one reasoning step in the planned reasoning process.
[0135] Specifically, when obtaining query content, the intelligent agent can parse the query content to obtain the parsing results. For example, if the query content is "I like hiking and I want to go camping in the mountains. I need to buy a tent. Do you have any purchasing suggestions?", the intelligent agent can parse the query content and obtain the parsing result as "The user likes hiking and plans to camp in the mountains. Please recommend a suitable tent for hiking and provide purchasing suggestions." The overall task objective of the reasoning process can be determined based on the parsing results. For example, the parsing result of the query content can be directly used as the overall task objective of the reasoning process; or, key content can be extracted from the parsing result of the query content to obtain the overall task objective of the reasoning process.
[0136] Furthermore, given the overall task objective, the agent can perform task planning on the query content based on the overall task objective, thereby obtaining at least one reasoning step in the planned reasoning process. For example, for the aforementioned overall task objective, at least one reasoning step planned by the agent includes: Reasoning Step 1: Recommendation and comparison of popular hiking tents; Reasoning Step 2: User demand suitability analysis; Reasoning Step 3: Integrating the product comparison and suitability analysis content to generate an analysis report.
[0137] Furthermore, once the reasoning steps obtained from the plan are obtained, these steps can be executed. For example, reasoning step 1 can be executed first: recommendation and comparison of popular hiking tents. In executing reasoning step 1, at least one initial action can be determined based on the reasoning objective and contextual information of reasoning step 1, and at least a portion of the initial actions can be executed to obtain action execution results, such as obtaining the results of the recommendation and comparison of popular hiking tents. The contextual information can be updated based on the action execution results to obtain updated contextual information, and then proceed to the next reasoning step, such as reasoning step 2. Based on the reasoning objective of reasoning step 2 and the updated contextual information, at least one initial action can be determined again, and a portion of the initial actions can be executed. This process is iterated until the overall task objective is achieved.
[0138] In one embodiment, it is readily understood that the planned inference steps have a sequential execution order. For example, in the above example, inference step 1 can be executed first. If the inference goal of inference step 1 is achieved, then inference step 2 can be executed. If the inference goal of inference step 2 is achieved, then inference step 3 can be executed. During the execution of inference steps, if it is determined based on the action execution result that the inference goal of that inference step has not been achieved, task decomposition can be performed to generate sub-inference steps of that inference step, and then the decomposed sub-inference steps can be executed in the next inference step. For example, during the execution of inference step 2, at least one initial action can be generated first, and at least some of the actions in the at least one initial action can be executed to obtain the action execution result. If it is determined based on the action execution result that the user requirement adaptability analysis has not been achieved, then the inference task corresponding to inference step 2 can be decomposed to obtain sub-inference steps of inference step 2, and the sub-inference tasks can be executed. When the user requirement adaptability analysis result is obtained based on the sub-inference tasks, then inference step 3 can be executed.
[0139] In the above embodiments, by obtaining the query content, the query content can be parsed to determine the overall task objective. Once the overall task objective is determined, task planning can be performed on the query content based on the overall task objective, thereby obtaining at least one reasoning step from the planning. Subsequently, each reasoning step can be executed to achieve the overall task objective.
[0140] In one embodiment, performing at least a portion of at least one initial action includes: when multiple initial actions are obtained, selecting at least one candidate action from the multiple initial actions; and performing each candidate action.
[0141] Specifically, taking the current inference step among multiple inference steps as an example, when the inference goal and context information of the current inference step are obtained, these can be input into a preset first prompt information template to generate the first prompt information. This first prompt information is then input into the large language model, which generates multiple initial actions. Further, when multiple initial actions are generated, at least one candidate action can be selected from these initial actions, and each candidate action can be executed.
[0142] In one embodiment, the first prompt message template may be, for example:
[0143] You are an assistant skilled at planning and breaking down tasks. When executing a task, you need to consider multiple possible actions.
[0144] #Context: {}
[0145] "Current task objective: {}", "Current known information: {}", "List of available tools: {}";
[0146] #Core Instructions
[0147] "Based on the above task objectives and the currently known information, please generate three next actions that are most likely to drive the task to completion."
[0148] "Require:"
[0149] "1. The output must be a strict JSON (JavaScript Object Notation) array, where each element is a JSON object." "2. Each JSON object contains a field: 'action'." "3. The 'action' field must strictly follow the format of a tool list." "4. Please sort the three actions from highest to lowest according to the expected effect."
[0150] In one embodiment, the output of at least one action to be filtered may be, for example, [Action 1, Action 2, Action 3], where “Action 1: {Name: Web Search; Parameter {'Search': 'Model B mobile phone in 202X'}}”, “Action 2: {Name: Web Search; Parameter {'Search': 'Latest information on mobile phones from Company A'}}”, and “Action 3: {Name: Crawling; Parameter {'Search': 'www.xxxx.com'}}”.
[0151] In the above embodiments, the initial action is generated based on the reasoning goal and complete context information of the reasoning steps, making the generated initial action more comprehensive and avoiding omissions of actions due to incomplete information.
[0152] In one embodiment, selecting at least one candidate action from multiple initial actions includes: obtaining multi-dimensional action filtering rules, and filtering multiple filtering actions from multiple initial actions according to the multi-dimensional action filtering rules; estimating the execution effect of each filtering action to obtain a pre-execution estimation result; and determining at least one candidate action from multiple filtering actions according to the pre-execution estimation result.
[0153] Specifically, when multiple initial actions are obtained, multi-dimensional action filtering rules can be acquired, and multiple filtering actions can be filtered out from the multiple initial actions based on these rules. The execution effect of each filtering action is then predicted to obtain a pre-execution prediction result, and at least one candidate action can be determined from the multiple filtering actions based on this pre-execution prediction result.
[0154] In one embodiment, when there is only one initial action, that initial action can be used as a candidate action.
[0155] In one embodiment, reference Figure 10 For the current inference step, the inference goal and context information can be determined. These are then input into a large language model, which outputs multiple initial actions. Multiple filtering actions can be derived from these initial actions using multi-dimensional action filtering rules. The large language model can be invoked to predict the execution effect of each filtering action, obtaining the pre-execution prediction results for each action. Subsequently, based on the pre-execution prediction results for each filtering action, the intelligent agent system determines at least one candidate action from the multiple filtering actions and executes that candidate action. Figure 10 A schematic diagram illustrating the determination of candidate actions in one embodiment is shown.
[0156] In one embodiment, the multi-dimensional action filtering rules include at least resource quantity filtering rules, security filtering rules, format validation rules, and repetitive action filtering rules. Resource quantity filtering rules are used to filter actions whose required resource consumption exceeds the current remaining resource quantity. Security filtering rules are used to filter actions from among multiple actions to be filtered that require permissions exceeding the permissions of the currently logged-in account. Format validation rules are used to filter actions from among multiple actions to be filtered that do not match preset parameter requirements. Repetitive action filtering rules are used to filter actions from among multiple actions to be filtered that have a similarity to failed action parameters greater than or equal to a preset threshold. Failed action parameters are the action parameters of historical actions that failed to execute at a historical time.
[0157] Specifically, multi-dimensional action filtering rules can include resource consumption filtering rules, security filtering rules, format validation rules, and repetitive action filtering rules. For resource consumption filtering rules, the cost estimation module integrated into the agent system can quantitatively estimate the expected resource consumption of each initial action (e.g., web search consumes 1 unit of computing resources and is expected to return 1000 text processing units; web crawling consumes 5 units of computing resources and is expected to return 5000 text processing units). If the estimated resource consumption of an initial action exceeds the current remaining resources, it is directly filtered. For security filtering rules, the agent system checks whether the currently logged-in account has permission to execute the initial action (e.g., whether it can access a database); if not, it is directly filtered. For format validation rules, the agent system verifies whether the action parameters of the initial action meet the required format and type; if not, it is directly filtered. For repetitive action filtering rules, the agent system compares the execution of historical actions and filters out initial actions with excessively high parameter similarity and historically failed execution results.
[0158] In the above embodiments, by comprehensively screening through multi-dimensional action filtering rules, actions that are irrelevant to reasoning, inefficient, or infeasible can be eliminated, so that the final filtered actions are highly consistent with the current reasoning needs and have strong execution. By estimating the execution effect of each filtered action, candidate actions with good execution effect can be selected based on the pre-execution estimation results, thereby reducing the time and resource waste caused by invalid action execution and significantly improving the efficiency and accuracy of subsequent reasoning steps.
[0159] In one embodiment, when multiple initial actions are generated, candidate actions can be selected from these initial actions, and the remaining actions that are not selected will be sent to a candidate pool for later use. It is easy to understand that the actions selected from the multiple initial actions that need to be executed are called candidate actions, and the remaining actions are sent to the candidate pool as alternative actions for later use.
[0160] In one embodiment, the execution effect of each initial action is estimated to obtain a pre-execution estimation result, including: for each filtering action, determining a first correlation between the filtering action and the overall task objective of the inference process, and determining a second correlation between the filtering action and the contextual information of the inference steps; determining the estimated probability value of successful execution of the filtering action; determining the estimated execution efficiency of executing the filtering action; and determining the pre-execution estimation result of the filtering action based on the first correlation, the second correlation, the estimated probability value, and the estimated execution efficiency.
[0161] Specifically, when multiple filtering actions are generated in the current inference step, the overall task objective of the inference process and the context information of the current inference step can be determined. Further, for each filtering action, the agent system can determine the association between the filtering action and the overall task objective of the inference process; this association is called the first association. The agent system can also determine the association between the filtering action and the context information of the current inference step; this association is called the second association. Further, the agent system can estimate the probability value of successful execution of the filtering action, obtaining the estimated probability value. The agent system can also estimate the execution efficiency of executing the filtering action, obtaining the estimated execution efficiency. When the first association, the second association, the estimated probability value, and the estimated execution efficiency are obtained, they can be combined to determine the pre-execution prediction result of the filtering action.
[0162] In one embodiment, the overall task objective of the inference process is a target determined based on the user's input query. For example, if the user's input query is "Please find and analyze the main competitors of Company A's latest mobile phone model," then the overall task objective is "Find and analyze the main competitors of Company A's latest mobile phone model." The inference objective of the current inference step is a target determined based on the overall task objective and the inference result of the previous inference step. For example, if it has been determined in the first inference step that Company A's latest mobile phone model is model B, then the inference objective of the second inference step can be "Find the main competitors of model B mobile phone."
[0163] In one embodiment, the reasoning objective of the current reasoning step, the overall task objective of the reasoning process, and the filtering action information of the filtering action can be input into the second prompt information template to obtain the second prompt information. Here, the filtering action information refers to the action information of the filtering action. Further, the second prompt information can be input into a large language model to output the pre-execution prediction result of the filtering action through the large language model.
[0164] In one embodiment, the second prompt message template may be, for example:
[0165] You are a highly efficient decision evaluator. Your task is to quickly score the potential value of an action.
[0166] #Context
[0167] "Overall task objective: {}"; "Current execution context: {}";
[0168] #Initial actions to be evaluated
[0169] "Filtering action: {}"
[0170] #Evaluation Criteria
[0171] Please rate this action (0.0-1.0) from the following three dimensions:
[0172] "Relevance: The degree of association between this action and the overall task objective and contextual information"; "Feasibility: The probability of this action being successfully executed and returning a valid result"; "Efficiency: Whether the execution cost (time, resource consumption) of this action is low and whether the information value is high";
[0173] # Output command
[0174] "Simply output a floating-point number representing the overall score; do not output any other text."
[0175] In one embodiment, when the large language model outputs the pre-execution prediction results for each filtering action, the filtering actions can be sorted according to the pre-execution prediction results to obtain a filtering action sequence, such as [("Action 1", 0.9), ("Action 2", 0.7), ("Action 3", 0.5)]. The ("Action 2", 0.7) filtering action sequence is sent to the executor for adaptive decision-making to determine the candidate actions to be executed. Simultaneously, actions not selected in the filtering action sequence are sent to the candidate pool as alternative actions. That is, in the filtering action sequence, the actions selected for execution are called candidate actions, and the actions not selected are called alternative actions.
[0176] In the above embodiments, by determining the first association between the filtering action and the overall task objective, and the second association with the context information, the evaluation can remain relevant to the core requirements and the current scenario. This avoids selecting candidate actions that deviate from the objective or have poor adaptability, making subsequent execution more aligned with the reasoning logic. Furthermore, incorporating the estimated probability of initial action success and the estimated execution efficiency into the evaluation process not only avoids high-failure-risk and low-feasibility actions in advance but also selects efficient solutions that save time and resources, reducing ineffective resource consumption from the source. In addition, by conducting multi-dimensional evaluation, the pre-execution prediction results are more comprehensive and objective, abandoning the one-sidedness of single-dimensional evaluation. This provides accurate decision-making basis for candidate action selection, resulting in candidate actions that not only fit the overall objective and adapt to the current reasoning steps but also possess high feasibility and high efficiency.
[0177] In one embodiment, the pre-execution prediction result is a predicted score; determining at least one candidate action from multiple filtering actions based on the pre-execution prediction result includes: determining the distribution of each predicted score; determining the current remaining resource amount; determining the number of candidate actions based on the distribution and the current remaining resource amount; and selecting the candidate action number from the multiple filtering actions.
[0178] Specifically, the pre-execution estimation result can be an estimated score. Based on the distribution of these estimated scores and at least one of the following: the current remaining resources, the number of candidate actions to be selected from the filtering actions can be determined. For example, the evaluation scores of each filtering action can be stored in the evaluation result set. If there is a first target estimated score in the evaluation result set that is significantly higher than the other estimated scores, then the number of candidate actions is determined to be K=1, and the filtering action with this first target estimated score is selected as a candidate action. Alternatively, if there are multiple second target evaluation scores in the evaluation result set that are close in value, and the current remaining resources are sufficient, then the number of candidate actions is determined to be K>1, and K second target evaluation scores are selected from these multiple second target evaluation scores. The filtering action with the selected second target evaluation scores is then selected as a candidate action.
[0179] In this embodiment, the number of candidate actions is dynamically determined based on the score distribution and the current remaining resources. This avoids wasting high-value paths due to too few actions when resources are sufficient and high-scoring actions are concentrated, and also avoids resource overdraft or execution lag due to too many candidate actions when resources are scarce and only a few actions are of high quality. This achieves a precise balance between execution quality and resource consumption.
[0180] In one embodiment, the action performed in at least one initial action is a candidate action; based on the action execution result, the next step of reasoning is performed, including: obtaining multi-dimensional target action determination rules; determining the target action from at least one candidate action based on the multi-dimensional target action determination rules and the action execution results of the candidate actions; updating the context information of the reasoning step based on the action execution result of the target action, and performing the next step of reasoning based on the updated context information.
[0181] Specifically, when executing candidate actions and obtaining their execution results, the final target action can be determined based on these results. For example, multi-dimensional target action determination rules can be obtained, and some actions can be filtered from the candidate actions based on these rules. The target action is then determined based on the remaining actions. For instance, if only one action remains, it is directly adopted as the target action; if multiple actions remain, the action with the best execution result is chosen as the target action. After obtaining the target action, the context information of the current inference step can be updated based on its execution result, and the next step of inference can be performed based on the updated context information.
[0182] For example, in the second reasoning step, if the candidate actions "directly search for competitors of model B" and "find competitors of model B from technology news" are executed based on the context information "Company A's latest mobile phone is model B", and the target action is determined to be "find competitors of model B from technology news" based on the multi-dimensional target action determination rules, then the context information "Company A's latest mobile phone is model B" in the second step can be updated based on the action execution result "Company A's latest mobile phone is model B, and the competitors of model B are model C and model D". This results in the context information "Company A's latest mobile phone is model B, and the competitors of model B are model C and model D". This context information is the context information for the third reasoning step, and in the third reasoning step, reasoning can be performed based on the context information of the third reasoning step.
[0183] In one embodiment, the multi-dimensional target action determination rules include at least cost filtering rules, feasibility filtering rules, and historical data filtering rules. Cost filtering rules are used to filter target actions based on the deviation between the resource consumption of a candidate action and the estimated resource consumption. For example, if the resource consumption of a candidate action exceeds the estimated amount by 30%, then the candidate action is filtered. Feasibility filtering rules are used to filter target actions based on the validity of the execution result of the candidate action. For example, if the returned execution result is invalid, then the candidate action is filtered; or if the returned execution result is incorrect, then the candidate action is filtered. Historical data filtering rules are used to filter target actions based on the execution success rate of historical target actions of the same type as the candidate action. For example, if the past success rate of similar actions is less than a preset threshold, then the candidate action is filtered.
[0184] In one embodiment, the multi-dimensional target action determination rule further includes: filtering out a candidate action if its execution result is an error or invalid result. If a candidate action's execution result is significantly superior (e.g., the execution result directly hits the key requirement; the completeness and accuracy of the result are significantly better than other candidate actions, and the actual resource consumption is less than or equal to the estimated resource consumption; based on historical data, the success rate of subsequent steps for this type of result is ≥90%; satisfying any two of the above conditions constitutes a significantly superior result), other candidate actions executed in parallel can be terminated in advance, and the candidate action with the significantly superior execution result is taken as the target action to save resources.
[0185] In the above embodiments, by setting multi-dimensional target action determination rules, target actions can be selected from candidate actions based on these rules. This ensures that the final determined target actions not only align with the overall reasoning objective but also possess high execution quality and cost-effectiveness. Integrating the execution results of the target actions into the context information of the current reasoning step yields updated context information. This ensures that the context remains accurate, complete, and aligned with the latest execution status, providing reliable data support for the next step of reasoning and preventing reasoning bias due to information lag.
[0186] In one embodiment, the method further includes: when the target action cannot be determined based on multi-dimensional target action determination rules, invoking a large language model to evaluate candidate actions and obtaining post-execution evaluation results of the candidate actions; and determining the target action from at least one candidate action based on the post-execution evaluation results of each candidate action.
[0187] Specifically, when the target action cannot be determined based on the multi-dimensional target action determination rules, the large language model is called to evaluate the candidate actions and obtain the post-execution evaluation results of the candidate actions. The target action is then determined based on the post-execution evaluation results of each candidate action. For example, the candidate action with the best post-execution evaluation result is taken as the target action.
[0188] In one embodiment, the reasoning target of the current reasoning step, the candidate action to be executed, the action parameters of the candidate action, and the action execution result can be input into the third prompt information template to generate the third prompt information, and the third prompt information can be input into the large language model to obtain the post-execution evaluation result.
[0189] In one embodiment, the third prompt message template may be, for example:
[0190] You are a results evaluator. Please assess the contribution of the action to our goals based on its actual performance results.
[0191] #Context
[0192] "Inference target: {}"; "Candidate action to be executed: {}"; "Action parameters: {}"; "Action execution result: {}".
[0193] #Evaluation Instructions
[0194] Did this result directly and usefully contribute to the achievement of the mission objectives?
[0195] "Please output only one score (0.0-1.0), where 1.0 represents a complete push and 0.0 represents no help."
[0196] In one embodiment, the results of action execution (such as actual cost and success rate) are used as feedback data to optimize the large language model, so that the output of the large language model is more accurate.
[0197] In the above embodiments, even when the target action cannot be determined based on multi-dimensional target action determination rules, the target action can still be determined through a large language model, thereby improving the success rate of target action determination.
[0198] In one embodiment, at least one unexecuted candidate action in the initial action is stored in a candidate pool; the next step of reasoning is performed based on the action execution result until the query result of the query content is obtained, including: when the action execution result indicates that all candidate actions executed in at least one initial action have failed to execute, a supplementary candidate action is determined based on the candidate actions in the candidate pool, and the supplementary candidate action is executed to obtain the supplementary action execution result; the next step of reasoning is performed based on the supplementary action execution result until the query result of the query content is obtained.
[0199] Specifically, when multiple initial actions are generated and candidate actions are determined from these initial actions, the remaining actions (excluding the candidate actions) are stored as alternative actions in a candidate pool. Further, if all candidate actions fail, an alternative action can be selected from the candidate pool as a supplementary candidate action. The intelligent agent system executes this supplementary candidate action, obtains the execution result, and then performs further reasoning based on the result until the query result is obtained.
[0200] In one embodiment, for the current inference step, a candidate action generated in the current inference step can be randomly selected from the candidate pool as a supplementary candidate action. Alternatively, the candidate action that was evaluated as optimal in the pre-evaluation stage can be selected as a supplementary candidate action.
[0201] In the above embodiments, when all candidate actions fail to execute, supplementary candidate actions can be determined from the candidate pool, and reasoning can continue based on the supplementary candidate actions to finally obtain the updated query results.
[0202] In one embodiment, reference Figure 11 , Figure 11This diagram illustrates the overall process of query result generation in one embodiment. In the first step, multiple initial actions can be generated using a large language model. For example, the inference target and context information are input into the large language model, which then outputs multiple initial actions. In the second step, the initial actions are filtered using multi-dimensional action filtering rules to obtain filtered actions. These filtered actions are then evaluated to obtain a sequence of filtered actions. In the third step, an adaptive decision module selects candidate actions from the filtered action sequence. The remaining unselected actions are stored as candidate action sequences in a candidate pool. Candidate action sequences can be stored in the candidate pool as key-value pairs, where the key can be the identifier of the inference node representing the candidate action, and the value can be the candidate action sequence. The candidate actions can be executed by an executor to obtain the action execution result. In the fourth step, the candidate actions are evaluated post-execution based on the action execution result. If the result is excellent, it is determined as the final adopted action, and the inference node representing that action is used as the main branch in the inference trajectory tree. If the candidate action fails to execute, the inference node representing that action is used as a pruned branch in the inference trajectory tree. If all candidate actions fail, a supplementary candidate action is retrieved from the candidate pool and executed. Both the execution results of the candidate actions and the execution results of the supplementary candidate actions can be used to optimize the large language model.
[0203] In one embodiment, the backtracking request is a request generated by the terminal in response to a triggering operation on the inference node; receiving the backtracking request sent by the terminal and determining the alternative actions that were not executed in the inference step indicated by the backtracking request includes: determining the inference node identifier carried in the backtracking request; obtaining a list of alternative actions corresponding to the inference node identifier from the candidate pool; the list of alternative actions records the alternative actions that were not executed in the inference step corresponding to the node identifier.
[0204] Specifically, when the terminal displays at least one inference node and the user triggers an operation targeting that inference node, the terminal can generate a backtracking request and send it to the backend of the intelligent agent system. Further, the intelligent agent system can determine the inference node identifier carried in the backtracking request and retrieve a list of candidate actions corresponding to the inference node identifier from the candidate pool. Here, the inference node identifier is the identifier of the inference node.
[0205] In one embodiment, executing an alternative action includes: returning alternative action information of alternative actions recorded in the alternative action list to the terminal to instruct the terminal to display the alternative action information; receiving an alternative action execution request sent by the terminal; the action execution request is a request generated by the terminal in response to a backtracking operation triggered by the alternative action information; and executing the alternative action indicated by the alternative action execution request according to the context information of the alternative action indicated by the alternative action execution request.
[0206] Specifically, the alternative action information recorded in the alternative action list can be returned to the terminal, so that the terminal can display the alternative action information. When the user triggers a backtracking operation on the alternative action information, the terminal can generate an alternative action execution request. Then, the intelligent agent system can respond to the alternative action execution request, determine the context information of the alternative action indicated by the alternative action execution request, and execute the alternative action indicated by the alternative action execution request according to the context information.
[0207] In one embodiment, the candidate pool can store not only the context information of candidate actions, but also the context information of the candidate action indicated by the candidate action execution request. For example, the corresponding context information can be obtained from the candidate pool based on the candidate action identifier carried in the candidate action execution request.
[0208] In the above embodiments, by responding to a backtracking request sent by the terminal, the reasoning process can be returned to a certain reasoning step, which saves the resources consumed by reasoning compared to starting the reasoning process from scratch.
[0209] In one embodiment, reference Figure 12 , Figure 12 A schematic diagram of query result updates in another embodiment is shown. Step 1201: Obtain the inference target and context information. Step 1202: The large language model generates multiple initial actions based on the inference target and context information. Step 1203: The real-time evaluator pre-evaluates the initial actions to obtain pre-execution prediction results. Step 1204: Based on the pre-execution prediction results, candidate actions and alternative actions are determined, and the alternative actions are stored in a candidate pool. Step 1205: The candidate actions are executed by the executor. Step 1206: Based on the execution results of each candidate action, inference nodes for each candidate action are generated to obtain an inference trajectory tree. Step 1207: The inference trajectory tree can be displayed on the terminal interface. Step 1208: The user can interact with the inference trajectory tree to perform backtracking.
[0210] In one embodiment, reference Figure 13 , Figure 13This diagram illustrates the overall query result update in another embodiment. Step 1301: The system creates the root node of the inference trajectory tree and initializes the total resources (e.g., total character unit consumption, maximum number of interface calls). Step 1302: The large language model generates N (e.g., 10) initial actions based on the current context information. Step 1303: The real-time evaluator pre-evaluates the N initial actions, using scoring criteria including relevance, feasibility, and estimated resource consumption. The system performs initial pruning based on the scores and the preset total resources, filtering out initial actions with excessively high costs or extremely low scores, resulting in a filtered action list (denoted as M, e.g., reducing from 10 to 5). Step 1304: The system stores the actions filtered out after this generation, along with subsequent unselected actions from the filtered action list M, along with their evaluation scores and context information, into a candidate pool. Step 1305: The system employs an Adaptive BeamSearch strategy, dynamically determining the concurrency level K based on the distribution of filtering actions in the filtering action list and the current remaining resources (e.g., if one estimated score is significantly higher than others, K=1; if multiple estimated scores are close and the current remaining resources are sufficient, K>1). Step 1306: The scheduler concurrently executes K candidate actions. Step 1307: After the candidate actions are executed, the system immediately performs a post-execution evaluation based on the execution results to obtain the evaluation results. Step 1308: Determine if any candidate action was successfully executed. If yes, proceed to step 1312; otherwise, proceed to step 1309. Step 1309: If all candidate actions fail, set the inference nodes representing the candidate actions in the inference trajectory tree to a preset style, such as adding the word "pruning". Step 1310: If all candidate actions fail, the system automatically checks if there are any available alternative actions in the candidate pool for the current inference step. Step 1311: If available alternative actions exist, select the best one as a supplementary candidate action and return to step 1306 to continue execution. Step 1312: If a successful candidate action exists, the system uses it as the new backbone and updates the context information. If multiple successful candidate actions exist, select the best one as the new backbone based on the post-execution evaluation result and update the context information. Step 1313: The system checks whether the overall task objective has been completed. If not, it jumps to step 1302 to continue execution; if yes, it jumps to step 1314 to continue execution. Step 1314: The user interface displays the inference trajectory tree. Step 1315: The user can interact with the inference trajectory tree to perform backtracking.
[0211] The beneficial effects of the above embodiments include: high decision robustness. By generating multiple alternative options for candidate actions at each inference step, the limitations of a single decision path are broken. Even if a candidate action fails or its effect is not as expected, the system can quickly switch to other high-quality alternatives without interrupting the overall inference process, greatly enhancing the fault tolerance for single-point decision errors and making the inference process more stable. At the same time, the system has the characteristic of proactively exploring optimization. It conducts miniaturized bundle search at each decision node, rather than relying solely on theoretical inference to generate a single action. Instead, it obtains real-world data by actually executing multiple candidate actions and selects the optimal action based on data feedback. This "practice-verified dynamic selection" mode can effectively avoid the trap of local optima and more easily discover tasks that fit the requirements. The system achieves the globally optimal solution to the overall objective. Furthermore, it significantly improves resource utilization efficiency. The execution results of multiple candidate actions are not completely isolated; some valid data and intermediate conclusions are automatically merged into the core inference process for reuse. Simultaneously, a pruning mechanism promptly terminates candidate actions that have no hope of progressing to the objective, avoiding ineffective consumption of computational resources and time costs. This allows limited resources to be concentrated on high-value candidate actions, significantly improving overall resource utilization. Moreover, because the system can flexibly adjust the allocation ratio of computational resources and the concurrent scale of candidate actions, it avoids redundant computational consumption caused by blind concurrency while ensuring inference quality under resource constraints. Ultimately, this achieves a dual improvement in inference accuracy and resource utilization, making the entire inference process both efficient and economical. Furthermore, the transparent and traceable design of the reasoning process in this application is of great practical value. The complete reasoning trajectory tree records in detail the decision-making logic, candidate action selection, execution results, and path adjustment process at each step, transforming the originally black-box reasoning process into a white-box presentation that can be viewed intuitively. This not only allows users to clearly understand the ins and outs of task progress and enhance their trust in the system, but also provides a complete traceability basis for subsequent troubleshooting and process optimization, greatly improving the system's debuggability and security.
[0212] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0213] This application also provides an application scenario in which the above-described query result update method is applied. Specifically, the query result update method is applied in this scenario as follows:
[0214] When a user engages in dialogue with the intelligent agent system and inputs their desired query, the system can perform inference based on the query, generating inference nodes during the process. These nodes can be displayed in real-time or, after the inference is complete, displayed in response to a viewing option. If the user is dissatisfied with the current inference result, they can trigger the intelligent agent system to re-perform the inference from a specific step onwards, obtaining an updated query result.
[0215] The above application scenarios are merely illustrative. It is understood that the application of the schedule synchronization method provided in the embodiments of this application is not limited to the above scenarios.
[0216] Based on the same inventive concept, this application also provides a query result updating apparatus for implementing the query result updating method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more query result updating apparatus embodiments provided below can be found in the limitations of the query result updating method described above, and will not be repeated here.
[0217] In one embodiment, such as Figure 14 As shown, a query result updating device is provided, including: a node display module 1402, an action information display module 1404, and a re-inference module 1406, wherein:
[0218] The node display module 1402 is used to display at least one inference node. Each inference node represents an action that has been performed in the inference step. The inference step is the step in the inference process of generating query results based on query content.
[0219] The action information display module 1404 is used to respond to the trigger operation for the inference node and display the alternative action information of the alternative actions that were not executed in the inference step corresponding to the triggered inference node.
[0220] The re-inference module 1406 is used to respond to the backtracking operation triggered by the alternative action information, return to the inference step where the alternative action is located, execute the alternative action, and perform re-inference to obtain updated query results.
[0221] In one embodiment, the action information display module 1404 is further configured to display an information display area in response to a trigger operation on the inference node; display an action list in the information display area, and display alternative action information of alternative actions that were not executed in the inference step corresponding to the triggered inference node in the action list.
[0222] In one embodiment, the action list also displays alternative action execution elements corresponding to the alternative action information; the re-inference module 1406 is also used to return to the inference step where the alternative action is located in response to the trigger operation for the alternative action execution element, and execute the alternative action.
[0223] In one embodiment, the re-inference module 1406 is further configured to, in response to a triggering operation for an inference node, display the re-execution element of the inference step; in response to a triggering operation for the re-execution element of the inference step, return to the inference step corresponding to the triggered inference node, regenerate at least one action, and execute at least some of the regenerated at least one action to perform re-inference and obtain updated query results.
[0224] In one embodiment, at least one inference node is a node in the inference trajectory tree; the re-inference module 140 is also configured to add an inference node representing the alternative action in the inference trajectory tree in response to a backtracking operation triggered for alternative action information.
[0225] In one embodiment, the re-inference module 140 is further configured to display the inference nodes on the path that needs to be pruned due to the execution of alternative actions in the inference trajectory tree in a preset style.
[0226] In one embodiment, such as Figure 15 As shown, a query result updating device is provided, including: a query result generation module 1502, a request receiving module 1504, and an action execution module 1506, wherein:
[0227] The query result generation module 1502 is used to obtain query content and perform inference based on the query content; for each inference step in the inference process, at least one initial action is determined according to the inference goal and context information of the inference step; at least some of the actions in the at least one initial action are executed to obtain the action execution result, and the next inference is performed according to the action execution result until the query result of the query content is obtained;
[0228] The request receiving module 1504 is used to receive a backtracking request sent by the terminal and determine the alternative actions that were not executed in the reasoning steps indicated by the backtracking request.
[0229] Action execution module 1506 is used to execute alternative actions to re-infer from the inference step where the alternative action is located and obtain updated query results.
[0230] In one embodiment, the query result generation module 1502 is further configured to, when multiple initial actions are obtained, filter out at least one candidate action from the multiple initial actions; and execute each candidate action.
[0231] In one embodiment, the query result generation module 1502 is further configured to obtain multi-dimensional action filtering rules, and filter out multiple filtering actions from multiple initial actions according to the multi-dimensional action filtering rules; predict the execution effect of each filtering action to obtain the pre-execution prediction result; and determine at least one candidate action from multiple filtering actions according to the pre-execution prediction result.
[0232] In one embodiment, the query result generation module 1502 is further configured to, for each filtering action, determine a first association between the filtering action and the overall task objective of the reasoning process, and determine a second association between the filtering action and the contextual information of the reasoning steps; determine the estimated probability value of successful execution of the filtering action; determine the estimated execution efficiency of the filtering action; and determine the pre-execution estimated result of the filtering action based on the first association, the second association, the estimated probability value, and the estimated execution efficiency.
[0233] In one embodiment, the pre-execution prediction result is a predicted score; the query result generation module 1502 is also used to determine the distribution of each predicted score; determine the current remaining resource amount; determine the number of candidate actions based on the distribution and the current remaining resource amount; and select the candidate action number from multiple filtering actions.
[0234] In one embodiment, the query result generation module 1502 is further configured to obtain multi-dimensional target action determination rules; determine the target action from each candidate action based on the multi-dimensional target action determination rules and the action execution results of at least one candidate action that has been executed in the initial action; update the context information of the reasoning step based on the action execution results of the target action, and perform the next reasoning step based on the updated context information.
[0235] In one embodiment, the query result generation module 1502 is further configured to, when the target action cannot be determined based on the multi-dimensional target action determination rules, call a large language model to evaluate the candidate actions and obtain the post-execution evaluation results of the candidate actions; and determine the target action from each candidate action based on the post-execution evaluation results.
[0236] In one embodiment, at least one unexecuted alternative action in the initial action is stored in a candidate pool; the query result generation module 1502 is further configured to determine a supplementary candidate action based on the alternative actions in the candidate pool when the action execution result indicates that all candidate actions executed in at least one initial action have failed to be executed; execute the supplementary candidate action to obtain the supplementary action execution result; and perform the next step of reasoning based on the supplementary action execution result until the query result of the query content is obtained.
[0237] In one embodiment, the backtracking request is a request generated by the terminal in response to a triggering operation for the inference node; the request receiving module 1504 is further configured to determine the inference node identifier carried in the backtracking request; obtain a list of alternative actions corresponding to the inference node identifier from the candidate pool; the list of alternative actions records the alternative actions that were not executed in the inference steps corresponding to the node identifier.
[0238] In one embodiment, the action execution module 1506 is further configured to return the alternative action information recorded in the alternative action list to the terminal to instruct the terminal to display the alternative action information; receive an alternative action execution request sent by the terminal; the action execution request is a request generated by the terminal in response to a backtracking operation triggered by the alternative action information; obtain context information of the alternative action indicated by the alternative action execution request; and execute the alternative action indicated by the alternative action execution request according to the obtained context information.
[0239] Each module in the aforementioned query result updating device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0240] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 16 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. 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, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores query result update data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a query result update method.
[0241] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a query result update method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0242] Those skilled in the art will understand that Figure 16 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0243] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0244] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0245] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.
[0246] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0247] 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 described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, etc., and are not limited to these.
[0248] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0249] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for updating query results, characterized in that, The method includes: Display at least one inference node, each inference node representing an action performed in the inference step, wherein the inference step is a step in the inference process of generating query results based on query content; In response to a triggering operation on the inference node, alternative action information is displayed for the alternative actions that were not executed in the inference step corresponding to the triggered inference node. In response to a backtracking operation triggered by the alternative action information, the system returns to the reasoning step where the alternative action is located, executes the alternative action to perform re-reasoning, and obtains updated query results.
2. The method according to claim 1, characterized in that, The alternative action information displayed in response to a triggering operation on the inference node, which represents alternative actions not executed in the inference step corresponding to the triggered inference node, includes: In response to a trigger operation on the inference node, an information display area is shown; The information display area displays a list of actions, and the list of actions displays alternative action information for alternative actions that were not executed in the reasoning step corresponding to the triggered reasoning node.
3. The method according to claim 2, characterized in that, The action list also displays the alternative action execution elements corresponding to the alternative action information; The backtracking operation triggered in response to the candidate action information, returning to the inference step where the candidate action is located, and executing the candidate action, includes: In response to the triggering operation of the element to be executed for the alternative action, return to the reasoning step where the alternative action is located and execute the alternative action.
4. The method according to claim 1, characterized in that, The method further includes: In response to a trigger operation on the inference node, display the inference step re-execution element; In response to a triggering operation for the re-execution element of the inference step, return to the inference step corresponding to the triggered inference node, regenerate at least one action, and execute at least some of the regenerated actions to perform re-inference and obtain updated query results.
5. The method according to claim 1, characterized in that, The at least one inference node is a node in the inference trajectory tree; the method further includes: In response to a backtracking operation triggered by the alternative action information, an inference node representing the alternative action is added to the inference trajectory tree.
6. The method according to claim 5, characterized in that, The method further includes: For paths in the inference trajectory tree that need to be pruned due to the execution of the alternative actions, the inference nodes on the path are displayed in a preset style.
7. A method for updating query results, characterized in that, The method includes: Obtain the query content and perform inference based on the query content; For each reasoning step in the reasoning process, at least one initial action is determined based on the reasoning goal and context information of the reasoning step; Execute at least some of the actions in the at least one initial action to obtain the action execution result, and perform the next inference based on the action execution result until the query result of the query content is obtained; The receiver terminal sends a backtracking request and determines the alternative actions that were not executed in the reasoning steps indicated by the backtracking request. Execute the alternative action to re-infer from the inference step where the alternative action is located and obtain an updated query result.
8. The method according to claim 7, characterized in that, The method further includes: The query content is parsed to obtain the overall objective of the reasoning process; Based on the overall task objective, the query content is used for task planning to obtain at least one reasoning step in the planned reasoning process.
9. The method according to claim 7, characterized in that, The execution of at least a portion of the at least one initial action includes: When multiple initial actions are obtained, at least one candidate action is selected from the multiple initial actions; Execute each of the candidate actions.
10. The method according to claim 9, characterized in that, The step of selecting at least one candidate action from the plurality of initial actions includes: Obtain multi-dimensional action filtering rules, and filter out multiple filtering actions from the multiple initial actions according to the multi-dimensional action filtering rules; The execution effect of each filtering action is estimated to obtain the pre-execution estimation result; At least one candidate action is determined from the plurality of filtering actions based on the pre-execution prediction results.
11. The method according to claim 10, characterized in that, The process of estimating the effect of each filtering action to obtain a pre-execution estimation result includes: For each filtering action, a first association between the filtering action and the overall task objective of the reasoning process is determined, and a second association between the filtering action and the contextual information of the reasoning step is determined. Determine the estimated probability value of the successful execution of the filtering action; Determine the estimated execution efficiency of performing the filtering action; Based on the first association relationship, the second association relationship, the estimated probability value, and the estimated execution efficiency, the pre-execution estimation result of the filtering action is determined.
12. The method according to claim 10, characterized in that, The pre-execution prediction result is a predicted score; the step of determining at least one candidate action from the plurality of filtering actions based on the pre-execution prediction result includes: Determine the distribution of each of the predicted scores; Determine the current amount of remaining resources; Based on the distribution and the current remaining resources, determine the number of candidate actions; The number of candidate actions is selected from the plurality of filtering actions.
13. The method according to claim 7, characterized in that, The next step of reasoning based on the result of the action includes: Obtain multi-dimensional target action determination rules; Based on the multi-dimensional target action determination rules and the action execution results of the candidate actions already executed in the at least one initial action, the target action is determined from each of the candidate actions; Based on the execution result of the target action, the context information of the reasoning step is updated, and the next reasoning step is performed based on the updated context information.
14. The method according to claim 13, characterized in that, The method further includes: If the target action cannot be determined based on the multi-dimensional target action determination rules, the large language model is invoked to evaluate the candidate action and obtain the post-execution evaluation result of the candidate action. Based on the post-execution evaluation results, the target action is determined from each of the candidate actions.
15. The method according to claim 7, characterized in that, The unexecuted alternative actions in the at least one initial action are stored in a candidate pool; The step of proceeding with further reasoning based on the result of the action execution until the query result of the query content is obtained includes: When the action execution result indicates that all candidate actions executed in the at least one initial action have failed, a supplementary candidate action is determined based on the alternative actions in the candidate pool; Execute the supplementary candidate action to obtain the supplementary action execution result; The next step of reasoning is performed based on the result of the supplementary action until the query result of the query content is obtained.
16. The method according to claim 7, characterized in that, The backtracking request is a request generated by the terminal in response to a triggering operation on the inference node; receiving the backtracking request from the terminal and determining the alternative actions that were not executed in the inference step indicated by the backtracking request includes: Determine the inference node identifier carried in the backtracking request; Obtain a list of alternative actions corresponding to the inference node identifier from the candidate pool; the list of alternative actions contains alternative actions that were not executed in the inference steps corresponding to the inference node identifier.
17. The method according to claim 16, characterized in that, The execution of the alternative action includes: The alternative action information recorded in the alternative action list is returned to the terminal to instruct the terminal to display the alternative action information; Receive the alternative action execution request sent by the terminal; the action execution request is a request generated by the terminal in response to a backtracking operation triggered by the alternative action information; Obtain the context information of the alternative action indicated by the alternative action execution request; The alternative action is executed according to the obtained context information, which is the alternative action indicated by the execution request.
18. A query result updating device, characterized in that, The device includes: The node display module is used to display at least one inference node. Each inference node represents an action that has been performed in the inference step, which is a step in the inference process of generating query results based on query content. An action information display module is used to respond to a trigger operation on the inference node and display the alternative action information of the alternative actions that were not executed in the inference step corresponding to the triggered inference node. The re-inference module is used to respond to a backtracking operation triggered by the alternative action information, return to the inference step where the alternative action is located, execute the alternative action, and perform re-inference to obtain updated query results.
19. A query result updating device, characterized in that, The device includes: The query result generation module is used to obtain query content and perform inference based on the query content; for each inference step in the inference process, at least one initial action is determined according to the inference goal and context information of the inference step; at least some of the actions in the at least one initial action are executed to obtain the action execution result, and the next inference is performed according to the action execution result until the query result of the query content is obtained; The request receiving module is used to receive a backtracking request sent by the terminal and determine the alternative actions that were not executed in the reasoning steps indicated by the backtracking request. The action execution module is used to execute the alternative actions to re-infer from the inference step where the alternative actions are located and obtain updated query results.
20. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 17.
21. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 17.
22. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 17.