Intelligent agent replay method, apparatus, device, medium, and program product
Patent Information
- Application Number
- CN202610953865.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-09-29
AI Technical Summary
跑批的脚本一般都是预设置的,提问的问题和真实的场景并不匹配且在进行提示词优化的过程中,存在成本较高的问题,导致提示词优化效率低下
[0022]本公开的上述各个实施例具有如下有益效果:通过本公开的一些实施例的智能体重放方法,通过对智能体进行日志重放的方式,可以提高对智能体对应提示词进行调优的效率。具体来说,造成提示词优化效率低下的原因在于:跑批的脚本一般都是预设置的,提问的问题和真实的场景并不匹配且在进行提示词优化的过程中,存在成本较高的问题,导致提示词优化效率低下。基于此,本公开的一些实施例的智能体重放方法,首先,获取针对第一智能体的对话重放信息,以确定智能体进行重放的重放需求。其中,上述第一智能体为提示词调优后的智能体。在这里,针对对应提示词调优后的智能体,通过对话重放的方式,利用重放智能体,可以高效且准确地实现提示词效果的生成。然后,对于上述对话重放信息,执行以下重放步骤:第一步,获取上述对话重放信息对应的对话日志文件,以基于用户进行重放的需求内容来获取目标智能体在历史时间段下的对话日志文件,以便于后续基于历史时间段下的真实对话内容来进行重放处理,校验优化后的提示词的提示词效果。第二步,构建上述第一智能体对应的智能体副本。在这里,通过构建智能体副本的方式,可以避免影响智能体使用且保证后续重放操作要真实校验提示词的效果。第三步,根据上述对话日志文件,对上述智能体副本进行对话重放处理,得到重放结果,以得到进行提示词调优后的表现效果。第四步,将上述重放结果发送至用于提示词调优效果展示的目标终端。综上,通过获取对话日志文件以及构建智能体对应智能体副本的方式,可以实现针对调优后的提示词进行智能体重放处理,以高效且准确地获取到调优后的提示词的表现效果。
Smart Images

Figure CN122840237A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to intelligent replay methods, apparatuses, devices, media, and program products. Background Technology
[0002] Currently, with the continuous development of AI agents, optimizing the prompt words for AI agents can greatly improve the accuracy of their output. The common approach to optimizing prompt words for AI agents is to run batches of scripts containing single word groups or pre-set word groups to draw conclusions, thereby optimizing the prompt words for the AI agent.
[0003] However, when using the above method, the following technical problems often arise: The scripts used for batch processing are usually pre-set, and the questions asked do not match the real-world scenarios. Furthermore, the process of optimizing prompts is costly, resulting in low efficiency in prompt optimization. Summary of the Invention
[0004] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0005] Some embodiments of this disclosure provide intelligent replay methods, apparatuses, electronic devices, computer-readable media, and program products to address the technical problems mentioned in the background section above.
[0006] In a first aspect, some embodiments of this disclosure provide an intelligent agent replay method, applied to replaying an intelligent agent, comprising: acquiring dialogue replay information for a first intelligent agent, wherein the first intelligent agent is an intelligent agent with optimized prompt words; for the dialogue replay information, performing the following replay steps: acquiring a dialogue log file corresponding to the dialogue replay information; constructing an intelligent agent copy corresponding to the first intelligent agent; performing dialogue replay processing on the intelligent agent copy according to the dialogue log file to obtain a replay result; and sending the replay result to a target terminal for displaying the prompt word optimization effect.
[0007] Optionally, obtaining the dialogue log file corresponding to the dialogue replay information includes: extracting dialogue query information from the dialogue replay information; and using the target plugin to obtain the dialogue log file corresponding to the dialogue query information, wherein the target plugin supports recording log files corresponding to each agent, and the log files include the input data and output data corresponding to the agents.
[0008] Optionally, the above-mentioned dialogue replay processing of the agent copy based on the dialogue log file to obtain a replay result includes: storing the dialogue log file to a target storage terminal; using a scheduling platform plugin to start a scheduling platform to execute the following replay steps: using a scheduling thread to download the dialogue log file from the target storage terminal; reading and traversing the dialogue log file to perform dialogue replay processing of the agent copy based on the dialogue log file to obtain a replay result.
[0009] Optionally, sending the replay results to the target terminal for displaying the prompt word optimization effect includes: extracting the replay sub-results corresponding to the prompt word optimization requirements from the replay results, wherein the prompt word optimization requirements are the content in the dialogue replay information; converting the replay sub-results into content in the target display format to obtain the replay requirement content; and sending the replay requirement content to the target terminal.
[0010] Optionally, the above method further includes: in response to obtaining the replay information of the second agent, determining the replay information of the second agent as the replay information of the dialogue, determining the second agent as the first agent, and continuing to execute the replay step, wherein the second agent is an agent after optimizing the prompt words corresponding to the first agent.
[0011] Optionally, the aforementioned dialogue replay information and the aforementioned replay information of the second dialogue are input by the prompt word optimization agent; and the aforementioned sending the replay results to the target terminal for displaying the prompt word optimization effect includes: sending the replay results to the agent terminal corresponding to the prompt word optimization agent, so that the prompt word optimization agent can perform prompt word optimization effect analysis.
[0012] Optionally, the above-mentioned replay information of the dialogue is generated through the following steps: obtaining the historical replay result sequence for the first agent; determining whether to optimize the prompt words corresponding to the first agent based on the historical replay result sequence; and generating the above-mentioned replay information of the dialogue based on the historical replay result sequence in response to determining to optimize the prompt words.
[0013] Secondly, some embodiments of this disclosure provide an intelligent replay device, including: an acquisition unit configured to acquire dialogue replay information for a first intelligent agent, wherein the first intelligent agent is an intelligent agent with optimized prompt words; and an execution unit configured to perform the following replay steps on the dialogue replay information: acquiring a dialogue log file corresponding to the dialogue replay information; constructing an intelligent agent copy corresponding to the first intelligent agent; performing dialogue replay processing on the intelligent agent copy according to the dialogue log file to obtain a replay result; and sending the replay result to a target terminal for displaying the prompt word optimization effect.
[0014] Optionally, the acquisition unit can be configured to: extract dialogue query information from the dialogue replay information; and use the target plugin to acquire the dialogue log file corresponding to the dialogue query information, wherein the target plugin supports recording log files corresponding to each agent, and the log files include the input data and output data corresponding to the agent.
[0015] Optionally, the execution unit can be configured to: store the aforementioned dialogue log file to the target storage terminal; and, using the scheduling platform plugin, start the scheduling platform to perform the following replay steps: using the scheduling thread to download the aforementioned dialogue log file from the aforementioned target storage terminal; and read and traverse the aforementioned dialogue log file to perform dialogue replay processing on the aforementioned agent copy based on the aforementioned dialogue log file, thereby obtaining the replay result.
[0016] Optionally, the execution unit can be configured to: extract the replay sub-result corresponding to the prompt word optimization requirement from the above replay result, wherein the above prompt word optimization requirement is the content in the above dialogue replay information; convert the above replay sub-result into content in the target display format to obtain the replay requirement content; and send the above replay requirement content to the above target terminal.
[0017] Optionally, the device further includes: in response to acquiring replay information of a second intelligent agent, determining the replay information of the second intelligent agent as replay information of a dialogue, determining the second intelligent agent as the first intelligent agent, and continuing to execute the replay step, wherein the second intelligent agent is an intelligent agent after optimizing the prompt words corresponding to the first intelligent agent.
[0018] Optionally, the aforementioned dialogue replay information and the aforementioned re-dialogue replay information are input by the prompt word optimization agent; and the execution unit can be configured to send the aforementioned replay results to the agent terminal corresponding to the aforementioned prompt word optimization agent, so that the aforementioned prompt word optimization agent can perform prompt word optimization effect analysis.
[0019] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, such that when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any implementation of the first aspect.
[0020] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method as described in any implementation of the first aspect.
[0021] Fifthly, some embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0022] The above embodiments of this disclosure have the following beneficial effects: The intelligent replay method of some embodiments of this disclosure, by replaying the logs of the intelligent agent, can improve the efficiency of optimizing the corresponding prompt words of the intelligent agent. Specifically, the reason for the low efficiency of prompt word optimization is that the scripts used for batch processing are generally pre-set, the questions asked do not match the real-world scenarios, and the process of optimizing prompt words involves high costs, resulting in low optimization efficiency. Based on this, the intelligent replay method of some embodiments of this disclosure first obtains dialogue replay information for a first intelligent agent to determine the replay requirements of the intelligent agent. Here, the first intelligent agent is the intelligent agent after prompt word optimization. Here, for the intelligent agent after corresponding prompt word optimization, by replaying the dialogue, the generation of prompt word effects can be achieved efficiently and accurately. Then, for the above dialogue replay information, the following replay steps are performed: First, obtain the dialogue log file corresponding to the above dialogue replay information. Based on the user's replay request, obtain the dialogue log file of the target agent within a historical time period. This allows for subsequent replay processing based on the actual dialogue content within that historical time period, verifying the effectiveness of the optimized prompts. Second, construct a copy of the first agent. Constructing a copy avoids affecting agent usage and ensures that subsequent replay operations accurately verify the prompt's effectiveness. Third, based on the dialogue log file, perform dialogue replay processing on the agent copy to obtain the replay result, showcasing the performance effect after prompt optimization. Fourth, send the replay result to the target terminal used to display the prompt optimization effect. In summary, by obtaining the dialogue log file and constructing a copy of the agent, intelligent replay processing of optimized prompts can be achieved, efficiently and accurately obtaining the performance effect of the optimized prompts. Attached Figure Description
[0023] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0024] Figure 1 This is a schematic diagram of an application scenario of the intelligent reload method according to some embodiments of the present disclosure; Figure 2This is a flowchart of some embodiments of the intelligent reloading method according to the present disclosure; Figure 3 This is a flowchart of some other embodiments of the intelligent weight repositioning method according to the present disclosure; Figure 4 These are schematic diagrams illustrating the structure of some embodiments of the intelligent resonator according to this disclosure; Figure 5 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0025] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0026] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0027] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0028] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0029] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0030] Before performing any of the operations involving the collection, storage, or use of user personal information (such as chat log files) disclosed in this disclosure, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, informing personal information subjects, and obtaining prior authorization and consent from personal information subjects.
[0031] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0032] Figure 1This is a schematic diagram illustrating an application scenario of the intelligent replay method according to some embodiments of the present disclosure.
[0033] exist Figure 1 In the application scenario, firstly, the replay agent 101 can obtain dialogue replay information 102 for the first agent. Here, the first agent is an agent with optimized prompts. In this application scenario, the target user can be user A. The first agent can be an agent with optimized prompts. That is, the first agent here can be "Agent ID=1234". The dialogue replay information 102 can be "Please replay the production environment dialogue from 2025-12-01 to 2025-12-31, with agent ID=1234, and send the summarized results to me via email in the form of the taskType value and the number of occurrences in the output parameter field". For the above dialogue replay information 102, the replay agent 101 can perform the following replay steps: First, obtain the dialogue log file 103 corresponding to the above dialogue replay information 102. Second, construct an agent copy 104 corresponding to the above first agent. Third, based on the dialogue log file 103, the aforementioned agent copy 104 is subjected to dialogue replay processing to obtain a replay result 105. Fourth, the replay result 105 is sent to the target terminal 106 used for displaying the prompt word optimization effect.
[0034] It should be noted that the aforementioned replay agent 101 can be a system capable of perceiving its environment and taking actions to achieve a certain goal, possessing autonomy, goal orientation, and adaptability. They can be software, hardware, or a combination of both, and possess perception, action, and learning capabilities. Agent classifications include simple reactive, model-driven, goal-driven, utility-based, and learning agents. The replay agent 101 can have wide applications in robotics, software agents, game AI, and autonomous driving, and is an important component of artificial intelligence research.
[0035] It should be understood that Figure 1 The number of playback agents 101 shown is merely illustrative. Any number of electronic devices can be used depending on implementation requirements.
[0036] Continue to refer to Figure 2 The diagram illustrates a flow 200 of some embodiments of the intelligent repositioning method according to the present disclosure. The intelligent repositioning method includes the following steps: Step 201: Obtain dialogue replay information for the first agent.
[0037] In some embodiments, the executing entity of the above-described intelligent replay method (e.g.) Figure 1The electronic device 101 shown can acquire dialogue replay information for the first intelligent agent via a wired or wireless connection. The first intelligent agent can be the agent to be replayed in the dialogue. That is, the optimization effect of the corresponding prompt words for the first intelligent agent is determined through dialogue replay processing. The first intelligent agent can be an intelligent agent that supports the execution of corresponding functions (i.e., for performing specific tasks) in dialogue processing. The aforementioned first intelligent agent is the intelligent agent after prompt word optimization. The aforementioned first intelligent agent is the intelligent agent after optimizing the corresponding prompt words for the target intelligent agent. The target intelligent agent is an intelligent agent that has not yet undergone prompt word optimization. For example, the first intelligent agent can be an intelligent customer service agent used in e-commerce scenarios. The first intelligent agent can be an intelligent agent with a large model deployed to complete the corresponding function. The dialogue replay information can be a replay description based on dialogue logs to replay the first intelligent agent. In practice, the dialogue replay information can include: a log description of the dialogue replay, information about the intelligent agent performing the dialogue replay, and output requirement information for the dialogue replay. The log description can be the description content of a log file, used to subsequently determine the log content for dialogue replay of the first intelligent agent.
[0038] In practice, the dialogue replay information can be input by the target user on a relevant prompting word platform. The target user can be a user who optimizes the prompting words for the agent. That is, by replaying the dialogue, it is determined whether the optimized agent performs well after prompting word optimization. If it is determined that the performance is not good, the relevant target user further optimizes the prompting words, and the dialogue is replayed again until the optimized agent after prompting word adjustment meets the target user's requirements.
[0039] Step 202: For the above dialogue replay information, perform the following replay steps: Step 2021: Obtain the dialogue log file corresponding to the above dialogue replay information.
[0040] In some embodiments, the aforementioned executing entity may obtain a dialogue log file corresponding to the dialogue replay information. The dialogue log file may be a file containing various dialogue logs. The dialogue log file can serve as the data basis for the subsequent dialogue replay by the first intelligent agent. That is, based on the log content in the dialogue log file, the first intelligent agent performs dialogue processing to obtain the dialogue processing result. The performance effect of the optimized prompt words is determined based on the dialogue processing result.
[0041] As an example, firstly, the aforementioned executing agent can retrieve the first log file corresponding to the dialogue replay information from the dialogue database. Then, using the replay agent, a second log file is generated for the aforementioned dialogue replay information. Finally, the first and second log files are combined to obtain the dialogue log file. Step 2022: Construct a copy of the first intelligent agent.
[0042] In some embodiments, the aforementioned executing entity may construct an agent copy corresponding to the first agent. Here, an agent copy refers to an independent instance created by replicating the first agent, which, while maintaining the same functionality and parameters, can execute tasks in an isolated environment without affecting the original agent's operational state.
[0043] As an example, the aforementioned executing entity can "fork" the first agent into a new copy by calling the API interface provided by the agent platform, thus obtaining an agent copy.
[0044] Step 2023: Based on the above dialogue log file, perform dialogue replay processing on the above agent copy to obtain the replay result.
[0045] In some embodiments, the aforementioned executing entity can perform dialogue replay processing on the aforementioned agent copy based on the aforementioned dialogue log file to obtain a replay result. The replay result can be the dialogue output corresponding to the agent copy, which can represent the execution result of the corresponding prompt word of the target agent.
[0046] As an example, firstly, the aforementioned agent can input each dialogue question from the dialogue log file into the agent replica to obtain each dialogue result. Then, the dialogue questions and results are encapsulated to obtain the replay result.
[0047] In some optional implementations of certain embodiments, the aforementioned executing entity may perform dialogue replay processing on the aforementioned agent copy based on the aforementioned dialogue log file to obtain the replay result, including the following steps: The first step is to store the aforementioned dialogue log files to the target storage. The target storage can be a repository storing the relevant dialogue data for replay processing. For example, the target storage could be OSS (Object Storage Service).
[0048] The second step is to use the scheduling platform plugin to start the scheduling platform and perform the following replay steps: Sub-step 1: Using a scheduling thread, download the aforementioned dialogue log file from the target storage terminal. The scheduling platform plugin can be the MCP plugin, used to start the scheduling platform. The scheduling platform is the core system responsible for the overall management of replay task execution. Specifically, the scheduling platform can perform the following: task scheduling (managing the execution order and priority of tasks), resource allocation (allocating necessary computing resources to tasks), execution monitoring (tracking task execution status in real time), and result collection (summarizing and storing task execution results). During the execution of the replay task, it can receive the initialization task completion signal, start the replay operation, download the log file to be replayed from OSS (e.g., RUN_BATCH_2025123001.log), use 5 concurrent threads to execute the replay operation by default to improve execution efficiency, and write the result of each replay to a replay report table for subsequent analysis.
[0049] Sub-step 2: Read and traverse the above dialogue log file to perform dialogue replay processing on the above agent copy based on the above dialogue log file, and obtain the replay result.
[0050] As an example, the scheduling platform could use five concurrent threads to perform dialogue replay processing on the aforementioned agent replicas based on the dialogue log file, and obtain the replay results.
[0051] Step 2024: Send the above playback results to the target terminal used for displaying the prompt word optimization effect.
[0052] In some embodiments, the execution entity may send the replay results to a target terminal for displaying the optimized prompt effects. The target terminal may be a terminal used to display the performance effects after prompt optimization. In practice, when the dialogue replay information is input by the target user, the target terminal may be the terminal used by the target user. For example, the user terminal may be a mobile device used by the target user.
[0053] In some optional implementations of certain embodiments, the aforementioned execution entity may send the replay result to a target terminal for displaying the prompt word optimization effect, including the following steps: The first step is to extract the replay sub-results corresponding to the prompt optimization requirements from the replay results. These prompt optimization requirements are the content within the dialogue replay information. Specifically, these requirements can be related to the desired effect of optimizing the prompts. In practice, the focus can be on various parameter fields. That is, the performance of the prompts is measured based on the performance of each parameter field. In other words, the prompt optimization requirements are the key adjustment directions observed during prompt tuning. For example, a prompt optimization requirement could be the "taskType value and frequency of occurrence in the output parameter field (resp)". The corresponding replay sub-result could be the results such as "how many times taskType=1, how many times taskType=2, and how many times the default fallback strategy is used".
[0054] The second step is to convert the replay sub-results into the target display format to obtain the replay requirement content. The target display method can be a pre-defined method that supports displaying the replay results. In practice, if no settings are specified, the default target display method can be an HTML report.
[0055] The third step is to send the aforementioned replay request content to the aforementioned target terminal.
[0056] In some optional implementations of certain embodiments, after step 202, the steps further include: In response to obtaining the replay information of the dialogue with the second agent, the executing entity can identify the replay information as dialogue replay information, identify the second agent as the first agent, and continue to execute the replay step. The second agent is an agent whose corresponding prompts for the first agent have been optimized. The replay information may be the description content set by the target user for the second agent to replay the dialogue.
[0057] In specific scenarios, the replay information of the dialogue can be input by the target user. The target user can dynamically adjust the prompts corresponding to the agent by viewing the replay results, so as to continuously and automatically execute the replay steps and achieve efficient optimization of the prompts.
[0058] In some optional implementations of certain embodiments, the aforementioned dialogue replay information and the aforementioned re-dialogue replay information are input to the prompt word tuning agent. The prompt word tuning agent can be an agent that adaptively adjusts the corresponding prompt word of a first agent based on the replay effect (i.e., the performance effect of the corresponding prompt word). In practice, the prompt word tuning agent can be the first agent (i.e., representing that the first agent can adaptively adjust the prompt word based on its own prompt word performance effect), or it can be an agent specifically designed for prompt word tuning. In practice, when the prompt word tuning agent is an agent specifically designed for prompt word tuning, the prompt word tuning agent can be deployed with a large language model for prompt word tuning.
[0059] Optionally, the above replay results are sent to the corresponding agent terminal of the above prompt word optimization agent, so that the above prompt word optimization agent can analyze the prompt word optimization effect.
[0060] In some optional implementations of certain embodiments, the aforementioned replay information is generated through the following steps: The first step is to obtain the historical replay result sequence for the first intelligent agent. This historical replay result sequence can be the replay results after the first intelligent agent performed prompt word optimization and replay processing at various historical times. Each historical replay result has a corresponding historical time. The historical time can be the time before the target terminal obtains the replay result.
[0061] As an example, the replay results of the first agent are cached to obtain a sequence of historical replay results.
[0062] The second step is to determine, based on the above sequence of historical replay results, whether to optimize the prompt words corresponding to the first intelligent agent.
[0063] As an example, in response to determining that the performance of each historical replay result in the historical replay result sequence tends to be stable, it is determined not to perform prompt word optimization on the prompt words corresponding to the first intelligent agent. In response to determining that the performance of each historical replay result in the historical replay result sequence has not tended to be stable, it is determined to perform prompt word optimization on the prompt words corresponding to the first intelligent agent.
[0064] The third step is to respond to the determination to optimize the prompt words and generate the above-mentioned replay information for the next dialogue based on the above-mentioned historical replay result sequence.
[0065] As an example, based on the above sequence of historical replay results, the large language model deployed in the agent is optimized using prompt words to generate the above replay information of the dialogue again.
[0066] The above embodiments of this disclosure have the following beneficial effects: The intelligent replay method of some embodiments of this disclosure, by replaying the logs of the intelligent agent, can improve the efficiency of optimizing the corresponding prompt words of the intelligent agent. Specifically, the reason for the low efficiency of prompt word optimization is that the scripts used for batch processing are generally pre-set, the questions asked do not match the real-world scenarios, and the process of optimizing prompt words involves high costs, resulting in low optimization efficiency. Based on this, the intelligent replay method of some embodiments of this disclosure first obtains dialogue replay information for a first intelligent agent to determine the replay requirements of the intelligent agent. Here, the first intelligent agent is the intelligent agent after prompt word optimization. Here, for the intelligent agent after corresponding prompt word optimization, by replaying the dialogue, the generation of prompt word effects can be achieved efficiently and accurately. Then, for the above dialogue replay information, the following replay steps are performed: First, obtain the dialogue log file corresponding to the above dialogue replay information. Based on the user's replay request, obtain the dialogue log file of the target agent within a historical time period. This allows for subsequent replay processing based on the actual dialogue content within that historical time period, verifying the effectiveness of the optimized prompts. Second, construct a copy of the first agent. Constructing a copy avoids affecting agent usage and ensures that subsequent replay operations accurately verify the prompt's effectiveness. Third, based on the dialogue log file, perform dialogue replay processing on the agent copy to obtain the replay result, showcasing the performance effect after prompt optimization. Fourth, send the replay result to the target terminal used to display the prompt optimization effect. In summary, by obtaining the dialogue log file and constructing a copy of the agent, intelligent replay processing of optimized prompts can be achieved, efficiently and accurately obtaining the performance effect of the optimized prompts.
[0067] Further reference Figure 3 The diagram illustrates flow 300 of some other embodiments of the intelligent weight repositioning method according to the present disclosure. This intelligent weight repositioning method includes the following steps: Step 301: Obtain the dialogue replay information input by the target user for the first intelligent agent.
[0068] Step 302: For the above dialogue replay information, perform the following replay steps: Step 3021: Extract the dialogue query information from the dialogue replay information above.
[0069] In some embodiments, the execution entity (e.g. Figure 1The replay agent 101 shown can extract dialogue query information from the aforementioned dialogue replay information. This dialogue query information can be query content related to querying dialogue logs within the dialogue replay information. For example, the dialogue query information can be keywords related to querying dialogue logs within the dialogue replay information. In practice, the dialogue query information can include: agent information, log time period, and key log fields. For example, the dialogue query information can include: startDate=2025-12-01, endDate=2025-12-01, agentId=1234, sendType=email, summary_field=taskType.
[0070] Step 3022: Use the target plugin to obtain the dialogue log file corresponding to the above dialogue query information.
[0071] In some embodiments, the aforementioned executing entity can utilize the target plugin to obtain the dialogue log file corresponding to the aforementioned dialogue query information. The target plugin supports recording log files corresponding to each agent. The log file includes the input and output data corresponding to the agent. The target plugin can be an MCP (Model Context Protocol) plugin, establishing a standardized communication channel between the Large Language Model (LLM) and external data sources and tools. In this disclosure, the target plugin can be used to query and collect the dialogue log files corresponding to each agent. The function of the target plugin is to encapsulate the input and output parameters of the agent into an entity object, and then report it to the log server via RPC (Remote Procedure Call). Each agent can include a target agent. That is, the target plugin is used to collect the log content corresponding to each agent. The target plugin can be embedded in each agent.
[0072] Step 3023: Construct a copy of the first intelligent agent.
[0073] Step 3024: Based on the above dialogue log file, perform dialogue replay processing on the above agent copy to obtain the replay result.
[0074] Step 3025: Send the above playback results to the target terminal used for displaying the prompt word optimization effect.
[0075] In some embodiments, the specific implementation of steps 301 and 3023-3025 and their resulting technical effects can be found in [reference needed]. Figure 2 Steps 201 and 2022-2024 in the corresponding embodiments will not be repeated here.
[0076] from Figure 3 It can be seen from this that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 3 In some corresponding embodiments, the process 300 of the intelligent replay method can use the target plugin to accurately and quickly obtain the real dialogue log file for the first intelligent agent to replay, and can more accurately generate the performance effect of the optimized prompt words corresponding to the first intelligent agent.
[0077] Further reference Figure 4 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of an intelligent resonator, which are similar to... Figure 2 Corresponding to the method embodiments shown, this intelligent reamplifier can be specifically applied to various electronic devices.
[0078] like Figure 4 As shown, an intelligent replay device 400 includes an acquisition unit 401 and an execution unit 402. The acquisition unit 401 is configured to acquire dialogue replay information for a first intelligent agent, wherein the first intelligent agent is an intelligent agent with optimized prompt words. The execution unit 402 is configured to perform the following replay steps on the dialogue replay information: acquire a dialogue log file corresponding to the dialogue replay information; construct an intelligent agent copy corresponding to the first intelligent agent; perform dialogue replay processing on the intelligent agent copy according to the dialogue log file to obtain a replay result; and send the replay result to a target terminal for displaying the prompt word optimization effect.
[0079] In some optional implementations of certain embodiments, the acquisition unit 401 may be further configured to: extract dialogue query information from the dialogue replay information; and use the target plugin to acquire the dialogue log file corresponding to the dialogue query information, wherein the target plugin supports recording log files corresponding to each agent, and the log files include input data and output data corresponding to the agents. In some optional implementations of some embodiments, the execution unit 402 may be further configured to: store the dialogue log file to the target storage terminal; and use the scheduling platform plugin to start the scheduling platform to perform the following replay steps: using the scheduling thread to download the dialogue log file from the target storage terminal; and reading and traversing the dialogue log file to perform dialogue replay processing on the agent copy according to the dialogue log file to obtain the replay result.
[0080] In some optional implementations of some embodiments, the execution unit 402 may be further configured to: extract the replay sub-result corresponding to the prompt word optimization requirement from the above replay result, wherein the above prompt word optimization requirement is the content in the above dialogue replay information; convert the above replay sub-result into content in the target display format to obtain the replay requirement content; and send the above replay requirement content to the above target terminal.
[0081] In some optional implementations of certain embodiments, the apparatus 400 further includes a step execution unit (not shown in the figure). This step execution unit can be configured to: in response to obtaining replay information of a second agent's dialogue, determine the replay information as dialogue replay information, determine the second agent as the first agent, and continue executing the replay step, wherein the second agent is an agent whose corresponding prompt words for the first agent have been optimized.
[0082] In some optional implementations of some embodiments, the above-mentioned dialogue replay information and the above-mentioned replay information of the second dialogue are input by the prompt word optimization agent; and the execution unit 402 may be further configured to send the above-mentioned replay results to the agent terminal corresponding to the above-mentioned prompt word optimization agent, so that the above-mentioned prompt word optimization agent can perform prompt word optimization effect analysis.
[0083] It is understandable that the units described in the intelligent resonator 400 are related to the reference. Figure 2 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the intelligent resonator 400 and the units contained therein, and will not be repeated here.
[0084] The following is for reference. Figure 5 It illustrates electronic devices suitable for implementing some embodiments of this disclosure (e.g., Figure 1 A schematic diagram of the structure of electronic device 101)500. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0085] like Figure 5As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory 502 or a program loaded from a storage device 508 into a random access memory 503. The random access memory 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, the read-only memory 502, and the random access memory 503 are interconnected via a bus 504. An input / output interface 505 is also connected to the bus 504.
[0086] Typically, the following devices can be connected to the input / output interface 505: input devices 506 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 5 Each box shown can represent a device or multiple devices as needed.
[0087] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a read-only memory 502. When the computer program is executed by the processing device 501, it performs the functions defined above in the methods of some embodiments of this disclosure.
[0088] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0089] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0090] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire dialogue replay information for a first intelligent agent, wherein the first intelligent agent is an intelligent agent whose prompt words have been optimized for the target intelligent agent; and, for the aforementioned dialogue replay information, perform the following replay steps: acquire a dialogue log file corresponding to the aforementioned dialogue replay information; construct an intelligent agent copy corresponding to the aforementioned first intelligent agent; perform dialogue replay processing on the intelligent agent copy according to the aforementioned dialogue log file to obtain a replay result; and send the replay result to a target terminal used for displaying the prompt word optimization effect.
[0091] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0092] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0093] The units described in some embodiments of this disclosure can be implemented in software or in hardware. The described units can also be housed in a processor; for example, a processor may be described as including an acquisition unit and an execution unit. The names of these units do not necessarily limit the unit itself; for example, an acquisition unit may also be described as "a unit that acquires dialogue replay information for a first intelligent agent."
[0094] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0095] Some embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements any of the above-described intelligent replay methods.
[0096] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for replaying an intelligent agent, applied to replaying an intelligent agent, comprising: Obtain dialogue replay information for the first agent, wherein the first agent is an agent with optimized prompt words; For the aforementioned dialogue replay information, perform the following replay steps: Obtain the dialogue log file corresponding to the dialogue replay information; Construct a copy of the first agent; Based on the dialogue log file, the agent copy is subjected to dialogue replay processing to obtain the replay result; The replay results are sent to the target terminal used to display the optimization effect of the prompt words.
2. The method according to claim 1, wherein, The step of obtaining the dialogue log file corresponding to the dialogue replay information includes: Extract the dialogue query information from the dialogue replay information; Using the target plugin, obtain the dialogue log file corresponding to the dialogue query information. The target plugin supports recording log files corresponding to each agent, and the log files include the input data and output data of the agent.
3. The method according to claim 1, wherein, The step of performing dialogue replay processing on the agent copy based on the dialogue log file to obtain the replay result includes: Store the dialogue log file to the target storage device; Using the scheduling platform plugin, start the scheduling platform to perform the following replay steps: The dialogue log file is downloaded from the target storage terminal using a scheduling thread; The dialogue log file is read and traversed to perform dialogue replay processing on the agent copy based on the dialogue log file, and the replay result is obtained.
4. The method according to claim 1, wherein, Sending the playback result to the target terminal for displaying the prompt word optimization effect includes: Extract the replay sub-results corresponding to the prompt word optimization requirements from the replay results, wherein the prompt word optimization requirements are the content in the dialogue replay information; The replay sub-results are converted into the target display format to obtain the replay requirement content; The replay request content is sent to the target terminal.
5. The method according to claim 1, wherein, The method further includes: In response to obtaining the replay information of the dialogue for the second agent, the replay information is identified as dialogue replay information, the second agent is identified as the first agent, and the replay step is continued. The second agent is the agent after the prompt words corresponding to the first agent are optimized.
6. The method according to claim 5, wherein, The dialogue replay information and the second dialogue replay information are input by the prompt word tuning agent; as well as Sending the playback result to the target terminal for displaying the prompt word optimization effect includes: The playback result is sent to the terminal of the intelligent agent corresponding to the prompt word optimization agent, so that the prompt word optimization agent can analyze the prompt word optimization effect.
7. The method according to claim 6, wherein, The replay information of the dialogue is generated through the following steps: Obtain the sequence of historical replay results for the first agent; Based on the sequence of historical replay results, determine whether to optimize the prompt words corresponding to the first agent; In response to the determination to perform prompt word optimization, the replay information for the next dialogue is generated based on the sequence of historical replay results.
8. An intelligent replay device, applied to replaying an intelligent agent, comprising: The acquisition unit is configured to acquire dialogue replay information for a first agent, wherein the first agent is an agent with optimized prompt words; The execution unit is configured to perform the following replay steps on the dialogue replay information: obtain the dialogue log file corresponding to the dialogue replay information; construct an agent copy corresponding to the first agent; perform dialogue replay processing on the agent copy according to the dialogue log file to obtain the replay result; and send the replay result to the target terminal for displaying the prompt word optimization effect.
9. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-7.