Intelligent assistant question answering method and device based on large language model, equipment and medium

By saving related questions of historical questions in the cache and performing similarity correction, the problem of inaccurate answers in the cache is solved, and the accuracy and efficiency of the intelligent assistant's question and answer are improved.

CN120705270APending Publication Date: 2025-09-26BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510880036.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing intelligent assistant question-answering technology based on large language models, the answers filtered in the cache are not accurate enough and need to be improved to improve the accuracy of the answers to questions.

Method used

By saving the related questions of the historical questions in the cache and correcting the similarity between the historical questions and the new questions based on the similarity between the related questions and the new questions, the accuracy of the answers obtained by screening is ensured.

Benefits of technology

It improves the accuracy of answers to questions, reduces system pressure, and improves the efficiency of intelligent assistant question and answering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705270A_ABST
    Figure CN120705270A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computer technologies, large model technologies, large language model technologies and artificial intelligence technologies, in particular to an intelligent assistant question answering method and device based on a large language model, equipment and a medium. And generating an associated question for the first historical question. The feature vectors of the first historical question and the associated question are different, so that when the intelligent assistant based on the large language model is used for answering the first question, when the similarity between the first historical question and the first question is not accurate, the first question can be answered based on the similarity between the associated question and the first question; and the similarity between the first historical question and the first question is corrected, so that the accuracy of screening the historical questions can be ensured, and the answer accuracy of the first question can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of computer technology, large model technology, large language model technology and artificial intelligence technology, and in particular to intelligent assistant question-answering methods, devices, equipment and media based on large language models. Background Art

[0002] In some intelligent assistant question-and-answer technologies based on large language models, previously answered questions and their answers are cached to reduce system pressure. When a new question is received, a similarity comparison is performed between the new question and the cached historical questions. If a matching historical question is found in the cache based on the similarity comparison, the cached answer is used as the answer to the new question. This eliminates the need to call the model again to generate answers for new questions, thereby reducing system pressure. However, some answers currently filtered from the cache based on similarity comparisons are not accurate enough and need improvement. Summary of the Invention

[0003] In view of this, the present disclosure provides an intelligent assistant question-answering method, electronic device, computer-readable storage medium, and computer program product based on a large language model, which can improve the accuracy of questions.

[0004] In a first aspect, the present disclosure provides an intelligent assistant question-answering method based on a large language model, the method comprising: Get the first question; Based on a first similarity between the first question and a second question in a cache, screening out a third question that meets the first similarity condition from the second question, the cache being used to store the second question and an answer to the second question, the second question including the first historical question, a question associated with the first historical question, and a second historical question; If the third question includes the associated question, then based on the first similarity between the associated question and the first question, correct the similarity between the first historical question corresponding to the associated question and the first question to obtain a second similarity; If a target question is obtained from the third questions based on the relationship between the second similarity and the second similarity condition, the answer to the target question is used as the answer to the first question; If the target question is not obtained from the third question, the first question is input into the large language model to obtain an answer to the first question.

[0005] In a second aspect, the present disclosure provides an intelligent assistant question-answering device based on a large language model, the device comprising: A question acquisition module, used to acquire a first question; a question search module configured to filter out a third question that meets a first similarity condition from among the second questions based on a first similarity between the first question and a second question in a cache, the cache being configured to store the second question and an answer to the second question, the second question including the first historical question, a question associated with the first historical question, and a second historical question; a similarity correction module configured to correct the similarity between a first historical question corresponding to the associated question and the first question based on the first similarity between the associated question and the first question to obtain a second similarity if the third question includes the associated question; an answer search module, configured to, if a target question is obtained from the third questions based on the relationship between the second similarity and the second similarity condition, use the answer to the target question as the answer to the first question; The question generation module is used to input the first question into the large language model to obtain an answer to the first question if the target question is not screened out from the third question.

[0006] In a third aspect, the present disclosure provides an electronic device comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the above method by executing the computer instructions.

[0007] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the above method.

[0008] In a fifth aspect, the present disclosure provides a computer program product, comprising computer instructions, where the computer instructions are used to enable a computer to execute the above method.

[0009] In the technical solutions of some embodiments of the present disclosure, a first historical question that has been answered by a large language model can be cached, and related questions can be generated for the first historical question. Because the feature vectors of the first historical question and its related questions are different, when an intelligent assistant based on a large language model is used to answer the first question, if the similarity between the first historical question and the first question is not accurate enough, the similarity between the first historical question and the first question can be corrected based on the similarity between the related questions and the first question, thereby ensuring the accuracy of the historical questions screened, and further improving the accuracy of the answer to the first question. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 This is a schematic diagram of the architecture of an intelligent assistant question-answering system based on a large language model in some technologies; Figure 2 is a flowchart of an intelligent assistant question-answering method based on a large language model provided by some embodiments of the present disclosure; Figure 3 This is a schematic diagram of the distribution of the eigenvectors of the first historical question and its related questions in the eigenvector space; Figure 4 1 is a schematic diagram of the architecture of an intelligent assistant question-answering system based on a large language model provided by some embodiments of the present disclosure; Figure 5 1 is a module diagram of an intelligent assistant question-answering device based on a large language model provided by some embodiments of the present disclosure; Figure 6 It is a structural diagram of an electronic device provided by some embodiments of the present disclosure. DETAILED DESCRIPTION

[0012] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present disclosure.

[0013] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0014] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below.

[0015] Herein, unless explicitly stated otherwise, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.

[0016] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0017] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the type, scope of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and authorization should be obtained from relevant users in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.

[0018] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to the software or hardware such as the electronic device, application, server or storage medium that executes the operation of the technical solution of the present disclosure based on the prompt message.

[0019] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, a prompt message may be sent to the relevant user in the form of a pop-up window, in which the prompt message may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.

[0020] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0021] An intelligent assistant is an auxiliary tool or system based on artificial intelligence technology that can understand questions entered by users in natural language, retrieve answers from the knowledge base, and return the answers to the users. Figure 1, which is a schematic diagram of the architecture of an intelligent assistant question-answering system based on a large language model in some technologies. Figure 1 In this example, the language model receives questions from the application service, generates answers to the questions, and then returns the answers to the application service. A cache is set up between the language model and the application service. The cache includes a vector database and a text database. The vector database stores feature vectors of answered historical questions, while the text database stores the text data of answered historical questions, the text data of the answers, and the associations between historical questions and answers. The feature vectors in the vector database are associated with the text data (i.e., historical questions) in the text database.

[0022] based on Figure 1 In the illustrated architecture, upon receiving a new question from an application service, the cosine similarity between the first feature vector of the new question and each second feature vector in the vector database can be determined. Based on the cosine similarity, a first similarity score between the first feature vector and the second feature vector can be determined. After sorting the first similarity scores from high to low, the first N second feature vectors can be used as target second feature vectors, and the historical questions associated with the target second feature vectors can be used as the first target historical questions that meet the first similarity condition with the new question.

[0023] Each first target historical question and the new question are formed into a question pair, and all question pairs are input into the re-ranking model. The re-ranking model can re-output a second similarity score for each first target historical question and the new question based on the global features of each first target historical question and the new question. The second similarity score can be different from the first similarity score.

[0024] Based on the second similarity score, if a second target historical question is found in the first target historical question and has a second similarity score exceeding a similarity threshold with the new question, the answer associated with the second target historical question in the cache may be used as the answer to the new question, and the answer to the new question may be returned to the application service. If multiple second target historical questions are found, the second target historical question with the greatest second similarity score with the new question may be found among the multiple second target historical questions, and the answer associated with the corresponding second target historical question may be used as the answer to the new question.

[0025] If a second target historical question with a second similarity score exceeding the similarity threshold with the new question is not found in the first target historical question, the new question is input into the language model to obtain the answer to the new question, and the answer to the new question is returned to the application service. At the same time, a feature vector for the new question is generated, and the feature vector of the new question is saved in the vector database, and the text data of the new question and the answer is saved in the text database, and a corresponding association relationship is established. In this way, when a new question is received again, or a question similar to the new question is received, the cached answer can be returned without calling the language model to generate the answer, thereby reducing the pressure on the system.

[0026] For ease of understanding, the following is explained by way of example: For example, it is assumed that the cache database stores the historical questions and their answers shown in Table 1.

[0027] Table 1 Historical issues

[0028] At this time, suppose a new question is received: "How many emperors were there in the Tang Dynasty?" Through similarity calculation, the first similarity scores of the new question "How many emperors were there in the Tang Dynasty?" and various historical questions can be shown in Table 2.

[0029] Table 2 First similarity score

[0030] The five historical questions with the highest first similarity scores are taken as the first target historical questions, as shown in Table 3.

[0031] Table 3. First target historical issues

[0032] Assuming that the similarity threshold is 0.75, the three first target historical questions shown in Table 4 can be screened from Table 3.

[0033] Table 4 Second target historical questions

[0034] Using the re-ranking model, the similarity between each first target historical question and the new question in Table 3 is calculated again to obtain the second similarity score of each first target historical question and the new question. After sorting by the second similarity score, the re-ranking results are shown in Table 5.

[0035] Table 5 Re-ranking results

[0036] Finally, the answer to the first target historical question "How many emperors were there in the history of the Tang Dynasty?" can be used as the answer to the new question and returned to the application service.

[0037] The answers determined based on the above method are not accurate enough. For example, if the new question is “Please introduce apple fruit”, the above method only selects one second target history question, as shown in Table 6.

[0038] Table 6 Second target historical questions

[0039] In this case, since there are no other secondary target history questions, only the answer to the secondary target history question "Please introduce Apple" will be returned. Obviously, this is incorrect.

[0040] In view of this, the present disclosure provides an intelligent assistant question-answering method based on a large language model, which can solve the above problems and thus improve the accuracy of questions. The intelligent assistant question-answering method can be applied to electronic devices. The electronic devices may include but are not limited to tablet computers, laptop computers, desktop computers, servers, etc. Figure 2 , which is a flow chart of the intelligent assistant question-answering method provided in some embodiments of the present disclosure. Figure 2 In the intelligent assistant question-answering method, the steps include: Step S201: Obtain the first question.

[0041] Specifically, the first question can be Figure 1 The question may be sent by the application service in the application service, or may be a question input by the user. The present disclosure does not limit this.

[0042] Step S202: Based on the first similarity between the first question and the second question in the cache, a third question that meets the first similarity condition is screened out from the second question. The cache is used to store the second question and the answer to the second question. The second question includes the first historical question, the related question of the first historical question, and the second historical question.

[0043] Specifically, related questions can be understood as questions that have similar semantics to historical questions but are expressed differently. When historical questions are saved in the cache, related questions can be rewritten based on the historical questions. For example, if the historical question "How many emperors were there in the history of the Qing Dynasty?" is saved in the cache, it can be input into the language model and rewritten to a related question "How many emperors were there in the history of the Qing Dynasty?" Related questions of historical questions can be saved in the cache along with the historical questions, and a relationship can be established between the historical questions and related questions.

[0044] The first historical question may refer to a historical question with associated questions, and the second historical question may refer to a historical question without associated questions. Each first historical question may have one or more associated questions. For example, assuming the first historical question "Please introduce Apple" has three associated questions, the association relationship between the first historical question and its associated questions can be shown in Table 7.

[0045] Table 7 The relationship between the first historical question and its related questions

[0046] It is understandable that, since the first historical question and its related questions have different sentence expressions, the feature vectors of the first historical question and its related questions may be different. Figure 3 , is a schematic diagram of the distribution of the eigenvectors of the first historical question and its related questions in the eigenvector space. Figure 3 It can be seen that the first historical question "Please introduce Apple" and its related questions "Can you introduce Apple", "Can you briefly introduce Apple" and "Please share some information about Apple" are located in different positions in the feature vector space. Among them, the first historical question "Please introduce Apple" and the question "Please introduce apple fruit" are relatively close, and the related question of the first historical question "Please share some information about Apple" and the question "Please introduce apple fruit" are relatively far apart.

[0047] In this embodiment, based on the first similarity between the first question and the second questions in the cache, the second questions in the cache can be sorted in descending order of the first similarity, and the first N second questions can be used as the third question. The found third question can include the first historical question, the second historical question, and the relevance of the first historical question, or can include only the relevance of the first historical question, the second historical question but not the first historical question, or can include only the second historical question, etc.

[0048] Step S203: If the third question includes an associated question, based on the first similarity between the associated question and the first question, the similarity between the first historical question corresponding to the associated question and the first question is corrected to obtain a second similarity.

[0049] For example, assume that the first similarity between the third question found and the first question is as shown in Table 8.

[0050] Table 8 The third question

[0051] Among them, the questions "Can you introduce Apple?", "Please share some information about Apple," and "Please provide some information about Apple" are related questions to the question "Please introduce Apple." The question "How many emperors were there in the history of the Tang Dynasty?" is a secondary historical question and is therefore not a related question. Categorizing the questions in Table 7 yields Table 8.

[0052] Table 9 Classification of the third question

[0053] In this embodiment, if the third question includes the first historical question corresponding to the associated question, a statistical analysis is performed on the first similarity between the first historical question and the first question, and the first similarity between the associated question and the first question to obtain a second similarity. Specifically, as shown in Table 8, the first similarity between the first historical question and the first question, and the first similarity between the associated question and the first question can be averaged to obtain the second similarity between the first historical question and the first question. Of course, the maximum value, minimum value, etc. can also be taken from the first similarity between the first historical question and the first question, and the first similarity between the associated question and the first question, or a weighted fusion calculation can be performed on the first similarity between the first historical question and the first question, and the first similarity between the associated question and the first question to obtain the second similarity between the first historical question and the first question. This disclosure does not impose any restrictions on this.

[0054] If the third question does not include the first historical question corresponding to the associated question, a statistical analysis is performed on the first similarity between the associated question and the first question to obtain a second similarity. The statistical analysis process is similar to the above and will not be repeated here.

[0055] In step S204 , if a target question is obtained from the third questions based on the relationship between the second similarity and the second similarity condition, the answer to the target question is used as the answer to the first question.

[0056] Specifically, the second similarity condition can be that the second similarity between the first historical question corresponding to the associated question in the third question and the first question is greater than the first similarity threshold, and the first similarity between the second historical question in the third question and the first question is greater than the second similarity threshold, where the first similarity threshold is less than the second similarity threshold. This is understandable because the second similarity between the first historical question corresponding to the associated question in the third question and the first question is corrected, so the threshold can be relatively low, but the first similarity between the second historical question in the third question and the first question is uncorrected, so the threshold can be relatively high.

[0057] See also Figure 3It can be understood that since the feature vectors of the first historical question and its associated question are different, when the feature vectors of the first historical question and the first question are relatively close, the feature vectors of its associated question and the first question may be relatively far, thereby reducing the similarity between the first historical question and the first question and avoiding the problem of historical question screening errors in some technologies.

[0058] In this embodiment, if there are multiple targets, each target question is combined with the first question to form a question pair, thus obtaining multiple question pairs; the multiple question pairs are input into the ranking model to obtain a similarity ranking between each target question and the first question; based on the similarity ranking, the answer to the target question with the greatest similarity to the first question is used as the answer to the first question. This process is similar to Figure 1 The process is similar and will not be described here.

[0059] In step S205 , if the target question is not obtained from the third question, the first question is input into the large language model to obtain an answer to the first question.

[0060] In some embodiments, after inputting the first question into the large language model and obtaining the answer to the first question, the large language model can write the first question and the answer to the first question into the cache. At the same time, the first question is rewritten to obtain at least one rewritten question of the first question; the rewritten question of the first question is written into the cache, and an association relationship between the first question and the rewritten question is established. This process is similar to Figure 1 Similar, I won’t go into details here.

[0061] Specifically, after rewriting the first question to obtain at least one rewritten question, the first question can be input into the rewriting model to obtain at least one candidate rewritten question for the first question. If the similarity between the candidate rewritten question and the first question exceeds a similarity threshold, the candidate rewritten question is used as the rewritten question for the first question. This ensures that the first question and the associated question have similar semantics.

[0062] To sum up, in the technical solutions of some embodiments of the present disclosure, by saving the associated questions of historical questions in the cache, since the feature vectors of the first historical question and its associated questions are different, when the similarity between the first historical question and the first question is not accurate enough, the similarity between the first historical question and the first question can be corrected based on the similarity between the associated question and the first question, thereby ensuring the accuracy of the historical questions screened, and further improving the accuracy of the answers to the questions.

[0063] See also Figure 4 , which is a schematic diagram of the architecture of an intelligent assistant question-answering system based on a large language model provided in some embodiments of the present disclosure. Figure 4 and Figure 1It is basically similar, except that a statement rewriting module is added. The relevant principles will not be repeated here.

[0064] See also Figure 5 , which is a module diagram of an intelligent assistant question-answering device based on a large language model provided in some embodiments of the present disclosure. Figure 5 In the intelligent assistant question-answering device, the intelligent assistant question-answering device includes: The question acquisition module 501 is used to acquire a first question.

[0065] The question search module 502 is used to filter out a third question that meets the first similarity condition from the second question based on the first similarity between the first question and the second question in the cache. The cache is used to store the second question and the answer to the second question. The second question includes the first historical question, the related question of the first historical question and the second historical question.

[0066] A similarity correction module 503 is configured to correct the similarity between the first historical question corresponding to the associated question and the first question based on the first similarity between the associated question and the first question to obtain a second similarity if the third question includes an associated question; The answer search module 504 is configured to use the answer to the target question as the answer to the first question if a target question is obtained from the third questions based on the relationship between the second similarity and the second similarity condition.

[0067] The question generation module 505 is configured to input the first question into the large language model to obtain an answer to the first question if the target question is not obtained from the third questions.

[0068] In some embodiments, the second similarity condition includes: The second similarity between the first historical question corresponding to the associated question in the third question and the first question is greater than the first similarity threshold, and the first similarity between the second historical question in the third question and the first question is greater than the second similarity threshold, wherein the first similarity threshold is less than the second similarity threshold.

[0069] In some embodiments, the answer search module 504 is specifically configured to: If there are multiple target questions, each target question is combined with the first question to form a question pair, thereby obtaining multiple question pairs; Input multiple question pairs into the ranking model to obtain the similarity ranking between each target question and the first question; According to the similarity sorting, the answer to the target question with the greatest similarity to the first question is taken as the answer to the first question.

[0070] In some embodiments, the similarity correction module 503 is specifically configured to: If the third question includes the first historical question corresponding to the associated question, statistically analyzing the first similarity between the first historical question and the first question, and the first similarity between the associated question and the first question to obtain a second similarity; If the third question does not include the first historical question corresponding to the associated question, a statistical analysis is performed on the first similarity between the associated question and the first question to obtain a second similarity.

[0071] In some embodiments, after inputting the first question into the large language model and obtaining the answer to the first question, the question search module 502 is further configured to: The large language model writes the first question and the answer to the first question into the cache.

[0072] In some embodiments, the problem finding module 502 is further configured to: Rewrite the first question to obtain at least one rewritten question of the first question; The rewritten question of the first question is written into the cache, and an association relationship between the first question and the rewritten question is established.

[0073] In some embodiments, the problem finding module 502 is further configured to: Inputting the first question into the rewriting model to obtain at least one alternative rewriting question for the first question; If the similarity between the candidate rewritten question and the first question is greater than a similarity threshold, the candidate rewritten question is used as the rewritten question of the first question.

[0074] The configuration device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0075] The intelligent assistant question-answering device based on a large language model disclosed in the present invention has the same beneficial effects as the above-mentioned intelligent assistant question-answering method based on a large language model, which will not be repeated here.

[0076] The present disclosure also provides an electronic device having the above Figure 5 The intelligent assistant question-answering device based on a large language model is shown.

[0077] See also Figure 6 , is a schematic diagram of the structure of an electronic device provided by some embodiments of the present disclosure. Figure 6As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0078] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0079] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0080] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0081] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0082] The electronic device further includes a communication interface 30 for the electronic device to communicate with other devices or a communication network.

[0083] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0084] A portion of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes but is not limited to a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0085] Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. An intelligent assistant question-answering method based on a large language model, characterized in that: The method comprises: Get the first question; Based on a first similarity between the first question and a second question in a cache, screening out a third question that meets the first similarity condition from the second question, the cache being used to store the second question and an answer to the second question, the second question including the first historical question, a question associated with the first historical question, and a second historical question; If the third question includes the associated question, then based on the first similarity between the associated question and the first question, correct the similarity between the first historical question corresponding to the associated question and the first question to obtain a second similarity; If a target question is obtained from the third questions based on the relationship between the second similarity and the second similarity condition, the answer to the target question is used as the answer to the first question; If the target question is not obtained from the third question, the first question is input into the large language model to obtain an answer to the first question.

2. The method according to claim 1, characterized in that The second similarity condition includes: The second similarity between the first historical question corresponding to the associated question in the third question and the first question is greater than the first similarity threshold, and the first similarity between the second historical question in the third question and the first question is greater than the second similarity threshold, wherein the first similarity threshold is less than the second similarity threshold.

3. The method according to claim 1 or 2, characterized in that The step of using the answer to the target question as the answer to the first question includes: If there are multiple target questions, each target question is combined with the first question to form a question pair, thereby obtaining multiple question pairs; Inputting the plurality of question pairs into a ranking model to obtain a similarity ranking between each of the target questions and the first question; According to the similarity sorting, the answer to the target question having the greatest similarity to the first question is used as the answer to the first question.

4. The method according to claim 1, wherein If the third question includes the associated question, then based on the first similarity between the associated question and the first question, the similarity between the first historical question corresponding to the associated question and the first question is corrected to obtain a second similarity, including: If the third question includes a first historical question corresponding to the associated question, performing statistical analysis on a first similarity between the first historical question and the first question, and a first similarity between the associated question and the first question, to obtain a second similarity; If the third question does not include the first historical question corresponding to the associated question, a statistical analysis is performed on the first similarity between the associated question and the first question to obtain the second similarity.

5. The method according to claim 1, wherein After inputting the first question into the large language model and obtaining an answer to the first question, the method further includes: The large language model writes the first question and the answer to the first question into the cache.

6. The method according to claim 5, characterized in that The method further comprises: Rewriting the first question to obtain at least one rewritten question of the first question; The rewritten question of the first question is written into the cache, and an association relationship between the first question and the rewritten question is established.

7. The method according to claim 6, characterized in that The step of rewriting the first question to obtain at least one rewritten question of the first question includes: Inputting the first question into a rewriting model to obtain at least one alternative rewriting question for the first question; If the similarity between the candidate rewritten question and the first question is greater than a similarity threshold, the candidate rewritten question is used as the rewritten question of the first question.

8. An intelligent assistant question-answering device based on a large language model, characterized in that: The device comprises: A question acquisition module, used for acquiring a first question; a question search module configured to filter out a third question that meets a first similarity condition from among the second questions based on a first similarity between the first question and a second question in a cache, the cache being configured to store the second question and an answer to the second question, the second question including the first historical question, a question associated with the first historical question, and a second historical question; a similarity correction module configured to correct the similarity between a first historical question corresponding to the associated question and the first question based on the first similarity between the associated question and the first question to obtain a second similarity if the third question includes the associated question; an answer search module, configured to, if a target question is obtained from the third questions based on the relationship between the second similarity and the second similarity condition, use the answer to the target question as the answer to the first question; The question generation module is used to input the first question into the large language model to obtain an answer to the first question if the target question is not screened out from the third question.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the intelligent assistant question-answering method based on a large language model according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the intelligent assistant question-answering method based on a large language model as described in any one of claims 1 to 7.

11. A computer program product, characterized in that It includes computer instructions, which are used to enable a computer to execute the intelligent assistant question-answering method based on a large language model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information searching method for discovering and clustering sub-topics of query statement

    CN102419778A

  • Intelligent interaction method and device and storage medium

    CN107609101A

  • Question and answer data processing method and system, electronic equipment and storage medium

    CN117786060A

  • Question and answer method, text matching model obtaining method and device, electronic equipment and storage medium

    CN118227759A

  • ABI question and answer method and system for aligning large model with database

    CN119760106A