A method, device, electronic device, and storage medium for generating an interactive robot
Through the graphical user interface, the interactive robot is designed without programming, and users can adjust the initial prompt template to generate the target interactive robot, solving the problem of high professional knowledge demand and achieving efficient interactive robot creation for non-professional personnel.
Patent Information
- Application Number
- CN202411993782.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Generating interactive robots in the prior art requires professional programming knowledge, which is difficult for non-professional personnel to create effectively and takes time.
Through the graphical user interface, users can design interactive robots without programmatic means, including adjustments and feedback optimization of the initial prompt template to generate target prompt templates.
Non-professionals can easily create efficient interactive robots, reducing the need for expertise and improving creation efficiency.
Smart Images

Figure CN119917627B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular, to a method, device, electronic device and storage medium for generating an interactive robot. Background Art
[0002] An interactive robot is a robot that exhibits intelligent behavior through dialogue and interaction. Usually, by interacting with users or the environment, they can recognize and respond to human instructions, and even have simple conversations with humans.
[0003] In the prior art, when generating an interactive robot, professional programmers are required. They not only need to have a full understanding of the language model, but also need to have certain programming skills. Even for such professional programmers, challenges such as prompting strategies will be encountered during the generation process. For non-professionals, during the process of designing and creating an interactive robot, not only does it take a lot of time, but also the effectiveness of the created interactive robot cannot be guaranteed. Summary of the Invention
[0004] In view of this, the purpose of the present application is to provide a method, device, electronic device and storage medium for generating an interactive robot to overcome the problems in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a method for generating an interactive robot. A graphical user interface is displayed through a terminal device. The method includes:
[0006] In response to a basic interactive robot generation operation, display a design interface of the basic interactive robot on the graphical user interface; wherein, the basic interactive robot is a pre-trained robot;
[0007] In response to an input operation of an expected behavior, generate an initial prompt template according to the input expected behavior; wherein, the initial prompt template is used to define the basic interactive robot as an initial interactive robot;
[0008] In response to a first interaction content input operation, display the first interaction content and a first response content fed back by the initial interactive robot to the first interaction content according to the initial prompt template;
[0009] Adjust the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein, the target prompt template is used to define the initial interactive robot as a target interactive robot.
[0010] In some technical solutions of the present application, the above initial prompt template includes: a preface part and an initial interaction part;
[0011] In response to the first interactive content input operation, displaying the first interactive content and a first response content fed back by the initial interactive robot according to the initial prompt template, includes:
[0012] Determining a target interaction scenario of the initial interactive robot according to the preamble part;
[0013] In the target interaction scenario, controlling the initial interactive robot to generate initial interactive content according to the initial interaction part;
[0014] In response to the first interactive content input operation, displaying the first response content; wherein, the first response content is generated by the initial interactive robot with the initial interactive content as an opening statement in the target interaction scenario.
[0015] In some technical solutions of the present application, the above initial prompt template further includes a prompt field part; after displaying the first response content, the method further includes:
[0016] Displaying a prompt selection control in the graphical user interface;
[0017] In response to a touch operation on the prompt selection control, displaying a plurality of candidate prompt fields corresponding to the prompt selection control;
[0018] In response to a selection operation on the candidate prompt field, determining a target prompt field of the first response content.
[0019] In some technical solutions of the present application, adjusting the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein, the target prompt template is used to define the initial interactive robot as a target interactive robot, includes:
[0020] In response to a supplementary information input operation, generating first supplementary information of the desired behavior;
[0021] Adding the first supplementary information to the initial prompt template to obtain a transition prompt template;
[0022] When the interaction process based on the transition prompt template reaches the preset response effect, obtaining the target prompt template.
[0023] In some technical solutions of the present application, after obtaining the transition prompt template, the method further includes:
[0024] Displaying a retry control at a preset position of the target prompt field;
[0025] In response to a touch operation on the retry control, display the second response content fed back by the transition interaction robot for the first interaction content according to the transition prompt template.
[0026] In some technical solutions of the present application, while displaying the first interaction content, the method further includes:
[0027] Display an editing control at a preset position of the first interaction content;
[0028] In response to a touch operation on the editing control, display the second interaction content after editing the first interaction content and the third response content fed back by the transition interaction robot for the second interaction content.
[0029] In some technical solutions of the present application, after displaying the second response content fed back by the transition interaction robot for the first interaction content according to the transition prompt template, the method further includes:
[0030] Display a statistical list of the difference information between the first response content and the second response content;
[0031] Generate second supplementary information for the expected behavior and the first supplementary information according to the difference information;
[0032] When the process of interacting based on the transition prompt template reaches the preset response effect, obtaining the target prompt template includes:
[0033] Add the second supplementary information to the transition prompt template to obtain a new transition prompt template until the process of interacting based on the new transition prompt template reaches the preset response effect, and obtain the target prompt template.
[0034] In a second aspect, an embodiment of the present application provides a generation device for an interaction robot. By a terminal device, a graphical user interface is displayed. The device includes:
[0035] A first response module, configured to, in response to a basic interaction robot generation operation, display a design interface of the basic interaction robot on the graphical user interface; wherein, the basic interaction robot is a pre-trained robot;
[0036] A second response module, configured to, in response to an input operation of an expected behavior, generate an initial prompt template according to the input expected behavior; wherein, the initial prompt template is used to define the basic interaction robot as an initial interaction robot;
[0037] A third response module, configured to display the first interaction content and a first response content fed back by the initial interaction robot according to the initial prompt template in response to a first interaction content input operation;
[0038] An adjustment module, configured to adjust the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein the target prompt template is used to define the initial interaction robot as a target interaction robot.
[0039] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the above method for generating an interaction robot are implemented.
[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps of the above method for generating an interaction robot are executed.
[0041] The technical solution provided by the embodiment of the present application may include the following beneficial effects:
[0042] The method of the present application includes: in response to a basic interaction robot generation operation, displaying a design interface of the basic interaction robot in the graphical user interface; wherein the basic interaction robot is a pre-trained robot; in response to an input operation of an expected behavior, generating an initial prompt template according to the input expected behavior; wherein the initial prompt template is used to define the basic interaction robot as an initial interaction robot; in response to a first interaction content input operation, displaying the first interaction content and a first response content fed back by the initial interaction robot according to the initial prompt template; adjusting the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein the target prompt template is used to define the initial interaction robot as a target interaction robot.
[0043] The present application generates an interaction robot through a non-programming interaction method, enabling non-expert users to easily create and configure an interaction robot, reducing the need for professional knowledge, and improving the efficiency of creating an interaction robot.
[0044] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specific preferred embodiments are given below in conjunction with the accompanying drawings for detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for the embodiments will be briefly introduced below. It should be understood that the following accompanying drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related accompanying drawings can be obtained based on these drawings.
[0046] Figure 1 It shows a schematic flowchart of a method for generating an interactive robot provided by an embodiment of the present application;
[0047] Figure 2 It shows a schematic diagram of a design interface provided by an embodiment of the present application;
[0048] Figure 3 It shows a schematic diagram of a statistical interface provided by an embodiment of the present application;
[0049] Figure 4 It shows a schematic diagram of a device for generating an interactive robot provided by an embodiment of the present application;
[0050] Figure 5 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. It should be understood that the accompanying drawings in the present application only serve the purposes of illustration and description and are not used to limit the protection scope of the present application. Additionally, it should be understood that the schematic accompanying drawings are not drawn to actual scale. The flowcharts used in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without logical context relationships may be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present application.
[0052] In addition, the described embodiments are only some embodiments of the present application, rather than all embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings here can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application to be protected, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present application.
[0053] It should be noted that in the embodiments of the present application, the term "including" will be used to indicate the existence of the features stated later, but does not exclude adding other features.
[0054] An interactive robot is a robot that demonstrates intelligent behavior through dialogue and interaction. Usually, by interacting with users or the environment, they can recognize and respond to human instructions and even have simple conversations with humans.
[0055] In the prior art, when generating an interactive robot, professional programmers with expertise are required. They not only need to have a full understanding of the language model but also have certain programming skills. Even for such professional programmers, challenges such as prompting strategies will be encountered during the generation process. For non-professionals, during the process of designing and creating an interactive robot, not only does it consume a large amount of time, but also the effectiveness of the created interactive robot cannot be guaranteed.
[0056] Based on this, the embodiments of the present application provide a method, device, electronic device, and storage medium for generating an interactive robot, which will be described below through embodiments.
[0057] Figure 1 The flowchart of a method for generating an interactive robot provided by the embodiments of the present application is shown. Among them, the method displays a graphical user interface through a terminal device, including steps S101 - S104; specifically:
[0058] S101. In response to a basic interactive robot generation operation, display the design interface of the basic interactive robot on the graphical user interface; wherein, the basic interactive robot is a pre-trained robot;
[0059] S102. In response to an input operation of an expected behavior, generate an initial prompt template according to the input expected behavior; wherein, the initial prompt template is used to define the basic interactive robot as an initial interactive robot;
[0060] S103. In response to a first interaction content input operation, display the first interaction content and the first response content feedback by the initial interactive robot to the first interaction content according to the initial prompt template;
[0061] S104. Adjust the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein, the target prompt template is used to define the initial interactive robot as a target interactive robot.
[0062] This application generates an interactive robot through a non - programming - free interaction method, enabling non - expert users to easily create and configure interactive robots, reducing the need for professional knowledge, and improving the efficiency of creating interactive robots.
[0063] Some embodiments of this application will be described in detail below. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0064] This application provides a method for generating an interactive robot. The implementation basis of this method is a programming - free prompt design tool (PromptDesigner). The programming - free prompt design tool is executed on a terminal device, and the operation interface of the programming - free prompt design tool is displayed through a graphical user interface. On the operation interface of the programming - free prompt design tool, there are controls such as "project creation". Users can click the "project creation" control to create a basic interactive robot for the project. The basic interactive robot is a pre - trained robot. Here, the robot is a large - language model (LLM), and the basic interactive robot is a pre - trained LLM, which has a certain response ability.
[0065] After the user creates the basic interactive robot, the graphical user interface displays the design interface of the basic interactive robot. As Figure 2 shown, the design interface includes a dialogue area and a design area. The design area is used for the design of the prompt template, and the dialogue area is used to interact with the robot according to the designed prompt template.
[0066] After the design interface of the basic interactive robot is displayed, in order to improve work efficiency and enable the basic interactive robot to interact more pertinently, the basic interactive robot needs to be set. The process of setting the basic interactive robot is the process of setting the prompt template for the basic interactive robot. For the sake of distinction, the prompt template used by the basic interactive robot in the embodiments of this application is called the initial prompt template.
[0067] The initial prompt template is determined by the expected behavior input by the user. Specifically, the user can tell the basic interactive robot the user's expected behavior by sending text, voice, pictures, or videos. Further, the initial prompt template includes: a preface part, an initial interaction part, and a prompt field part; among them, the preface part is used to determine the target interaction scenario of the initial interactive robot, the initial interaction part is used to limit the generation of the initial interaction content of the initial interactive robot, and the prompt field part is used to mark the effect of the interaction content.
[0068] For example, the expected behaviors input by the user include "You are a teaching material production guidance robot. Participate in the conversation to guide the user to complete the following teaching system results: grade, subject, teaching module, teaching steps, etc.". The above content is used as the preface part to define the interaction scenario of the basic interaction robot as teaching guidance and a certain degree. The expected behaviors input by the user also include "Hi, today I'm going to help you with the teaching design plan. Are you ready?" "Yes, I'm ready. What do I need to do first?", which are the initial interaction content part including the initial prompt content of the basic interaction robot and the initial response content of the user (one-round or multi-round Q&A). The user can also design the prompt field part according to the possible error types in the actual interaction scenario. The prompt field part corresponds to multiple candidate prompt fields, such as set to list too long, too many, very good, no response, irrelevant, error, etc.
[0069] After the initial prompt template is designed, the basic interaction robot will interact based on this initial prompt template. To distinguish it from the basic interaction robot without a prompt template, the basic interaction robot that interacts based on the initial prompt template in the embodiments of this application is called the initial interaction robot.
[0070] The above design process for the initial interaction robot is completed by the user in the design area. After that, the user needs to conduct an interaction test on the initial interaction robot in the conversation area: in response to the first interaction content input operation, display the first interaction content and the first response content feedback by the initial interaction robot according to the initial prompt template for the first interaction content. The specific interaction test process is as follows: the initial interaction robot conducts the initial few rounds of conversation process according to the initial interaction part of the initial prompt template, and then conducts the actual conversation according to the actual needs of the user.
[0071] For example: Initial interaction robot: Hi, today I'm going to help you with the teaching design plan. Are you ready? (Initial interaction content generated according to the initial prompt template).
[0072] User: Yes, I'm ready. What do I need to do first? (Initial interaction content generated according to the initial prompt template).
[0073] Initial interaction robot: First, you need to collect your information. You need to: determine the grade, determine the subject, determine the core vocabulary of the first-level knowledge content under the major unit theme concept, determine the teaching module, and the teaching steps.
[0074] User: Wait, slow down.
[0075] Initial interaction robot: Okay, sorry. Do you have all the information you need to collect?
[0076] After multiple rounds of conversations in the conversation area, it is necessary to determine the effect of the initial prompt template. If the effect of the initial prompt template reaches the preset response effect, the initial prompt template is used as the target prompt template, and the initial interaction robot that interacts based on the target prompt template is used as the target interaction robot. If the effect of the initial prompt template does not reach the preset response effect, the initial prompt template needs to be adjusted. If the adjusted (once or multiple times) initial prompt template can reach the preset response effect, the adjusted initial prompt template is used as the target prompt template, and the initial interaction robot that interacts based on the target prompt template is used as the target interaction robot.
[0077] The specific process of determining whether the preset response effect is achieved is as follows: calculate the proportion of the response content that meets the user's needs in all response contents. For example, the initial interaction robot generates ten response contents, among which nine response contents meet the user's needs, and the proportion is 90%, which is greater than the preset proportion threshold of 85%. The embodiments of the present application consider that the initial prompt template at this time can be used as the target prompt template. Whether the user's needs are met can be determined by the user himself or by calculating the semantic similarity between the response content and the preset standard content.
[0078] For the initial prompt template that needs to be adjusted, in order to improve the adjustment efficiency, the embodiments of the present application need to first determine the error information of the first response content (marked with a prompt field). Specifically, after the first response content is displayed, a prompt selection control is displayed in the preset area of the first response content. The prompt selection control corresponds to multiple candidate prompt fields, and by performing a touch operation on the prompt selection control, the candidate prompt fields corresponding to the prompt selection control are displayed. The user performs a selection operation again to determine the target prompt field of the first response content.
[0079] For example, for the prompt selection control of the first response content "First, you need to collect your information. You need to: determine the grade, determine the subject, determine the core concept of the large unit theme, determine the core vocabulary of the first-level knowledge content under the theme concept, teaching module, and teaching steps". The user touches the prompt selection control to display candidate prompt fields such as "The list is too long, too many, very good, no response, irrelevant, wrong". The user performs a selection operation again to determine the target prompt field of "The list is too long". Further, the target prompt field in the embodiments of the present application can also include multiple candidate prompt fields. After the user selects the candidate prompt field of "The list is too long", the above operation can be repeated again to determine the candidate prompt field of "too many" as the target prompt field. At this time, the prompt field of "too many" will also be displayed after "The list is too long".
[0080] To avoid accidental touch and improve interaction efficiency, in the embodiments of the present application, each target prompt field also corresponds to a deletion control. After the user determines the target prompt field, if it is found that the target prompt field is generated by accidental touch, the user can perform a touch operation on the deletion control to delete (not display) the target prompt field corresponding to the deletion control.
[0081] After determining the target prompt field of the first response content, the embodiments of the present application adjust the initial prompt template according to the target prompt field. When adjusting the initial prompt template, the embodiments of the present application can perform the adjustment (perform multiple adjustment processes) based on only one type of target prompt field at a time, or can adjust all types of target prompt fields simultaneously. For example, in descending order according to the quantity of each type, perform the adjustment of the "list too long" type, the adjustment of the "too many" type... in sequence, or perform the adjustment of the "list too long" type, the "too many" type... simultaneously.
[0082] The specific adjustment process is as follows: After the user understands the target prompt fields of each first response content, the user performs an input operation of supplementary information in the design area to generate the first supplementary information of the desired behavior. For example, when the target field is "list too long", the user can input the first supplementary information "Do not list more than one piece of information in each message". Add the first supplementary information to the preamble part of the initial prompt template to obtain a new initial prompt template. To make a distinction, the embodiments of the present application refer to the adjusted initial prompt template as a transition prompt template. If the transition prompt template has not yet reached the preset response effect, it is necessary to adjust the transition prompt template again until the preset response effect is reached to obtain the target prompt template. The embodiments of the present application also refer to the initial interaction robot that interacts based on the transition prompt template as a transition interaction robot.
[0083] After obtaining the transition interaction robot, the embodiments of the present application also need to test the effect of the transition interaction robot. To improve the test efficiency, the embodiments of the present application give priority to considering the part where the first interaction content generated by the initial interaction robot does not reach the preset feedback effect. That is, give priority to considering the first response content marked with the target prompt field. Specifically, a retry control is displayed at the preset position of the target prompt field. The user performs a touch operation on the retry control, and the transition interaction robot feeds back the first interaction content according to the transition prompt template, generates and displays the second response content. That is to say, the embodiments of the present application use the transition interaction robot to perform feedback again (generate the second response content) for the content with poor feedback effect of the initial interaction robot to let the user determine whether the adjusted robot can have a better interaction effect. Similarly, the judgment process for the second response content in the embodiments of the present application is the same as that for the first response content, and will not be elaborated here.
[0084] To reduce the number of adjustments, in the embodiment of the present application, an editing control is also displayed at a preset position of the first interaction content. After the user touches the editing control, the first interaction content becomes editable. For the editable first interaction content, the user can adjust the first interaction content through modification methods such as replacement and deletion to obtain the adjusted second interaction content. The transition interaction robot can perform subsequent feedback on the second interaction content. For example, the user can modify "Wait, slow down" in Figure 2 to "There is too much content", etc.
[0085] After the transition interaction robot uses all the first interaction contents as the second response contents, the embodiment of the present application also needs to perform a global evaluation on the transition interaction robot to avoid the generation of new errors.
[0086] Specifically, in the embodiment of the present application, PromptDesigner can also provide an interface of an "error browser", as Figure 3 shown (for each error type, the total number of modified utterances in all annotated dialogues is listed separately; the original utterance content is listed on the left, and the new utterance generated by the modified template is shown on the right). This interface displays a statistical list of the difference information between the first response content and the second response content. After observing this statistical list, the user can perform an input operation of supplementary information according to the difference information to generate the second supplementary information of the expected behavior and the first supplementary information; add the second supplementary information to the transition prompt template to obtain a new transition prompt template. Then test the new transition prompt template until the interaction process based on the new transition prompt template reaches the preset response effect to obtain the target prompt template. Use the new transition interaction robot based on the target prompt template as the target interaction robot.
[0087] In an alternative embodiment, a user intends to develop a chatbot that can guide users during the design of teaching resources, answer any questions they may ask, and engage in social small talk when necessary. In addition, the user also plans to interact with this chatbot via voice for more convenient use during course design.
[0088] Set the basic chatbot prompt template: Since GPT-3 (the basic chatbot) can directly conduct multi-turn conversations, this step can be quite straightforward. The user entered the following: You are a courseware production guidance robot. Participate in the conversation to guide the completion of the following teaching system results: XXXX, followed by a series of teaching materials information and curriculum design methods copied from the website. It is necessary to start with "First, help the user collect and prepare information", and then execute the corresponding instructions step by step. Be friendly.
[0089] Evaluate what the basic chatbot can do. The user then generates a series of initial conversations with the basic chatbot, trying some different types of questions that real-world users might ask, such as "Is this information suitable for mathematics?" and "Can I change this information to be suitable for mathematics?" The user may also recruit other users or workers to create such requests.
[0090] Identify errors: The user then reviews this series of conversations, records any errors or significant success cases, and marks specific robot responses in the context of the conversation. For example, if the robot suggests a dangerous activity, the user may add the label "dangerous", indicating that this is a critical error that needs to be fixed; if the list of information listed by the robot is too long to follow, the user may add "list too long".
[0091] Debug: The user selects a type of error to focus on fixing, based on its frequency of occurrence or potential harm. For example, to fix the "list too long" error, the user adds "but do not list more than one piece of information in each message" at the end of the first paragraph of the prompt template preface.
[0092] Locally evaluate the new prompt: To see if the prompt change fixes the error, the user clicks the "Retry" button next to the chatbot response marked with this error label. Retrying allows the user to test whether the new prompt template can fix the error in the same conversation context where the error first occurred. In addition to retrying, the edit button also allows the user to edit the user's speech in the conversation, simulating how the new prompt template would guide a new conversation with the user.
[0093] Globally evaluate the new prompt: After locally fixing the error, the user tests the new prompt template on the complete set of collected conversations in case this new prompt template fixes other errors or causes new errors.
[0094] Iterate: After identifying an effective global prompt, the user returns to selecting different errors and tries new prompt design solutions until approaching the ideal result.
[0095] The advantages of this application are:
[0096] Lower the threshold and promote extensive user participation: Through the chatbot design system, a means is provided for users to create chatbots using natural language without programming, significantly reducing the threshold for ordinary users, especially non-AI experts without a programming background, to participate in the design of LLM-based chatbots. This enables a wider user group to access and use AI technology and thus participate in the application and innovation of artificial intelligence.
[0097] Improve the effectiveness of chatbots generated by prompt template design: Through the chatbot design system, an iterative optimization mechanism for prompt template design is provided. Users can gradually optimize their prompt strategies by evaluating the feedback of chatbots. This process can significantly improve the flexibility and effectiveness of users' designed prompts, making the generated output more in line with users' expectations.
[0098] Deepen the understanding of LLM capabilities: Through NLP technology and a response success case prompt library, users are guided on how to write effective prompt templates, enhancing their understanding of LLM, enabling them to master the operation rules of LLM, and learn to utilize its generation capabilities. This not only effectively avoids incorrect prompt designs but also improves the success rate of users in practical applications.
[0099] Promote an effective user interaction experience: With the evaluation and feedback mechanism of the chatbot design system, users can obtain real-time information about the effectiveness of their designs and optimization suggestions during the process of designing chatbots. This immediate feedback improves the user interaction experience, enabling designers to adjust their strategies in a timely manner and enhancing the accuracy and reliability of the design.
[0100] Create education and training opportunities: This application helps improve users' understanding of LLM and prompt engineering by providing guidance and feedback on prompt template design, assisting non-expert users in gradually mastering relevant knowledge, and promoting the improvement of their technical literacy and the development of practical abilities.
[0101] Flexibility in applying to multiple scenarios: The chatbot creation of this application can be flexibly applied to various chatbot demand scenarios, such as teaching chatbots, customer service robots, technical support, etc. In these scenarios, the tool can provide users with a smooth interaction experience and more effectively meet different needs.
[0102] It can be seen that through the above technical effects, the method provided by this application not only offers a new design method for non-AI expert users but also provides a more efficient and intuitive method for users when designing LLM-based chatbots. The innovative design ideas, feedback mechanism, and educational elements introduced can greatly enhance the user experience, promote the popularization of related technologies, and provide a solid foundation for future research and development.
[0103] Figure 4 The structure diagram of a generating device for an interactive robot provided by an embodiment of the present application is shown. A graphical user interface is displayed through a terminal device. The device includes:
[0104] A first response module, configured to respond to a basic interactive robot generation operation and display a design interface of the basic interactive robot in the graphical user interface; wherein, the basic interactive robot is a pre-trained robot;
[0105] A second response module, configured to respond to an input operation of an expected behavior, and generate an initial prompt template according to the input expected behavior; wherein, the initial prompt template is used to define the basic interactive robot as an initial interactive robot;
[0106] A third response module, configured to respond to a first interaction content input operation, and display the first interaction content and a first response content fed back by the initial interactive robot to the first interaction content according to the initial prompt template;
[0107] An adjustment module, configured to adjust the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein, the target prompt template is used to define the initial interactive robot as a target interactive robot.
[0108] The initial prompt template includes: a preface part and an initial interaction part;
[0109] The responding to the first interaction content input operation and displaying the first interaction content and the first response content fed back by the initial interactive robot to the first interaction content according to the initial prompt template includes:
[0110] Determining a target interaction scenario of the initial interactive robot according to the preface part;
[0111] Controlling the initial interactive robot to generate initial interaction content according to the initial interaction part in the target interaction scenario;
[0112] Responding to the first interaction content input operation and displaying the first response content; wherein, the first response content is generated by the initial interactive robot with the initial interaction content as an opening statement in the target interaction scenario.
[0113] The initial prompt template further includes a prompt field part; after the first response content is displayed, it further includes:
[0114] Displaying a prompt selection control in the graphical user interface;
[0115] In response to a touch operation on the prompt selection control, display multiple candidate prompt fields corresponding to the prompt selection control;
[0116] In response to a selection operation on the candidate prompt field, determine the target prompt field of the first response content.
[0117] Adjust the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein, the target prompt template is used to define the initial interaction robot as a target interaction robot, including:
[0118] In response to a supplementary information input operation, generate first supplementary information for the desired behavior;
[0119] Add the first supplementary information to the initial prompt template to obtain a transitional prompt template;
[0120] When the interaction process based on the transitional prompt template reaches the preset response effect, obtain the target prompt template.
[0121] After obtaining the transitional prompt template, further include:
[0122] Display a retry control at a preset position of the target prompt field;
[0123] In response to a touch operation on the retry control, display a second response content fed back by the transitional interaction robot to the first interaction content according to the transitional prompt template.
[0124] When displaying the first interaction content, further include:
[0125] Display an edit control at a preset position of the first interaction content;
[0126] In response to a touch operation on the edit control, display a second interaction content after editing the first interaction content and a third response content fed back by the transitional interaction robot to the second interaction content.
[0127] After displaying the second response content fed back by the transitional interaction robot to the first interaction content according to the transitional prompt template, further include:
[0128] Display a statistical list of difference information between the first response content and the second response content;
[0129] Generate second supplementary information for the desired behavior and the first supplementary information according to the difference information;
[0130] When the process of interacting based on the transition prompt template achieves the preset response effect, obtaining the target prompt template includes:
[0131] Adding the second supplementary information to the transition prompt template to obtain a new transition prompt template until the process of interacting based on the new transition prompt template achieves the preset response effect, and obtaining the target prompt template.
[0132] As Figure 5 shown, an embodiment of the present application provides an electronic device for executing the method for generating an interactive robot in the present application. The device includes a memory, a processor, a bus, and a computer program stored on the memory and executable on the processor. Among them, when the above-mentioned processor executes the above-mentioned computer program, the steps of the method for generating the above-mentioned interactive robot are implemented.
[0133] Specifically, the above-mentioned memory and processor can be general memory and processor, and no specific limitation is made here. When the processor runs the computer program stored in the memory, it can execute the method for generating the above-mentioned interactive robot.
[0134] Corresponding to the method for generating an interactive robot in the present application, an embodiment of the present application also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the steps of the method for generating the above-mentioned interactive robot are executed.
[0135] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the method for generating the above-mentioned interactive robot.
[0136] In the embodiments provided by the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. The system embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of the system or unit can be in an electrical, mechanical or other form.
[0137] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units. They can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0138] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, may exist separately as individual physical units, or two or more units may be integrated into one unit.
[0139] If the above-mentioned function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0140] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third", etc. are only used for descriptive distinction and cannot be construed as indicating or implying relative importance.
[0141] Finally, it should be noted that the above-mentioned embodiments are only specific implementation manners of the present application, used to illustrate the technical solutions of the present application, rather than limiting them. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present application can still modify the technical solutions described in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. All should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for generating an interactive robot, characterized in that, Display a graphical user interface through a terminal device, and the method includes: In response to an operation generated by a basic interaction robot, display a design interface of the basic interaction robot in the graphical user interface; wherein, the basic interaction robot is a pre-trained robot; In response to an input operation of an expected behavior, generate an initial prompt template according to the input expected behavior; wherein, the initial prompt template is used to define the basic interaction robot as an initial interaction robot; In response to a first interaction content input operation, display the first interaction content and a first response content fed back by the initial interaction robot to the first interaction content according to the initial prompt template; Adjust the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein, the target prompt template is used to define the initial interaction robot as a target interaction robot; The initial prompt template further includes a prompt field part; after the first response content is displayed, the method further includes: Display a prompt selection control in the graphical user interface; In response to a touch operation on the prompt selection control, display a plurality of candidate prompt fields corresponding to the prompt selection control; In response to a selection operation on the candidate prompt field, determine a target prompt field of the first response content; The adjusting the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template includes: After determining the target prompt field of the first response content, adjust the initial prompt template according to the target prompt field; The process of determining whether the preset response effect is achieved is: calculating the proportion of the response content that meets the user's needs in all response contents.
2. The method according to claim 1, characterized in that, The initial prompt template includes: a preface part and an initial interaction part; The displaying the first interaction content and a first response content fed back by the initial interaction robot to the first interaction content according to the initial prompt template in response to a first interaction content input operation includes: Determine a target interaction scenario of the initial interaction robot according to the preface part; Under the target interaction scenario, control the initial interaction robot to generate initial interaction content according to the initial interaction part; In response to a first interaction content input operation, display the first response content; wherein, the first response content is generated by the initial interaction robot with the initial interaction content as the opening remarks under the target interaction scenario.
3. The method according to claim 1, wherein The adjusting the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein, the target prompt template is used to define the initial interaction robot as a target interaction robot includes: In response to a supplementary information input operation, generate first supplementary information of the expected behavior; Add the first supplementary information to the initial prompt template to obtain a transition prompt template; When the interaction process based on the transition prompt template reaches the preset response effect, obtain the target prompt template.
4. The method according to claim 3, characterized in that, After obtaining the transition prompt template, the method further includes: Display a retry control at a preset position of the target prompt field; In response to a touch operation on the retry control, display the second response content fed back by the transition interaction robot according to the transition prompt template for the first interaction content.
5. The method according to claim 4, characterized in that, While displaying the first interaction content, the method further includes: Display an edit control at a preset position of the first interaction content; In response to a touch operation on the edit control, display the second interaction content after editing the first interaction content and the third response content fed back by the transition interaction robot for the second interaction content.
6. The method according to claim 4, characterized in that, After displaying the second response content fed back by the transition interaction robot according to the transition prompt template for the first interaction content, the method further includes: Display a statistical list of the difference information between the first response content and the second response content; Generate a second supplementary information for the expected behavior and the first supplementary information according to the difference information; The obtaining the target prompt template when the process of interacting based on the transition prompt template reaches the preset response effect includes: Add the second supplementary information to the transition prompt template to obtain a new transition prompt template until the process of interacting based on the new transition prompt template reaches the preset response effect to obtain the target prompt template.
7. A generation device for an interactive robot, characterized in that Display a graphical user interface through a terminal device, and the device includes: A first response module, configured to, in response to a basic interaction robot generation operation, display a design interface of the basic interaction robot in the graphical user interface; wherein, the basic interaction robot is a pre-trained robot; A second response module, configured to, in response to an input operation of an expected behavior, generate an initial prompt template according to the input expected behavior; wherein, the initial prompt template is used to define the basic interaction robot as an initial interaction robot; A third response module, configured to, in response to a first interaction content input operation, display the first interaction content and the first response content fed back by the initial interaction robot according to the initial prompt template for the first interaction content; An adjustment module, configured to adjust the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template; wherein, the target prompt template is used to define the initial interaction robot as a target interaction robot; The initial prompt template further includes a prompt field part; after displaying the first response content, it further includes: Display a prompt selection control in the graphical user interface; In response to a touch operation on the prompt selection control, display a plurality of candidate prompt fields corresponding to the prompt selection control; In response to a selection operation on the candidate prompt field, determine the target prompt field of the first response content; The adjusting the initial prompt template according to the first response content and a preset response effect to obtain an adjusted target prompt template includes: The process of determining whether the preset response effect is achieved is as follows: calculating the proportion of the response content that meets the user's needs in all the response content.
8. An electronic device, characterized in that, Including: A processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of the method for generating an interactive robot according to any one of claims 1 to 6 are executed.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is run by the processor, the steps of the method for generating an interactive robot according to any one of claims 1 to 6 are executed.
Citation Information
Patent Citations
Generation method and device of customer service robot, electronic equipment and medium
CN111400465A
Customer service message generation method based on AI system and e-commerce customer service system
CN116701599A