Question and answer task processing method, related device, equipment and storage medium
By selecting the target task type in the Q&A task processing and filling the slot to generate prompt instructions, the large language model is assisted to execute subtasks, solving the accuracy problem under complex tasks and improving the processing accuracy of Q&A task.
Patent Information
- Application Number
- CN202510812680.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-07-18
AI Technical Summary
Existing artificial intelligence systems are difficult to reason accurately when facing complex question-and-answer tasks, resulting in insufficient accuracy in handling question-and-answer tasks.
By obtaining the human-computer interaction text in the target application scenario and the task description text of the preset task type, selecting the target task type using similarity matching, and filling the slots in the prompt instruction template based on the human-computer interaction text, generating the target prompt instruction, and then using a large language model to plan the subtask execution results to reply to the target object.
When facing complex tasks, through task disassembly and pre-configuration, the accuracy of Q&A task processing is improved, the processing difficulty is alleviated, and the large language model is assisted to generate more matching task instructions, improving the accuracy of Q&A tasks.
Smart Images

Figure CN120337943A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of natural language processing, and in particular, to a method for processing question-and-answer tasks, as well as related devices, equipment, and storage media. Background Art
[0002] With the rapid evolution of artificial intelligence technology, artificial intelligence systems such as large language models and agents based on large language models have been widely used in many scenarios such as education and medical care.
[0003] However, in the actual application process, when facing certain question-and-answer tasks (such as complex tasks) in the application scenario, the above artificial intelligence systems inevitably cannot smoothly infer accurate results. In view of this, how to improve the accuracy of question-and-answer task processing, especially when facing complex tasks, has become an urgent problem to be solved. Summary of the Invention
[0004] The main technical problem to be solved by this application is to provide a method for processing question-and-answer tasks, as well as related devices, equipment, and storage media, which can improve the accuracy of question-and-answer task processing, especially when facing complex tasks.
[0005] To solve the above technical problem, the first aspect of this application provides a method for processing question-and-answer tasks, including: obtaining the human-computer interaction text of the target object in the target application scenario, and obtaining the task description text and prompt instruction template of each preset task type in the target application scenario; wherein, the prompt instruction template contains several slots to be filled; selecting a preset task type as the target task type based on the similarity between the human-computer interaction text and the task description text of each preset task type; filling the slots to be filled in the prompt instruction template of the target task type based on the human-computer interaction text to obtain the target prompt instruction; obtaining the task result for replying to the target object based on the execution results of each subtask planned by the large language model in response to the target prompt instruction.
[0006] To solve the above technical problems, a second aspect of the present application provides a question-and-answer task processing device, including: an acquisition module, a measurement module, a filling module, and an execution module. The acquisition module is configured to acquire the human-computer interaction text of the target object in the target application scenario, and acquire the task description text and the prompt instruction template of each preset task type in the target application scenario; wherein, the prompt instruction template contains a number of slots to be filled. The measurement module is configured to select a preset task type as the target task type based on the similarity between the human-computer interaction text and the task description text of each preset task type. The filling module is configured to fill the slots to be filled in the prompt instruction template of the target task type based on the human-computer interaction text to obtain a target prompt instruction. The execution module is configured to obtain a task result for replying to the target object based on the execution results of each subtask planned by the large language model in response to the target prompt instruction.
[0007] To solve the above technical problems, a third aspect of the present application provides an electronic device, at least including a memory and a processor coupled to each other. The memory stores at least program instructions, and the processor is configured to execute the program instructions to implement the question-and-answer task processing method in the first aspect above.
[0008] To solve the above technical problems, a fourth aspect of the present application provides a computer-readable storage medium, storing program instructions that can be run by a processor, and the program instructions are used to implement the question-and-answer task processing method in the first aspect above.
[0009] In the above solution, the human-computer interaction text of the target object in the target application scenario is obtained, and the task description text and prompt instruction template of each preset task type in the target application scenario are obtained. The prompt instruction template contains several slots to be filled. Then, based on the similarity between the human-computer interaction text and the task description text of each preset task type, a preset task type is selected as the target task type. Thus, the slots in the prompt instruction template of the target task type are filled based on the human-computer interaction text to obtain the target prompt instruction. Furthermore, based on the execution results of each subtask planned by the large language model in response to the target prompt instruction, the task result for replying to the target object is obtained. Therefore, on the one hand, when facing complex tasks, by decomposing the tasks into subtasks, the processing difficulty of complex tasks can be alleviated to a certain extent, which helps to improve the accuracy of question-and-answer task processing. On the other hand, by pre-configuring each preset task type and its task description text and prompt instruction template in the target application scenario, and selecting the target task type that is as matching as possible according to the similarity between the human-computer interaction text and each task description text, and then using the human-computer interaction text to fill the slots in the prompt instruction template of the target task type to obtain the target prompt instruction for instructing the large language model, it is possible to generate the target prompt instruction that is as matching as possible according to the actual situation before the large language model processes the task, so as to assist the large language model in task processing. Compared with directly processing tasks by the large language model, the accuracy of question-and-answer task processing can be improved to a certain extent. Therefore, the accuracy of question-and-answer task processing can be improved, especially when facing complex tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is a schematic flowchart of an embodiment of the question-and-answer task processing method of the present application; Figure 2a is a schematic diagram of an embodiment of the display interface of the present application; Figure 2b is a schematic diagram of the process of an embodiment of the question-and-answer task processing method of the present application; Figure 3 is a schematic framework diagram of an embodiment of the question-and-answer task processing device of the present application; Figure 4 is a schematic framework diagram of an embodiment of the electronic device of the present application; Figure 5 is a schematic framework diagram of an embodiment of the computer-readable storage medium of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0011] The solution of the embodiment of the present application will be described in detail below with reference to the accompanying drawings of the specification.
[0012] In the following description, specific details such as specific system architectures, interfaces, technologies, etc. are presented for illustration rather than limitation in order to provide a thorough understanding of the present application.
[0013] The terms "system" and "network" are often used interchangeably in this document. The term "and / or" in this document is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the fragment " / " in this document generally represents an "or" relationship between the associated objects before and after. Furthermore, "plurality" in this document means two or more than two.
[0014] Please refer to Figure 1 , Figure 1 is a schematic flowchart of an embodiment of the method for processing question-and-answer tasks in the present application. Specifically, the following steps may be included: Step S11: Obtain the human-computer interaction text of the target object in the target application scenario, and obtain the task description text and prompt instruction template of each preset task type in the target application scenario.
[0015] In one implementation scenario, the target application scenario can be specifically set according to actual application needs. For example, when it is necessary to apply the embodiments of the present disclosure in the education field, the target application scenario can be set to include, but not limited to, teaching application scenarios, tutoring application scenarios, and other education-related scenarios; or, when it is necessary to apply the embodiments of the present disclosure in the medical field, the target application scenario can be set to include, but not limited to, patient guidance application scenarios, consultation application scenarios, and other medical-related scenarios. Of course, the above examples are only several possible examples of the target application scenario in the actual application process, and the specific setting of the target application scenario is not limited here, nor will they be listed one by one.
[0016] In an implementation scenario, the human-computer interaction text of the target object in the target application scenario may at least include the question text input by the target object. Still taking the teaching application scenario as an example of the target application scenario, the question text may include, but is not limited to, the following content: "I want to tell primary school students about celestial body knowledge related to black holes. Where can I find suitable materials?" and so on. The specific content of the question text is not limited here. In addition, as another possible example, the human-computer interaction text of the target object in the target application scenario may also include the initial answer to the foregoing question text. Still taking the teaching application scenario as an example of the target application scenario, when the question text is the foregoing "I want to tell primary school students about celestial body knowledge related to black holes. Where can I find suitable materials?", the initial answer may include, but is not limited to: "I don't know the specific platforms, but I can give you some possible channels: (1) Celestial body-related books, such as textbooks, popular science readings, etc., (2) Related video websites, such as online education websites, etc., (3) Library websites, such as the National Library website, etc.". Of course, the above examples are only one possible example of the question text and its initial answer when taking the teaching application scenario as an example. Other possible situations are not listed one by one here. It should be noted that when the human-computer interaction text also includes the initial answer, the initial answer can be generated by an artificial intelligence model with a relatively small number of parameters answering the question text. It can assist the large language model mentioned in the following text of the embodiments of the present disclosure to initially answer the question text of the target object. On the one hand, it can give an initial answer temporarily after the target object inputs the question text to reduce the waiting time of the target object. On the other hand, the initial answer can also provide additional information outside the question text to assist in performing subsequent steps. Taking the above example as an example, when the human-computer interaction text also includes the initial answer, since the initial answer also contains additional information such as "celestial body-related books", "related video websites", "library websites" that do not exist in the question text, in the subsequent task matching process, preset task types similar to "book resource search" and "video resource search" may also be matched, which helps to assist in answering task processing.
[0017] In an implementation scenario, various preset task types, their task description texts, and prompt instruction templates in a target application scenario can be predefined. Still taking the target application scenario as the teaching application scenario as an example, the various preset task types can include, but are not limited to, teaching activity generation tasks, teaching resource generation tasks, teaching tool recommendation tasks, education evaluation tasks, etc., and other possible situations will not be enumerated one by one here. Taking the preset task type "teaching activity generation" as an example, its task description text can include, but is not limited to, "design classroom activities closely related to teaching content and objectives", etc.; or, taking the preset task type "teaching resource generation task" as an example, its task description text can include, but is not limited to, "design exercises covering specific knowledge points", etc.; or, taking the preset task type "teaching tool recommendation task" as an example, its task description text can include, but is not limited to, "recommend relevant platforms suitable for a specific course", "design practical suggestions for a given teaching topic", etc.; or, taking the preset task type "education evaluation task" as an example, its task description text can include, but is not limited to, "provide feedback on specific content of a given teaching topic", etc. The specific content of the task description text is not limited here, and when the preset task type includes other situations, they will not be enumerated one by one here either.
[0018] It should be noted that in the embodiments of the present disclosure, the prompt instruction template may contain several slots to be filled. Still taking the target application scenario as the teaching application scenario as an example, for the preset task type of "teaching activity generation task", its prompt instruction template may include, but is not limited to: "As a creative educator, please design a creative and inspiring classroom activity. This activity should be closely related to the [teaching content] and [objectives] of this class, aiming to improve students' participation and learning effects. You can design activity forms such as [group discussion], [role-playing], [experimental operation], etc., so that students can deepen their understanding and mastery of [knowledge points] during the hands-on practice process. At the same time, ensure that the activity has appropriate challenges and interests to stimulate students' learning interests and enthusiasm. Through this activity, cultivate students' [teamwork spirit], [communication ability] and [innovation ability]"; or, for the preset task type of "teaching resource generation task", its prompt instruction template may include, but is not limited to: "As a mathematics teacher, please design a series of carefully selected exercises for the [knowledge points] of this class. These exercises should cover all aspects of [knowledge points], including [basic concepts], [principle applications], [problem-solving], etc. Through practice, help students consolidate the knowledge they have learned and improve their problem-solving abilities and thinking levels. At the same time, pay attention to the difficulty of the exercises should be moderate, which should have certain challenges to stimulate students' learning interests, and avoid being too difficult to cause students to have a sense of frustration. During the practice process, give students [feedback] and [guidance] in a timely manner to help them find mistakes and correct the deviations in understanding"; or, for the preset task type of "teaching tool recommendation task", its prompt instruction template may include, but is not limited to: "Please give me an example to illustrate the most suitable online learning platform for [course type]", "I hope you act as an online learning designer and provide best practice suggestions for the design of effective e-learning modules for [teaching theme], ensuring its attractiveness and interactivity for [target audience]"; or, for the preset task type of "education evaluation task", its prompt instruction template may include, but is not limited to: "I hope you act as a writing coach and provide feedback on the [content type] of my [teaching theme] to ensure that it is clear, concise and attractive for [target audience]". Among them, the slot names shown in square brackets "[]" are the slot names of the slots to be filled. Of course, the above examples are only several possible examples of the prompt instruction template of the preset task type when taking the teaching application scenario as an example, and other possible situations will not be exemplified one by one here. For example, the prompt instruction template can also give relevant examples of task planning to assist the large language model to combine relevant examples in the subsequent task planning process to conduct specific planning after understanding the task planning.
[0019] Step S12: Based on the similarity between the human-computer interaction text and the task description texts of each preset task type, select a preset task type as the target task type.
[0020] In an implementation scenario, as a possible example, in order to measure the similarity between the human-computer interaction text and the task description text of a preset task type, semantic feature extraction can be performed on the human-computer interaction text to obtain the first semantic feature of the human-computer interaction text, and semantic feature extraction can be performed on the task description text of the preset task type to obtain the second semantic feature of the task description text. On this basis, similarity measurement can be performed based on the first semantic feature and the second semantic feature to obtain the similarity between the human-computer interaction text and the task description text. It should be noted that the above semantic feature extraction can be implemented by a language model such as BERT (Bidirectional Encoder Representation from Transformers). Of course, the above semantic feature extraction can also be implemented by other methods such as word vector tools. In addition, the above similarity measurement can be implemented by measurement methods such as cosine similarity and Euclidean distance. After obtaining the similarity between the human-computer interaction text and the task description text of the preset task type, the preset task types can be sorted according to the similarity, and the target task type can be selected based on the sorted preset task types. Exemplarily, the preset task types in the first preset order (such as the first 2 or the first 3, etc.) can be selected as the target task type; or, based on the similarity corresponding to each preset task type, each preset task type can be arranged and displayed as a candidate task type in sequence, so as to determine the selected candidate task type as the target task type in response to the selection instruction of the target object for the candidate task type. Of course, the above examples are only several possible examples of selecting the preset task type as the target task type after measuring the similarity, and other possible selection methods are not limited here and will not be exemplified one by one.
[0021] In another implementation scenario, different from the foregoing implementation, as another possible example, it is also possible to match a number of keywords in the human-computer interaction text with the task description text of the preset task type to obtain the similarity corresponding to the preset task type. Exemplarily, the first word vector of each keyword in the human-computer interaction text can be extracted respectively. At the same time, the second word vector of each word segment in the task description text can be extracted. On this basis, a measurement method such as cosine similarity can be used to perform similarity measurement on the first word vector and the second word vector to obtain the similarity corresponding to the preset task type. For ease of description, the first word vector of the i-th keyword can be denoted as x i and the second word vector of the i-th word segment can be denoted as y i , then the similarity between the human-computer interaction text and the task description text can be expressed as:
[0022] In the above formula, cos(θ) represents the similarity between the human-computer interaction text and the task description text calculated using cosine similarity. Of course, the above example is only a possible example of calculating the similarity of word vectors using cosine similarity. Here, other possible calculation methods are not limited, and no further examples will be given one by one. On this basis, based on the similarities corresponding to each preset task type, each preset task type can be sorted and displayed in sequence as a candidate task type, so as to determine the selected candidate task type as the target task type in response to the selection instruction of the target object for the candidate task type. Still taking the target application scenario as the teaching application scenario as an example, as mentioned above, each preset task type may include teaching activity generation tasks, teaching resource generation tasks, teaching tool recommendation tasks, and education evaluation tasks. For the human-computer interaction text "I want to tell primary school students about celestial knowledge related to black holes. Where can I find suitable materials?", the similarities can be sorted from high to low as: teaching tool recommendation tasks, teaching resource generation tasks, teaching activity generation tasks, and education evaluation tasks. Then, the above sorted preset task types can be displayed and the target object can be prompted to select from them. In response to the selection instruction of the target object among the preset task types after the above sorting, the selected preset task type, such as "teaching tool recommendation task", can be determined as the target task type. In the above manner, based on the matching of several keywords in the human-computer interaction text with the task description text of the preset task type, the similarity corresponding to the preset task type is obtained, and based on the similarities corresponding to each preset task type, each preset task type is sorted and displayed in sequence as a candidate task type, so as to determine the selected candidate task type as the target task type in response to the selection instruction of the target object for the candidate task type. Therefore, it is possible to combine keyword matching and target object selection for joint decision-making in the process of determining the target task type, which helps to improve the efficiency and accuracy of determining the target task type.
[0023] Step S13: Fill the slots to be filled in the prompt instruction template of the target task type based on the human-computer interaction text to obtain the target prompt instruction.
[0024] In an implementation scenario, as a possible example, to achieve slot filling for a prompt instruction template using human-computer interaction text, one can first select a text segment as the filling text for the slot to be filled based on the matching degree between the slot name of the slot to be filled and each text segment in the human-computer interaction text. Then, based on the filling text of the slot to be filled, perform slot filling on the slot to be filled to obtain the target prompt instruction. It should be noted that the matching degree between the slot name and the text segment can refer to the aforementioned similarity measurement method, which will not be elaborated here. Of course, other methods can also be used. For example, a neural network model for matching can be pre-trained to measure the matching degree between the slot name and the text segment using the neural network model. This is not limited here, and no further examples will be given one by one. Still taking the teaching application scenario as an example, for the human-computer interaction text "I want to tell primary school students about celestial body knowledge related to black holes. Where can I find suitable materials?", since the preset task type "teaching tool recommendation task" is determined as the target task type, the matching degree between the slot name "course type" of the slot to be filled in the prompt instruction template for "teaching tool recommendation task" (such as the aforementioned example) and each text segment "I want", "tell primary school students about celestial body knowledge related to black holes", "I can", "Where can I find suitable materials?" in the human-computer interaction text can be measured respectively. Since it is measured that the matching degree between the slot name "course type" and the text segment "tell primary school students about celestial body knowledge related to black holes" is the highest, the text segment "tell primary school students about celestial body knowledge related to black holes" can be selected as the filling text for the slot name "course type", and based on this, perform slot filling on the slot to be filled to obtain the target prompt instruction "Please give me examples of online learning platforms that are most suitable for telling primary school students about celestial body knowledge related to black holes". Of course, the above example is only a possible example in the actual application process, and other possible situations will not be given one by one here. The above method, based on the matching degree between the slot name of the slot to be filled and each text segment in the human-computer interaction text, selects a text segment as the filling text for the slot to be filled, and based on the filling text of the slot to be filled, performs slot filling on the slot to be filled to obtain the target prompt instruction, which can improve the integrity of slot filling as much as possible.
[0025] In another implementation scenario, different from the aforementioned implementation method, as another possible example, to achieve slot filling for a prompt instruction template using human-computer interaction text, one can also construct a prompt instruction based on the slot name of the slot to be filled and each text segment in the human-computer interaction text. The prompt instruction is used to instruct the large language model to select a text segment that matches the slot to be filled from each text segment according to the slot name of the slot to be filled. Then, the output content of the large language model in response to the prompt instruction can be obtained as the filling text for the slot to be filled, and based on the filling text of the slot to be filled, perform slot filling on the slot to be filled to obtain the target prompt instruction.
[0026] It should be noted that the above examples are only several possible examples of slot filling. Based on the above two examples, corresponding adjustments can be made (for example, for the first implementation manner, other matching methods can be adopted; for the second implementation manner, other artificial intelligence models can be adopted, etc.) to obtain other possible implementation manners. Other possible implementation manners are not limited here and will not be exemplified one by one.
[0027] Step S14: Based on the execution results of each subtask planned by the large language model in response to the target prompt instruction, obtain the task result for replying to the target object.
[0028] In an implementation scenario, after obtaining the target prompt instruction, the target prompt instruction can be input into the large language model for task planning to obtain several subtasks, then each subtask is executed in sequence to obtain the direct results of each subtask, and finally, the execution results of each subtask can be integrated to obtain the task result for replying to the target object.
[0029] In a specific implementation scenario, the relationship between each subtask obtained by the large language model through task planning under the command of the target prompt instruction can be a parallel execution relationship, a serial execution relationship, or a situation where both serial execution and parallel execution exist simultaneously (for example, subtask A and subtask B are in a serial execution relationship, while subtask C is in a parallel execution relationship with the former two). The execution relationship between subtasks is not limited here. For the sake of understanding, still taking the target application scenario as the teaching application scenario as an example, for the human-computer interaction text "I want to tell primary school students about celestial knowledge related to black holes. On which platforms can I find suitable materials?", the large language model can first perform task planning under the command of the above target prompt instruction to obtain the parallel subtasks "Query platforms introducing black holes" and "Query platforms suitable for primary school students and introducing celestial knowledge". Then, the above two subtasks can be executed respectively. The former can obtain the execution result "Platform A, Platform C, Platform D", and the latter can obtain the execution result "Platform B, Platform C". Then, the execution results of the two can be integrated (such as taking the intersection) to obtain the task result "Platform C" for replying to the target object. Of course, the above example is only one possible example in the actual application process. Other possible situations are not limited here and will not be exemplified one by one.
[0030] In a specific implementation scenario, as a possible example, the large language model can be integrated into the intelligent agent, and the question-answering task processing method can be executed by the intelligent agent. Then, when executing each subtask, the intelligent agent can also call auxiliary tools (such as plug-ins, etc.) to assist in the execution of the subtask, so as to provide the intelligent agent with professional capabilities that the large language model does not have or is not good at, and help it complete the professional problems in the planned subtask. Exemplarily, when executing the aforementioned subtask "querying the platform introducing the black hole", the intelligent agent can call the search engine used to assist in the execution of the subtask, the database of the introduction knowledge platform, etc. as auxiliary tools; or, in other cases, when it is necessary to execute subtasks related to mathematical calculations, the intelligent agent can call Wolfram Alpha, etc., used to assist in the execution of the subtask as an auxiliary tool. Of course, the above examples are only several possible examples of subtask execution in actual application, and other possible situations will not be given one by one here.
[0031] In a specific implementation scenario, in order to minimize the possibility of "model hallucination" in the large language model, the text segmentation algorithm can be used to segment the long text in the knowledge base into semantically related short sentence texts, and its semantic features can be extracted and stored in a vector database (such as chroma) to form a feature retrieval knowledge base. Then, the semantic features of each short sentence text in the feature retrieval knowledge base can be similar to the semantic features of the subtask (for the specific measurement method, please refer to the formula and its related description), and then the short sentence text with the subtask is selected according to the similarity for the large language model to refer to when generating the execution results of the subtask.
[0032] In a specific implementation scenario, as described above, the large language model is integrated into the agent, and the question-and-answer task processing method is executed by the agent. During the execution of each subtask, it is also possible to detect whether the execution result of the subtask meets the task requirements based on short-term memory data, and the short-term memory data can include personal resource data related to the target application scenario when the target object interacts with the agent. On this basis, in response to the execution result of the subtask meeting the task requirements, the execution result of the subtask can be retained and the completion of the subtask can be confirmed. In response to the execution result of the subtask not meeting the task requirements, the subtask can be re-executed, and for the new execution result of the subtask, return to execute the step of detecting whether the execution result of the subtask meets the task requirements based on the short-term memory data. It should be noted that the task requirements of the subtask can be set according to specific circumstances, such as being set to include but not limited to: the prediction error of the execution result is lower than the set error, the specific content of the execution result is not less than the set number of words, etc. The specific content of the task requirements is not limited here. In addition, when the target object starts a new round of interaction with the agent, the historical interaction data between the target object and the agent can be obtained as short-term memory data. That is to say, as the number of interaction rounds between the target object and the agent is continuously updated, its short-term memory data is also continuously updated. Exemplarily, still taking the target application scenario as the teaching application scenario, the short-term memory data can include individual private information closely related to the educational user and their role, such as the historical interaction learning and learning evaluation data of individual learners, the teaching videos, teaching plans, and teaching evaluation data of individual teachers, etc. Of course, it is possible to establish corresponding data usage specifications and inform in advance, and request user privacy authorization in the process to execute the above process steps after obtaining authorization. The above method, based on short-term memory data, detects whether the execution result of the subtask meets the task requirements, and in response to the execution result of the subtask meeting the task requirements, retains the execution result of the subtask and confirms the completion of the subtask, while in response to the execution result of the subtask not meeting the task requirements, re-executes the subtask and returns to execute the step of detecting whether the execution result of the subtask meets the task requirements based on the short-term memory data for the new execution result of the subtask, which can assist the agent in making decisions on whether the execution result of the subtask meets the task requirements through short-term memory.
[0033] In an implementation scenario, after obtaining the task result for replying to the target object based on the execution results of each subtask planned in response to the target prompt instruction by the large language model, the evaluation result of the task result can also be obtained, and the evaluation result includes at least one of real-time performance and accuracy. In response to the evaluation result not meeting the execution requirements, the first resource data can be extracted from the information source related to the target application scenario, and based on the first resource data, the knowledge base can be updated, and based on the knowledge base, the preset task type, its task description text, and the prompt instruction template can be updated. Furthermore, the step of selecting the preset task type as the target task type by returning the similarity between the human-computer interaction text and the task description text of each preset task type respectively is performed until the latest evaluation result meets the execution requirements. In the above manner, after obtaining the task result, by detecting whether the evaluation result regarding at least one of accuracy and real-time performance meets the execution requirements, it is decided whether to extract the latest resource data to update the knowledge base accordingly, and then update the preset task type, its task description text, and the prompt instruction template, and then return to execute the relevant steps of the aforementioned similarity measurement again after confirming the update, which helps to automatically correct the reply error of the question-and-answer task.
[0034] In a specific implementation scenario, as described above, the large language model can be integrated into the intelligent agent, and the question-and-answer task processing method can be executed by the intelligent agent. Then, as a possible implementation manner, in order to obtain the evaluation result of the task result, the long-term memory data of the intelligent agent can be obtained first, and the long-term memory data contains the second resource data accumulated by the intelligent agent related to the target application scenario. Then, the task result is evaluated based on the long-term memory data to obtain the evaluation result. Still taking the target application scenario as the teaching application scenario as an example, the long-term memory data can involve the educational knowledge and teaching resources accumulated by the intelligent agent, including but not limited to subject knowledge graphs, teaching method knowledge, curriculum standards, teaching materials, teaching aids, etc. The specific content of the long-term memory data is not limited here. In addition, the long-term memory data, like the aforementioned short-term memory data, also needs to obtain authorization in advance. For specific details, please refer to the relevant description of the short-term memory data above and will not be elaborated here.
[0035] In a specific implementation scenario, in order to obtain the evaluation result of the task result, as another possible implementation manner, an interactive interface can also be displayed, and the task result can be displayed on the interactive interface. Thus, in response to detecting the evaluation instruction of the target object for the task result in the interactive interface, the evaluation instruction is parsed to obtain the evaluation result. For the convenience of understanding, please refer to Figure 2a , Figure 2a is a schematic diagram of an embodiment of the display interface of the present application. As Figure 2aAs shown, still taking the target application scenario as the teaching application scenario as an example, for the human-computer interaction data "I want to tell primary school students about celestial knowledge related to black holes. Where can I find suitable materials?", its task result can be "The following platforms are found for you: Platform C: www.xxxx.com", and it is displayed on the interaction interface (such as Figure 2a shown in the left figure in). When the target object tries to access Platform C and finds that Platform C has been closed, an evaluation instruction "The recommended platform has been closed" can be issued for this (such as Figure 2b shown in the right figure in). Of course, the above example is only one possible example of obtaining an evaluation result by the target object issuing an evaluation instruction, and other possible situations will not be exemplified one by one here. In the above manner, the interaction interface is displayed, and the task result is displayed on the interaction interface, and in response to detecting an evaluation instruction of the task result in the interaction interface by the target object, the evaluation instruction is parsed to obtain an evaluation result, which can evaluate the task result from the evaluation perspective of the target object, so as to decide whether to execute subsequent process steps related to update according to the evaluation perspective of the target object.
[0036] It should be noted that the above examples are only two possible examples of obtaining an evaluation result in the actual application process. Other possible obtaining methods are not limited here and will not be exemplified one by one either.
[0037] In a specific implementation scenario, after obtaining the evaluation result, it can be detected whether the evaluation result meets the execution requirements. For example, taking the evaluation result including real-time performance as an example, the execution requirements can be set to include that the real-time performance does not exceed the time limit threshold; or, taking the evaluation result including accuracy as an example, the execution requirements can be set to include that the accuracy is not lower than the precision threshold. Of course, the above examples are only two possible examples of the execution requirements in the actual application process, and other possible situations will not be exemplified one by one here.
[0038] In a specific implementation scenario, when the evaluation result does not meet the execution requirements, first resource data can be extracted from information sources related to the target application scenario. Still taking the target application scenario as the teaching application scenario as an example, information sources related to the target application scenario can include, but are not limited to: educational resource public service platforms, professional education academic journals, educational news websites, etc. The specific types of information sources are not limited here. On this basis, first resource data can include, but is not limited to: the latest educational resources, real-time educational data, etc., and the knowledge base can be updated accordingly. It should be noted that at the beginning of the implementation process of the disclosed embodiments, resource collection can be pre-performed to form a knowledge base. For example, the knowledge base can be constructed through methods such as user upload and active indexing. Its knowledge resource data can cover forms such as documents, web pages, and knowledge graphs, and semantic features of the knowledge resource data can be extracted by means of word embedding of the language model, and then stored in the knowledge base online or offline. Of course, along with the semantic features, the knowledge resource data from which they are derived can also be stored in the knowledge base together. In this case, after obtaining the first resource data, the semantic features of the first resource data can also be extracted by means of word embedding of the language model and updated in the knowledge base.
[0039] In a specific implementation scenario, after the knowledge base is updated, the preset task types, their task description texts, and prompt instruction templates can be updated according to the updated knowledge base. It should be noted that in the actual application process, as the knowledge base is updated, it indicates that the knowledge resource data related to the target application scenario also exists updated. At this time, the preset task types originally set may change. For example, if new preset task types are added, new preset task types, their task description texts, and prompt instruction templates can be further added accordingly. It is also possible that the preset task types do not change, but at least one of the task description texts and prompt instruction templates of the preset task types is updated. Of course, the above examples are only several possible examples of updating the preset task types, their knowledge description texts, and prompt instruction templates based on the updated knowledge base, and other possible situations are not exemplified one by one here. It should be noted that a prompt instruction can be constructed based on the updated knowledge base, the preset task types, their task description texts, and prompt instruction templates, and the prompt instruction is used to instruct the large language model to refer to the updated knowledge base to update the preset task types, their task description texts, and prompt instruction templates. Then, the constructed prompt instruction can be input into the large language model, and the output content of the large language model can be used as the updated preset task types, their task description texts, and prompt instruction templates to meet the requirements of returning to process steps such as similarity measurement. For specific details, please refer to the relevant descriptions above and will not be elaborated here.
[0040] In an implementation scenario, please refer to Figure 2b , Figure 2bIt is a schematic process diagram of an embodiment of the Q&A task processing method of the present application. As Figure 2b shown, data resource collection can be performed in advance to collect internal and external resources to form a knowledge base (for the construction process of the knowledge base, refer to the foregoing related description). Then, task planning can be carried out for the human-computer interaction text of the target object to obtain a task planning set (which may include several subtasks). A memory system can also be constructed, such as a long-term memory and a short-term memory (specifically, refer to the foregoing related description). Of course, a scientific tool set can also be constructed (specifically, refer to the foregoing related description) to expand other capabilities of the large language model. The latter can assist the large language model in executing subtasks. The short-term memory in the former can assist in detecting whether the execution results of the subtasks in the task planning set meet the relevant requirements. The long-term memory in the former can assist in detecting whether the task results meet the relevant requirements after the overall task is executed. When not satisfied, the knowledge base can be updated according to the latest resource data, thereby constructing a user feedback mechanism to improve the search scope of the intelligent agent's knowledge base and the task process (specifically, refer to the foregoing related description). Finally, through multi-person and multi-round Q&A interactions, the automatic upgrade and ability improvement of the intelligent agent can be achieved.
[0041] In the above solution, the human-computer interaction text of the target object in the target application scenario is obtained, and the task description text and the prompt instruction template of each preset task type in the target application scenario are obtained. The prompt instruction template contains several slots to be filled. Then, based on the similarity between the human-computer interaction text and the task description text of each preset task type, a preset task type is selected as the target task type. Thus, the slots in the prompt instruction template of the target task type are filled based on the human-computer interaction text to obtain the target prompt instruction. Furthermore, based on the execution results of each subtask planned by the large language model in response to the target prompt instruction, the task result for replying to the target object is obtained. Therefore, on the one hand, when facing complex tasks, by decomposing the tasks into subtasks, the processing difficulty of complex tasks can be alleviated to a certain extent, which helps to improve the accuracy of Q&A task processing. On the other hand, by pre-configuring each preset task type and its task description text and prompt instruction template in the target application scenario, and selecting the target task type that is as matching as possible according to the similarity between the human-computer interaction text and each task description text, and accordingly filling the slots in the prompt instruction template of the target task type with the human-computer interaction text to obtain the target prompt instruction for indicating the large language model, a target prompt instruction that is as matching as possible can be generated in advance according to the actual situation before the large language model processes the task, so as to assist the large language model in task processing. Compared with directly processing tasks by the large language model, the accuracy of Q&A task processing can be improved to a certain extent. Therefore, the accuracy of Q&A task processing can be improved, especially when facing complex tasks.
[0042] Please refer toFigure 3 , Figure 3 is a schematic framework diagram of an embodiment of the Q&A task processing device of the present application. The Q&A task processing device 30 includes: an acquisition module 31, a measurement module 32, a filling module 33, and an execution module 34. The acquisition module 31 is configured to acquire the human-computer interaction text of the target object in the target application scenario, and acquire the task description text and prompt instruction template of each preset task type in the target application scenario. Among them, the prompt instruction template contains several slots to be filled. The measurement module 32 is configured to select a preset task type as the target task type based on the similarity between the human-computer interaction text and the task description text of each preset task type. The filling module 33 is configured to fill the slots to be filled in the prompt instruction template of the target task type based on the human-computer interaction text to obtain a target prompt instruction. The execution module 34 is configured to obtain the task result for replying to the target object based on the execution results of each subtask planned by the large language model in response to the target prompt instruction.
[0043] In the above solution, the Q&A task processing device 30 acquires the human-computer interaction text of the target object in the target application scenario, and acquires the task description text and prompt instruction template of each preset task type in the target application scenario. The prompt instruction template contains several slots to be filled. Then, based on the similarity between the human-computer interaction text and the task description text of each preset task type, a preset task type is selected as the target task type. Thus, the slots to be filled in the prompt instruction template of the target task type are filled based on the human-computer interaction text to obtain a target prompt instruction. Furthermore, based on the execution results of each subtask planned by the large language model in response to the target prompt instruction, the task result for replying to the target object is obtained. Therefore, on the one hand, when facing complex tasks, by decomposing the tasks into subtasks, the processing difficulty of complex tasks can be alleviated to a certain extent, which helps to improve the accuracy of Q&A task processing. On the other hand, by pre-configuring each preset task type and its task description text and prompt instruction template in the target application scenario, and selecting the target task type that is as matching as possible according to the similarity between the human-computer interaction text and each task description text, and then using the human-computer interaction text to fill the slots in the prompt instruction template of the target task type to obtain the target prompt instruction for instructing the large language model, a target prompt instruction that is as matching as possible can be generated in advance according to the actual situation before the large language model processes the task, so as to assist the large language model in task processing. Compared with directly processing tasks by the large language model, the accuracy of Q&A task processing can be improved to a certain extent. Therefore, the accuracy of Q&A task processing can be improved, especially when facing complex tasks.
[0044] In some disclosed embodiments, the metric module 32 includes a matching sub-module for matching a plurality of keywords in the human-computer interaction text with the task description text of a preset task type to obtain the similarity corresponding to the preset task type; the metric module 32 includes a display sub-module for sequentially arranging and displaying each preset task as a candidate task type based on the similarity corresponding to each preset task type; the metric module 32 includes a determination sub-module for determining the selected candidate task type as the target task type in response to a selection instruction of the target object for the candidate task type.
[0045] In some disclosed embodiments, the question-and-answer task processing device 30 includes an evaluation module for obtaining an evaluation result of the task result; wherein, the evaluation result includes at least one of real-time performance and accuracy; the question-and-answer task processing device 30 includes an update module for extracting first resource data from an information source related to the target application scenario and updating the knowledge base based on the first resource data, and updating the preset task type, its task description text, and the prompt instruction template based on the knowledge base in response to the evaluation result not meeting the execution requirements; the processing device 30 includes an iteration module for returning the step of selecting the preset task type as the target task type based on the similarity between the human-computer interaction text and the task description text of each preset task type until the latest evaluation result meets the execution requirements.
[0046] In some disclosed embodiments, the large language model is integrated into the intelligent agent, and the question-and-answer task processing method is executed by the intelligent agent. The evaluation module includes a long-term memory acquisition sub-module for acquiring the long-term memory data of the intelligent agent; wherein, the long-term memory data contains second resource data accumulated by the intelligent agent related to the target application scenario; the evaluation module includes a task result evaluation sub-module for evaluating the task result based on the long-term memory data to obtain the evaluation result.
[0047] In some disclosed embodiments, the evaluation module includes an interactive interface display sub-module for displaying the interactive interface; wherein, the task result is displayed on the interactive interface; the evaluation module includes an evaluation instruction parsing sub-module for parsing the evaluation instruction to obtain the evaluation result in response to detecting an evaluation instruction of the target object for the task result in the interactive interface.
[0048] In some disclosed embodiments, a large language model is integrated into an agent, and the question-and-answer task processing method is executed by the agent. The question-and-answer task processing device 30 includes a detection module for detecting whether the execution result of a subtask meets the task requirements based on short-term memory data; wherein, the short-term memory data includes personal resource data related to the target application scenario when the target object interacts with the agent. The question-and-answer task processing device 30 includes a first response module for retaining the execution result of the subtask and confirming that the subtask is completed in response to the execution result of the subtask meeting the task requirements. The question-and-answer task processing device 30 includes a second response module for re-executing the subtask and returning to execute the step of detecting whether the execution result of the subtask meets the task requirements based on the short-term memory data for the new execution result of the subtask in response to the execution result of the subtask not meeting the task requirements.
[0049] In some disclosed embodiments, the question-and-answer task processing device 30 includes a memory construction module for obtaining the historical interaction data between the target object and the agent as short-term memory data in response to the target object starting a new round of interaction with the agent.
[0050] In some disclosed embodiments, the filling module 33 includes a text selection sub-module for selecting a text segment as the filling text for the slot to be filled based on the matching degree between the slot name of the slot to be filled and each text segment in the human-computer interaction text. The filling module 33 includes a text filling module for performing slot filling on the slot to be filled based on the filling text of the slot to be filled to obtain a target prompt instruction.
[0051] In some disclosed embodiments, when the target application scenario includes a teaching application scenario, each preset task type includes a teaching activity generation task, a teaching resource generation task, a teaching tool recommendation task, and an education evaluation task.
[0052] Please refer to Figure 4 , Figure 4 which is a schematic framework diagram of an embodiment of the electronic device of the present application. The electronic device 40 at least includes a memory 41 and a processor 42 that are coupled to each other. At least program instructions are stored in the memory 41, and the processor 42 is configured to execute the program instructions to implement the steps in any of the above embodiments of the question-and-answer task processing method. Specifically, reference may be made to the foregoing disclosed embodiments, which will not be elaborated herein. As a possible example, the electronic device 40 may include, but is not limited to, devices such as a display, a tablet computer, a learning machine, and a smart large screen. The specific type of the electronic device 40 is not limited herein.
[0053] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above-mentioned question-and-answer task processing method embodiments. The processor 42 can also be referred to as a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. Additionally, the processor 42 can be implemented jointly by integrated circuit chips.
[0054] In the above solution, the electronic device 40 obtains the human-computer interaction text of the target object in the target application scenario, and obtains the task description text and the prompt instruction template of each preset task type in the target application scenario. The prompt instruction template contains several slots to be filled. Then, based on the similarity between the human-computer interaction text and the task description text of each preset task type, a preset task type is selected as the target task type. Thus, the slots to be filled in the prompt instruction template of the target task type are filled based on the human-computer interaction text to obtain the target prompt instruction. Furthermore, based on the execution results of each subtask planned by the large language model in response to the target prompt instruction, the task result for replying to the target object is obtained. Therefore, on the one hand, when facing complex tasks, by decomposing the tasks into each subtask, the processing difficulty of complex tasks can be alleviated to a certain extent, which helps to improve the accuracy of question-and-answer task processing. On the other hand, by pre-configuring each preset task type and its task description text and prompt instruction template in the target application scenario, and selecting the target task type that is as matching as possible according to the similarity between the human-computer interaction text and each task description text, and accordingly using the human-computer interaction text to fill the slots in the prompt instruction template of the target task type to obtain the target prompt instruction for indicating the large language model, the target prompt instruction that is as matching as possible can be generated in advance according to the actual situation before the large language model processes the task, so as to assist the large language model in task processing. Compared with directly processing tasks by the large language model, the accuracy of question-and-answer task processing can be improved to a certain extent. Therefore, the accuracy of question-and-answer task processing can be improved, especially when facing complex tasks.
[0055] Please refer to Figure 5 , Figure 5It is a schematic framework diagram of an embodiment of the computer-readable storage medium of the present application. The computer-readable storage medium 50 stores program instructions 51 that can be run by a processor, and the program instructions 51 are used to implement the steps in any of the above-described method embodiments for processing question-and-answer tasks.
[0056] In the above solution, the computer-readable storage medium 50 obtains the human-computer interaction text of the target object in the target application scenario, and obtains the task description text and the prompt instruction template of each preset task type in the target application scenario. The prompt instruction template contains several slots to be filled. Then, based on the similarity between the human-computer interaction text and the task description text of each preset task type, a preset task type is selected as the target task type. Thus, the slots to be filled in the prompt instruction template of the target task type are filled based on the human-computer interaction text to obtain the target prompt instruction. Furthermore, based on the execution results of each subtask planned by the large language model in response to the target prompt instruction, a task result for replying to the target object is obtained. Therefore, on the one hand, when facing complex tasks, by decomposing the tasks into subtasks, the processing difficulty of complex tasks can be alleviated to a certain extent, which helps to improve the accuracy of question-and-answer task processing. On the other hand, by pre-configuring each preset task type and its task description text and prompt instruction template in the target application scenario, and selecting the target task type that is as matching as possible according to the similarity between the human-computer interaction text and each task description text, and accordingly filling the slots in the prompt instruction template of the target task type with the human-computer interaction text to obtain the target prompt instruction for indicating the large language model, a target prompt instruction that is as matching as possible can be generated according to the actual situation in advance before the large language model processes the task, so as to assist the large language model in task processing. Compared with directly processing tasks by the large language model, the accuracy of question-and-answer task processing can be improved to a certain extent. Therefore, the accuracy of question-and-answer task processing can be improved, especially when facing complex tasks.
[0057] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments, and their specific implementations can refer to the descriptions of the above method embodiments. For the sake of brevity, they will not be elaborated here.
[0058] The descriptions of the above embodiments tend to emphasize the differences between the embodiments. Their similarities or similarities can be referred to each other. For the sake of brevity, they will not be elaborated in this article.
[0059] In several embodiments provided in the present application, it should be understood that the disclosed methods and apparatuses can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of the apparatuses or units can be in electrical, mechanical or other forms.
[0060] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0061] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0062] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in each embodiment of the present application. And the aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical discs and other various media that can store program codes.
[0063] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
Claims
1. A method for processing a question-and-answer task, characterized in that, Including: Obtain the human-computer interaction text of the target object in the target application scenario, and obtain the task description text and prompt instruction template of each preset task type in the target application scenario; wherein, there are several slots to be filled in the prompt instruction template; Based on the similarity between the human-computer interaction text and the task description text of each preset task type, select the preset task type as the target task type; Based on the human-computer interaction text, fill the slots to be filled in the prompt instruction template of the target task type to obtain the target prompt instruction; Based on the execution results of each subtask planned by the large language model in response to the target prompt instruction, obtain the task result for replying to the target object.
2. The method according to claim 1, wherein The step of selecting the preset task type as the target task type based on the similarity between the human-computer interaction text and the task description text of each preset task type includes: Match several keywords in the human-computer interaction text with the task description text of the preset task type to obtain the similarity corresponding to the preset task type; Based on the similarities corresponding to each preset task type, arrange each preset task type as a candidate task type in sequence and display them; In response to the selection instruction of the target object for the candidate task type, determine the selected candidate task type as the target task type.
3. The method according to claim 1, wherein After obtaining the task result for replying to the target object based on the execution results of each subtask planned by the large language model in response to the target prompt instruction, the method further includes: Obtain the evaluation result of the task result; wherein, the evaluation result includes at least one of timeliness and accuracy; In response to the evaluation result not meeting the execution requirements, extract the first resource data from the information source related to the target application scenario, update the knowledge base based on the first resource data, and update the preset task type, its task description text, and the prompt instruction template based on the knowledge base; Return to the step of selecting the preset task type as the target task type based on the similarity between the human-computer interaction text and the task description text of each preset task type until the latest evaluation result meets the execution requirements.
4. The method according to claim 3, characterized in that, The large language model is integrated in the intelligent agent, and the question-and-answer task processing method is executed by the intelligent agent. The step of obtaining the evaluation result of the task result includes: Obtain the long-term memory data of the intelligent agent; wherein, the long-term memory data contains the second resource data accumulated by the intelligent agent related to the target application scenario; Evaluate the task result based on the long-term memory data to obtain the evaluation result.
5. The method according to claim 3, wherein The step of obtaining the evaluation result of the task result includes: Display the interaction interface; wherein, the task result is displayed on the interaction interface; In response to detecting the evaluation instruction of the target object for the task result in the interaction interface, parse the evaluation instruction to obtain the evaluation result.
6. The method according to claim 1, characterized in that, The large language model is integrated into the intelligent agent, and the question-and-answer task processing method is executed by the intelligent agent. During the execution of each of the subtasks, the method further includes: Based on the short-term memory data, detecting whether the execution result of the subtask meets the task requirements; wherein, the short-term memory data includes personal resource data related to the target application scenario when the target object interacts with the intelligent agent; In response to the execution result of the subtask meeting the task requirements, retaining the execution result of the subtask and confirming that the subtask has been completed; In response to the execution result of the subtask not meeting the task requirements, re-executing the subtask, and for the new execution result of the subtask, returning to execute the step of detecting whether the execution result of the subtask meets the task requirements based on the short-term memory data of the intelligent agent.
7. The method according to claim 6, wherein The obtaining step of the short-term memory data includes: In response to the target object starting a new round of interaction with the intelligent agent, obtaining the historical interaction data between the target object and the intelligent agent as the short-term memory data.
8. The method according to claim 1, wherein The slot filling of the to-be-filled slots in the prompt instruction template of the target task type based on the human-computer interaction text to obtain the target prompt instruction includes: Based on the matching degree between the slot name of the to-be-filled slot and each text segment in the human-computer interaction text, selecting the text segment as the filling text for the to-be-filled slot; Based on the filling text of the to-be-filled slot, performing slot filling on the to-be-filled slot to obtain the target prompt instruction.
9. The method according to any one of claims 1 to 8, characterized in that, In the case where the target application scenario includes a teaching application scenario, each of the preset task types includes a teaching activity generation task, a teaching resource generation task, a teaching tool recommendation task, and an education evaluation task.
10. A question-and-answer task processing device, characterized in that, Including: An obtaining module, configured to obtain the human-computer interaction text of the target object in the target application scenario, and obtain the task description text and the prompt instruction template of each preset task type in the target application scenario; wherein, the prompt instruction template contains a number of to-be-filled slots; A metric module, configured to select the preset task type as the target task type based on the similarity between the human-computer interaction text and the task description text of each preset task type; A filling module, configured to perform slot filling on the to-be-filled slots in the prompt instruction template of the target task type based on the human-computer interaction text to obtain the target prompt instruction; An execution module, configured to obtain the task result for replying to the target object based on the execution results of each subtask planned by the large language model in response to the target prompt instruction.
11. An electronic device, characterized in that, At least including a memory and a processor, at least program instructions are stored in the memory, and the processor is configured to execute the program instructions to implement the question-and-answer task processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, Stored with program instructions that can be run by the processor, and the program instructions are used to implement the question-and-answer task processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Knowledge question and answer method, device and equipment and storage medium
CN116561278A
Knowledge question-answering method and device, equipment and storage medium
CN117828057A
Task processing method and device, equipment, storage medium and product
CN119850146A
Question-answering method and apparatus based on large language model
WO2025098195A1