Subject interaction question-answering method based on large model and teaching assistant agent

By establishing a subject knowledge base and designing prompt words for implicit interactive processes, the problem of large language models lacking guidance and accuracy in knowledge Q&A in specific subject areas is solved, and interactive multi-round question answers are realized, which improves subject interactive Q&A accuracy and learning value.

CN119271766APending Publication Date: 2025-01-07TSINGHUA UNIVERSITY +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411043303.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing large language models lack guidance and accuracy in knowledge questions and answers in specific subject areas, and cannot meet students' needs for learning specific subjects.

Method used

By establishing a subject knowledge base and designing prompt words for implicit interactive processes, using search enhancement algorithms to determine knowledge fragments from the subject knowledge base, and entering these fragments and prompt words into a pre-trained big model to improve the accuracy and correlation of the answers , realize interactive multi-round question answering, and gradually give ideas for answering questions.

Benefits of technology

It improves the accuracy and relevance of the answers of the large language model in specific subject areas, so that it can guide students to think and understand knowledge like human teachers, provide correct, comprehensive and guiding solutions, and enhance students' learning value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271766A_ABST
    Figure CN119271766A_ABST
Patent Text Reader

Abstract

The invention provides a subject interactive question-answering method based on a large model and a teaching assistant agent. The method comprises the following steps: establishing a subject knowledge base; determining knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; taking the knowledge fragments as context information of the large model; on the basis of the subject knowledge base, cue words implying an interaction process are designed; cue words implied in the interaction process comprise an answer background of the large model, a multi-round answer logic structure and content and format requirements of each round of answer; and inputting the knowledge fragments and the prompt words implying the interaction process into a pre-trained large model to obtain a subject interaction question and answer result output by the large model. According to the method, the accuracy and correlation of large model answering can be improved through the subject knowledge base. And through the prompt words implying the interaction process, the large language model performs interactive multi-round questions aiming at a specific subject, so that question answering thoughts are hidden, guided and gradually given in the student question answering process, and the method has better practical value for students.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a subject interactive question-answering method based on a large model and an assistant teaching agent. Background Art

[0002] A large language model is a natural language processing model based on deep learning. It can learn and generate human language. The core of LLM (Large Language Model) is deep learning technology, especially neural network models in the field of natural language processing. These models usually have billions to trillions of parameters and can handle various natural language processing tasks. The subject interactive question-answering system based on the large language model is an important application of the large language model.

[0003] The basic functions of most existing LLMs are to accurately, correctly and quickly give users the answers they need, and to build a direct mapping between questions and answers. At the same time, existing LLMs often focus on using pretraining as the technical core, targeting a wider range of knowledge fields, but have certain problems in answering knowledge questions that focus on a specific field. For example, for AI teaching assistant projects in science and engineering disciplines at the university level, the current LLM design method cannot fully meet the needs of students learning specific disciplines. Summary of the invention

[0004] The present invention provides a subject interactive question-answering method and teaching assistant intelligent agent based on a large model, which are used to solve the defects of the large language model in the prior art that the large language model does not have sufficient relevant knowledge in a specific field and cannot answer students' questions in a guided manner. The present invention can improve the accuracy and relevance of the answers of the large model through the subject knowledge base. And through the prompt words of the implicit interaction process, the large language model can conduct interactive multiple rounds of questions for specific subjects, so as to achieve hiding, guiding, and gradually giving problem-solving ideas in the process of answering students' questions, which has better practical value for students.

[0005] The present invention provides a subject interactive question-answering method based on a big model, comprising: establishing a subject knowledge base; determining knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; using the knowledge fragments as context information of the big model; designing prompt words for an implicit interaction process based on the subject knowledge base; the prompt words for the implicit interaction process include the answer background of the big model, a multi-round answer logic structure, and the content and format requirements of each round of answers; inputting the knowledge fragments and the prompt words for the implicit interaction process into a pre-trained big model to obtain the subject interactive question-answering result output by the big model.

[0006] According to a subject interactive question-answering method based on a large model provided by the present invention, the establishment of a subject knowledge base includes: extracting information from subject materials to obtain subject information; segmenting the subject information to obtain segmented data; based on the segmented data, using a prompt engineering method to guide the large language model to generate the subject knowledge base.

[0007] According to a large-model-based subject interactive question-answering method provided by the present invention, the knowledge fragment is determined from the subject knowledge base based on a retrieval enhancement algorithm, including: retrieving the most matching text fragment from the subject knowledge base according to the current question; and generating the knowledge fragment for answering the current question according to the current question and the text fragment.

[0008] According to a subject interactive question-answering method based on a big model provided by the present invention, the prompt words of the implicit interactive process are designed based on the subject knowledge base, including: determining the answer background of the big model based on the subject knowledge base and the current question; stipulating that the big model should master the knowledge of the subject knowledge base and the format requirements when answering the current question, and answer the current question as an assistant; dividing the multi-round answer logic structure into a first answer mode, a second answer mode and a third answer mode; the first answer mode is used to provide preliminary ideas for answering the current question; the second answer mode is used to provide partial ideas for answering the current question; the third answer mode is used to provide all ideas for answering the current question; and determining the content of each round of answers according to the multi-round answer logic structure.

[0009] The present invention also provides a subject interactive question-answering teaching assistant intelligent agent based on a large model, comprising: an establishment module for establishing a subject knowledge base; a determination module for determining knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; the knowledge fragments serve as context information of the large model; a design module for designing prompt words for an implicit interaction process based on the subject knowledge base; the prompt words for the implicit interaction process include the answer background of the large model, the logical structure of multiple rounds of answers, and the content and format requirements of each round of answers; a result module for inputting the knowledge fragments and the prompt words for the implicit interaction process into the pre-trained large model to obtain the subject interactive question-answering results output by the large model.

[0010] According to a subject interactive question-answering teaching assistant intelligent agent based on a large model provided by the present invention, the establishment module includes an extraction module, a segmentation module and a prompt module; the extraction module is used to extract information from subject materials to obtain subject information; the segmentation module is used to segment the subject information to obtain segmented data; the prompt module is used to guide the large language model to generate the subject knowledge base in a prompt engineering manner based on the segmented data.

[0011] According to a subject interactive question-answering teaching assistant agent based on a large model provided by the present invention, the determination module includes a retrieval module and a generation module; the retrieval module is used to retrieve the most matching text fragment from the subject knowledge base according to the current question; the generation module is used to generate the knowledge fragment for answering the current question based on the current question and the text fragment.

[0012] According to a subject interactive question-answering teaching assistant intelligent agent based on a large model provided by the present invention, the design module includes a background module, a regulation module, a logic module and a content module; the background module is used to determine the answer background of the large model based on the subject knowledge base and the current question; the regulation module is used to stipulate that the large model should master the knowledge of the subject knowledge base and the format requirements when answering the current question, and answer the current question as an assistant; the logic module is used to divide the multi-round answer logic structure into a first answer mode, a second answer mode and a third answer mode; the first answer mode is used to provide preliminary ideas for answering the current question; the second answer mode is used to provide partial ideas for answering the current question; the third answer mode is used to provide all ideas for answering the current question; the content module is used to determine the content of each round of answers according to the multi-round answer logic structure.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the subject interactive question-answering method based on a large model as described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described large-model-based subject interactive question-answering methods.

[0015] The present invention provides a subject interactive question-answering method and teaching assistant agent based on a large model, the method comprising: establishing a subject knowledge base; determining knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; using the knowledge fragments as context information of the large model; designing prompt words of an implicit interactive process based on the subject knowledge base; the prompt words of the implicit interactive process include the answer background of the large model, the multi-round answer logic structure, and the content and format requirements of each round of answers; inputting the knowledge fragments and the prompt words of the implicit interactive process into the pre-trained large model to obtain the subject interactive question-answering results output by the large model. The present invention can improve the accuracy and relevance of the answers of the large model through the subject knowledge base. And through the prompt words of the implicit interactive process, the large language model can be made to conduct interactive multi-round questions for specific subjects, so as to achieve hiding, guiding, and gradually giving problem-solving ideas in the process of answering students' questions, which has better practical value for students. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a flow chart of a subject interactive question-answering method based on a large model provided by the present invention.

[0018] Figure 2 It is a schematic diagram of the interactive answer structure provided by the present invention.

[0019] Figure 3 It is a structural schematic diagram of a subject interactive question-answering teaching assistant intelligent agent based on a large model provided by the present invention.

[0020] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] Please refer to Figure 1 , Figure 1 A flowchart of a subject interactive question-answering method based on a large model provided by the present invention.

[0023] The present invention provides a subject interactive question-answering method based on a large model, comprising: 101: Establish a subject knowledge base; 102: Determine knowledge fragments from subject knowledge base based on retrieval enhancement algorithm; knowledge fragments serve as context information for large models; 103: Based on the subject knowledge base, design the prompt words of the implicit interaction process; the prompt words of the implicit interaction process include the solution background of the large model, the logical structure of multiple rounds of solutions, and the content and format requirements of each round of solutions; 104: Input knowledge fragments and hint words of the implicit interaction process into the pre-trained big model to obtain the subject interaction question-answering results output by the big model.

[0024] This embodiment takes the course of digital electronic technology foundation in university-level science and engineering as an example. In this course, students often ask questions about exercises related to digital circuits. Digital circuit problems often involve a multi-step thinking process, including the transformation of requirements to circuit logic, the understanding of component characteristics, and the transformation of circuit logic to circuit connection. The answer mode that directly gives answers cannot enable students to gradually think about relevant knowledge, explore and understand the solution ideas in solving problems. In order to meet these needs, without using massive data to retrain the large language model, this embodiment establishes a subject knowledge base, uses a retrieval enhancement algorithm to retrieve specific subject knowledge and assist language model generation, and specifically determines knowledge fragments from the subject knowledge base. And design the prompt words of the implicit interactive process to enable the large language model to conduct interactive multiple rounds of questions for specific subjects, so as to realize the function of gradually guiding students in the process of answering students' questions, triggering students' thinking through counter-questions, and finally helping students find the correct solution ideas.

[0025] Compared with existing model designs that are not specialized in a certain field, have straightforward answers without guidance, and lack educational value, the present invention can enable the large language model to master a large amount of knowledge related to a specific subject (digital circuits), and improve the accuracy and relevance of the large language model's answers. By hiding, guiding, and gradually providing rather than directly generating problem-solving ideas, it is possible to generate correct, comprehensive, and sufficiently guiding answers to specific courses, which are closely aligned with the actual knowledge background, have better practical value for student users, and help them think, accept guidance, master knowledge, and understand questions, making the large language model more capable of educational guidance similar to that of human teachers.

[0026] The large language model can be but is not limited to the ChatGPT model.

[0027] As a preferred embodiment, establishing a subject knowledge base includes: extracting information from subject materials to obtain subject information; segmenting the subject information to obtain segmented data; based on the segmented data, using a prompt engineering method to guide a large language model to generate a subject knowledge base.

[0028] In this embodiment, subject reference materials for digital circuit courses are collected, and the optical character recognition (OCR) technology is used to convert the PDF content into editable text to extract subject information. Then, regular expressions are used to segment the subject information by chapter using Python to obtain segmented data. Finally, based on the segmented data, the prompt engineering method is used to guide the large language model to generate a subject knowledge base (KB).

[0029] Some datasets of the subject knowledge base are as follows: {

[0030] "article_name": ""Basics of Digital Electronic Technology (Edited by Yan Shi)" Chapter 1 Number System and Code System",

[0031] "title": "Binary Conversion",

[0032] "content":"Binary conversion refers to converting a decimal number into an equivalent binary number. The conversion method for the integer part is to divide the decimal integer from the highest bit to the lowest bit by 2 one by one, and arrange the remainders from the lowest bit to the highest bit until the quotient is 0. The conversion method for the decimal part is to multiply the decimal fraction by 2 one by one starting from the decimal point, and use the integer part of the product as the number of digits in the binary number, and use the decimal part of the product as the decimal part of the next calculation until the decimal part is 0 or the required accuracy is reached."

[0033] }

[0034] {

[0035] "article_name": ""Basics of Digital Electronic Technology (Edited by Yan Shi)" Chapter 1 Number System and Code System",

[0036] "title": "Binary to Decimal",

[0037] "content":"The method of converting a binary number to its decimal equivalent is to calculate the decimal number based on the digits on each digit of the binary number and the weights of the corresponding digits. For example, for the integer part, multiply each digit by the corresponding power of 2 and add the results to get the decimal number. For the decimal part, multiply each digit by the corresponding negative power of 2 and add the results to get the decimal number."

[0038] }

[0039] {

[0040] "article_name": ""Basics of Digital Electronic Technology (Edited by Yan Shi)" Chapter 1 Number System and Code System",

[0041] "title": "Binary to Octal",

[0042] "content":"The method of converting a binary number into an equivalent octal number is to divide the integer part of the binary number into groups of 3 bits from low to high, and convert each group into an equivalent octal number. For the decimal part, divide the decimal part into groups of 3 bits from high to low, and convert each group into an equivalent octal number. The results of the integer part and the decimal part are concatenated together to get the octal number."

[0043] }

[0044] As a preferred embodiment, knowledge fragments are determined from a subject knowledge base based on a retrieval enhancement algorithm, including: retrieving the most matching text fragment from the subject knowledge base according to the current question; and generating a knowledge fragment for answering the current question according to the current question and the text fragment.

[0045] The core idea of ​​RAG (Retrieval-Augmented Generation) is to combine a large language model with an external knowledge base to make up for the lack of knowledge in the large language model itself, thereby improving the performance of the large language model in a specific field. In this embodiment, RAG is used to provide structured relevant knowledge fragments in a specific field, which are input as context into the generation of a large language model. Specifically, first, according to the current question, the most matching text fragment is retrieved from the subject knowledge base. The retrieval tools include TF-IDF, BM25, and a neural retriever based on a dual-tower model. Then, based on the current question and the text fragment, a knowledge fragment is generated to answer the current question. This embodiment can use the subject knowledge base to avoid integrating all knowledge when training a large language model from scratch, which can significantly reduce the computational cost. At the same time, it also avoids the need to retrain the large language model as a whole when knowledge is updated.

[0046] Please refer to Figure 2 , Figure 2 A schematic diagram of the interactive answer structure provided by the present invention.

[0047] As a preferred embodiment, prompt words of an implicit interactive process are designed based on the subject knowledge base, including: determining the answer background of the large model based on the subject knowledge base and the current question; stipulating that the large model should master the knowledge and format requirements of the subject knowledge base when answering the current question, and answer the current question as an assistant; dividing the multi-round answer logic structure into a first answer mode, a second answer mode and a third answer mode; the first answer mode is used to provide preliminary ideas for answering the current question; the second answer mode is used to provide partial ideas for answering the current question; the third answer mode is used to provide all ideas for answering the current question; and determining the content of each round of answers according to the multi-round answer logic structure.

[0048] In order to design the prompt words of the implicit interaction process, in this embodiment, the answer state machine is used as the basic idea, and the judgment question is used as the interactive function. Structurally, the teaching assistant agent provides a designed background prompt (the prompt words of the implicit interaction process) based on the subject knowledge base and the current problem. The prompt words specify the answer background of the large language model, the multi-round answer logic structure, and the content and format requirements of each round of answers. Specifically, the prompt words of the implicit interaction process stipulate that when the large language model answers, it should be considered to have relevant knowledge in the field of digital circuits (the knowledge of the subject knowledge base should be mastered), and answer the current question as a teaching assistant. When answering the current question, the multi-round answer logic structure of the teaching assistant agent based on the large language model is divided into the first answer mode, the second answer mode, and the third answer mode.

[0049] In the first answer mode (first round of answers), the teaching assistant agent only needs to provide preliminary ideas for the questions raised by students (current questions) and give relevant judgment questions. If the student answers incorrectly, the teaching assistant agent will continue to answer in this way until the student answers correctly and enters the second answer mode. In the second answer mode (Nth round of answers), the teaching assistant agent can continue multiple rounds according to the prompt words of the implicit interaction process. Each round of answers provides some ideas for solving the problem and some relevant knowledge points, and gives relevant judgment questions. If the student answers incorrectly, the teaching assistant agent will continue to answer in this way until the student answers correctly and enters the N+1th round of answers. After all such answers are completed, the third answer mode will be entered. In the third answer mode (the last round of answers), the teaching assistant agent provides a complete solution idea (all ideas for the current problem), summarizes the student's performance, gives learning suggestions, and ends the entire answer process.

[0050] The following shows the actual effect of interactive answering, taking a specific question in the digital circuit course as an example (the maximum number of question-answering rounds is set to 3).

[0051] You are a teaching assistant for the university course "Digital Circuit Technology". In order to enable students to learn knowledge better rather than just cope with homework, when students ask you a math logic circuit question, you should not directly give the solution process and answer to the question, but should interact with the students in multiple rounds, give some ideas for the question and guide students to think about the question and related knowledge points.

[0052] Requirements: During the interactive process, any judgment questions you give should clearly indicate right or wrong, and there should be no vague answers...

[0053] Teaching assistant agent: First round of answers (first answer mode): Tip: First, we need to understand the concepts of 3-code and 4421 binary-decimal code, as well as the function of the 4-bit parallel adder 74LS243. The remainder 3 code is a binary-decimal encoding method, in which each decimal number is 3 more than the corresponding 4421 code. The 74LS243 is a 4-bit parallel adder that can perform addition operations on 4-bit binary numbers.

[0054] Guide statement: Considering that the 74LS243 can perform addition operations, consider whether the remainder 3 code can be converted to the 4421 code through addition operations. Please consider the input and output of the 74LS243 and the specific relationship between the two codes.

[0055] True or False: To convert the remainder 3 code to the 4421 binary-decimal code, is it only necessary to perform binary addition operations on each bit of the remainder 3 code? Answer "yes" or "no".

[0056] Student: No

[0057] Teaching assistant agent: Second round of answers (second answer mode): Result feedback: Your answer is correct. The conversion of the remainder 3 code to the 4421 binary-decimal code is not simply a matter of performing binary addition operations on each bit, because each bit of the remainder 3 code has an extra 3, so we need to make appropriate adjustments to each bit.

[0058] Tips: To achieve this conversion, we can use the characteristics of 74LS243 to adjust the value of each bit through appropriate inputs. Specifically, we can fix some inputs of 74LS243 to high level (logic 1), so that a fixed value will be added to each bit of the remainder 3 code during the addition operation.

[0059] Part of the solution process: For example, for a 4-bit binary number, if we connect the C0, C1, and C2 inputs of 74LS243 to a high level, then when performing an addition operation, 3 will be added to each bit (0011 in binary), so that the remainder 3 code can be converted to a 4421 code.

[0060] Introductory statement: Now, please think about how to connect the input terminals of 74LS243 so that when the adder receives the remainder 3 code input, it will output the corresponding 4421 binary-decimal code.

[0061] True or False: When converting the remainder 3 code to the 4421 binary-decimal code, do you need to connect all the carry inputs (C0, C1, C2, C3) of the 74LS243 to a high level? Answer "yes" or "no".

[0062] Student: No

[0063] Teaching assistant agent: Final round of answers (third answer mode): Result feedback: Your answer is correct. We do not need to connect all the carry inputs of 74LS243 to high level. In fact, we only need to connect C0, C1, and C2 to high level, and C3 to low level, because connecting C3 to high level will cause the highest bit to carry, which is not what we want.

[0064] Solution: To convert the remainder 3 code to the 4421 binary-decimal code, we can connect the remainder 3 code to the four input terminals A, B, C, and D of 74LS243, and connect C0, C1, and C2 to high level, and C3 to low level. In this way, when the adder performs the addition operation, 3 (0011 in binary) will be added to each bit, thus obtaining the corresponding 4421 binary-decimal code.

[0065] Related knowledge points: This conversion process utilizes the parallel addition function of 74LS243 and the conversion rules between binary and decimal codes. Understanding the characteristics and conversion methods of different coding methods is an important aspect in digital circuit design.

[0066] Study Tip: You have demonstrated a good understanding of the working principle of digital circuit encoding and adders. To further deepen your understanding, it is recommended that you verify this conversion process by actually building a circuit and study other types of encoding conversion and digital circuit design.

[0067] At this point, you have completed the learning process of this problem. I hope you can consolidate and deepen the knowledge you have learned through practice.

[0068] The following describes the subject interactive question and answer teaching assistant intelligent body based on a large model provided by the present invention. The subject interactive question and answer teaching assistant intelligent body based on a large model described below and the subject interactive question and answer method based on a large model described above can refer to each other.

[0069] Please refer to Figure 3 , Figure 3 A structural schematic diagram of a subject interactive question-answering teaching assistant intelligent agent based on a large model provided by the present invention.

[0070] The present invention also provides a subject interactive question-answering teaching assistant intelligent agent based on a large model, comprising: an establishment module 1, used to establish a subject knowledge base; a determination module 2, used to determine knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; the knowledge fragments serve as context information of the large model; a design module 3, used to design prompt words for an implicit interaction process based on the subject knowledge base; the prompt words for the implicit interaction process include the answer background of the large model, the logical structure of multiple rounds of answers, and the content and format requirements of each round of answers; a result module 4, used to input knowledge fragments and prompt words for the implicit interaction process into the pre-trained large model to obtain the subject interactive question-answering results output by the large model.

[0071] As a preferred embodiment, the establishment module includes an extraction module, a segmentation module and a prompt module; the extraction module is used to extract information from subject materials to obtain subject information; the segmentation module is used to segment the subject information to obtain segmented data; the prompt module is used to guide the large language model to generate a subject knowledge base based on the segmented data by using a prompt engineering method.

[0072] As a preferred embodiment, the determination module includes a retrieval module and a generation module; the retrieval module is used to retrieve the most matching text fragment from the subject knowledge base according to the current question; the generation module is used to generate a knowledge fragment for answering the current question based on the current question and the text fragment.

[0073] As a preferred embodiment, the design module includes a background module, a regulation module, a logic module and a content module; the background module is used to determine the answer background of the large model based on the subject knowledge base and the current problem; the regulation module is used to stipulate that the large model should master the knowledge and format requirements of the subject knowledge base when answering the current question, and answer the current question as an assistant; the logic module is used to divide the multi-round answer logic structure into a first answer mode, a second answer mode and a third answer mode; the first answer mode is used to provide preliminary ideas for answering the current question; the second answer mode is used to provide partial ideas for answering the current question; the third answer mode is used to provide all ideas for answering the current question; the content module is used to determine the content of each round of answers according to the multi-round answer logic structure.

[0074] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the subject interactive question-answering method based on the big model, the method comprising: establishing a subject knowledge base; determining knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; using the knowledge fragments as context information of the big model; designing prompt words of the implicit interaction process based on the subject knowledge base; the prompt words of the implicit interaction process include the answer background of the big model, the multi-round answer logic structure and the content and format requirements of each round of answer; inputting the knowledge fragments and the prompt words of the implicit interaction process into the pre-trained big model to obtain the subject interactive question-answering result output by the big model.

[0075] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0076] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the subject interactive question and answer method based on the big model provided by the above-mentioned methods, which includes: establishing a subject knowledge base; determining knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; using the knowledge fragments as context information of the big model; designing prompt words for implicit interaction processes based on the subject knowledge base; the prompt words for the implicit interaction process include the answer background of the big model, the logical structure of multiple rounds of answers, and the content and format requirements of each round of answers; inputting the knowledge fragments and the prompt words of the implicit interaction process into the pre-trained big model to obtain the subject interactive question and answer results output by the big model.

[0077] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the subject interactive question and answer method based on a big model provided by the above-mentioned methods, the method comprising: establishing a subject knowledge base; determining knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; using the knowledge fragments as context information of the big model; designing prompt words for an implicit interaction process based on the subject knowledge base; the prompt words for the implicit interaction process include the answer background of the big model, the logical structure of multiple rounds of answers, and the content and format requirements of each round of answers; inputting the knowledge fragments and the prompt words for the implicit interaction process into the pre-trained big model to obtain the subject interactive question and answer results output by the big model.

[0078] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0079] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A subject interactive question-answering method based on a large model, characterized in that: include: Establishing subject knowledge base; determining knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; The knowledge fragments serve as context information for the large model; Based on the subject knowledge base, designing the prompt words of the implicit interaction process; the prompt words of the implicit interaction process include the solution background of the large model, the logical structure of multiple rounds of solutions, and the content and format requirements of each round of solutions; The knowledge fragments and the prompt words of the implicit interaction process are input into the pre-trained big model to obtain the subject interaction question and answer results output by the big model.

2. The subject interactive question-answering method based on a large model according to claim 1 is characterized in that: The establishment of a subject knowledge base includes: Extract information from subject materials to obtain subject information; Segmenting the subject information to obtain segmented data; Based on the segmented data, a prompt engineering approach is adopted to guide the large language model to generate the subject knowledge base.

3. The subject interactive question-answering method based on a large model according to claim 1 is characterized in that: Determining the knowledge fragments from the subject knowledge base based on the retrieval enhancement algorithm includes: Retrieving the most matching text fragment from the subject knowledge base according to the current question; The knowledge fragment for answering the current question is generated according to the current question and the text fragment.

4. The subject interactive question-answering method based on a large model according to any one of claims 1 to 3, characterized in that: The step of designing the prompt words of the implicit interaction process based on the subject knowledge base includes: Based on the subject knowledge base and the current problem, determine the solution context of the large model; It is stipulated that the large model should master the knowledge of the subject knowledge base and the format requirements when answering the current question, and answer the current question as a teaching assistant; The multi-round answer logic structure is divided into a first answer mode, a second answer mode and a third answer mode; the first answer mode is used to provide a preliminary idea for answering the current question; the second answer mode is used to provide a partial idea for answering the current question; the third answer mode is used to provide a complete idea for answering the current question; The content of each round of answers is determined according to the multi-round answer logic structure.

5. A subject interactive question-answering teaching assistant agent based on a large model, characterized in that: include: Establish modules for building subject knowledge base; A determination module, used for determining knowledge fragments from the subject knowledge base based on a retrieval enhancement algorithm; The knowledge fragments serve as context information for the large model; A design module, used for designing prompt words of an implicit interaction process based on the subject knowledge base; The hint words of the implicit interaction process include the solution background of the large model, the logical structure of multiple rounds of solutions, and the content and format requirements of each round of solutions; The result module is used to input the knowledge fragments and the prompt words of the implicit interaction process into the pre-trained large model to obtain the subject interaction question and answer results output by the large model.

6. The subject interactive question-answering teaching assistant agent based on a large model according to claim 5 is characterized in that: The establishment module includes an extraction module, a segmentation module and a prompt module; The extraction module is used to extract information from subject materials to obtain subject information; The segmentation module is used to segment the subject information to obtain segmentation data; The prompt module is used to guide the large language model to generate the subject knowledge base based on the segmented data by using a prompt engineering method.

7. The subject interactive question-answering teaching assistant agent based on a large model according to claim 5 is characterized in that: The determination module includes a retrieval module and a generation module; The retrieval module is used to retrieve the most matching text segment from the subject knowledge base according to the current question; The generation module is used to generate the knowledge fragment for answering the current question based on the current question and the text fragment.

8. The subject interactive question-answering teaching assistant agent based on a large model according to any one of claims 5 to 7, characterized in that: The design module includes a background module, a regulation module, a logic module and a content module; The background module is used to determine the solution background of the large model based on the subject knowledge base and the current problem; The regulation module is used to stipulate that the large model should master the knowledge of the subject knowledge base and the format requirements when answering the current question, and answer the current question as a teaching assistant; The logic module is used to divide the multi-round answer logic structure into a first answer mode, a second answer mode and a third answer mode; the first answer mode is used to provide a preliminary idea for answering the current question; the second answer mode is used to provide a partial idea for answering the current question; The third answer mode is used to provide all the ideas for answering the current question; The content module is used to determine the content of each round of answers according to the multi-round answer logic structure.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements the subject interactive question-answering method based on a large model as described in any one of claims 1 to 4.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the subject interactive question-answering method based on a large model as described in any one of claims 1 to 4 is implemented.

Citation Information

Cited By

  • Call-out management method and device based on large language model, electronic equipment, storage medium and computer product

    CN120067247A

  • Interactive teaching assisting method and device based on controllable intelligent agent

    CN120104279A

  • Intelligent teaching assisting system base LLM training method for well drilling simulator

    CN121414554A

  • Education large model method and system integrating retrieval enhancement and efficient fine tuning

    CN122047404A