Interactive teaching assisting method and device based on controllable intelligent agent
By adopting an interactive teaching assistant method based on controllable agents in AI teaching assistants in the field of education, the problem of difficulty in effectively calling complex tools is solved, and more accurate teaching output and a wider teaching scope are achieved.
Patent Information
- Application Number
- CN202510173174.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-02-17
AI Technical Summary
The existing large-scale pre-trained language model is difficult to effectively call complex tools in AI teaching assistants in the field of education, resulting in incorrect calls and parameter input, limiting the scope and effect of teaching.
An interactive teaching assistant method based on controllable agents is adopted, by obtaining and identifying user message sequences, preset message injection and output simulation is performed, selecting whether to jump out of the agent's call loop, and optimizing tool call parameters to generate the final output content.
It effectively alleviates the problem that big models are difficult to control output through prompt engineering, improves the accuracy of behavior control of agents in calling teaching assistant tools, obtains more accurate teaching results, and provides teachers and students with better auxiliary teaching tools.
Smart Images

Figure CN120104279A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to an interactive teaching assistant method and device based on a controllable intelligent agent. Background Art
[0002] With the success of large-scale pre-trained language models such as ChatGPT in the field of question-answering, products that use question-answering to realize AI teaching assistants in the field of education are also developing rapidly. The potential of using large models to improve students' learning outcomes is much better than the original question-answering system that can only generate non-fluent and illogical questions, and can well assist teachers in guiding students. However, large models that can only process language cannot cover all teaching scenarios, nor can they make good use of all teaching-assisting tools, which greatly limits the teaching scope of such products.
[0003] Recent work has proposed the concept of large model agents, which encode tool calls into special word sequences, train large models to call various tools and observe the results returned by analytical tools, aiming to improve the interaction between large models and the virtual and real worlds. This technology greatly reduces the threshold for large models to be used in AI teaching assistants, and gives AI teaching assistants capabilities other than language interaction, such as code execution in science and engineering, and art drawing in humanities and social sciences. However, due to the limitations of large models' ability to call complex tool instructions and the lack of data on real tool calls, it is difficult to handle all complex tool calls based solely on prompt engineering and input modifications, and it is easy to make incorrect calls and parameter inputs. Summary of the invention
[0004] The present invention provides an interactive teaching assistant method and method based on a controllable intelligent agent to solve the problem that the calling ability of complex tool instructions of a large model is limited and the data of the actual calling tool is scarce. The existing scheme is difficult to handle the calling of all complex tools based only on prompt engineering and input modification, and is prone to problems such as erroneous calling and parameter input.
[0005] The first aspect of the present invention provides an interactive teaching assistant method based on a controllable intelligent agent, comprising the following steps: obtaining a first message sequence in response to a current question; inputting the first message sequence into a first external intention recognition interface of a target intelligent agent to identify a first actual intention; selecting whether to perform a preset message injection according to the first actual intention, and if the preset message injection is selected, adjusting the first message sequence according to the preset message injection method to generate a second message sequence, otherwise the first message sequence is not adjusted; selecting whether to bypass the target intelligent agent for output simulation according to the first actual intention, and if the output simulation is selected, performing output simulation on the second message sequence or the first message sequence to generate a first simulation message, and inserting the first simulation message into the second message sequence or the first message sequence to obtain a third message sequence; if the preset message injection is selected, the first message sequence is outputted to the target intelligent agent, and ... When performing output simulation, it is selected whether to jump out of the calling loop of the target intelligent agent according to the first actual intention. If it is selected to jump out of the calling loop of the target intelligent agent, the third message sequence is used as the final output content, and the user's new question is obtained. Otherwise, it is not selected to perform output simulation, and the second message sequence or the first message sequence is input into the generation interface of the target intelligent agent to generate a second simulation message, and the second simulation 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 intention recognition interface of the target intelligent agent to identify the second actual intention; a preset tool judgment is performed according to the second actual intention 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 intelligent agent cycle.
[0006] Optionally, the expression of the first message sequence is:
[0007] M=[m 1 , m 2 , ..., m i , m |M| ]
[0008] m i ={role:r,content:c}
[0009] Among them, m |M| is the current message, m i is the historical message, r is the role, and c is the output content.
[0010] Optionally, the preset message injection method includes at least one of introducing external knowledge, fine-tuning message content, and adjusting tools available for the large model.
[0011] Optionally, the preset tool judgment is performed according to the second actual intention 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 intelligent body cycle, including: the preset tool judgment is performed according to the second actual intention to select at least one of jumping out of the call loop of the target intelligent body, skipping the tool call and continuing the tool call; if the jumping out of the call loop of the target intelligent body is selected, the fourth message sequence or the third message sequence is used as the final output content, and the user's new question is obtained; if the skip tool call is selected, the fourth message sequence or the third message sequence is used as the final output content and enters the next round of intelligent body cycle; if the tool call is continued, it is selected whether to adjust the tool call parameters of the target intelligent body according to the second actual intention 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 enter the next round of intelligent body cycle.
[0012] The second aspect of the present invention provides an interactive teaching assistant device based on a controllable intelligent agent, including: a first acquisition module, used to acquire a first message sequence in response to a current question; a first identification module, inputting the first message sequence into a first external intention identification interface of a target intelligent agent to identify a first actual intention; a first selection module, selecting whether to perform a preset message injection according to the first actual intention, if the 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; a second selection module, used to select whether to bypass the target intelligent agent for output simulation according to the first actual intention, if the output simulation is selected, the second message sequence or the first message sequence is output simulated to generate a first simulation message, and the first simulation message is inserted into the second message sequence or the first message sequence to obtain a third message sequence; Three selection modules, for if output simulation is selected, then according to the first actual intention, choose whether to jump out of the calling loop of the target intelligent agent; if it is selected to jump out of the calling loop of the target intelligent 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, the second message sequence or the first message sequence is input into the generation interface of the target intelligent agent to generate a second simulation message, and the second simulation message is inserted into the second message sequence or the first message sequence to obtain a fourth message sequence; a second identification module, for inputting the fourth message sequence or the third message sequence into the second external intention recognition interface of the target intelligent agent to identify the second actual intention; a determination module, for performing a preset tool determination according to the second actual intention, so as to adjust the output of the fourth message sequence or the third message sequence, obtain the final output content, and enter the next round of intelligent agent cycle.
[0013] Optionally, the expression of the first message sequence is:
[0014] M=[m 1 , m 2 , ..., m i , m |M| ]
[0015] m i ={role:r,content:c}
[0016] Among them, m | M | is the current message, m i is the historical message, r is the role, and c is the output content.
[0017] Optionally, the preset message injection method includes at least one of introducing external knowledge, fine-tuning message content, and adjusting tools available for the large model.
[0018] Optionally, the determination module includes:
[0019] A selection unit, configured to perform a preset tool determination according to the second actual intention, so as to select at least one of jumping out of a call loop of the target agent, skipping a tool call, and continuing a tool call;
[0020] an acquisition unit, configured to, if the calling loop of the target agent is selected to be jumped out, use the fourth message sequence or the third message sequence as the final output content, and acquire a new question from the user;
[0021] A jump-out unit, configured to, if the skip tool call is selected, use the fourth message sequence or the third message sequence as the final output content and enter the next round of intelligent agent cycle;
[0022] A modification unit is used to select whether to adjust the tool call parameters of the target intelligent agent according to the second actual intention if the tool call is continued, so as to obtain the adjusted tool call parameters, and to perform output modification and tool call on the fourth message sequence or the third message sequence according to the adjusted tool call parameters, so as to obtain the final output content and enter the next round of intelligent agent cycle.
[0023] The third aspect of the present invention 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 executes the program to implement the interactive teaching assistant method based on a controllable intelligent agent as described in the above embodiment.
[0024] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned interactive teaching assistant method based on a controllable intelligent agent.
[0025] The interactive teaching assistant method and device based on a controllable intelligent agent proposed in the embodiment of the present invention changes the current situation where the intelligent agent is completely controlled by a large model by controlling the output and optimizing the external intention recognition in specific scenarios. It can effectively alleviate the problem that the large model is difficult to control the output through prompt engineering, and allows to find a stable external intention recognition method for certain specific field scenarios that require precise improvement of the effect, thereby better controlling the behavior of the intelligence in calling the teaching assistant tool and obtaining more accurate results to empower teachers and students.
[0026] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0028] Figure 1 A flow chart of an interactive teaching assistant method based on a controllable intelligent agent provided by an embodiment of the present invention;
[0029] Figure 2 A schematic diagram of an execution of an interactive teaching assistant method based on a controllable intelligent agent provided by an embodiment of the present invention;
[0030] Figure 3 A schematic block diagram of an interactive teaching assistant device based on a controllable intelligent agent provided by an embodiment of the present invention;
[0031] Figure 4 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0032] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0033] The interactive teaching assistant method and device based on a controllable intelligent agent according to an embodiment of the present invention will be described below with reference to the accompanying drawings.
[0034] Figure 1 A flowchart of 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, the interactive teaching assistant method based on a controllable intelligent agent includes the following steps:
[0036] In step S101, a message sequence in response to the current question is obtained.
[0037] In the actual implementation process, Figure 2 As shown, the first message sequence M in response to the current question is obtained. 1 , m 2 , ..., m i , m |M| ], M includes the current message m |M| and all historical messagesi A sequence of m i ={role:r,content:c} saves multiple key-value pairs, where r is the role, including the user input user, the system prompt system, the model output assistant, and the tool output tool, and c is the output content.
[0038] It should be noted that the first message sequence may originate from a user or a tool, and is pre-generated and controlled through an external intent recognition interface before being input into the target agent.
[0039] In step S102, a first message sequence is input into a first external intention recognition interface of a target agent to recognize a first actual intention.
[0040] In the actual implementation process, Figure 2 As shown, the first message sequence is input into the first external intention recognition interface of the target intelligent agent, and a decision is made based on the features in the first message sequence. For example, awareness recognition can be performed through regular expressions and other meta-information carried in the message sequence (such as the course corresponding to the AI teaching assistant) to obtain the user's first actual intention.
[0041] In step S103, whether to perform preset message injection is selected according to the first actual intention. If the 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.
[0042] In some embodiments, the preset message injection method includes at least one of introducing external knowledge, fine-tuning message content, and adjusting large model available tools.
[0043] In the actual implementation process, Figure 2 As shown, whether to perform preset message injection is selected according to the first actual intention. If selected, the first message sequence is adjusted using at least one of the preset message injection methods to generate a second message sequence. If the preset message injection is not selected, the first message sequence is not adjusted.
[0044] It should be noted that there are three ways to inject messages. 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 project to add, delete, or modify. The third is to adjust the teaching assistant tools that can be used by the large model, which is achieved by adding a message with the role of system to the front of the message sequence M, and describing the relevant information of the tool call in the output content c.
[0045] In step S104, whether to bypass the target agent for output simulation is selected 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 simulation message, and the first simulation message is inserted into the second message sequence or the first message sequence to obtain a third message sequence.
[0046] In the actual implementation process, Figure 2 As shown, according to the first actual intention, it is selected whether to bypass the target intelligent agent for output simulation. If output simulation is selected, the direct generation of the target intelligent agent is skipped, that is, the output simulation is performed on the second message sequence or the first message sequence to generate one or more first simulation messages to provide the needs of solving the problem without large model processing, such as only returning specific files and template script requirements to prevent abnormal performance of the large model, and inserting one or more first simulation messages into the second message sequence or the first message sequence to obtain a third message sequence.
[0047] In step S105, if output simulation is chosen, whether to jump out of the calling loop of the target intelligent agent is selected according to the first actual intention. If the calling loop of the target intelligent agent is chosen, 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 chosen, the second message sequence or the first message sequence is input into the generation interface of the target intelligent agent to generate a second simulation message, and the second simulation message is inserted into the second message sequence or the first message sequence to obtain a fourth message sequence.
[0048] In the actual implementation process, Figure 2 As shown, if the output simulation is selected, whether to jump out of the call loop of the target intelligent agent is selected according to the first actual intention. If the call loop of the target intelligent agent is selected, the third message sequence is used as the final output content, and the user's new question is obtained, and the process of steps S101-S105 is re-executed. Otherwise, the next step is executed normally. If the output simulation is not selected, the second message sequence or the first message sequence is input into the generation interface of the target intelligent agent to generate a second simulation message, and it is inserted at the end of the second message sequence or the first message sequence M to generate a fourth message sequence M′=[m 1 , m 2 , ..., m i , m |M|′ ], the role of the last message in the fourth message sequence is assistant.
[0049] In step S106, the fourth message sequence or the third message sequence is input into the second external intention recognition interface of the target agent to recognize the second actual intention.
[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 to obtain the final output content and enter the next round of intelligent agent cycle.
[0051] In some embodiments, a preset tool determination is performed according to the second actual intention to adjust the output of the fourth message sequence to obtain final output content, including:
[0052] Performing a preset tool determination according to the second actual intention to select at least one of jumping out of a call loop of the target intelligent body, skipping a tool call, and continuing a tool call;
[0053] If you choose to jump out of the target agent's call loop, you will get the user's new question;
[0054] If you choose to skip the tool call, the fourth message sequence or the third message sequence is used as the final output content;
[0055] If you choose to continue the tool call, choose whether to adjust the tool call parameters of the target intelligent body according to the second actual intention to obtain the adjusted tool call parameters, and modify the output of the third or fourth message sequence according to the adjusted tool call parameters to obtain the final output content.
[0056] In the actual implementation process, in the actual implementation process, such as Figure 2 As shown, the new message sequence is input into the second external generation interface of the target intelligent body, the second actual intention is identified according to the output content c in the third or fourth message sequence, and the preset tool determination is performed according to the second actual intention to select at least one of jumping out of the call loop of the target intelligent body, skipping the tool call, and continuing the tool call;
[0057] If the target agent's call loop is jumped out, the fourth message sequence or the third message sequence is used as the final output content, and the user's new question is obtained, and the process of steps S101-S106 is re-executed, thereby correcting 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 is used as the final output content and enters the next round of intelligent agent cycle;
[0059] If you choose to continue the tool call, choose whether to adjust the tool call parameters of the target intelligent agent according to the second actual intention; if you do not adjust the tool call parameters, directly call the tool output and enter the next round of intelligent agent call cycle. If you adjust the tool call parameters, use some fixed template parameters provided by the actual intention to adjust the tool call parameters, so as to improve the parameter call stability of some clear scenarios, and modify the output of the fourth message sequence or the third message sequence according to the adjusted tool call parameters. The output modification may include special symbol replacement, knowledge graph display optimization, reference article addition, etc. These adjustment methods are a set of script programs customized in advance according to the needs and provided after external intent recognition. They are connected to the intelligent agent control interface in the form of plug-ins. After adjustment, the process of steps S102-S107 is iteratively executed to correct the output errors of the target intelligent agent, beautify the output content of the target intelligent agent, add new templated information to obtain the final output content, and enter the next round of intelligent agent cycle.
[0060] For example, according to the last few messages m |M|′ The output content c in the output determines whether to call a tool. If the output content c contains a tool call symbol, the relevant tool interface is opened and the call result is packaged into a new message and returned to step S101. The new teaching assistant tool message will add a message object with r as tool at the end of the new message sequence M'. If it does not contain a tool call symbol, it enters the next round of agent call loop and iterates the process of steps S101-S107.
[0061] In summary, the interactive teaching assistant method based on controllable intelligent agents proposed in an embodiment of the present invention changes the current situation where the intelligent agent is completely controlled by a large model by controlling the output and optimizing the external intention recognition in specific scenarios. It can effectively alleviate the problem that it is difficult for large models to control outputs through prompt engineering, and allows for the search for a stable external intention recognition method for certain specific field scenarios that require precise improvement of effects, thereby better controlling the behavior of intelligence in calling teaching assistant tools and obtaining more accurate results to empower teachers and students.
[0062] Next, an interactive teaching assistant device based on a controllable intelligent agent according to an embodiment of the present invention will be described with reference to the accompanying drawings.
[0063] Figure 3 It 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 the 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 determination module 307.
[0065] Among them, the first acquisition module 301 is used to obtain the first message sequence in response to the current question. The first identification module 302 inputs the first message sequence into the first external intention recognition interface of the target intelligent body to identify the first actual intention. The first selection module 303 selects whether to perform preset message injection according to the first actual intention. If the 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 is used to select whether to bypass the target intelligent body for output simulation according to the first actual intention. If the output simulation is selected, the second message sequence or the first message sequence is output simulated to generate a first simulation message, and the first simulation message is inserted into the second message sequence or the first message sequence to obtain a third message sequence. The third selection module 305 is used to select whether to jump out of the call loop of the target intelligent body according to the first actual intention if the output simulation is selected. If the call loop of the target intelligent body is selected, the third message sequence is used as the final output content and the user's new question is obtained. Otherwise, if the output simulation is not selected, the second message sequence or the first message sequence is input into the generation interface of the target intelligent body to generate a second simulation message, and the second simulation message is inserted into the second message sequence or the first message sequence to obtain a fourth message sequence. The second identification module 306 is used to input the fourth message sequence or the third message sequence into the second external intention recognition interface of the target intelligent body to identify the second actual intention. The determination module 307 is used to perform a preset tool determination according to the second actual intention to adjust the output of the fourth message sequence or the third message sequence, obtain the final output content, and enter the next round of intelligent body cycle.
[0066] In some embodiments, the expression of the first message sequence is:
[0067] M=[m 1 , m 2 , ..., m i , m |M| ]
[0068] m i ={role:r,content:c}
[0069] Among them, m |M| is the current message, m i is the historical message, r is the role, and c is 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 large model available tools.
[0071] In some embodiments, the determination module 407 includes:
[0072] A selection unit, configured to perform a preset tool determination according to the second actual intention, so as to select at least one of jumping out of a call loop of the target intelligent body, skipping a tool call, and continuing a tool call;
[0073] An acquisition unit, configured to use the fourth message sequence or the third message sequence as the final output content and acquire a new question from the user if the call loop of the target agent is chosen to be jumped out;
[0074] A jump-out unit, used to take the fourth message sequence or the third message sequence as the final output content and enter the next round of intelligent agent cycle if the tool call is skipped;
[0075] The modification unit is used to select whether to adjust the tool calling parameters of the target intelligent agent according to the second actual intention if the tool calling is continued, so as to obtain the adjusted tool calling parameters, and perform output modification and tool calling on the fourth message sequence or the third message sequence according to the adjusted tool calling parameters to obtain the final output content and enter the next round of intelligent agent cycle.
[0076] It should be noted that the aforementioned explanation of the embodiment of the interactive teaching assistant method based on a controllable intelligent agent is also applicable to the interactive teaching assistant device based on a controllable intelligent agent in this embodiment, and will not be repeated here.
[0077] The interactive teaching assistant device based on a controllable intelligent agent proposed in an embodiment of the present invention changes the current situation where the intelligent agent is completely controlled by a large model by controlling the output and optimizing the external intention recognition in specific scenarios. It can well alleviate the problem that it is difficult for a large model to control the output through prompt engineering, and allows for finding a stable external intention recognition method for certain specific field scenarios that require precise improvement of the effect, thereby better controlling the behavior of the intelligence in calling the teaching assistant tool and obtaining more accurate results to empower teachers and students.
[0078] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device may include:
[0079] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .
[0080] When the processor 402 executes the program, the interactive teaching assistant method based on the controllable intelligent agent provided in the above embodiment is implemented.
[0081] Furthermore, the electronic device further comprises:
[0082] The communication interface 403 is used for communication between the memory 401 and the processor 402 .
[0083] The memory 401 is used to store computer programs that can be executed on the processor 402 .
[0084] The memory 401 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0085] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0086] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.
[0087] The processor 402 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0088] An embodiment of the present invention further provides a computer program product, which implements the above-mentioned interactive teaching assistant method based on a controllable intelligent agent when the computer program / instructions are executed by a processor.
[0089] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned interactive teaching assistant method based on a controllable intelligent agent.
[0090] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0091] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "N" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0092] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0093] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.
[0094] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0095] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0096] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0097] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify 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: The following steps are involved: Obtaining a first message sequence in response to the current question; Inputting the first message sequence into a first external intent recognition interface of a target agent to recognize a first actual intent; selecting whether to perform preset message injection according to the first actual intention, and if the preset message injection is selected, adjusting the first message sequence according to the preset message injection method to generate a second message sequence, otherwise the first message sequence is not adjusted; According to the first actual intention, whether to bypass the target agent for output simulation is selected; if output simulation is selected, output simulation is performed on the second message sequence or the first message sequence to generate a first simulation message, and the first simulation message is inserted into the second message sequence or the first message sequence to obtain a third message sequence; If output simulation is selected, whether to jump out of the call loop of the target intelligent agent is selected according to the first actual intention. If the call loop of the target intelligent 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 intelligent agent to generate a second simulation message, and the second simulation message is inserted into the second message sequence or the first message sequence to obtain a fourth message sequence. Inputting the fourth message sequence or the third message sequence into a second external intention recognition interface of the target intelligent agent to recognize a second actual intention; A preset tool determination is performed based on the second actual intention 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 intelligent agent cycle.
2. The interactive teaching assistant method based on controllable intelligent agent according to claim 1, characterized in that: The expression of the first message sequence is: M=[m1,m2,...,m i ,m |M| ] m i ={role:r,content:c} Among them, m |M| is the current message, m i is the historical message, r is the role, and c is the output content.
3. The interactive teaching assistant method based on controllable intelligent agent according to claim 1, characterized in that: The preset message injection method includes at least one of introducing external knowledge, fine-tuning message content, and adjusting tools available for large models.
4. The interactive teaching assistant method based on controllable intelligent agent according to claim 1, characterized in that: The method of performing a preset tool determination according to the second actual intention to adjust the output of the fourth message sequence or the third message sequence to obtain final output content and enter the next round of intelligent agent cycle includes: Performing a preset tool determination according to the second actual intention to select at least one of jumping out of the call loop of the target intelligent body, skipping the tool call, and continuing the tool call; If the calling loop of the target agent is jumped out, 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 the tool call is skipped, the fourth message sequence or the third message sequence is used as the final output content to enter the next round of intelligent agent cycle; If the continue tool call is selected, then according to the second actual intention, it is selected whether to adjust the tool call parameters of the target intelligent agent to obtain the adjusted tool call parameters, and according to 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 to obtain the final output content and enter the next round of intelligent agent cycle.
5. An interactive teaching assistant device based on a controllable intelligent agent, characterized in that: include: A first acquisition module, used to acquire a first message sequence in response to the current question; a first recognition module, inputting the first message sequence into a first external intention recognition interface of a target agent to recognize a first actual intention; a first selection module, selecting whether to perform preset message injection according to the first actual intention, and if the preset message injection is selected, adjusting the first message sequence according to the 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 agent to perform output simulation according to the first actual intention, and if output simulation is selected, perform output simulation on the second message sequence or the first message sequence to generate a first simulation message, and insert the first simulation message into the second message sequence or the first message sequence to obtain a third message sequence; A third selection module is used for, if output simulation is selected, selecting whether to jump out of the call loop of the target intelligent agent according to the first actual intention; if jumping out of the call loop of the target intelligent agent is selected, using the third message sequence as the final output content and obtaining a new question from the user; otherwise, if output simulation is not selected, inputting the second message sequence or the first message sequence into the generation interface of the target intelligent agent to generate a second simulation message, and inserting the second simulation message into the second message sequence or the first message sequence to obtain a fourth message sequence; A second recognition module, used for inputting the fourth message sequence or the third message sequence into a second external intention recognition interface of the target intelligent agent to recognize a second actual intention; A determination module is used to make a preset tool determination according to the second actual intention, so as to make output adjustments and tool calls to the fourth message sequence or the third message sequence, obtain the final output content, and enter the next round of intelligent body cycle.
6. The interactive teaching assistant device based on a controllable intelligent agent according to claim 5, characterized in that: The expression of the first message sequence is: M=[m1,m2,...,m i ,m |M| ] m i ={role:r,content:c} Among them, m |M| is the current message, m i is the historical message, r is the role, and c is 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 introducing external knowledge, fine-tuning message content, and adjusting tools available for large models.
8. The interactive teaching assistant device based on a controllable intelligent agent according to claim 5, characterized in that: The determination module comprises: A selection unit, configured to perform a preset tool determination according to the second actual intention, so as to select at least one of jumping out of a call loop of the target agent, skipping a tool call, and continuing a tool call; an acquisition unit, configured to, if the calling loop of the target agent is selected to be jumped out, use the fourth message sequence or the third message sequence as the final output content, and acquire a new question from the user; A jump-out unit, configured to, if the skip tool call is selected, use the fourth message sequence or the third message sequence as the final output content and enter the next round of intelligent agent cycle; A modification unit is used to select whether to adjust the tool call parameters of the target intelligent agent according to the second actual intention if the tool call is continued, so as to obtain the adjusted tool call parameters, and to perform output modification and tool call on the fourth message sequence or the third message sequence according to the adjusted tool call parameters, so as to obtain the final output content and enter the next round of intelligent agent cycle.
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, wherein the processor executes the program to implement the interactive teaching assistant method based on a controllable intelligent agent as described in any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the interactive teaching assistant method based on a controllable intelligent agent as described in any one of claims 1 to 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
Intelligent interaction method and device and interaction system based on intelligent agent
CN119149701A
Subject interaction question-answering method based on large model and teaching assistant agent
CN119271766A
Teaching method and device based on intelligent agent system with body
CN119398178A