Intelligent agent publishing method and device, electronic equipment and storage medium
By adding the identification information of the target prompt word to the code in the agent and automatically loading it at startup, the problem of separate testing of the agent prompt word and code is solved, and unified testing and stable release are achieved.
Patent Information
- Application Number
- CN202411346852.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-31
AI Technical Summary
The prompt word development and code development test of existing agents are carried out separately, which makes integration testing difficult and difficult to fully test. The prompt word version and code published online do not match the stability, making it difficult to guarantee.
By determining the target prompt word from at least one version of the prompt word, adding its first identification information to the code, responsive to the agent startup, obtaining the first mark information from the code, and loading the target prompt word based on the first mark information. Go to the specified location to complete the testing and publication of the target prompt words and code.
It realizes unified testing of prompt words and code, reduces the difficulty of testing, improves test stability, and ensures the correctness of prompt words and code versions published online.
Smart Images

Figure CN119227720A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to the field of intelligent agents, large models, computer vision and deep learning technology. More specifically, the present disclosure provides a method, device, electronic device and storage medium for publishing an intelligent agent. Background Art
[0002] With the development of artificial intelligence technology, agents, as a key component of artificial intelligence, play an important role and are widely used in many fields, such as smart homes, autonomous driving, robots, games and entertainment, financial services, healthcare, customer service and support, education, smart transportation and environmental monitoring, etc. Summary of the invention
[0003] The present disclosure provides a method, device, electronic device and storage medium for publishing an intelligent agent.
[0004] According to one aspect of the present disclosure, a method for publishing an intelligent agent is provided, the method comprising: determining a target prompt word from prompt words of at least one version, the prompt word being used as input for the intelligent agent to guide the intelligent agent to generate output; adding first identification information of the target prompt word to a code, the code being used to implement the intelligent agent; in response to the intelligent agent starting, obtaining first tag information from the code, and loading the target prompt word to a specified location based on the first tag information to complete testing and publishing of the target prompt word and the code.
[0005] According to another aspect of the present disclosure, a publishing device for an intelligent agent is provided, the device comprising: a determination module, used to determine a target prompt word from prompt words of at least one version, the prompt word being used as input for the intelligent agent to guide the intelligent agent to generate output; an adding module, used to add first identification information of the target prompt word to a code, the code being used to implement the intelligent agent; a loading module, used to obtain first tag information from the code in response to the startup of the intelligent agent, and load the target prompt word to a specified location based on the first tag information, so as to complete the testing and publishing of the target prompt word and the code.
[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided according to the present disclosure.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to cause a computer to execute the method provided according to the present disclosure.
[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method provided according to the present disclosure is implemented.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0011] Figure 1 is a schematic diagram of an exemplary system architecture to which a publishing method and apparatus for an intelligent agent can be applied according to an embodiment of the present disclosure;
[0012] Figure 2 is a flow chart of a method for publishing an agent according to an embodiment of the present disclosure;
[0013] Figure 3 A schematic diagram schematically shows a process of creating a prompt word according to an embodiment of the present disclosure;
[0014] Figure 4 A schematic diagram schematically shows a code testing process according to an embodiment of the present disclosure;
[0015] Figure 5 A schematic diagram schematically shows an interactive interface of a second development tool according to an embodiment of the present disclosure;
[0016] Figure 6 is a block diagram of a publishing device of an intelligent agent according to an embodiment of the present disclosure;
[0017] Figure 7 A block diagram schematically shows a structure of an artificial intelligence agent according to an embodiment of the present disclosure; and
[0018] Figure 8 It is a block diagram of an electronic device to which the publishing method of an intelligent agent can be applied according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0020] An agent can refer to an agent that can perceive the environment and take actions to achieve specific goals. It can be software, hardware or a system with autonomy, adaptability and interaction capabilities. The core of an agent is the ability to learn autonomously and continuously evolve to better complete tasks and adapt to complex environments. The working principle of an agent can include three processes: perception, decision-making and execution. First, the agent collects information in the environment through the perception module, which can be static or dynamic. Then, the agent can make decisions and reasoning based on the collected information, combined with its own algorithms and learning mechanisms, to determine the appropriate behavior strategy. Finally, the agent can convert the decision results into actual actions through the action module to change the state of the environment, and adjust its behavior strategy in real time to adapt to environmental changes.
[0021] Intelligent agents and large models can be used in combination. Large models can be used as part of intelligent agents to process data perceived by intelligent agents and help them make more accurate decisions. For example, in an autonomous driving scenario, intelligent agents can perceive the road environment, identify traffic signals and obstacle information, while large models can use this information for deep learning and detection, thereby providing more accurate and reliable decision support for intelligent agents.
[0022] The interaction between agents and big models in the field of artificial intelligence can promote the development and progress of intelligent systems. The autonomy and interactivity of agents enable them to flexibly respond to various challenges in various complex environments. The information processing and knowledge output capabilities of big models provide agents with richer and more accurate data support. The combination of agents and big models makes artificial intelligence systems more intelligent and autonomous.
[0023] The release elements of the intelligent body can include prompts, codes and configurations. At present, the development and testing of prompts are carried out on an independent platform. After the test is completed, the prompts are manually copied to the self-operation and maintenance medium, and then integrated testing and release are completed together with the code. The code and configuration are developed, tested and put online on the intelligent body hosting platform, and the prompts are updated independently and manually. Since the development and testing of prompts and the development, testing and release of codes are carried out separately, integration testing is difficult and difficult to fully test, and the version of prompts released online does not match the code. Since prompts are freely stored in the self-operation and maintenance medium by each business party, unified management is impossible and stability is difficult to guarantee.
[0024] The present disclosure provides a publishing method for an intelligent agent, which includes determining a target prompt word from prompt words of at least one version; adding first identification information of the target prompt word to a code; obtaining first marking information from the code in response to the intelligent agent starting, and loading the target prompt word to a specified location based on the first marking information to complete the testing and publishing of the target prompt word and the code.
[0025] Compared with the current method of separately conducting prompt word development and testing and code development and testing, the intelligent agent publishing method provided by the present invention pre-adds the identification information of the target prompt word to be tested to the corresponding code to be tested. When the intelligent agent is started for testing, the target prompt word is automatically brought in for testing together with the code by obtaining the identification information in the code, thereby achieving unified testing of the prompt word and code, reducing the difficulty of testing, and improving test stability. In addition, the prompt word version matches the code, ensuring the correctness of the prompt word and code versions published online.
[0026] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0027] In the technical solution of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0028] Figure 1 is a schematic diagram of an exemplary system architecture to which the publishing method and device of an intelligent agent can be applied according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0029] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101 and 102 and a server 103 .
[0030] The terminal devices 101, 102 may be communicatively connected to the server 102 via a network. The network may include various connection types, such as wired and / or wireless communication links, and the like.
[0031] The terminal devices 101 and 102 may have a display screen, which may provide an interactive interface. Users may select, edit, and perform other operations on the interactive interface of the terminal devices 101 and 102 to create prompt words, write codes, and trigger testing of intelligent agents. The terminal devices 101 and 102 include but are not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0032] The server 103 may be a server that provides various services, such as a background management server that performs unified testing of prompt words and codes of the agent in response to user operations on the interactive interface of the terminal devices 101 and 102 (for example only). The background management server may add the identification information of the target prompt word to be tested to the corresponding code to be tested, and when the agent is started for testing, the target prompt word is automatically brought in for testing together with the code by acquiring the identification information in the code.
[0033] It should be noted that the publishing method of the intelligent body provided in the embodiment of the present disclosure can generally be executed by the server 103. Accordingly, the publishing device of the intelligent body provided in the embodiment of the present disclosure can generally be set in the server 103. The publishing method of the intelligent body provided in the embodiment of the present disclosure can also be executed by a server or a server cluster that is different from the server 103 and can communicate with the terminal devices 101, 102 and / or the server 103. Correspondingly, the publishing device of the intelligent body provided in the embodiment of the present disclosure can also be set in a server or a server cluster that is different from the server 103 and can communicate with the terminal devices 101, 102 and / or the server 103.
[0034] It should be understood that Figure 1 The types and numbers of the terminal devices and servers in the embodiment are merely illustrative. Any types and numbers of terminal devices and servers may be provided as required.
[0035] Figure 2 It is a flowchart of a method for publishing an intelligent agent according to an embodiment of the present disclosure.
[0036] like Figure 2 As shown, the method 200 may include operations S210 to S230.
[0037] In operation S210, a target prompt word is determined from at least one version of prompt words.
[0038] According to an embodiment of the present disclosure, prompt words can be used for input of an agent to guide the agent to generate output. Prompt words can be an important means of interacting with an agent or a large model, which can be text or instructions that provide input to the agent or large model to guide it to generate a specific output. Prompt words can be text paragraphs provided by the user when interacting with the model, used to describe the information, answers, text, etc. that the user wants to obtain from the model. The purpose of prompt words is to guide the model to produce the required response in order to better control the generated output. Prompt words can also be parameter descriptions in a certain format.
[0039] In the actual application of intelligent agents, the intelligent agents may involve a variety of application scenarios, corresponding to multiple large models, such as face retrieval models, object retrieval models, text recognition models, target detection models, segmentation models, plant and animal recognition models, landmark recognition models, etc. For the same retrieval model, the objects of retrieval may be, for example, text, audio, pictures, videos, charts, etc. The prompt words created for text, audio, pictures, videos, charts, etc. are different, that is, the versions of the prompt words are different. For different application scenarios, the input and output of the large models involved are different. For example, the input and output of the large models for implementing marketing program management, creative material management, data insights, diagnostic optimization, account management, etc. are different, so the prompt words are different, that is, the versions of the prompt words are different.
[0040] Therefore, development and operation personnel can create multiple versions of prompt words to meet the needs of different applications. Development and operation personnel can select corresponding prompt words as target prompt words according to the current actual application scenario, and test the prompt words and codes. For example, the current application scenario is to use clustering algorithms in Python for clustering analysis, then the corresponding target prompt words can be prompt words for implementing clustering analysis using clustering algorithms in Python. For another example, the current application scenario is that when a user processes an office document, an intelligent agent is called to execute document-related content, then the corresponding target prompt words can be prompt words for searching documents, querying information, integrating document information, etc.
[0041] In operation S220, first identification information of the target cue word is added to the code.
[0042] According to the embodiments of the present disclosure, the code can be used to implement an intelligent agent. For scenarios where an intelligent agent is used for perception, decision-making, and execution, the code for implementing the intelligent agent can be understood as the code for implementing a single intelligent agent; for scenarios where an intelligent agent and a large model are used in combination for perception, decision-making, and execution, the code for implementing the intelligent agent can be understood as the code for the intelligent agent and the large model integrated on the intelligent agent.
[0043] Different first identification information can be used to identify different versions of prompt words, that is, the first identification information and the prompt word can be in a one-to-one correspondence. The development and operation personnel complete the code development in the test environment, and complete the writing of the code that interacts with the intelligent agent and the large model by adding the first identification information in the code. Since the first identification information is added to the code, the entire content of the target prompt word is not added to the code writing, which can avoid the problem of increased programming difficulty caused by the content of the prompt word, such as characters and strings.
[0044] In operation S230, in response to the agent being started, first marking information is obtained from the code, and the target prompt word is loaded into a designated location based on the first marking information to complete the testing and release of the target prompt word and the code.
[0045] According to an embodiment of the present disclosure, the designated position may be the location of the prompt word during the code and prompt word testing process. When the intelligent agent is started, the target prompt word identified by the first identification information is obtained based on the first identification information, and all the target prompt words are loaded into the designated position. The completion of the loading of the target prompt word indicates that the intelligent agent has been started and the testing and release of the code and prompt word have been completed.
[0046] Through the disclosed embodiments, by pre-adding the first identification information of the target prompt word to be tested to the corresponding code to be tested, when the intelligent agent is started for testing, the target prompt word is automatically brought in for testing together with the code by obtaining the first identification information in the code, thereby achieving unified testing of the prompt word and code, reducing the difficulty of testing, improving test stability, and matching the prompt word version with the code, thereby ensuring the correctness of the online published version.
[0047] The following will be combined Figure 3 A method for publishing an intelligent agent according to another embodiment of the present disclosure is schematically described. Figure 3 The following is a schematic diagram schematically showing a process of creating a prompt word according to an embodiment of the present disclosure.
[0048] like Figure 3 As shown, based on the publishing method of the agent described in the above embodiment, the publishing method of the agent in this embodiment may also include:
[0049] Before determining the target prompt word from the prompt words of at least one version, at least one version of the prompt word is generated by a first development tool. The prompt word of at least one version is stored in a first storage unit, which is a storage unit allocated for the first development tool.
[0050] In some embodiments, the user can perform operations such as editing based on the interactive interface of the terminal device 301, create at least one version of the prompt word 312 through the first development tool 311, and store the first version of the prompt word 312 in the first storage unit 313. The first development tool 311 can be, for example, a prompt management tool platform. The first development tool 311 can be configured with a joint publishing function. Based on the joint publishing function, after a version of the prompt word is created, it can be published, and other platforms or tools can associate and pull the prompt word of this version, that is, the joint publishing function can break through the barriers between the first development tool 311 and other platforms or tools, and change the original way of independently developing and testing prompt words.
[0051] Through the embodiment of the present disclosure, since a corresponding first storage unit is allocated to the first development tool, the prompt words can be automatically stored in the first storage unit after creation, and subsequent tests can uniformly obtain the corresponding target prompt words from the first storage unit. Compared with the prompt words being independently developed and stored in the operation and maintenance media corresponding to each business party after testing, unified management can be achieved, and the unified testing stability of subsequent codes and prompt words is higher.
[0052] The following will be combined Figure 4 A method for publishing an intelligent agent according to another embodiment of the present disclosure is schematically described. Figure 4 The figure schematically shows a code testing process according to an embodiment of the present disclosure.
[0053] like Figure 4 As shown, based on the publishing method of the agent described in the above embodiment, the publishing method 400 of the agent in this embodiment may also include:
[0054] Before the target prompt word is loaded into the designated location based on the tag information, the first file is obtained from the second storage unit, the first file includes the version number of the target prompt word, the second storage unit is a storage unit allocated for the second development tool, and the second development tool is used for writing code. Based on the version number of the target prompt word, the target prompt word is obtained from the first storage unit.
[0055] In some embodiments, the user can perform operations such as editing based on the interactive interface of the terminal device 401, create at least one version of the prompt word 412 through the first development tool 411, and store the first version of the prompt word 412 in the first storage unit 413. The first storage unit 413 can be a storage unit set on the terminal device 401.
[0056] The user can perform operations such as editing based on the interactive interface of the terminal device 402, and write the code 422 through the second development tool 421. During the writing process, the first identification information of the target prompt word can be added to the code 422 to complete the code writing. The completed code can be stored in the second storage unit 423. The second storage unit 423 can be set on the terminal device 402. The second storage unit 423 can also store a first file in advance, and the first file includes a version number of the target prompt word, and the version number can be unique.
[0057] The server 403 may be configured with a processor 431 and a memory 432, and the processor 431 and the memory 432 may be communicatively connected. The memory 432 stores instructions that can be executed by the processor 431, and the instructions may include instructions for starting an agent in a container and performing a unified test of prompt words and codes. The instructions may also include instructions for development and operation personnel to operate on the interactive interface of the terminal devices 401 and 402 to complete the creation of prompt words and code writing.
[0058] After starting the intelligence, the processor 431 can obtain the first file storing the version number of the target prompt word from the second storage unit 423, and read the first file to obtain the version number of the target prompt word. The terminal device 401 can be accessed through http, and the corresponding target prompt word can be obtained from the first storage unit 413 based on the version number. The processor 431 can also obtain the code from the second storage unit 423, obtain the first identification information in the code, and add the obtained target prompt word to the specified position based on the first identification information to complete the test and release.
[0059] Through the embodiment of the present disclosure, since the prompt words are retained in the local first storage unit after development, there is no need to send the developed prompt words to the second storage unit for storage, and the second storage unit stores the first file containing the version number of the target prompt words. When the intelligent agent is started for testing, the target prompt words are obtained from the first storage unit based on the version number, thereby saving network transmission resources and memory resources.
[0060] In other embodiments, the second storage unit 423 can also be set on the server 403. After the terminal 402 completes the writing of the code to be tested, it is sent to the second storage unit 423 on the server 403 for storage, and the first file is also retained in the second storage unit 423 on the server 403. In this way, when the intelligent agent is started for testing, the server 403 does not need to access the terminal device 402 to obtain the code and the first file, thereby improving the testing efficiency.
[0061] In other embodiments, the terminal device 401 and the terminal device 402 may be electronic devices with autonomous capabilities and storage capabilities, and the terminal device 401 and the terminal device 402 may be directly connected in communication without the need to achieve communication connection through the server 403. The prompt word 412 may be independently created on the terminal device 401 without the need to rely on the processing function of the server 403, and the prompt word 412 may be stored in the local first storage unit 413. The code may be independently written and configured on the terminal device 402, and stored in the local second storage unit 423 after writing. The local second storage unit 423 may also store the first file. The terminal device 402 also has the ability to test the code. In response to the start of the intelligent agent, the prompt word is obtained from the first storage unit 413 based on the version number for testing and publishing.
[0062] In other embodiments, the first development tool 411 and the second development tool 412 may also be set in the same terminal device, for example, the first development tool 411 and the second development tool 412 may be set in the terminal device 401. For another example, the first development tool 411 and the second development tool 412 may be set in the terminal device 402. The first storage unit 413 may be set in the terminal device, and the second storage unit 423 may be set in the server 403.
[0063] According to an embodiment of the present disclosure, the publishing method of an agent may further include:
[0064] The target prompt word is added to the first file to obtain a second file, and the target prompt word and the version number of the target prompt word in the second file have a mapping relationship.
[0065] In response to the existence of the version number of the target prompt word in the second file, the target prompt word is obtained from the second file.
[0066] For example, if the target prompt word A with version number a has been obtained from the first storage unit, the target prompt word A can be added to the first file to obtain a second file containing both version word a and target prompt word A. If the target prompt word A with version number a needs to be added to another code for testing next time, the target prompt word A can be directly obtained from the second file without accessing the first storage unit 413 to obtain the target prompt word A. The target prompt word and the version number of the target prompt word have a mapping relationship that can correspond one to one.
[0067] Through the embodiments of the present disclosure, the first file can only store the version number at the beginning, saving memory resources. After the test, the tested prompt words can be added to the second file. In this way, if the version number of the prompt word to be tested does not change subsequently, the corresponding prompt word content can be directly obtained from the second file without repeatedly accessing the first storage unit of the terminal to obtain the prompt word content, saving network resources and access resources.
[0068] The following will be combined Figure 5 A method for publishing an intelligent agent according to another embodiment of the present disclosure is schematically described. Figure 5 A schematic diagram schematically illustrates an interactive interface of a second development tool according to an embodiment of the present disclosure.
[0069] like Figure 5 As shown, based on the agent publishing method described in the above embodiment, in the agent publishing method of this embodiment, determining the target prompt word from the prompt word of at least one version may include:
[0070] In response to the user operating a control displayed on the display interface of the second development tool, a prompt word of a target version is selected from the prompt words of at least one version as a target prompt word.
[0071] After the test is completed, the prompt words, codes and configurations are published online.
[0072] In one example, determining a target version of code from at least one version of code may include:
[0073] In response to a user operating a control displayed on a display interface of the second development tool, a target version of code is selected from at least one version of code as the target code.
[0074] In one example, determining the configuration of the target version from the configuration of at least one version may include:
[0075] In response to a user operating a control displayed on a display interface of the second development tool, a configuration of a target version is selected from the configurations of at least one version as a target configuration.
[0076] In one example, when the user operates the control displayed on the display interface of the second development tool, the target prompt word, target code, and target configuration are put online in a unified manner.
[0077] For example, a prompt word version selection control 521 may be provided on the interactive interface 520. When the user clicks the control 521, a display box displaying the version number of the currently existing prompt word may pop up, and the user may select the prompt word of the target version from the display box of the existing prompt word version number.
[0078] For another example, a code version selection control 522 may be provided on the interactive interface 520. When the user clicks the control 522, a display box showing the currently completed test code version number may pop up, and the user may select the currently required test code version number from the display box.
[0079] For another example, a configuration version selection control 523 may be provided on the interactive interface 520. When the user clicks the control 523, a display box showing the configuration version number corresponding to the current test code may pop up. The user may select the configuration version corresponding to the current test code from the configuration version number display box.
[0080] After the user selects the corresponding target prompt word, code and configuration through controls 521, 522 and 523, the user can click confirmation item 524 to realize the multi-factor release of the target prompt word, code and configuration. After the release, the target prompt word version, code version and configuration version are unified, and a unified version is put online, ensuring the correctness of the version.
[0081] Through the embodiments of the present disclosure, a visual control is provided on the interactive interface to allow the user to quickly add identification information of the target prompt word in the code, thereby improving the convenience and efficiency of the test.
[0082] According to an embodiment of the present disclosure, based on the above embodiment, the publishing method of the agent may further include:
[0083] Displays the version number of each version in the prompt word of at least one version.
[0084] For example, the version numbers of each version in the prompt word of at least one version can be displayed in the form of a table. Based on the principle of the selection control 521 of the prompt word version, a control can be set. When the control is not clicked, the table containing the version numbers of each version in the prompt word is in a hidden state. Clicking the control can pop up the table and display the complete table to view the version numbers of each prompt word. After viewing, click the control again to hide the table.
[0085] Through the embodiments of the present disclosure, compared with the existing independent R&D testing and code R&D testing of prompt words, code developers need to view the existing version and the latest version from the prompt words stored by each business party respectively. The present disclosure will create at least one version of prompt words for a visual display, and developers can intuitively obtain the existing version and the latest version, thereby improving development efficiency.
[0086] According to an embodiment of the present disclosure, based on the above embodiment, the publishing method of the agent may further include:
[0087] Before adding the first identification information of the target prompt word to the designated position in the code, first identification information is configured for each prompt word based on the content of each prompt word in at least one version of the prompt word.
[0088] For example, if the function to be implemented is "how to use clustering algorithm in Python to perform clustering analysis", the corresponding prompt word may be in the text form of "write a complete interactive information including a code that can execute the clustering algorithm according to the programming language (Python) selected by the user." The first identification information of the prompt word may be generated based on "write a complete interactive information including a code that can execute the clustering algorithm according to the programming language (Python) selected by the user".
[0089] For another example, the function to be implemented is to call the big model to perform document search, information query, document information integration, etc. when processing office documents. The corresponding prompt word text may be "find recently viewed documents". The first identification information of the prompt word may be generated based on "find recently viewed documents".
[0090] Through the embodiments of the present disclosure, by setting identification information for prompt words according to the content of the prompt words, not only can different versions of prompt words be distinguished well, but also the readability of the identification information can be improved, making it easier for developers to complete code writing.
[0091] According to an embodiment of the present disclosure, based on the above embodiment, the publishing method of the intelligent agent in this embodiment may include adding the first identification information of the target prompt word to the code:
[0092] Annotate the first identification information of the target prompt word into the code.
[0093] For example, the first identification information may be annotated into the code by developing the annotation promptValue+prmpt. The present disclosure does not limit the annotation method.
[0094] Through the disclosed embodiment, identification information is added to the code by way of annotations. Since the annotations are presented as special marks in the code, the first identification information can be accurately and quickly identified during testing, thereby improving the accuracy and efficiency of the test.
[0095] According to an embodiment of the present disclosure, on the basis of the above embodiment, the publishing method of the agent in this embodiment further includes:
[0096] Classify at least one version of the prompt words to obtain at least one group of prompt words.
[0097] Second identification information is configured for each group of prompt words, and the second identification information is used to distinguish prompt words of different groups.
[0098] The second identification information is associated with the agent.
[0099] In some embodiments, a prompt word project may be created for prompt words of the same type, that is, a prompt word project may include multiple versions of prompt words of the same type.
[0100] For example, a second identification information may be configured for a prompt word of the text search type, another second identification information may be configured for a prompt word of the audio search type, another second identification information may be configured for a prompt word of the image search type, and another second identification information may be configured for a prompt word of the video search type.
[0101] Through the disclosed embodiment, by creating prompt word projects for prompt words of the same type, setting first identification information for marking prompt words of the same type, and associating second identification information with the intelligent body, prompt words of the same type can be directly pulled based on the second identification information for batch testing and release, thereby achieving unified management and batch testing and release.
[0102] The following will be combined Figure 6A schematic description is given of an intelligent agent publishing device according to an embodiment of the present disclosure. Figure 6 It is a block diagram of a publishing device of an intelligent agent according to an embodiment of the present disclosure.
[0103] like Figure 6 As shown, the publishing device 600 of the intelligent agent may include a determination module 610 , an adding module 620 and a loading module 630 .
[0104] The determination module 610 is used to determine a target prompt word from at least one version of the prompt word, where the prompt word is used as an input of the agent to guide the agent to generate an output.
[0105] The adding module 620 is used to add the first identification information of the target prompt word to the code, and the code is used to implement the intelligent agent.
[0106] The loading module 630 is used to obtain the first marking information from the code in response to the agent startup, and load the target prompt word to the specified location based on the first marking information to complete the test of the target prompt word and the code.
[0107] According to an embodiment of the present disclosure, the publishing device 600 of the intelligent agent may further include a generation module and a first storage module. The generation module is used to generate at least one version of the prompt word through the first development tool. The first storage module is used to store the at least one version of the prompt word in a first storage unit, which is a storage unit allocated for the first development tool.
[0108] According to an embodiment of the present disclosure, the publishing device 600 of the intelligent body may further include a first acquisition module and a second acquisition module. The first acquisition module is used to acquire a first file from a second storage unit, the first file includes a version number of a target prompt word, the second storage unit is a storage unit allocated for a second development tool, and the second development tool is used for writing code. The second acquisition module is used to acquire the target prompt word from the first storage unit based on the version number of the target prompt word.
[0109] According to an embodiment of the present disclosure, the publishing device 600 of the intelligent body may further include a second storage module and a third acquisition module. The second storage module is used to store the target prompt word in the first file to obtain the second file, and the target prompt word and the version number of the target prompt word in the second file have a mapping relationship. The third acquisition module is used to obtain the target prompt word from the second file in response to the version number of the target prompt word existing in the second file.
[0110] According to an embodiment of the present disclosure, the determination module determining the target prompt word from the prompt words of at least one version may include: in response to a user operating a control displayed on a display interface of the second development tool, selecting a prompt word of the target version from the prompt words of at least one version as the target prompt word.
[0111] According to an embodiment of the present disclosure, the publishing device 600 of the intelligent agent may further include: a first configuration module. The first configuration module is used to configure first identification information for each prompt word based on the content of each prompt word in at least one version of the prompt word.
[0112] According to an embodiment of the present disclosure, the adding module adds the first identification information of the target prompt word to the code, including: annotating the first identification information of the target prompt word into the code.
[0113] According to an embodiment of the present disclosure, the publishing device 600 of the intelligent agent may further include a classification module and a second configuration module. The classification module is used to classify the prompt words of at least one version to obtain at least one group of prompt words. The second configuration module is used to configure second identification information for each group of prompt words, and the second identification information is used to distinguish prompt words of different groups. The association module is used to associate the second identification information with the intelligent agent.
[0114] According to an embodiment of the present disclosure, the publishing device 600 of the agent may further include a display module. The display module is used to display the version number of each version in the prompt word of at least one version.
[0115] After completing the multi-factor release of the intelligent agent based on the above-mentioned intelligent agent release method and device, the corresponding functions can be realized based on the intelligent agent. Figure 7 This paper introduces the structure of artificial intelligence agents.
[0116] Figure 7 The structural block diagram of an artificial intelligence agent according to an embodiment of the present disclosure is schematically shown.
[0117] In the embodiments of the present disclosure, inspired by the von Neumann structure in modern computer theory, such as Figure 7 As shown, the AI agent 700 may include five core modules: an input module 710 , a control module 720 , a storage module 730 , a calculation module 740 and an output module 750 .
[0118] The input module 710 is responsible for receiving or sensing information such as queries, requests, instructions, signals or data from the outside world (such as users or external environment), and converting them into a format that can be understood and processed by the AI agent 700. The input module 710 is the primary link for the AI agent 700 to interact with the outside world. It enables the AI agent 700 to efficiently and accurately obtain the necessary "sensory" information from the outside world and respond to this information.
[0119] For example, let's take the example of an agent applied to search:
[0120] The input module 710 may input a search request.
[0121] The control module 720 is the core support for the AI agent 700 to handle complex tasks. The control module 720 can execute a large model-based search method.
[0122] During operation, the control module 720 will continuously interact with the storage module 730, the computing module 740 and / or the output module 750. However, it should be noted that the control module 720 acts as a single initiator to initiate communication with the storage module 730, the computing module 740 and / or the output module 750, and there is no communication coupling between the storage module 730, the computing module 740 and the output module 750.
[0123] The performance of the control module 720 may be closely related to the large model on which the AI agent 700 is based. In order to give full play to the capabilities of the large language model, the internal structure of the control module 920 may be designed to be highly configurable and scalable to cope with various types of tasks and requirements in real scenarios.
[0124] The storage module 730 may be responsible for memorizing information such as historical conversations, event streams, etc. The aforementioned prompt information and data resources may be included in the storage module 730 .
[0125] After the AI agent 700 obtains the search request, the AI agent 700 can use the intent recognition model to determine the search intent from the search request. The search intent can be stored in the storage module 730. The AI agent 700 can retrieve the relevant search intent, prompt information and data resources from the storage module 730 and feed them back to the control module 720. Then, the control module 720 can use the feedback prompt information and data resources to obtain the search results corresponding to the search request, and pass the search results to the output module 750.
[0126] The operation module 740 can be regarded as a predefined tool library. The renderer and display control mentioned above can be included in the operation module 740.
[0127] When the AI agent 700 needs to render multiple output data, the relevant renderer and display control can be called from the operation module 740 and fed back to the control module 720. Then, the control module 720 can use the feedback renderer and display control to render the search results and pass the search results to the output module 750. It can be understood that although the large language model has excellent language understanding and generation capabilities, it is the same as a human being. Without the help of any tools, the tasks that can be solved are very limited. When the AI agent 700 is given the ability to call tools, it can achieve tasks such as completing mathematical operations with the help of a calculator, completing data analysis with the help of python, and completing weather forecasts with the help of a search engine.
[0128] In an example, the output module 750 may output the search results and the search results described above.
[0129] The AI agent 700 according to the embodiment of the present disclosure can simply and effectively improve the level of intelligence, and improve flexibility and versatility.
[0130] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0131] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0132] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0133] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0134] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the publishing method of the agent. For example, in some embodiments, the publishing method of the agent may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the publishing method of the agent described above may be executed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the publishing method of the agent in any other appropriate manner (eg, by means of firmware).
[0135] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0136] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0137] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories (EPROM) or flash memories, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0138] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) display or a liquid crystal display (LCD)) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0139] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.
[0140] A computer system may include a terminal device and a server. The terminal device and the server are generally remote from each other and usually interact through a communication network. The relationship between the terminal device and the server is generated by computer programs running on the corresponding computers and having a terminal device-server relationship with each other.
[0141] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0142] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for publishing an intelligent agent, comprising: Determining a target prompt word from at least one version of prompt words, the prompt word being used as an input to the agent to guide the agent to generate an output; adding the first identification information of the target prompt word to a code, wherein the code is used to implement the intelligent agent; In response to the agent being started, the first marking information is obtained from the code, and the target prompt word is loaded into a designated location based on the first marking information to complete the testing and release of the target prompt word and the code.
2. The method according to claim 1, further comprising: Before determining the target prompt word from the prompt words of at least one version, generating the prompt word of at least one version by a first development tool; The at least one version of the prompt word is stored in a first storage unit, where the first storage unit is a storage unit allocated to the first development tool.
3. The method according to claim 2, further comprising: Before loading the target prompt word to the designated location based on the tag information, obtaining a first file from a second storage unit, the first file including a version number of the target prompt word, the second storage unit being a storage unit allocated for a second development tool, the second development tool being used for writing the code; Based on the version number of the target prompt word, the target prompt word is acquired from the first storage unit.
4. The method according to claim 3, further comprising: Adding the target prompt word to the first file to obtain a second file, wherein the target prompt word and the version number of the target prompt word in the second file have a mapping relationship; In response to the existence of the version number of the target prompt word in the second file, the target prompt word is obtained from the second file.
5. The method according to claim 3, wherein: The step of determining a target prompt word from the prompt words of the at least one version includes: In response to a user operating a control displayed on a display interface of the second development tool, a prompt word of a target version is selected from the prompt words of the at least one version as the target prompt word.
6. The method according to claim 1, further comprising: Before adding the first identification information of the target prompt word into the code, the first identification information is configured for each prompt word based on the content of each prompt word in at least one version of the prompt word.
7. The method according to any one of claims 1 to 6, wherein: The step of adding the first identification information of the target prompt word to the code includes: The first identification information of the target prompt word is annotated into the code.
8. The method according to any one of claims 1 to 6, further comprising: Classifying the prompt words of the at least one version to obtain at least one group of prompt words; Configuring second identification information for each group of prompt words, where the second identification information is used to distinguish prompt words of different groups; The second identification information is associated with the agent.
9. The method according to any one of claims 1 to 6, further comprising: The version number of each version in the prompt word of the at least one version is displayed.
10. A publishing device for an intelligent agent, comprising: A determination module, configured to determine a target prompt word from at least one version of prompt words, wherein the prompt word is used as an input of the agent to guide the agent to generate an output; An adding module, used for adding the first identification information of the target prompt word into a code, wherein the code is used for realizing the intelligent agent; A loading module is used to obtain the first marking information from the code in response to the agent being started, and load the target prompt word to the designated location based on the first marking information to complete the testing and release of the target prompt word and the code.
11. The apparatus according to claim 10, further comprising: A generating module, configured to generate the prompt word of the at least one version by using a first development tool; The first storage module is used to store the prompt word of the at least one version in a first storage unit, where the first storage unit is a storage unit allocated for the first development tool.
12. The apparatus according to claim 11, further comprising: A first acquisition module is used to acquire a first file from a second storage unit, wherein the first file includes a version number of the target prompt word, and the second storage unit is a storage unit allocated for a second development tool, and the second development tool is used for writing the code; The second acquisition module is used to acquire the target prompt word from the first storage unit based on the version number of the target prompt word.
13. The apparatus according to claim 12, further comprising: A second storage module is used to store the target prompt word in the first file to obtain a second file, wherein the target prompt word and the version number of the target prompt word in the second file have a mapping relationship; A third acquisition module is configured to acquire the target prompt word from the second file in response to the existence of the version number of the target prompt word in the second file.
14. The device according to claim 12, wherein: The determining module determines the target prompt word from the prompt words of the at least one version, including: In response to a user operating a control displayed on a display interface of the second development tool, a prompt word of a target version is selected from the prompt words of the at least one version as the target prompt word.
15. The apparatus according to claim 1, further comprising: The first configuration module is used to configure the first identification information for each prompt word based on the content of each prompt word in at least one version of the prompt word.
16. The method according to any one of claims 10 to 15, wherein: The adding module adds the first identification information of the target prompt word to the code, including: The first identification information of the target prompt word is annotated into the code.
17. The device according to any one of claims 10 to 15, further comprising: A classification module, used for classifying the prompt words of the at least one version to obtain at least one group of prompt words; A second configuration module, configured to configure second identification information for each group of prompt words, wherein the second identification information is used to distinguish prompt words of different groups; An association module is used to associate the second identification information with the agent.
18. The device according to any one of claims 10 to 15, further comprising: The display module is used to display the version number of each version in the prompt word of the at least one version.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.
21. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.
