Multi-round knowledge question and answer intention recognition method and system based on large language model
Through a multi-round knowledge question and answer intent recognition method based on a large language model, the existing technology problem of difficulty in identifying user intent and matching knowledge bases in complex business scenarios is solved, achieving an in-depth understanding and accurate identification of user needs, and providing Precise business services.
Patent Information
- Application Number
- CN202410667922.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-10-18
AI Technical Summary
It is difficult for existing knowledge question and answer systems to accurately identify user intentions and match corresponding knowledge bases in complex business scenarios, resulting in insufficient service accuracy.
Using a multi-round knowledge question and answer intent recognition method based on a large language model, by analyzing the semantics and keywords of the user input content, it determines the relevance of the session and the business scenario, identifies the user intent and matches the knowledge base, and calls relevant tools for business processing , to generate the final answer or solution.
It achieves an in-depth understanding and accurate identification of user needs, provides accurate business services, can track demand changes and call relevant tools to perform tasks, improving service accuracy.
Smart Images

Figure CN118796995A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of knowledge question answering, and in particular to a method and system for identifying multi-round knowledge question answering intentions based on a large language model. Background Art
[0002] With the rapid development of artificial intelligence technology, large language models have become an important tool in the field of natural language processing. Through deep learning technology, large language models can understand and generate natural language and play a key role in knowledge question-answering systems.
[0003] However, existing knowledge question answering systems still have certain limitations in processing user intent recognition and meeting user needs. Especially in complex business scenarios, it is often difficult for the system to accurately identify user intent, match the corresponding knowledge base according to business needs, and provide accurate services. Therefore, how to improve the intent recognition capability and service accuracy of multi-round knowledge question answering systems has become an urgent problem to be solved in this field. Summary of the invention
[0004] In view of this, it is necessary to provide a multi-round knowledge question and answer intention recognition method based on a large language model to solve the above-mentioned defects of the prior art.
[0005] In order to solve the above problems, in a first aspect, an embodiment of the present invention provides a multi-round knowledge question-answering intention recognition method based on a large language model, comprising:
[0006] S01, judging whether the current session is related to the business scenario based on the user input content, and if so, performing user intent recognition; if not, entering the business guidance questioning to guide the user to handle the business;
[0007] S02, according to the user intention recognition result, matching the knowledge base of the corresponding business to search, and calling the corresponding tool to process the business;
[0008] S03, judging whether further dialogue is needed according to the business processing result, and if so, generating guiding questions;
[0009] S04, based on the retrieved knowledge base information and user intent, a large language model is used to generate the final answer or solution.
[0010] Preferably, in step S01, determining whether the current session is related to the business scenario includes:
[0011] Use a large language model to analyze the semantics and keywords of user input;
[0012] Match the analysis results with the preset business scenarios and calculate the semantic similarity;
[0013] Determine the relevance of the current session and the business scenario based on semantic similarity.
[0014] Preferably, in step S01, identifying the user's intention includes:
[0015] Convert user input into semantic vectors;
[0016] Calculate the similarity between the semantic vector and the intent vector in the pre-built business intent list;
[0017] According to the similarity results and similarity threshold parameters, the top N intents greater than the similarity threshold are taken, and the large language model is used to select the business intent with the highest similarity as the user query intent.
[0018] Preferably, after performing user intention recognition in step S01, the method further includes:
[0019] Track changes in user needs and match the knowledge base with corresponding businesses.
[0020] Preferably, the tracking of changes in user needs and matching of knowledge bases of corresponding services includes:
[0021] Get the intent history for the current session;
[0022] Compare the current intent with the historical intent to determine whether a change has occurred; if so, switch to the knowledge base corresponding to the changed intent; if not, continue to use the last used knowledge base.
[0023] Preferably, in step S02, the tool called at least includes:
[0024] Calculator, used to perform numerical calculations such as addition, subtraction, multiplication, and division;
[0025] Unit converter, used to convert between different units, such as length, area, volume, weight, etc.;
[0026] Currency converter, used to convert exchange rates between different currencies;
[0027] Date and time tools, used to process date and time information, such as calculating date differences, converting time zones, etc.;
[0028] Weather forecast tool, used to query weather forecast information for a specified location;
[0029] Translation tool for translating between different languages.
[0030] Preferably, in step S03, generating a guiding question includes:
[0031] Analyze current user intent and acquired information to identify missing key information;
[0032] Generate guiding questions based on the missing key information to guide users to handle related business and supplement key information.
[0033] In a second aspect, an embodiment of the present invention provides a multi-round knowledge question and answer intention recognition system based on a large language model, wherein the system is used to execute the multi-round knowledge question and answer intention recognition method based on a large language model described in the first aspect embodiment, and the system includes:
[0034] The intention recognition module is used to determine whether the current session is related to the business scenario based on the user input content. If so, the user intention is recognized; if not, the business guidance question is asked to guide the user to handle the business;
[0035] The knowledge base matching module is used to identify the results according to the user's intention, match the knowledge base of the corresponding business for retrieval, and call the corresponding tools for business processing;
[0036] The guidance module is used to determine whether further dialogue is needed based on the business processing results, and if so, generate guidance questions;
[0037] The result output module is used to generate the final answer or solution based on the retrieved knowledge base information and user intent using a large language model.
[0038] In a third aspect, the present invention further provides an electronic device, including a memory and a processor, wherein:
[0039] The memory is used to store programs;
[0040] The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the multi-round knowledge question and answer intention recognition method based on a large language model as described in the embodiment of the first aspect of the present invention.
[0041] In a fourth aspect, the present invention further provides a computer-readable storage medium for storing computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the multi-round knowledge question and answer intention recognition method based on a large language model as described in the embodiment of the first aspect of the present invention.
[0042] The beneficial effects of adopting the above embodiment are:
[0043] The multi-round knowledge question-answering intention recognition method based on a large language model provided by the present invention can deeply understand user needs through continuous communication, accurately identify and guide users to clarify business needs, call the knowledge base to retrieve relevant information, and call related tools to perform corresponding tasks. In the service process, the changes in user needs are tracked, user needs are accurately identified, and precise business services are provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flow chart of the multi-round knowledge question-answering intention recognition method based on a large language model provided by the present invention;
[0045] Figure 2 A schematic diagram of the multi-round knowledge question-answering intention recognition method based on a large language model provided by the present invention;
[0046] Figure 3 A structural block diagram of a multi-round knowledge question-answering intention recognition system based on a large language model provided by the present invention;
[0047] Figure 4 This is a structural block diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0048] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0049] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0050] Existing knowledge question answering systems still have certain limitations in processing user intent recognition and meeting user needs. Especially in complex business scenarios, it is often difficult for the system to accurately identify user intent, match the corresponding knowledge base according to business needs, and provide accurate services. Therefore, how to improve the intent recognition ability and service accuracy of multi-round knowledge question answering systems has become an urgent problem to be solved in this field.
[0051] In view of this, the present invention proposes a multi-round knowledge question and answer intention recognition method based on a large language model, aiming to solve the defect that the existing knowledge question and answer system is difficult to accurately identify the user's intention in complex business scenarios and provide accurate services. The following will be explained and introduced through multiple embodiments.
[0052] Figure 1 A flow chart of the multi-round knowledge question and answer intention recognition method based on a large language model provided by the present invention. Figure 2 The schematic diagram of the multi-round knowledge question-answering intention recognition method based on a large language model provided by the present invention. Figure 1 As shown in FIG. 1 , the multi-round knowledge question answering intention recognition method based on a large language model includes:
[0053] Step S01, based on the user input content, determine whether the current session is related to the business scenario. If so, perform user intent recognition; if not, enter the business guidance questioning to guide the user to handle the business.
[0054] Specifically, when a user initiates a conversation on the intelligent business platform, the system detects the relevance of the current conversation to the business scenario. First, the large language model is used to analyze the semantics and keywords of the user's input content. Then, the analysis results are matched with the preset business scenario, namely the provident fund business scenario, and the semantic similarity is calculated; finally, the relevance of the current conversation to the business scenario is determined based on the semantic similarity. If the semantic similarity exceeds the preset similarity threshold, the current conversation is determined to be related to the business scenario, otherwise it is not related. In this article, "system" refers to a multi-round knowledge question and answer intention recognition system based on a large language model.
[0055] Furthermore, if the system determines that the current session is related to the business scenario, user intent recognition is performed. The user input content is converted into a semantic vector; then, the semantic vector is similar to the intent vector in the pre-built business intent list; based on the similarity result and the similarity threshold parameter, the top N intents greater than the similarity threshold are taken, and the business intent with the highest similarity is selected as the user query intent using the large language model.
[0056] Reference Figure 2 If the system determines that the current session is not relevant to the business scenario, it will enter the business guidance questioning to guide the user to handle the business. According to the current business scenario and user input content, identify the key information missing from the current business processing flow; generate guidance questions based on the missing key information to guide the user to handle related business. After guiding the user to ask the correct questions, the user's needs are obtained, and the final answer is generated using the large language model LLM, such as Figure 2 shown.
[0057] Step S02: According to the user intention recognition result, the knowledge base of the corresponding business is matched for retrieval, and the corresponding tool is called to perform business processing.
[0058] Reference Figure 2After identifying the user's intent, track the changes in user needs and match the knowledge base of the corresponding business. Specifically, first, obtain the intent history of the current session. Then, compare the current intent with the historical intent to determine whether there is a change; if so, switch to the knowledge base corresponding to the changed intent, if not, continue to use the knowledge base used last time.
[0059] After matching the knowledge base of the corresponding business, the system will search the knowledge base according to the user's intention and call the corresponding tool to process the business. The system stores the tool information that can be called, including the tool name, function description, calling method, etc., matches the corresponding tool according to the user's intention recognition result, calls the matched tool and executes the corresponding function.
[0060] In this embodiment, the tools called include but are not limited to:
[0061] Calculator, used to perform numerical calculations such as addition, subtraction, multiplication, and division;
[0062] Unit converter, used to convert between different units, such as length, area, volume, weight, etc.;
[0063] Currency converter, used to convert exchange rates between different currencies;
[0064] Date and time tools, used to process date and time information, such as calculating date differences, converting time zones, etc.;
[0065] Weather forecast tool, used to query weather forecast information for a specified location;
[0066] Translation tool for translating between different languages.
[0067] Step S03, judging whether further dialogue is needed according to the business processing result, and if so, generating guiding questions.
[0068] Specifically, during the business processing, it is determined whether further dialogue is required, and if so, guiding questions are generated.
[0069] The steps of generating guiding questions include: analyzing the current user intention and the information obtained, identifying the missing key information; generating guiding questions based on the missing key information, guiding the user to handle related business and supplementing the key information.
[0070] Step S04, based on the retrieved knowledge base information and user intention, a large language model (LLM) is used to generate a final answer or solution.
[0071] Specifically, the system uses the functionality of the large language model (LLM) to combine user intent with information already acquired in the knowledge base to generate the final answer or solution.
[0072] The multi-round knowledge question-answering intention recognition method based on a large language model provided by the present invention can deeply understand user needs through continuous communication, accurately identify and guide users to clarify business needs, call the knowledge base to retrieve relevant information, and call related tools to perform corresponding tasks. In the service process, the changes in user needs are tracked, user needs are accurately identified, and precise business services are provided.
[0073] Figure 3 The structural block diagram of the multi-round knowledge question answering intention recognition system based on a large language model provided by the present invention is shown in FIG. Figure 3 The multi-round knowledge question-answering intention recognition system 300 based on a large language model includes:
[0074] The intention recognition module 301 is used to determine whether the current session is related to the business scenario based on the user input content. If so, the user intention is recognized; if not, the business guidance question is asked to guide the user to handle the business;
[0075] The knowledge base matching module 302 is used to match the knowledge base of the corresponding business for retrieval according to the user intention recognition result, and call the corresponding tool for business processing;
[0076] A guidance module 303 is used to determine whether further dialogue is needed according to the business processing result, and if so, generate guidance questions;
[0077] The result output module 304 is used to generate a final answer or solution based on the retrieved knowledge base information and user intention using a large language model.
[0078] The multi-round knowledge question and answer intention recognition system based on a large language model provided by the present invention executes the multi-round knowledge question and answer intention recognition method based on a large language model provided by the embodiment of the present invention through the above-mentioned modules. The multi-round knowledge question and answer intention recognition method based on a large language model has been described in detail in the above-mentioned embodiments, and will not be repeated in this embodiment.
[0079] The multi-round knowledge question-answering intention recognition system based on a large language model provided by the present invention can deeply understand user needs through continuous communication, accurately identify and guide users to clarify business needs, call the knowledge base to retrieve relevant information, and call related tools to perform corresponding tasks. In the service process, it tracks changes in user needs, accurately identifies user needs, and provides precise business services.
[0080] Figure 4 The structural block diagram of the electronic device provided by the present invention is as follows: Figure 4As shown, the present invention also provides an electronic device, and the electronic device 400 can be a computing device such as a mobile terminal, a desktop computer, a notebook, a PDA, and a server. The electronic device 400 includes a processor 401 and a memory 402, wherein the memory 402 stores a multi-round knowledge question and answer intention recognition program 403 based on a large language model.
[0081] In some embodiments, the memory 402 may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 402 may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Furthermore, the memory 402 may also include both an internal storage unit of a computer device and an external storage device. The memory 402 is used to store application software and various types of data installed on the computer device, such as program codes for installing the computer device. The memory 402 may also be used to temporarily store data that has been output or is to be output. In one embodiment, when the multi-round knowledge question and answer intention recognition program 403 based on a large language model is executed by the processor 401, the following steps are implemented:
[0082] S01, judging whether the current session is related to the business scenario based on the user input content, and if so, performing user intent recognition; if not, entering the business guidance questioning to guide the user to handle the business;
[0083] S02, according to the user intention recognition result, matching the knowledge base of the corresponding business to search, and calling the corresponding tool to process the business;
[0084] S03, judging whether further dialogue is needed according to the business processing result, and if so, generating guiding questions;
[0085] S04, based on the retrieved knowledge base information and user intent, a large language model is used to generate the final answer or solution.
[0086] In some embodiments, the processor 401 can be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 402, such as executing a multi-round knowledge question and answer intention recognition program based on a large language model.
[0087] This embodiment further provides a computer-readable storage medium on which a multi-round knowledge question and answer intention recognition program based on a large language model is stored. When the multi-round knowledge question and answer intention recognition program based on a large language model is executed by a processor, the following steps are implemented:
[0088] S01, judging whether the current session is related to the business scenario based on the user input content, and if so, performing user intent recognition; if not, entering the business guidance questioning to guide the user to handle the business;
[0089] S02, according to the user intention recognition result, matching the knowledge base of the corresponding business to search, and calling the corresponding tool to process the business;
[0090] S03, judging whether further dialogue is needed according to the business processing result, and if so, generating guiding questions;
[0091] S04, based on the retrieved knowledge base information and user intent, a large language model is used to generate the final answer or solution.
[0092] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-round knowledge question-answering intention recognition method based on a large language model, characterized in that: include: S01, judging whether the current session is related to the business scenario based on the user input content, and if so, performing user intent recognition; If not, the user will be prompted to ask questions to guide the user to handle the business. S02, according to the user intention recognition result, matching the knowledge base of the corresponding business to search, and calling the corresponding tool to process the business; S03, judging whether further dialogue is needed according to the business processing result, and if so, generating guiding questions; S04, based on the retrieved knowledge base information and user intent, a large language model is used to generate the final answer or solution.
2. The multi-round knowledge question-answering intention recognition method based on a large language model according to claim 1 is characterized in that: In step S01, determining whether the current session is related to the business scenario includes: Use a large language model to analyze the semantics and keywords of user input; Match the analysis results with the preset business scenarios and calculate the semantic similarity; Determine the relevance of the current session and the business scenario based on semantic similarity.
3. The multi-round knowledge question-answering intention recognition method based on a large language model according to claim 1 is characterized in that: In step S01, user intention recognition is performed, including: Convert user input into semantic vectors; Calculate the similarity between the semantic vector and the intent vector in the pre-built business intent list; According to the similarity results and similarity threshold parameters, the top N intents greater than the similarity threshold are taken, and the large language model is used to select the business intent with the highest similarity as the user query intent.
4. The multi-round knowledge question-answering intention recognition method based on a large language model according to claim 1 is characterized in that: After performing user intention recognition in step S01, the method further includes: Track changes in user needs and match the knowledge base with corresponding businesses.
5. The multi-round knowledge question-answering intention recognition method based on a large language model according to claim 4 is characterized in that: The tracking of user demand changes and matching of the knowledge base of corresponding services include: Get the intent history for the current session; Compare the current intent with the historical intent to determine whether a change has occurred; if so, switch to the knowledge base corresponding to the changed intent; if not, continue to use the last used knowledge base.
6. The multi-round knowledge question-answering intention recognition method based on a large language model according to claim 1 is characterized in that: In step S02, the tools called at least include: calculator, used to perform numerical calculations, including addition, subtraction, multiplication, and division; Unit converter for converting between different units, including length, area, volume, and weight; Currency converter, used to convert exchange rates between different currencies; Date and time tools for manipulating date and time information, including calculating date differences and converting time zones; Weather forecast tool, used to query weather forecast information for a specified location; Translation tool for translating between different languages.
7. The multi-round knowledge question-answering intention recognition method based on a large language model according to claim 1 is characterized in that: In step S03, generating a guiding question includes: Analyze current user intent and acquired information to identify missing key information; Generate guiding questions based on the missing key information to guide users to handle related business and supplement key information.
8. A multi-round knowledge question-answering intention recognition system based on a large language model, characterized in that: include: The intent recognition module is used to determine whether the current session is related to the business scenario based on the user input content. If so, the user intent is recognized; If not, the user will be prompted to ask questions to guide the user to handle the business. The knowledge base matching module is used to identify the results according to the user's intention, match the knowledge base of the corresponding business for retrieval, and call the corresponding tools for business processing; The guidance module is used to determine whether further dialogue is needed based on the business processing results, and if so, generate guidance questions; The result output module is used to generate the final answer or solution based on the retrieved knowledge base information and user intent using a large language model.
9. An electronic device, It is characterized in that comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the multi-round knowledge question and answer intention recognition method based on a large language model as described in any one of claims 1 to 7 above.
10. A computer-readable storage medium, characterized in that: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the multi-round knowledge question and answer intention recognition method based on a large language model as described in any one of claims 1 to 7 above.
Citation Information
Cited By
Knowledge question and answer method and device, equipment, medium and product
CN119149717A
Method, device, equipment, medium and product for knowledge question answering
CN119149717B
Information processing method and system based on large language model and AI intelligent assistant
CN119250209A
Workflow construction method and system
CN119250507A
Artificial intelligence proxy method and device based on large model
CN119670901A
