Electronic explanation method and electronic explanation device
By analyzing user problems, extracting key information and retrieving and explaining knowledge, generating content with large language models, and fine-tuning the model through user feedback, the large language model solves the problem of inaccurate answers in the vertical content field, improving the accuracy of the answer and the user's answers Experience.
Patent Information
- Application Number
- CN202411004251.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-22
AI Technical Summary
The question-and-answer system based on the large language model has insufficient accuracy in the vertical content field and cannot effectively answer users' accurate content questions, which affects the accuracy of the application.
By receiving user questions, analyzing the intent to ask questions, extracting key information, retrieving corresponding explanation knowledge, and inputting it into a large language model to generate targeted explanation content. At the same time, fine-tuning the model through user feedback to improve the accuracy of the answers.
It realizes providing accurate answers in the vertical content field, avoids inaccurate answers caused by the limitations and probability of training content, and improves user experience.
Smart Images

Figure CN119003716A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of explanation equipment, and in particular to an electronic explanation method and an electronic explanation device. Background Art
[0002] Nowadays, electronic explanation systems have been widely used in museum visits, exhibition visits and scenic spot tours. Taking the museum visit field as an example, the traditional electronic explanation system has become a key tool for tourists to enhance their visiting experience. The electronic explanation system usually records the explanation voice of the museum's cultural relics in advance, and triggers the explanation voice playback in a certain way next to the cultural relics exhibits to provide voice explanation services for visiting tourists. However, there are still some shortcomings in the actual application of the current electronic explanation system, such as single answer content, inability to continue to ask questions, and lack of interactivity.
[0003] To this end, with the development of artificial intelligence technology, question-answering systems based on large language models have received widespread attention and have been widely used in recent years. Question-answering systems can understand questions asked by users in text language and generate concise and clear answers. Large language models are usually trained with a large amount of text content, and provide answers to users based on the knowledge obtained from the training results. However, due to the limitations of the training content and the probabilistic nature of the model's answer results, it often fails to answer questions with accurate content in vertical content fields (such as museum visits and exhibition visits), affecting the accuracy of its application in vertical content fields. Summary of the invention
[0004] The present invention provides an electronic explanation method and an electronic explanation device, which are used to solve the problem of insufficient accuracy of a question-answering system based on a large language model in the prior art in the vertical content field.
[0005] In order to solve the above technical problems, in a first aspect, the present invention provides an electronic explanation method, comprising:
[0006] Receive target questions raised by users;
[0007] Analyze the question intention of the target question and determine the question intention category corresponding to the question intention;
[0008] Extracting key question information corresponding to the question intention category in the target question;
[0009] Retrieve the explanation knowledge corresponding to the key information of the question;
[0010] The target question and the corresponding explanation knowledge are input into a large language model, and the explanation content for the target question is output to the user through the large language model.
[0011] Optionally, the retrieving the explanation knowledge corresponding to the key information of the question includes:
[0012] Determine a target retrieval library corresponding to the question intention category;
[0013] In the target search library, the explanation knowledge corresponding to the key information of the question is searched.
[0014] Optionally, inputting the target question and the corresponding explanation knowledge into a large language model, and outputting explanation content for the target question to the user through the large language model, comprises:
[0015] The target question, the explanation knowledge and the explanation rules preset by the large language model are input into the large language model, and the explanation content is output to the user through the large language model.
[0016] Optionally, inputting the target question and the corresponding explanation knowledge into a large language model, and outputting explanation content for the target question to the user through the large language model, comprises:
[0017] The target question, the explanation knowledge, the explanation rules and the historical dialogue between the user and the large language model are input into the large language model, and the explanation content is output to the user through the large language model.
[0018] Optionally, after outputting explanation content for the target question to the user through the large language model, the method further includes:
[0019] In the dialogue between the user and the large language model, select a target dialogue whose preset evaluation index is greater than a preset value;
[0020] The target dialogue is annotated and input into the large language model as a new training set;
[0021] Performing training and fine-tuning on the large language model using the newly added training set;
[0022] During the fine-tuning process, monitoring the output of the large language model;
[0023] It is determined whether the output result meets the expected result. If so, positive feedback is given to the output of the large language model. Otherwise, negative feedback is given to the output of the large language model.
[0024] Optionally, after retrieving the explanation knowledge corresponding to the question key information and before inputting the target question and the corresponding explanation knowledge into the large language model, the method further includes:
[0025] Respectively extracting the first key information of the target question and the second key information of the explained knowledge;
[0026] Determining similarities between the first key information and a plurality of the second key information;
[0027] When the similarity is higher than a first preset threshold, the explanation knowledge corresponding to the second key information is determined as the explanation knowledge corresponding to the target question.
[0028] Optionally, after analyzing the question intention of the target question and determining the question intention category corresponding to the question intention, and before extracting the question key information corresponding to the question intention category in the target question, the method further includes:
[0029] Pre-storing high-frequency questions and explanation knowledge corresponding to the high-frequency questions in the local terminal device, wherein the high-frequency questions are questions asked by users more than a second preset threshold number of times;
[0030] Determine whether the question intention category of the target question is to explain the high-frequency question. If so, call the explanation knowledge corresponding to the target question in the local terminal device and output it to the user.
[0031] Optionally, extracting the key question information corresponding to the question intention category in the target question includes:
[0032] When the question intention category is entity attribute explanation, the target entity and the target attribute of the target entity are extracted from the target question.
[0033] Optionally, determining a target retrieval library corresponding to the question intention category includes:
[0034] When the question intention category is entity explanation or entity attribute explanation, determining that the target search library corresponding to the question intention category is an entity search library, wherein the entity search library pre-stores entity information and attribute information of the entity information;
[0035] When the question intention category is common sense explanation or daily interaction, it is determined that the target retrieval library corresponding to the question intention category is a knowledge retrieval library or a search engine.
[0036] In a second aspect, the present invention provides an electronic teaching device, comprising:
[0037] A receiving module, used for receiving a target question raised by a user;
[0038] An analysis module, used to analyze the question intention of the target question and determine the question intention category corresponding to the question intention;
[0039] An extraction module, used to extract key question information corresponding to the question intention category in the target question;
[0040] A retrieval module, used to retrieve the explanation knowledge corresponding to the key information of the question;
[0041] The output module is used to input the target question and the corresponding explanation knowledge into the large language model, and output the explanation content for the target question to the user through the large language model.
[0042] Compared with the prior art, the electronic explanation method provided by the present invention has the following beneficial effects:
[0043] The present invention analyzes the question intention of the target question raised by the user, and further extracts the key information of the question from the target question according to the question intention category corresponding to the question intention, so as to accurately obtain the user's question intention in the vertical content field. In this way, when the present invention further retrieves the corresponding explanation knowledge based on the question key information, it can obtain the accurate answer corresponding to the user's question intention in the vertical content field. In this way, when the target question and the corresponding explanation knowledge are input into the large language model to obtain the explanation content for the target question, it can avoid the problem of insufficient accuracy of the large language model in the vertical content field due to the limitations of the training content and the probabilistic nature of the model's answer results when it needs to be trained with a large amount of text content. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only part of the embodiments of the present invention, rather than all of the embodiments. For ordinary technicians in this field, without paying creative work, other drawings obtained based on these drawings all fall within the scope of protection of this application.
[0045] Figure 1 is a flow chart of an electronic explanation method provided by an embodiment of the present invention;
[0046] Figure 2 is a flow chart of another electronic explanation method provided by an embodiment of the present invention;
[0047] Figure 3 is a structural diagram of a local terminal device provided by an embodiment of the present invention;
[0048] Figure 4 is a schematic diagram of an electronic explanation system provided by an embodiment of the present invention;
[0049] Figure 5 It is a structural schematic diagram of an electronic explanation device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0051] In order to make the description of the disclosed content more detailed and complete, the following is an illustrative description of the implementation mode and specific examples of the present invention; however, this is not the only form of implementing or applying the specific embodiments of the present invention. The implementation mode covers the features of multiple specific embodiments and the method steps and their sequence for constructing and operating these specific embodiments. However, other specific embodiments can also be used to achieve the same or equal functions and step sequences. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.
[0053] In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two, and other quantifiers are similar and should be understood. The preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention. In addition, the embodiments of the present application and the features therein may be combined with each other if there is no conflict.
[0054] like Figure 1 The flowchart of an electronic explanation method provided by an embodiment of the present invention includes the following steps.
[0055] Step S101, receiving a target question raised by a user.
[0056] It should be noted that the target question raised by the user can be a question raised actively or passively;
[0057] For example, when users visit scenic spots and museums, they can actively ask questions through the explanation terminal device when they want to ask questions.
[0058] When the user passively asks questions, the questions can be passively asked according to the surrounding environment, according to the time strategy, or according to the event strategy. For example, when the user passively asks questions according to the surrounding environment, the user's current location can be determined by the positioning device. When the user is near a scenic spot, the user can be helped to ask the question "explain the scenic spot". When the user is near an exhibit in the museum, the radio frequency signal emitted near the exhibit can also be used to determine whether the user is near an exhibit in the museum. If so, the user can be helped to ask the question "explain the exhibit"; when the user passively asks questions according to the time strategy, the user's question time can be judged. If the user has not asked a question after the preset time has passed since the explanation terminal device was started, the user can be helped to ask the question "please explain the instructions for use" etc.; when the user passively asks questions according to the event strategy, when the user's question about a certain exhibit is answered, and the user does not ask further questions within the preset time, the user can be helped to ask more questions about the exhibit.
[0059] It should be noted that in this step, there is no specific limitation on the way in which the user asks questions, and it can be any feasible way of asking questions, for example, the user can ask questions in text, voice, video or picture, etc.
[0060] It should be noted that in this step, the form of the questions received by the user is not specifically limited. For example, the questions received by the user can be in the form of text, voice, automatically triggered system instructions, pictures or videos, etc.
[0061] Step S102, analyzing the question intention of the target question, and determining the question intention category corresponding to the question intention.
[0062] It should be noted that the method of analyzing the question intention of the target question can be any feasible method. For example, the target question raised by the user can be converted into natural language text and input into the large language model for judgment, or the user's target question can be input into the multimodal large model for judgment in the original input form, or the user's target question can be converted into natural language text and judged by the keywords obtained from the natural language text. It is also possible to make a comprehensive judgment in the above three ways according to the priority.
[0063] It should be noted that the question intent category corresponding to the question intent can be defined according to the specific needs of the application. For example, if the user's question intent is to obtain specific information about a certain entity, the question intent category corresponding to the question intent can be entity explanation. As a specific example, the question raised by the user can be what a certain entity (such as Yi Village) is. It can be determined that the question intent of the question is to explain the specific information of the entity (Yi Village), and further the question intent category corresponding to the question intent is entity explanation.
[0064] Step S103, extracting key question information corresponding to the question intention category in the target question.
[0065] It should be noted that the method of extracting the key question information corresponding to the question intention category in the target question can be any feasible method, for example, the key question information can be extracted through a large language model obtained through training, or the key question information can be extracted using a word segmentation tool, or the question intention of the question raised by the user can be analyzed through semantic recognition technology and information extraction technology, and the key information in the target question can be extracted, which can include the question intention of the target question and the key question information corresponding to the question intention.
[0066] It should be noted that the key question information corresponding to the question intention category is the key element that must be possessed to realize the user's question intention. For example, the user's question intention category is entity explanation, then the key question information corresponding to the question diagram category is the entity. As a specific example, the question raised by the user may be what a certain entity (such as Yi village) is. It can be judged that the question intention of this question is to explain the specific information of the entity (Yi village). Further, the question intention category corresponding to the question intention is entity explanation (Yi village explanation), and the key question information corresponding to this question intention category is the entity (i.e. Yi village).
[0067] Optionally, before this step, the user's target question may be converted into a form that can be understood by a large language model. Usually, the form that can be understood by an ordinary large language model is a natural language text.
[0068] Optionally, when converting the target question into a natural language text form, a recognition model can be used to recognize the natural language text. To this end, the accuracy of the recognition model can be improved. For example, when the original state of the target question is a speech state, the speech recognition model can be trained using speech-text data, and the converted text can be corrected by judging the speech similarity to ensure accuracy. When the original state of the target question is a picture state, the picture recognition model can be trained using a picture data set, and the similarity can be compared by shooting materials from multiple different angles of the entity.
[0069] Of course, if the large language model is a large language model that supports multi-modal input such as voice, pictures, natural language text, and video, there is no need to transform the form of the target problem.
[0070] Step S104, retrieving the explanation knowledge corresponding to the key information of the question.
[0071] It should be noted that the retrieval method for obtaining the explanation knowledge corresponding to the key information of the question can be any feasible method, for example, it can be a preset knowledge base, or a search website, and the preset knowledge base can pre-store the key information of the question and its corresponding explanation knowledge.
[0072] Optionally, after this step, the multiple explanation knowledge corresponding to the retrieved key information of the question may be sorted and screened to filter out the explanation knowledge that is not highly relevant to the key information of the question.
[0073] It is understandable that by screening out explanation knowledge that is not highly relevant to the key information of the question, it is possible to avoid outputting explanation knowledge that is irrelevant to the target question into the large language model, thereby ensuring the accuracy of the explanation content output by the large language model.
[0074] Step S105: input the target question and the corresponding explanation knowledge into a large language model, and output the explanation content for the target question to the user through the large language model.
[0075] It should be noted that a large language model refers to a deep learning text model trained through a large amount of text and predictions. The model has the ability to understand, translate and generate natural language text.
[0076] It can be understood that by inputting the target question and the corresponding explanation knowledge into the large language model, natural language text can be generated through the large language model, thereby enabling natural interactive dialogue with the user.
[0077] Optionally, when the large language model is a conventional large language model, after this step, the explanation content in text form output by the large language model is converted into explanation content in voice form and output to the user.
[0078] Of course, if the large language model is a multimodal large language model, the mode of the output explanation content can be directly set to voice output.
[0079] In the embodiment of the present invention, the question intention of the target question raised by the user is analyzed, and the key question information is further extracted from the target question according to the question intention category corresponding to the question intention, so as to accurately obtain the user's question intention in the vertical content field. In this way, when the embodiment of the present invention further retrieves the corresponding explanation knowledge based on the question key information, it can obtain the accurate answer corresponding to the user's question intention in the vertical content field. In this way, when the target question and the corresponding explanation knowledge are input into the large language model to obtain the explanation content for the target question, it can avoid the problem that the large language model has insufficient accuracy in the vertical content field due to the limitations of the training content and the probabilistic nature of the model's answer results when it needs to be trained with a large amount of text content.
[0080] In an optional implementation, Figure 2 FIG. 1 is a flow chart of another electronic explanation method provided by an embodiment of the present invention, wherein step S104 includes:
[0081] Step S1041, determining a target search library corresponding to the question intention category;
[0082] Step S1042, searching the target search library for explanation knowledge corresponding to the key information of the question.
[0083] It should be noted that the correspondence between the question intention category and the search library in this implementation can be set according to the specific needs of the application;
[0084] It can be understood that by giving each question intention category its own corresponding search library, the search resources can be fully utilized. This can avoid the situation where the explanation knowledge corresponding to all questions is searched in one search library when searching for various questions of users, thereby avoiding reducing the retrieval speed of the explanation knowledge and avoiding the problem of excessive resource occupation caused by excessive search volume.
[0085] In an optional implementation, inputting the target question and the corresponding explanation knowledge into a large language model, and outputting explanation content for the target question to the user through the large language model, includes:
[0086] The target question, the explanation knowledge and the explanation rules preset by the large language model are input into the large language model, and the explanation content is output to the user through the large language model.
[0087] It should be noted that the explanation rules in this implementation are the explanation rules of the explanation content output by the large language model to the user. In this implementation, the explanation rules can be set according to the specific needs at the time of application. As a specific example, the explanation rules can be (1) when outputting the explanation content for the target question, it is necessary to extract the effective content of the provided explanation knowledge, and summarize these effective contents to comprehensively answer the user's target question. (2) During the answering process, do not summarize the different explanation contents, and do not directly give the explanation knowledge and its source. If you need to directly say the content of the explanation knowledge, you can prefix "according to my knowledge" before saying the explanation content, and give the answer directly; if the content of the explanation knowledge is not used, you can give the answer directly. (3) If you encounter a question that the large language model cannot answer, you can directly output to the user "I'm sorry, I can't answer this question for the time being."
[0088] It is understandable that inputting explanation rules into the large language model can enable the large language model to output explanation content according to the needs of designers and users, thereby providing users with a better experience when outputting explanation content to users.
[0089] In an optional implementation, inputting the target question and the corresponding explanation knowledge into a large language model, and outputting explanation content for the target question to the user through the large language model, includes:
[0090] The target question, the explanation knowledge, the explanation rules and the historical dialogue between the user and the large language model are input into the large language model, and the explanation content is output to the user through the large language model.
[0091] It should be noted that, in this implementation, the historical conversation between the user and the large language model is the conversation between the user and the large language model before the current conversation;
[0092] Specifically, after the target question, explanation knowledge, explanation rules and historical dialogues are input into the large language model, the large language model can not only combine the explanation knowledge to form the explanation content for the target question in this dialogue, but also integrate the information in the historical dialogue to form the explanation content for the target question, thereby making the explanation content for the target question output by the large language model more accurate.
[0093] As a specific example, if the user asks the target question "Where was it unearthed" in this conversation, and in the interaction between the user and the large language model, it can be learned from the historical conversations that the user has been asking questions related to the Gilded Knight Shell Storage Vessel, so the large language model can determine that the "he" in the target question in this conversation is "Gilded Knight Shell Storage Vessel", and then can answer questions about the Gilded Knight Shell Storage Vessel. For example, the explanation output by the large language model for the target question can be "The Gilded Knight Shell Storage Vessel was discovered in Tomb No. 10, Shizhaishan, Jinning District, Kunming City. This tomb is located in the Shizhaishan area of Jinning County and was built during the Western Han Dynasty. An important cultural site of the ancient Dian Kingdom. In the tomb, archaeologists discovered many precious bronze artifacts, including the Gilded Knight Shell Storage Vessel. These unearthed cultural relics are of great value for studying the history and culture of the ancient Dian Kingdom. The cultural relics unearthed in this tomb are rich and diverse, showing the social system, cultural level and artistic achievements of the ancient Dian Kingdom. As one of the important cultural relics, the Gilded Knight Shell Storage Vessel shows the gold craftsmanship and carving technology of the ancient Dian Kingdom. Its excavation has enabled us to better understand the society and culture of the ancient Dian Kingdom during this historical period. I hope I can help you with your question. If you have other questions, please continue to ask! "
[0094] In an optional implementation, after outputting explanation content for the target question to the user through the large language model, the method further includes:
[0095] In the dialogue between the user and the large language model, select a target dialogue whose preset evaluation index is greater than a preset value;
[0096] The target dialogue is annotated and input into the large language model as a new training set;
[0097] Performing training and fine-tuning on the large language model using the newly added training set;
[0098] During the fine-tuning process, monitoring the output of the large language model;
[0099] It is determined whether the output result meets the expected result. If so, positive feedback is given to the output of the large language model. Otherwise, negative feedback is given to the output of the large language model.
[0100] It is understandable that since the big language model that outputs explanation content for the target question overcomes the problem of its lack of accuracy in the vertical content field, when the excellent dialogues (i.e., dialogues with preset evaluation indicators greater than preset values) output by the big language model that overcomes the lack of accuracy in the vertical content field are used as new training sets to train the big language model, the trained big language model can be further improved in terms of accuracy in the vertical content field.
[0101] It should be noted that the preset evaluation index and the preset value can be set according to the specific needs of the application. For example, the preset evaluation index can be accuracy, completeness, timeliness, etc.
[0102] It should be noted that the expected results in this implementation can be set according to specific needs of the application, for example, whether the accuracy of the output result meets the requirements, or whether the score of the output result on a specific task meets the requirements.
[0103] In an optional implementation, after retrieving the explanation knowledge corresponding to the question key information and before inputting the target question and the corresponding explanation knowledge into a large language model, the method further includes:
[0104] Respectively extracting the first key information of the target question and the second key information of the explained knowledge;
[0105] Determining similarities between the first key information and a plurality of the second key information;
[0106] When the similarity is higher than a first preset threshold, the explanation knowledge corresponding to the second key information is determined as the explanation knowledge corresponding to the target question.
[0107] It should be noted that the method of extracting the target question and the key information of explaining the knowledge can be any feasible method, such as word segmentation processing, semantic recognition technology, etc.
[0108] It should be noted that the similarity and the first preset threshold in this implementation can be set according to specific needs during application. For example, the similarity can be cosine similarity or semantic similarity.
[0109] It can be understood that in this implementation, when the similarity is higher than the first preset threshold, the explanation knowledge corresponding to the second key information is determined as the explanation knowledge corresponding to the target question, and the explanation knowledge corresponding to the second key information that is not similar enough to the first key information can be screened out, that is, the explanation knowledge that is not related to the target question can be screened out, so that the explanation content finally output by the large language model is accurate enough.
[0110] Optionally, the large language model may also be trained so that the large language model can screen the explanation knowledge that is most relevant to the target question, and process the explanation knowledge to finally output the explanation content.
[0111] In an optional implementation, after retrieving the explanation knowledge corresponding to the question key information and before inputting the target question and the corresponding explanation knowledge into the large language model, the method may further include:
[0112] The target question and explanation knowledge are converted into first vector information and second vector information respectively, and the first vector information and the second vector information are matched through a vector similarity matching model, and the explanation knowledge corresponding to the second vector information with the highest matching degree with the first vector information is used as the explanation knowledge corresponding to the target question.
[0113] In an optional implementation, after analyzing the question intention of the target question and determining the question intention category corresponding to the question intention, and before extracting the question key information corresponding to the question intention category in the target question, the method further includes:
[0114] Pre-storing high-frequency questions and explanation knowledge corresponding to the high-frequency questions in the local terminal device, wherein the high-frequency questions are questions asked by users more than a second preset threshold number of times;
[0115] Determine whether the question intention category of the target question is to explain the high-frequency question. If so, call the explanation knowledge corresponding to the target question in the local terminal device and output it to the user.
[0116] It should be noted that the second preset threshold can be set according to specific needs during application and is not specifically limited here.
[0117] It is understandable that the explanation knowledge corresponding to high-frequency questions is pre-stored in the local terminal device, so that when obtaining the explanation knowledge corresponding to high-frequency questions, it can be obtained directly from the local terminal device, eliminating the process of querying and answering in the middle, thereby improving the speed of answering user questions.
[0118] In an optional implementation, the text answer content output by the large language model can be segmented according to punctuation marks, and each segment can be converted into speech for output in turn.
[0119] It can be understood that, compared with directly converting all text answer contents into voice output, the solution of this implementation method can effectively improve the output efficiency of the large language model for the explanation content.
[0120] In an optional implementation, a conversion module for converting text information into voice information may be provided in the local terminal device.
[0121] In this way, the explanation content output by the large language model can be sent directly to the local terminal device in text form, and the text-based explanation content can be converted into voice-based explanation content through the conversion module in the local terminal device and output to the user, thereby effectively improving the timeliness of the user receiving the explanation content.
[0122] In an optional implementation, extracting the key information of the question corresponding to the question intention category in the target question includes:
[0123] When the question intention category is entity attribute explanation, the target entity and the target attribute of the target entity are extracted from the target question.
[0124] As a specific example, the target question raised by the user may be "When was the ox-tiger bronze case unearthed?" It can be judged that the question intention corresponding to the target question is "Explain the unearth time of the ox-tiger bronze case." The question intention category corresponding to this question intention is entity attribute explanation, where the entity is the ox-tiger bronze case, and the attribute is the unearth time. That is, the key question information corresponding to this question intention category is the ox-tiger bronze case (target entity) and the unearth time (target attribute).
[0125] Optionally, the question intention category can also be common sense explanation and daily interaction, and key question information can be extracted from the target question based on these categories.
[0126] In an optional implementation, determining the target retrieval library corresponding to the question intention category includes:
[0127] When the question intention category is entity explanation or entity attribute explanation, determining that the target search library corresponding to the question intention category is an entity search library, wherein the entity search library pre-stores entity information and attribute information of the entity information;
[0128] When the question intention category is common sense explanation or daily interaction, it is determined that the target retrieval library corresponding to the question intention category is a knowledge retrieval library or a search engine.
[0129] It can be understood that in the entity retrieval library, entity information may have one attribute information or multiple attribute information.
[0130] It should be noted that questions and their corresponding answers are pre-stored in the knowledge retrieval database, and multiple questions may correspond to one answer.
[0131] In an optional implementation, Figure 3 As shown is a structural diagram of a local terminal device provided in an embodiment of the present invention, the local terminal device may include a processor 301, a microphone 302, a button 303, a camera 304, a printed circuit board (PCB) 305, a memory 306, a speaker 307, a global positioning system (GPS) 308 and a radio frequency sensor 309.
[0132] In this implementation, the explanation content and the code program for executing each method step can be stored in the memory, and the processor can further read and run the program through the communication line provided by the PCB to call the microphone through the button status to upload the user's target question, or call the camera to take video and image shots to ask the target question. The radio frequency signal can also be judged by the radio frequency sensor, or the user can be located by GPS to passively help the user ask the target question. When the explanation content sent by the server is received, the speaker can be called to play the target question.
[0133] In an optional implementation, the execution subject of each method step of the embodiment of the present invention may include a server 401, and the server 401 may be a server 401 using an independent host, or a server 401 cluster composed of multiple independent hosts, or a virtual cloud server 401, a smart phone, a tablet computer, a local terminal device 402, etc.;
[0134] It should be noted that if Figure 4 As shown, the server 401 can be connected to at least one local terminal device 402 that can access the network to form an electronic explanation system.
[0135] The user can use the explanation service on the local terminal device 402. For example, the client can provide a method for the user to input explanation questions, such as providing an operation interface for the user to input text. Another example is providing recording capabilities.
[0136] The user can upload information using the local terminal device 402 in a variety of ways. For example, the user can use the operation interface to input text, or use the operation interface to take pictures and videos, or use button interaction to ask voice questions.
[0137] The local terminal device 402 can send the information of the user's question to the server 401, and the server 401 will process the data. After the server 401 processes the data, it will transmit the explanation answer generated by the large language model to the local terminal device 402, and the local terminal device 402 will display the explanation result to the user.
[0138] The user can also use the local terminal device 402 to receive information in a variety of ways, such as viewing the text information returned by the server 401 on the operation interface of the local terminal device 402, or listening to the explanation voice sent by the local terminal device 402 and returned by the server 401, or listening to the explanation voice stored locally in the local terminal device 402, etc.
[0139] Based on the above electronic explanation method, the embodiment of the present invention provides an electronic explanation device, such as Figure 5 As shown, the electronic explanation device includes:
[0140] A receiving module 510 is used to receive a target question raised by a user;
[0141] An analysis module 520 is used to analyze the question intention of the target question and determine the question intention category corresponding to the question intention;
[0142] An extraction module 530 is used to extract the key information of the question corresponding to the question intention category in the target question;
[0143] A retrieval module 540 is used to retrieve the explanation knowledge corresponding to the key information of the question;
[0144] The output module 550 is used to input the target question and the corresponding explanation knowledge into the large language model, and output the explanation content for the target question to the user through the large language model.
[0145] For other details about how the modules in the electronic explanation device implement the above technical solution, please refer to the description of the electronic explanation method provided in the above invention embodiment, which will not be repeated here.
[0146] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0147] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0149] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0150] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium), or a semiconductor medium (e.g., an SSD (solid state disk, solid state hard disk)), etc.
[0151] The technical solution provided by the present application is introduced in detail above. The principles and implementation methods of the present application are explained by using specific examples in the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0152] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) that contain computer-usable program code.
[0153] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0154] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0156] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An electronic explanation method, characterized in that: include: Receive target questions raised by users; Analyze the question intention of the target question and determine the question intention category corresponding to the question intention; Extracting key question information corresponding to the question intention category in the target question; Retrieve the explanation knowledge corresponding to the key information of the question; The target question and the corresponding explanation knowledge are input into a large language model, and the explanation content for the target question is output to the user through the large language model.
2. The electronic explanation method according to claim 1, characterized in that: The retrieving the explanation knowledge corresponding to the key information of the question includes: Determine a target retrieval library corresponding to the question intention category; In the target search library, the explanation knowledge corresponding to the key information of the question is searched.
3. The electronic explanation method according to claim 1, characterized in that: The step of inputting the target question and the corresponding explanation knowledge into a large language model, and outputting explanation content for the target question to the user through the large language model, comprises: The target question, the explanation knowledge and the explanation rules preset by the large language model are input into the large language model, and the explanation content is output to the user through the large language model.
4. The electronic explanation method according to claim 3, characterized in that: The step of inputting the target question and the corresponding explanation knowledge into a large language model, and outputting explanation content for the target question to the user through the large language model, comprises: The target question, the explanation knowledge, the explanation rules and the historical dialogue between the user and the large language model are input into the large language model, and the explanation content is output to the user through the large language model.
5. The electronic explanation method according to claim 1, characterized in that: After outputting explanation content for the target question to the user through the large language model, the method further includes: In the dialogue between the user and the large language model, select a target dialogue whose preset evaluation index is greater than a preset value; The target dialogue is annotated and input into the large language model as a new training set; Performing training and fine-tuning on the large language model using the newly added training set; During the fine-tuning process, monitoring the output of the large language model; It is determined whether the output result meets the expected result. If so, positive feedback is given to the output of the large language model. Otherwise, negative feedback is given to the output of the large language model.
6. The electronic explanation method according to claim 1, characterized in that: After retrieving the explanation knowledge corresponding to the key information of the question and before inputting the target question and the corresponding explanation knowledge into the large language model, the method further includes: Respectively extracting the first key information of the target question and the second key information of the explained knowledge; Determining similarities between the first key information and a plurality of the second key information; When the similarity is higher than a first preset threshold, the explanation knowledge corresponding to the second key information is determined as the explanation knowledge corresponding to the target question.
7. The electronic explanation method according to claim 1, characterized in that: After analyzing the question intention of the target question and determining the question intention category corresponding to the question intention, and before extracting the question key information corresponding to the question intention category in the target question, the method further includes: Pre-storing high-frequency questions and explanation knowledge corresponding to the high-frequency questions in the local terminal device, wherein the high-frequency questions are questions asked by users more than a second preset threshold number of times; Determine whether the question intention category of the target question is to explain the high-frequency question. If so, call the explanation knowledge corresponding to the target question in the local terminal device and output it to the user.
8. The electronic explanation method according to claim 1, characterized in that: The step of extracting key question information corresponding to the question intention category in the target question includes: When the question intention category is entity attribute explanation, the target entity and the target attribute of the target entity are extracted from the target question.
9. The electronic explanation method according to claim 2, characterized in that: The determining of the target retrieval library corresponding to the question intention category includes: When the question intention category is entity explanation or entity attribute explanation, determining that the target search library corresponding to the question intention category is an entity search library, wherein the entity search library pre-stores entity information and attribute information of the entity information; When the question intention category is common sense explanation or daily interaction, it is determined that the target retrieval library corresponding to the question intention category is a knowledge retrieval library or a search engine.
10. An electronic explanation device, characterized in that: include: A receiving module, used for receiving a target question raised by a user; An analysis module, used to analyze the question intention of the target question and determine the question intention category corresponding to the question intention; An extraction module, used to extract key question information corresponding to the question intention category in the target question; A retrieval module, used to retrieve the explanation knowledge corresponding to the key information of the question; The output module is used to input the target question and the corresponding explanation knowledge into the large language model, and output the explanation content for the target question to the user through the large language model.
Citation Information
Patent Citations
Intelligent knowledge explanation system based on large language model
CN117668176A
Domain question-answering system, domain question-answering construction method, electronic equipment and storage medium
CN117909466A
