Interactive tutoring method and apparatus based on controllable agents

By using an interactive teaching assistant method based on controllable intelligent agents, and by optimizing output control through external intent recognition and pre-set message injection, the problem of large models struggling to call complex tools is solved, resulting in more accurate and stable teaching assistance.

CN120104279BActive Publication Date: 2025-11-18TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510173174.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-11-18
Estimated Expiration
2045-02-17

AI Technical Summary

Technical Problem

Existing large-scale pre-trained language models struggle to effectively utilize complex tools when assisting in teaching, leading to incorrect calls and parameter inputs, which limits the scope and effectiveness of AI teaching assistants.

Method used

By using an interactive teaching assistant method based on controllable intelligent agents, and leveraging external intent recognition interfaces and preset message injection methods, output control and tool invocation are optimized. This includes introducing external knowledge, fine-tuning message content, and adjusting the available tools in the large model, thereby achieving precise control over the behavior of the intelligent agent.

Benefits of technology

It improves the accuracy and stability of the large model's output in specific teaching scenarios, alleviates the problem of the large model's output being difficult to control, and enhances the effect of teacher-student interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104279B_ABST
    Figure CN120104279B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of natural language processing, in particular to an interactive tutoring method and device based on controllable intelligent agents, wherein the method comprises: obtaining a first message sequence in response to a current question; identifying a first actual intention according to the first message sequence to perform message injection judgment, if injection, adjusting the sequence to generate a second message sequence, otherwise, not adjusting; judging whether to output simulation, if yes, outputting simulation on the second or first message sequence to generate a third message sequence, and judging whether to jump out of the loop, if yes, obtaining a new question of the user, otherwise, inputting into the intelligent agent to generate a fourth message sequence; identifying a second actual intention according to the fourth or third message sequence to perform preset tool determination to obtain final output content. Thus, the problem that the existing large model is difficult to solve all complex tool calls based on prompt engineering and modification of input only, and is prone to produce error calls and parameter input is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to an interactive teaching assistant method and device based on a controllable intelligent agent. Background Technology

[0002] With the success of large-scale pre-trained language models like ChatGPT in the question-answering field, products that use question-answering to assist teaching with AI are also developing rapidly. The potential of large models to improve student learning outcomes is far superior to previous question-answering systems that could only generate non-fluent and illogical responses, effectively assisting teachers in guiding students. However, large models that can only process language cannot cover all teaching scenarios, nor can they effectively utilize all teaching aids, significantly limiting the teaching scope of such products.

[0003] Recent work has proposed the concept of large-scale model agents, which encode tool calls into special word sequences to train large-scale models to invoke various tools and observe and analyze the results returned by these tools. This aims to improve the interaction capabilities of large-scale models with the virtual and real worlds. This technology significantly lowers the barrier to entry for applying large-scale models to AI teaching assistants, endowing them with capabilities beyond language interaction, such as code execution in STEM fields and art drawing in humanities and social sciences. However, limited by the ability of large-scale models to invoke complex tool commands and the scarcity of real-world tool call data, it is difficult to handle all complex tool calls based solely on prompt engineering and input modifications, easily leading to erroneous calls and parameter inputs. Summary of the Invention

[0004] This invention provides an interactive teaching assistant method based on a controllable intelligent agent to solve the problems of limited ability of large models to call complex tool instructions and lack of data for actual tool calls. Existing solutions are difficult to handle the call of all complex tools based solely on prompt engineering and modification of input, and are prone to erroneous calls and parameter inputs.

[0005] A first aspect of the present invention provides an interactive teaching assistant method based on a controllable intelligent agent, comprising the following steps: acquiring a first message sequence in response to a current question; inputting the first message sequence into a first external intent recognition interface of a target intelligent agent to identify a first actual intent; selecting whether to perform preset message injection based on the first actual intent; if preset message injection is selected, adjusting the first message sequence according to the preset message injection method to generate a second message sequence, otherwise not adjusting the first message sequence; selecting whether to bypass the target intelligent agent to perform output simulation based on the first actual intent; if output simulation is selected, performing output simulation on the second message sequence or the first message sequence to generate a first simulated message, and inserting the first simulated message into the second message sequence or the first message sequence to obtain a third message sequence; if... If output simulation is performed, the user selects whether to exit the target agent's call loop based on the first actual intent. If the user selects to exit the target agent's call loop, the third message sequence is used as the final output content, and a new question from the user is obtained. Otherwise, if the user does not select to perform output simulation, the second message sequence or the first message sequence is input into the target agent's generation interface to generate a second simulated message, and the second simulated message is inserted into the second message sequence or the first message sequence to obtain a fourth message sequence. The fourth message sequence or the third message sequence is input into the target agent's second external intent recognition interface to identify the second actual intent. Based on the second actual intent, a preset tool is used to determine the output of the fourth message sequence or the third message sequence to adjust the output and obtain the final output content, then proceed to the next round of the agent loop.

[0006] Optionally, the expression for the first message sequence is:

[0007] M = [m1, m2, ..., m i m |M| ]

[0008] m i ={role:r,content:c}

[0009] Where, m |M| For the current message, m i For historical messages, r represents the character, and c represents the output content.

[0010] Optionally, the preset message injection method includes at least one of introducing external knowledge, fine-tuning message content, and adjusting the available tools of the large model.

[0011] Optionally, the step of determining a preset tool based on the second actual intent to adjust the output of the fourth message sequence or the third message sequence to obtain the final output content and enter the next round of the agent loop includes: determining a preset tool based on the second actual intent to select at least one of exiting the target agent's call loop, skipping tool calls, and continuing tool calls; if exiting the target agent's call loop is selected, the fourth message sequence or the third message sequence is used as the final output content, and a new question from the user is obtained; if skipping tool calls is selected, the fourth message sequence or the third message sequence is used as the final output content, and the next round of the agent loop is entered; if continuing tool calls is selected, the tool call parameters of the target agent are adjusted according to the second actual intent to obtain the adjusted tool call parameters, and the output of the fourth message sequence or the third message sequence is modified and the tool call is performed according to the adjusted tool call parameters to obtain the final output content, and the next round of the agent loop is entered.

[0012] A second aspect of the present invention provides an interactive teaching assistant device based on a controllable intelligent agent, comprising: a first acquisition module, configured to acquire a first message sequence in response to a current question; a first identification module, configured to input the first message sequence into a first external intent identification interface of a target intelligent agent to identify a first actual intent; a first selection module, configured to select whether to perform preset message injection based on the first actual intent; if preset message injection is selected, the first message sequence is adjusted according to a preset message injection method to generate a second message sequence, otherwise the first message sequence is not adjusted; a second selection module, configured to select whether to bypass the target intelligent agent to perform output simulation based on the first actual intent; if output simulation is selected, output simulation is performed on the second message sequence or the first message sequence to generate a first simulated message, and the first simulated message is inserted into the second message sequence or the first message sequence to obtain a third message sequence; A three-selection module is used to determine whether to exit the target agent's call loop based on the first actual intent if output simulation is selected. If exiting the target agent's call loop is selected, the third message sequence is used as the final output content, and a new question from the user is obtained. Otherwise, if output simulation is not selected, the second message sequence or the first message sequence is input into the target agent's generation interface to generate a second simulated message, and the second simulated message is inserted into the second message sequence or the first message sequence to obtain a fourth message sequence. A second recognition module is used to input the fourth message sequence or the third message sequence into the target agent's second external intent recognition interface to identify the second actual intent. A judgment module is used to perform a preset tool judgment based on the second actual intent to adjust the output of the fourth message sequence or the third message sequence to obtain the final output content and enter the next round of agent loop.

[0013] Optionally, the expression for the first message sequence is:

[0014] M = [m1, m2, ..., m i m |M| ]

[0015] m i ={role:r,content:c}

[0016] Where, m | M | For the current message, m i For historical messages, r represents the character, and c represents the output content.

[0017] Optionally, the preset message injection method includes at least one of introducing external knowledge, fine-tuning message content, and adjusting the available tools of the large model.

[0018] Optionally, the determination module includes:

[0019] The selection unit is used to determine the preset tool according to the second actual intention, so as to select at least one of jumping out of the call loop of the target agent, skipping the tool call, and continuing the tool call;

[0020] The acquisition unit is configured to, if the user chooses to exit the call loop of the target agent, use the fourth message sequence or the third message sequence as the final output content and acquire the user's new question.

[0021] The jump unit is used to, if the skip tool is selected, take the fourth message sequence or the third message sequence as the final output content and enter the next round of the agent loop;

[0022] The modification unit is configured to, if the continued tool call is selected, select whether to adjust the tool call parameters of the target agent according to the second actual intention to obtain the adjusted tool call parameters, and modify the output of the fourth message sequence or the third message sequence and make tool calls according to the adjusted tool call parameters to obtain the final output content and enter the next round of agent loop.

[0023] A third aspect of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the interactive teaching assistant method based on a controllable intelligent agent as described in the above embodiments.

[0024] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described interactive teaching assistant method based on a controllable intelligent agent.

[0025] The interactive teaching assistant method and device based on controllable intelligent agents proposed in this invention changes the current situation where intelligent agents are completely controlled by large models by controlling the output and optimizing the external intent recognition in specific scenarios. It can effectively alleviate the problem that large models are difficult to control the output through prompts and engineering, and allows for the search of a stable external intent recognition method for certain specific domain scenarios that require more precise improvement. This allows for better control of the behavior of the intelligent agent when calling teaching assistant tools, resulting in more accurate results and empowering teachers and students.

[0026] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0027] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0028] Figure 1 A flowchart illustrating an interactive teaching assistant method based on a controllable intelligent agent provided in an embodiment of the present invention;

[0029] Figure 2 This is a schematic diagram illustrating the execution of an interactive teaching assistant method based on a controllable intelligent agent, provided in an embodiment of the present invention.

[0030] Figure 3 A block diagram of an interactive teaching assistant device based on a controllable intelligent agent provided in an embodiment of the present invention;

[0031] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0032] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0033] The interactive teaching assistant method and apparatus based on controllable intelligent agents according to embodiments of the present invention are described below with reference to the accompanying drawings.

[0034] Figure 1 This is a flowchart illustrating an interactive teaching assistant method based on a controllable intelligent agent, provided in an embodiment of the present invention.

[0035] like Figure 1 As shown, this interactive teaching assistant method based on controllable intelligent agents includes the following steps:

[0036] In step S101, the message sequence in response to the current question is obtained.

[0037] In actual implementation, such as Figure 2 As shown, obtain the first message sequence M = [m1, m2, ..., m] in response to the current query. i m |M| M represents the current message m. |M| and all historical messages m i A sequence, where m i ={role:r,content:c} stores multiple key-value pairs, where r is the role, including user input, system prompts, assistant output, and tool output, and c is the output content.

[0038] It should be noted that the first message sequence may originate from the user or a tool, and is pre-generated through an external intent recognition interface before being input into the target intelligent agent.

[0039] In step S102, the first message sequence is input into the first external intent recognition interface of the target intelligent agent to identify the first actual intent.

[0040] In actual implementation, such as Figure 2 As shown, the first message sequence is input into the first external intent recognition interface of the target intelligent agent, and decisions are made based on the features in the first message sequence. For example, consciousness recognition can be performed through regular expressions and other meta-information (such as the course corresponding to the AI ​​teaching assistant) to obtain the user's first actual intent.

[0041] In step S103, whether to perform preset message injection is selected according to the first actual intention. If preset message injection is selected, the first message sequence is adjusted according to the preset message injection method to generate the second message sequence; otherwise, the first message sequence is not adjusted.

[0042] In some embodiments, the preset message injection method includes at least one of introducing external knowledge, fine-tuning message content, and adjusting the available tools for the large model.

[0043] In actual implementation, such as Figure 2 As shown, depending on the first actual intention, it is selected whether to perform preset message injection. If selected, the first message sequence is adjusted using at least one of the preset message injection methods to generate the second message sequence. If preset message injection is not selected, the first message sequence is not adjusted.

[0044] It should be noted that message injection is divided into three types: the first is to introduce external knowledge, such as retrieval enhancement methods; the second is to fine-tune the message content, such as adjusting the message by prompting the engineering to add, delete, or modify; and the third is to adjust the teaching assistant tools that the large model can use, which is achieved by adding a message with the role of system at the beginning of the message sequence M, and describing the relevant information of the tool call in the output content c.

[0045] In step S104, based on the first actual intention, it is selected whether to bypass the target agent to perform output simulation. If output simulation is selected, output simulation is performed on the second message sequence or the first message sequence to generate the first simulated message, and the first simulated message is inserted into the second message sequence or the first message sequence to obtain the third message sequence.

[0046] In actual implementation, such as Figure 2As shown, based on the first actual intention, it is selected whether to bypass the target agent to perform output simulation. If output simulation is selected, the direct generation of the target agent is skipped, that is, output simulation is performed on the second message sequence or the first message sequence to generate one or more first simulated messages to provide the need to solve the problem without the processing of a large model, such as only needing to return specific files and template speech requirements, to prevent the large model from performing abnormally, and one or more first simulated messages are inserted into the second message sequence or the first message sequence to obtain the third message sequence.

[0047] In step S105, if output simulation is selected, then the user chooses whether to exit the target agent's call loop based on the first actual intention. If the user chooses to exit the target agent's call loop, then the third message sequence is used as the final output content, and the user's new question is obtained. Otherwise, if output simulation is not selected, then the second message sequence or the first message sequence is input into the target agent's generation interface to generate the second simulated message, and the second simulated message is inserted into the second message sequence or the first message sequence to obtain the fourth message sequence.

[0048] In actual implementation, such as Figure 2 As shown, if output simulation is selected, the system chooses whether to exit the target agent's call loop based on the first actual intention. If the system chooses to exit the target agent's call loop, the third message sequence is used as the final output, and the user's new question is obtained. Steps S101-S105 are then re-executed; otherwise, the next step is executed normally. If output simulation is not selected, the second message sequence or the first message sequence is input into the target agent's generation interface to generate a second simulated message, which is then inserted at the end of the second message sequence or the first message sequence M to generate a fourth message sequence M′ = [m1, m2, ..., m i m |M|′ The role of the last message in this fourth message sequence is assistant.

[0049] In step S106, the fourth message sequence or the third message sequence is input into the second external intent recognition interface of the target agent to identify the second actual intent.

[0050] In step S107, a preset tool is determined according to the second actual intention to adjust the output of the fourth message sequence or the third message sequence, and the final output content is obtained, and the next round of intelligent agent loop is entered.

[0051] In some embodiments, a preset tool is used to determine the second actual intent in order to adjust the output of the fourth message sequence and obtain the final output content, including:

[0052] Based on the second actual intent, a preset tool determination is made to select at least one of the following: exiting the target agent's call loop, skipping tool calls, and continuing tool calls;

[0053] If you choose to exit the call loop of the target agent, then retrieve the user's new question;

[0054] If you choose to skip the tool call, the fourth or third message sequence will be used as the final output.

[0055] If the tool call is continued, the tool call parameters of the target agent are adjusted according to the second actual intention to obtain the adjusted tool call parameters. The output of the third or fourth message sequence is then modified according to the adjusted tool call parameters to obtain the final output content.

[0056] In actual implementation, such as Figure 2 As shown, a new message sequence is input into the second external generation interface of the target agent. The second actual intention is identified according to the output content c in the third or fourth message sequence. A preset tool determination is performed according to the second actual intention to select at least one of jumping out of the target agent's call loop, skipping tool calls, and continuing tool calls.

[0057] If the call loop of the target agent is broken, the fourth message sequence or the third message sequence is used as the final output, and the user's new question is obtained. The process of steps S101-S106 is re-executed to correct the obvious tool call error of the target agent.

[0058] If you choose to skip the tool call, the fourth message sequence or the third message sequence will be used as the final output and the process will proceed to the next round of the agent loop.

[0059] If the tool call is continued, the tool call parameters of the target agent are adjusted according to the second actual intent. If the tool call parameters are not adjusted, the tool output is directly called and the process enters the next round of agent call loop. If the tool call parameters are adjusted, some fixed template parameters provided by the actual intent are used to adjust the tool call parameters, thereby improving the stability of parameter calls in some specific scenarios. The output of the fourth message sequence or the third message sequence is modified according to the adjusted tool call parameters. The output modification may include special symbol replacement, knowledge graph display optimization, addition of cited articles, etc. These adjustment methods are a set of script programs customized in advance according to the requirements and provided after external intent recognition. They are connected to the agent control interface in the form of plug-ins. After adjustment, the process of steps S102-S107 is executed iteratively to correct the output errors of the target agent, beautify the output content of the target agent, add new template information to obtain the final output content, and enter the next round of agent loop.

[0060] For example, according to some of the last messages m |M|′ The output content c determines whether a tool call should be performed. If the output content c contains a tool call symbol, the relevant tool interface is invoked, and the call result is packaged into a new message and returned to step S101. The new teaching assistant tool message will have a message object with r as tool appended to the end of the new message sequence M′. If it does not contain a tool call symbol, the next round of agent call loop is entered, iteratively executing steps S101-S107.

[0061] In summary, the interactive teaching assistant method based on a controllable intelligent agent proposed in this embodiment of the invention changes the current situation where the intelligent agent is completely controlled by a large model by controlling the output and optimizing the external intent recognition in specific scenarios. It can effectively alleviate the problem that large models are difficult to control the output through prompts and engineering, and allows for the search of a stable external intent recognition method for certain specific domain scenarios that require more precise improvement. This allows for better control of the intelligent agent's behavior when calling teaching assistant tools, resulting in more accurate results and empowering teachers and students.

[0062] Next, with reference to the accompanying drawings, we describe the interactive teaching assistant device based on a controllable intelligent agent according to an embodiment of the present invention.

[0063] Figure 3 This is a block diagram of an interactive teaching assistant device based on a controllable intelligent agent according to an embodiment of the present invention.

[0064] like Figure 3 As shown, the interactive teaching assistant device 30 based on a controllable intelligent agent includes: a first acquisition module 301, a first recognition module 302, a first selection module 303, a second selection module 304, a third selection module 305, a second recognition module 306, and a judgment module 307.

[0065] The first acquisition module 301 acquires a first message sequence in response to the current query. The first recognition module 302 inputs the first message sequence into the first external intent recognition interface of the target agent to identify the first actual intent. The first selection module 303 selects whether to perform preset message injection based on the first actual intent. If preset message injection is selected, the first message sequence is adjusted according to the preset message injection method to generate a second message sequence; otherwise, the first message sequence is not adjusted. The second selection module 304 selects whether to bypass the target agent to perform output simulation based on the first actual intent. If output simulation is selected, output simulation is performed on either the second message sequence or the first message sequence to generate a first simulated message, which is then inserted into either the second message sequence or the first message sequence to obtain a third message sequence. The third selection module 305 is used to determine whether to exit the target agent's call loop based on the first actual intent if output simulation is selected. If exiting the target agent's call loop is selected, the third message sequence is used as the final output content, and a new question from the user is obtained. Otherwise, if output simulation is not selected, the second message sequence or the first message sequence is input into the target agent's generation interface to generate a second simulated message, and the second simulated message is inserted into the second message sequence or the first message sequence to obtain a fourth message sequence. The second recognition module 306 is used to input the fourth message sequence or the third message sequence into the target agent's second external intent recognition interface to recognize the second actual intent. The judgment module 307 is used to perform a preset tool judgment based on the second actual intent to adjust the output of the fourth message sequence or the third message sequence to obtain the final output content and enter the next round of the agent loop.

[0066] In some embodiments, the expression for the first message sequence is:

[0067] M = [m1, m2, ..., m i m |M| ]

[0068] m i ={role:r,content:c}

[0069] Where, m |M| For the current message, m i For historical messages, r represents the character, and c represents the output content.

[0070] In some embodiments, the preset message injection method includes at least one of introducing external knowledge, fine-tuning message content, and adjusting the available tools for the large model.

[0071] In some embodiments, the determination module 407 includes:

[0072] The selection unit is used to make a preset tool determination based on the second actual intention, so as to select at least one of jumping out of the target agent's call loop, skipping tool calls, and continuing tool calls;

[0073] The acquisition unit is used to, if the user chooses to exit the call loop of the target agent, take the fourth message sequence or the third message sequence as the final output and acquire the user's new question.

[0074] The exit unit is used to select the fourth or third message sequence as the final output if the tool call is skipped, and then enter the next round of the agent loop.

[0075] The modification unit is used to, if the option to continue tool calls is selected, to choose whether to adjust the tool call parameters of the target agent according to the second actual intention, so as to obtain the adjusted tool call parameters, and to modify the output of the fourth message sequence or the third message sequence and make tool calls according to the adjusted tool call parameters, so as to obtain the final output content and enter the next round of agent loop.

[0076] It should be noted that the foregoing explanation of the interactive teaching assistant method embodiment based on controllable intelligent agents also applies to the interactive teaching assistant device based on controllable intelligent agents in this embodiment, and will not be repeated here.

[0077] The interactive teaching assistant device based on a controllable intelligent agent proposed in this embodiment of the invention changes the current situation where the intelligent agent is completely controlled by a large model by controlling the output and optimizing the external intent recognition in specific scenarios. It can effectively alleviate the problem that large models are difficult to control the output through prompts and engineering, and allows for the search of a stable external intent recognition method for certain specific domain scenarios that require precise improvement of results. This allows for better control of the intelligent agent's behavior when calling teaching assistant tools, resulting in more accurate results and empowering teachers and students.

[0078] Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. The electronic device may include:

[0079] The memory 401, the processor 402, and the computer program stored on the memory 401 and capable of running on the processor 402.

[0080] When the processor 402 executes the program, it implements the interactive teaching assistant method based on a controllable intelligent agent provided in the above embodiments.

[0081] Furthermore, electronic devices also include:

[0082] Communication interface 403 is used for communication between memory 401 and processor 402.

[0083] The memory 401 is used to store computer programs that can run on the processor 402.

[0084] The memory 401 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0085] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0086] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.

[0087] Processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.

[0088] This invention also provides a computer program product, which, when executed by a processor, implements the above-described interactive teaching assistant method based on a controllable intelligent agent.

[0089] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described interactive teaching assistant method based on a controllable intelligent agent.

[0090] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0091] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0092] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0093] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0094] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0095] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0096] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0097] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. An interactive teaching assistant method based on a controllable intelligent agent, characterized in that, Includes the following steps: Retrieve the first message sequence in response to the current query; The first message sequence is input into the first external intent recognition interface of the target intelligent agent to identify the first actual intent; Based on the first actual intention, it is selected whether to perform preset message injection. If preset message injection is selected, the first message sequence is adjusted according to the preset message injection method to generate the second message sequence; otherwise, the first message sequence is not adjusted. Based on the first actual intention, it is selected whether to bypass the target agent to perform output simulation. If output simulation is selected, output simulation is performed on the second message sequence or the first message sequence to generate a first simulated message. The first simulated message is then inserted into the second message sequence or the first message sequence to obtain a third message sequence. If output simulation is selected, then the user chooses whether to exit the call loop of the target agent according to the first actual intention. If the user chooses to exit the call loop of the target agent, then the third message sequence is used as the final output content, and the user's new question is obtained. Otherwise, if output simulation is not selected, then the second message sequence or the first message sequence is input into the generation interface of the target agent to generate a second simulated message, and the second simulated message is inserted into the second message sequence or the first message sequence to obtain a fourth message sequence. The fourth message sequence or the third message sequence is input into the second external intent recognition interface of the target intelligent agent to identify the second actual intent; Based on the second actual intention, a preset tool is used to determine the output of the fourth message sequence or the third message sequence, and the final output content is obtained to enter the next round of intelligent agent loop.

2. The interactive teaching assistant method based on a controllable intelligent agent according to claim 1, characterized in that, The expression for the first message sequence is: M=[m1,m2,...,m i ,m |M| ] m i ={role:r,content:c} Where, m |M| For the current message, m i For historical messages, r represents the character, and c represents the output content.

3. The interactive teaching assistant method based on a controllable intelligent agent according to claim 1, characterized in that, The preset message injection method includes at least one of the following: introducing external knowledge, fine-tuning message content, and adjusting the available tools of the large model.

4. The interactive teaching assistant method based on a controllable intelligent agent according to claim 1, characterized in that, The step of determining the output of the fourth message sequence or the third message sequence based on the second actual intention using a preset tool to adjust the output and obtain the final output content before entering the next round of the intelligent agent loop includes: Based on the second actual intent, a preset tool determination is performed to select at least one of the following: exiting the call loop of the target agent, skipping tool calls, and continuing tool calls; If the user chooses to exit the call loop of the target agent, then the fourth message sequence or the third message sequence will be used as the final output content, and the user's new question will be obtained. If the skip tool call is selected, the fourth message sequence or the third message sequence will be used as the final output content to enter the next round of the agent loop; If the continued tool call is selected, the tool call parameters of the target agent are adjusted according to the second actual intention to obtain the adjusted tool call parameters. The output of the fourth message sequence or the third message sequence is modified and the tool call is performed according to the adjusted tool call parameters to obtain the final output content and enter the next round of agent loop.

5. An interactive teaching assistant device based on a controllable intelligent agent, characterized in that, include: The first acquisition module is used to acquire the first message sequence in response to the current query; The first identification module inputs the first message sequence into the first external intent identification interface of the target intelligent agent to identify the first actual intent; The first selection module selects whether to perform preset message injection based on the first actual intention. If preset message injection is selected, the first message sequence is adjusted according to the preset message injection method to generate the second message sequence; otherwise, the first message sequence is not adjusted. The second selection module is used to select whether to bypass the target agent to perform output simulation according to the first actual intention. If output simulation is selected, output simulation is performed on the second message sequence or the first message sequence to generate a first simulated message, and the first simulated message is inserted into the second message sequence or the first message sequence to obtain a third message sequence. The third selection module is used to select whether to exit the call loop of the target agent according to the first actual intention if output simulation is selected. If exiting the call loop of the target agent is selected, the third message sequence is used as the final output content and the user's new question is obtained. Otherwise, if output simulation is not selected, the second message sequence or the first message sequence is input into the generation interface of the target agent to generate a second simulated message, and the second simulated message is inserted into the second message sequence or the first message sequence to obtain a fourth message sequence. The second identification module is used to input the fourth message sequence or the third message sequence into the second external intent identification interface of the target intelligent agent to identify the second actual intent; The determination module is used to determine the preset tool according to the second actual intention, so as to adjust the output and call the tool for the fourth message sequence or the third message sequence, obtain the final output content, and enter the next round of intelligent agent loop.

6. The interactive teaching assistant device based on a controllable intelligent agent according to claim 5, characterized in that, The expression for the first message sequence is: M=[m1,m2,...,m i ,m |M| ] m i ={role:r,content:c} Where, m |M| For the current message, m i For historical messages, r represents the character, and c represents the output content.

7. The interactive teaching assistant device based on a controllable intelligent agent according to claim 5, characterized in that, The preset message injection method includes at least one of the following: introducing external knowledge, fine-tuning message content, and adjusting the available tools of the large model.

8. The interactive teaching assistant device based on a controllable intelligent agent according to claim 5, characterized in that, The determination module includes: The selection unit is used to determine the preset tool according to the second actual intention, so as to select at least one of jumping out of the call loop of the target agent, skipping the tool call, and continuing the tool call; The acquisition unit is configured to, if the user chooses to exit the call loop of the target agent, use the fourth message sequence or the third message sequence as the final output content and acquire the user's new question. The jump unit is used to, if the skip tool is selected, take the fourth message sequence or the third message sequence as the final output content and enter the next round of the agent loop; The modification unit is configured to, if the continued tool call is selected, select whether to adjust the tool call parameters of the target agent according to the second actual intention to obtain the adjusted tool call parameters, and modify the output of the fourth message sequence or the third message sequence and make tool calls according to the adjusted tool call parameters to obtain the final output content and enter the next round of agent loop.

9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the interactive teaching assistant method based on a controllable intelligent agent as described in any one of claims 1-4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the interactive teaching assistant method based on a controllable intelligent agent as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Government affair intelligent response device and method based on intention recognition and large language model

    CN118035419A

  • Intelligent sales method and device based on large model Agent, equipment and medium

    CN119130476A