Generation method and device of interaction robot, electronic equipment and storage medium
Through graphical user interface and prompt template adjustment technology, the problem of professional programming knowledge required for generation of interactive robots in the existing technology is solved, and the goal of non-expert users to easily create efficient interactive robots is achieved.
Patent Information
- Application Number
- CN202411993782.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Generating interactive robots in the prior art requires professional programming knowledge, and non-professionals are time-consuming and ineffective in the design and creation process.
The design interface of the basic interactive robot is displayed through the graphical user interface. Users can enter the desired behavior to generate initial prompt templates, adjust the templates to optimize the interactive content, and generate target prompt templates to define the target interactive robot.
Reduces the need for professional programming knowledge, allowing non-expert users to easily create and configure interactive robots, improving the efficiency and effectiveness of interactive robot creation.
Smart Images

Figure CN119917627A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a method, device, electronic device and storage medium for generating an interactive robot. Background Art
[0002] An interactive robot is a robot that demonstrates intelligent behavior through dialogue and interaction, usually by interacting with users or the environment. They are able to recognize and respond to human instructions and even have simple conversations with humans.
[0003] In the prior art, when generating interactive robots, programmers with professional knowledge are needed. They not only need to have a full understanding of language models, but also need to have certain programming skills. Even for such professional programmers, there are still challenges in the generation process such as prompt strategies. For non-professionals, in the process of designing and creating interactive robots, not only a lot of time is spent, but also the effectiveness of the created interactive robots 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, wherein a graphical user interface is displayed through a terminal device, and the method comprises:
[0006] In response to a basic interactive robot generation operation, displaying 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 a desired behavior, an initial prompt template is generated according to the input desired 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 interactive content input operation, displaying the first interactive content and a first response content fed back by the initial interactive robot to the first interactive content according to the initial prompt template;
[0009] According to the first response content and the preset response effect, the initial prompt template is adjusted 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-mentioned initial prompt template includes: a preface part and an initial interaction part;
[0011] The step of displaying, in response to the first interactive content input operation, the first interactive content and the first response content fed back by the initial interactive robot to the first interactive content according to the initial prompt template comprises:
[0012] Determining a target interaction scenario of the initial interactive robot according to the preface;
[0013] In the target interaction scenario, controlling the initial interaction robot to generate initial interaction content according to the initial interaction part;
[0014] In response to a first interaction content input operation, the first response content is displayed; wherein the first response content is generated by the initial interaction robot in the target interaction scenario with the initial interaction content as an opening remark.
[0015] In some technical solutions of the present application, the initial prompt template further includes a prompt field portion; after displaying the first response content, the method further includes:
[0016] Displaying a prompt selection control on the graphical user interface;
[0017] In response to a touch operation on the prompt selection control, displaying a plurality of prompt fields to be selected corresponding to the prompt selection control;
[0018] In response to a selection operation on the to-be-selected prompt field, a target prompt field of the first response content is determined.
[0019] In some technical solutions of the present application, the initial prompt template is adjusted according to the first response content and the 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, including:
[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 process of interacting based on the transition prompt template achieves the preset response effect, the target prompt template is obtained.
[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 the touch operation on the retry control, a second response content fed back by the transition interaction robot to the first interaction content according to the transition prompt template is displayed.
[0026] In some technical solutions of the present application, while displaying the first interactive content, the method further includes:
[0027] Displaying an editing control at a preset position of the first interactive content;
[0028] In response to a touch operation on the editing control, second interactive content edited from the first interactive content and third response content fed back by the transitional interactive robot to the second interactive content are displayed.
[0029] In some technical solutions of the present application, after the above-mentioned display transition interaction robot feeds back the second response content to the first interaction content according to the transition prompt template, the method further includes:
[0030] Display a statistical list of difference information between the first response content and the second response content;
[0031] generating second supplementary information of 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 achieves the preset response effect, obtaining the target prompt template includes:
[0033] The second supplementary information is added to the transition prompt template to obtain a new transition prompt template, until the process of interaction based on the new transition prompt template achieves the preset response effect to obtain the target prompt template.
[0034] In a second aspect, an embodiment of the present application provides a device for generating an interactive robot, which displays a graphical user interface through a terminal device, and the device includes:
[0035] A first response module, configured to respond to a basic interactive robot generation operation and display a design interface of the basic interactive robot on the graphical user interface; wherein the basic interactive robot is a pre-trained robot;
[0036] 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;
[0037] A third response module, configured to respond to a first interactive content input operation and display the first interactive content and a first response content fed back by the initial interactive robot to the first interactive content according to the initial prompt template;
[0038] An adjustment module is used 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.
[0039] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for generating an interactive robot when executing the computer program.
[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 executed by a processor, the steps of the above-mentioned method for generating an interactive robot are executed.
[0041] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0042] The method of the present application includes, in response to a basic interactive robot generation operation, displaying a design interface of the basic interactive robot on the graphical user interface; wherein the basic interactive 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 interactive robot as an initial interactive robot; in response to a first interactive content input operation, displaying the first interactive content and a first response content fed back by the initial interactive robot to the first interactive content 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 interactive robot as a target interactive robot.
[0043] This application generates an interactive robot through a non-programming interactive method, allowing non-expert users to easily create and configure interactive robots, reducing the need for professional knowledge and improving the efficiency of creating interactive robots.
[0044] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A schematic diagram showing a flow chart of a method for generating an interactive robot provided in an embodiment of the present application;
[0047] Figure 2 A schematic diagram of a design interface provided by an embodiment of the present application is shown;
[0048] Figure 3 A schematic diagram of a statistical interface provided in an embodiment of the present application is shown;
[0049] Figure 4 A schematic diagram of a generating device of an interactive robot provided in an embodiment of the present application is shown;
[0050] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0052] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely 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 making creative work belong to the scope of protection of the present application.
[0053] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of 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 are able to recognize and respond to human instructions and even have simple conversations with humans.
[0055] In the prior art, when generating interactive robots, programmers with professional knowledge are needed. They not only need to have a full understanding of language models, but also need to have certain programming skills. Even for such professional programmers, there are still challenges in the generation process such as prompt strategies. For non-professionals, in the process of designing and creating interactive robots, not only a lot of time is spent, but also the effectiveness of the created interactive robots 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 are described below through embodiments.
[0057] Figure 1 A schematic flow chart of a method for generating an interactive robot provided in an embodiment of the present application is shown, wherein 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, displaying a 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, generating 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 interactive content input operation, displaying the first interactive content and a first response content fed back by the initial interactive robot to the first interactive content according to the initial prompt template;
[0061] S104. According to the first response content and a preset response effect, the initial prompt template is adjusted 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 interactive method, allowing 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 the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0064] The present application provides a method for generating an interactive robot, the implementation basis of which is a non-programming prompt design tool (PromptDesigner), the non-programming prompt design tool is executed on a terminal device, and the operation interface of the non-programming prompt design tool is displayed through a graphical user interface. The operation interface of the non-programming prompt design tool includes controls such as "Project Creation". The user can create a basic interactive robot for a project by clicking the "Project Creation" control, and the basic interactive robot is a pre-trained robot. The robot here 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 a basic interactive robot, the graphical user interface displays the design interface of the basic interactive robot. Figure 2 As shown, the design interface includes a dialogue area and a design area. The design area is used to design 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 targetedly, the basic interactive robot needs to be set. The setting process of the basic interactive robot is the process of setting a prompt template for the basic interactive robot. In order to distinguish, the prompt template used by the basic interactive robot is called the initial prompt template in the embodiment of the present application.
[0067] The initial prompt template is determined by the expected behavior input by the user. The specific user can tell the basic interactive robot the user's expected behavior by sending text, voice, picture or video. Further, the initial prompt template includes: a preface part, an initial interaction part and a prompt field part; wherein the preface part is used to determine the target interaction scene of the initial interactive robot, the initial interaction part user limits the generation of the initial interactive content of the initial interactive robot, and the prompt field part is used to mark the effect of the interactive content.
[0068] For example, the expected behavior input by the user includes "You are a courseware production guidance robot. Participate in the dialogue to guide users to complete the following teaching system results: grade, subject, teaching module, teaching steps, etc.". The above content serves as the preface, limiting the interaction scenarios of the basic interactive robot to teaching guidance and certain. The expected behavior input by the user also includes "Hi, today I want to help you with teaching design plans, are you ready?" "Yes, I'm ready. What do I need to do first?", which is the initial interaction content part including the initial prompt content of the basic interactive robot and the user's initial answer content (one round of questions and answers or multiple rounds of questions and answers). Users can also design the prompt field part according to the types of errors that may occur in actual interaction scenarios. The prompt field part corresponds to multiple prompt fields to be selected, such as setting the list to be 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 the initial prompt template. In order to distinguish it from the basic interaction robot without a prompt template, the embodiment of the present application calls the basic interaction robot that interacts based on the initial prompt template 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 perform an interaction test on the initial interaction robot in the dialogue area: in response to the first interaction content input operation, the first interaction content and the first response content of the initial interaction robot to the first interaction content according to the initial prompt template are displayed. The specific interaction test process is: the initial interaction robot conducts the initial rounds of dialogue according to the initial interaction part of the initial prompt template, and then conducts actual dialogue according to the actual needs of the user.
[0071] For example: Initial interaction robot: Hi, today I will help you with teaching design. 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 based on 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 major unit theme concept, determine the first-level knowledge content core vocabulary under the theme concept, the teaching module, and the teaching steps.
[0074] User: Wait, slow down.
[0075] Initial Interaction Robot: OK, sorry. Do you have all the information you need to collect?
[0076] After multiple rounds of dialogue in the dialogue 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 interactive robot that interacts based on the target prompt template is used as the target interactive 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 initial prompt template after adjustment (one or more times) can achieve the preset response effect, the adjusted initial prompt template is used as the target prompt template, and the initial interactive robot that interacts based on the target prompt template is used as the target interactive robot.
[0077] The specific process of determining whether the preset response effect is achieved is: calculating the proportion of response content that meets user needs to all response content. For example, the initial interactive robot generates ten response contents, of which nine meet user needs, accounting for 90%, which is greater than the preset proportion threshold of 85%. The embodiment of the present application believes that the initial prompt template at this time can be used as a 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 embodiment of the present application needs to first determine the error information of the first response content (marked using the 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 a plurality of prompt fields to be selected, and by touching the prompt selection control, the prompt field to be selected corresponding to the prompt selection control is displayed. The user performs a selection operation again to determine the target prompt field of the first response content.
[0079] For example, for the first response content "First, you need to collect your information. You need to: determine the grade, determine the subject, determine the theme concept of the large unit, determine the core vocabulary of the first-level knowledge content under the theme concept, the teaching module, and the teaching steps". The user touches the prompt selection control to display the prompt fields waiting to be selected "The list is too long, too many, very good, no response, irrelevant, error". The user performs the selection operation again to determine the target prompt field of "The list is too long". Furthermore, the target prompt field in the embodiment of the present application can also include multiple prompt fields to be selected. After the user selects the prompt field to be selected "The list is too long", the user can repeat the above operation again to determine the prompt field to be selected "Too many" as the target prompt field. At this time, the prompt field "Too many" will also be displayed after "The list is too long".
[0080] In order to avoid accidental touches and improve interaction efficiency, in the embodiment of the present application, each target prompt field also corresponds to a delete control. After the user has determined the target prompt field, if he finds that a target prompt field is generated by accidental touch, he can delete (not display) the target prompt field corresponding to the delete control by touching the delete control.
[0081] After determining the target prompt field of the first response content, the embodiment of the present application adjusts the initial prompt template according to the target prompt field. When adjusting the initial prompt template, the embodiment of the present application can adjust only the target prompt field of a certain type at a time (perform multiple adjustment processes), or can adjust all types of target prompt fields at the same time. For example, according to the number of each type from high to low, the "list is too long" type adjustment, the "too many" type adjustment..., or the "list is too long" type, the "too many" type... are adjusted at the same time.
[0082] The specific adjustment process is: after the user understands the target prompt field of each first response content, the user inputs the supplementary information in the design area to generate the first supplementary information of the expected behavior. For example, when the target field is too long for a list, the user can enter the first supplementary information "Do not list more than one information in each message". Add the first supplementary information to the preface of the initial prompt template to obtain a new initial prompt template. In order to distinguish, the embodiment of the present application refers to the adjusted initial prompt template as a transition prompt template. If the transition prompt template has not yet achieved the preset response effect, the transition prompt template needs to be adjusted again until the preset response effect is achieved to obtain the target prompt template. The embodiment of the present application also calls the initial interaction robot that interacts based on the transition prompt template a transition interaction robot.
[0083] After obtaining the transitional interaction robot, the embodiment of the present application also needs to test the effect of the transitional interaction robot. In order to improve the test efficiency, the embodiment of the present application gives priority to the part of the first interactive content generated by the initial interactive robot that does not achieve the preset feedback effect. That is, the first response content marked with the target prompt field is given priority. Specifically, a retry control is displayed at the preset position of the target prompt field. The user touches the retry control, and the transitional interaction robot feeds back the first interactive content according to the transitional prompt template, and generates and displays the second response content. In other words, the embodiment of the present application uses the transitional interaction robot to give feedback again (generate the second response content) for the content with poor feedback effect of the initial interactive robot, so that the user can determine whether the adjusted robot can have a better interactive effect. Similarly, the judgment process for the second response content in the embodiment of the present application is the same as the judgment process for the first response content, which will not be repeated here.
[0084] In order to reduce the number of adjustments, the embodiment of the present application also displays an editing control at the preset position of the first interactive content. After the user touches the editing control, the first interactive content becomes editable. For the editable first interactive content, the user can adjust the first interactive content by replacing, deleting, or other modification methods to obtain the adjusted second interactive content. The transitional interaction robot can provide subsequent feedback on the second interactive content. For example, the user can Figure 2 The sentence “Wait, slow down” in the sentence should be changed to “There is too much content” etc.
[0085] After the transitional 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 of the transitional interaction robot to avoid new errors.
[0086] Specifically, in the embodiment of the present application, PromptDesigner can also provide an "error browser" interface, such as Figure 3 As shown (for each error type, the total number of utterances that have been modified in all annotated conversations 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). The interface displays a statistical list of the difference information between the first response content and the second response content. After observing the statistical list, the user can input supplementary information according to the difference information to generate the expected behavior and the second supplementary information of the first supplementary information; the second supplementary information is added to the transition prompt template to obtain a new transition prompt template. The new transition prompt template is then tested until the process of interaction based on the new transition prompt template achieves the preset response effect, and the target prompt template is obtained. The new transition interaction robot that interacts based on the target prompt template is used as the target interaction robot.
[0087] In an alternative embodiment, a user intends to develop a chatbot that can guide users in the process of designing teaching resources, answer any questions they may have, and engage in social chit-chat when necessary. In addition, the user intends to interact with the chatbot via voice to make it more convenient to use when designing courses.
[0088] Set up the basic chatbot prompt template: Given that GPT-3 (the basic chatbot) can directly conduct multi-round 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 course design methods copied from the website. It needs to start with "First help users collect and prepare information, and then follow the instructions for the response step by step. It needs to be friendly.
[0089] Evaluate what the base chatbot can do. The user then generates a series of initial conversations with the base chatbot, trying out a few different types of questions that a real-world user might ask, such as “Is this information appropriate for math?” and “Can I make this information appropriate for math?” The user may also recruit other users or workers to create such requests.
[0090] Identify errors: The user then reviews the series of conversations, noting any errors or notable successes, and tags specific bot responses in the context of the conversation. For example, if the bot suggests a dangerous activity, the user might add the tag "dangerous" to indicate that this is a critical error that needs to be fixed; if the bot's list of information is too long and difficult to follow, the user might add "list too long."
[0091] Debugging: The user selects a type of error to focus on fixing, based on its frequency or potential harm. For example, to fix the "list too long" error, the user adds "But do not list more than one message per message" to the end of the first paragraph of the tip template preface.
[0092] Evaluate the new prompt locally: To see if the prompt change fixed the error, the user clicked the “Retry” button next to the chatbot response tagged with this error label. Retry allows the user to test if the new prompt template fixes the error in the same conversation context where the error first occurred. In addition to Retry, the Edit button allows the user to edit the user utterance in the conversation, simulating how the new prompt template would lead a new conversation with the user.
[0093] Globally evaluate new prompts: After fixing the bug locally, users test the new prompt template on the full set of collected dialogues to see if the new prompt template fixes other bugs or introduces new ones.
[0094] Iteration: After identifying an effective global cue, the user goes back to select different errors and try new cue design solutions until the ideal result is approached.
[0095] The benefits of this application are:
[0096] Lowering the threshold and promoting broad user participation: Through the chatbot design system, users are provided with the means to create chatbots using natural language without programming, which greatly lowers the threshold for ordinary users, especially non-AI experts without programming background, to participate in the design of LLM-based chatbots. This enables a wider range of user groups to access and use AI technology, and then 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 the prompt strategy by evaluating the chatbot's feedback. This process can significantly improve the flexibility and effectiveness of user-designed prompts, making the generated output more in line with user expectations.
[0098] Deepen the understanding of LLM capabilities: Through NLP technology and a prompt library of successful response cases, guide users on how to write effective prompt templates, enhance users' understanding of LLM, enable users to master the operating rules of LLM, and learn to use its generation capabilities. This not only effectively avoids incorrect prompt design, but also improves the success rate of users in actual applications.
[0099] Promote effective user interaction experience: With the help of the evaluation and feedback mechanism of the chatbot design system, users can obtain real-time information about the effects and optimization suggestions of their designs during the chatbot design process. This instant feedback improves the user interaction experience and enables designers to adjust strategies in a timely manner to improve 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, helping non-expert users to gradually master relevant knowledge and promote the improvement of their technical literacy and the development of practical abilities.
[0101] Flexibility in application to multiple scenarios: The chatbot created in 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 interactive experience and meet different needs more effectively.
[0102] It can be seen that through the technical effects of the above aspects, the method provided by this application not only provides a new design method for non-AI expert users, but also provides users with a more efficient and intuitive method when designing LLM-based chatbots. The innovative design ideas, feedback mechanisms and educational elements introduced by it can greatly improve the user experience, promote the popularization of related technologies, and provide a solid foundation for future research and development.
[0103] Figure 4 A schematic diagram of the structure of a device for generating an interactive robot provided in an embodiment of the present application is shown, wherein a graphical user interface is displayed through a terminal device, and 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 on 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 interactive content input operation and display the first interactive content and a first response content fed back by the initial interactive robot to the first interactive content according to the initial prompt template;
[0107] An adjustment module is used 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 step of displaying, in response to the first interactive content input operation, the first interactive content and the first response content fed back by the initial interactive robot to the first interactive content according to the initial prompt template comprises:
[0110] Determining a target interaction scenario of the initial interactive robot according to the preface;
[0111] In the target interaction scenario, controlling the initial interaction robot to generate initial interaction content according to the initial interaction part;
[0112] In response to a first interaction content input operation, the first response content is displayed; wherein the first response content is generated by the initial interaction robot in the target interaction scenario with the initial interaction content as an opening remark.
[0113] The initial prompt template further includes a prompt field portion; after displaying the first response content, it also includes:
[0114] Displaying a prompt selection control on the graphical user interface;
[0115] In response to a touch operation on the prompt selection control, displaying a plurality of prompt fields to be selected corresponding to the prompt selection control;
[0116] In response to a selection operation on the to-be-selected prompt field, a target prompt field of the first response content is determined.
[0117] The initial prompt template is adjusted according to the first response content and the 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, including:
[0118] In response to a supplementary information input operation, generating first supplementary information of the desired behavior;
[0119] Adding the first supplementary information to the initial prompt template to obtain a transition prompt template;
[0120] When the process of interacting based on the transition prompt template achieves the preset response effect, the target prompt template is obtained.
[0121] After getting the transition prompt template, it also includes:
[0122] Displaying a retry control at a preset position of the target prompt field;
[0123] In response to the touch operation on the retry control, a second response content fed back by the transition interaction robot to the first interaction content according to the transition prompt template is displayed.
[0124] While displaying the first interactive content, the method further includes:
[0125] Displaying an editing control at a preset position of the first interactive content;
[0126] In response to a touch operation on the editing control, second interactive content edited from the first interactive content and third response content fed back by the transitional interactive robot to the second interactive content are displayed.
[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, the method further includes:
[0128] Display a statistical list of difference information between the first response content and the second response content;
[0129] generating second supplementary information of the expected 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] The second supplementary information is added to the transition prompt template to obtain a new transition prompt template, until the process of interaction based on the new transition prompt template achieves the preset response effect to obtain the target prompt template.
[0132] like Figure 5 As 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 in the memory and executable on the processor, wherein the processor implements the steps of the method for generating an interactive robot when executing the computer program.
[0133] Specifically, the above-mentioned memory and processor can be general-purpose memory and processor, which are not specifically limited here. When the processor runs the computer program stored in the memory, the above-mentioned method for generating an interactive robot can be executed.
[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, on which a computer program is stored, and when the computer program is run by a processor, the steps of the above-mentioned method for generating an 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, the above-mentioned method for generating an interactive robot can be executed.
[0136] In the embodiments provided in 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 schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0137] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may 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, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0139] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0140] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0141] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; 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. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for generating an interactive robot, characterized in that: Displaying a graphical user interface via a terminal device, the method comprising: In response to a basic interactive robot generation operation, displaying a design interface of the basic interactive robot on the graphical user interface; wherein the basic interactive robot is a pre-trained robot; In response to an input operation of a desired behavior, an initial prompt template is generated according to the input desired behavior; wherein the initial prompt template is used to define the basic interactive robot as an initial interactive robot; In response to a first interactive content input operation, displaying the first interactive content and a first response content fed back by the initial interactive robot to the first interactive content according to the initial prompt template; According to the first response content and the preset response effect, the initial prompt template is adjusted 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.
2. The method according to claim 1, characterized in that: The initial prompt template includes: a preface part and an initial interaction part; The step of displaying, in response to the first interactive content input operation, the first interactive content and the first response content fed back by the initial interactive robot to the first interactive content according to the initial prompt template comprises: Determining a target interaction scenario of the initial interactive robot according to the preface; In the target interaction scenario, controlling the initial interaction robot to generate initial interaction content according to the initial interaction part; In response to a first interaction content input operation, the first response content is displayed; wherein the first response content is generated by the initial interaction robot in the target interaction scenario with the initial interaction content as an opening remark.
3. The method according to claim 2, characterized in that The initial prompt template also includes a prompt field portion; after displaying the first response content, the method further includes: Displaying a prompt selection control on the graphical user interface; In response to a touch operation on the prompt selection control, displaying a plurality of prompt fields to be selected corresponding to the prompt selection control; In response to a selection operation on the to-be-selected prompt field, a target prompt field of the first response content is determined.
4. The method according to claim 3, characterized in that: The initial prompt template is adjusted according to the first response content and the 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, including: In response to a supplementary information input operation, generating first supplementary information of the desired behavior; Adding the first supplementary information to the initial prompt template to obtain a transition prompt template; When the process of interacting based on the transition prompt template achieves the preset response effect, the target prompt template is obtained.
5. The method according to claim 4, characterized in that After obtaining the transition prompt template, the method further includes: Displaying a retry control at a preset position of the target prompt field; In response to the touch operation on the retry control, a second response content fed back by the transition interaction robot to the first interaction content according to the transition prompt template is displayed.
6. The method according to claim 5, characterized in that While displaying the first interactive content, the method further includes: Displaying an editing control at a preset position of the first interactive content; In response to a touch operation on the editing control, second interactive content edited from the first interactive content and third response content fed back by the transitional interactive robot to the second interactive content are displayed.
7. The method according to claim 5, characterized in that After displaying the second response content fed back by the transition interaction robot to the first interaction content according to the transition prompt template, the method further includes: Display a statistical list of difference information between the first response content and the second response content; generating second supplementary information of the expected behavior and the first supplementary information according to the difference information; When the process of interacting based on the transition prompt template achieves the preset response effect, obtaining the target prompt template includes: The second supplementary information is added to the transition prompt template to obtain a new transition prompt template, until the process of interaction based on the new transition prompt template achieves the preset response effect to obtain the target prompt template.
8. A device for generating an interactive robot, characterized in that: A graphical user interface is displayed by a terminal device, the device comprising: A first response module, configured to respond to a basic interactive robot generation operation and display a design interface of the basic interactive robot on the graphical user interface; wherein the basic interactive robot is a pre-trained robot; 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; A third response module, configured to respond to a first interactive content input operation and display the first interactive content and a first response content fed back by the initial interactive robot to the first interactive content according to the initial prompt template; An adjustment module is used 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.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for generating an interactive robot as described in any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating an interactive robot as described in any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Generation method and device of customer service robot, electronic equipment and medium
CN111400465A
Message configuration method and related device
CN116069308A
Customer service message generation method based on AI system and e-commerce customer service system
CN116701599A
Automated chatbot linguistic expression generation
US20200356632A1
Function-as-a-service cloud chatbot for two-way communication systems
WO2021119441A1