Response method and device based on large language model, electronic equipment and storage medium

By adopting a large language model-based reply method in the intelligent question-answer system, the problem of low accuracy in answering questions in professional fields in the existing technology is solved, and higher accuracy in reply is achieved.

CN119597900APending Publication Date: 2025-03-11PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411741668.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

When dealing with problems in professional fields, existing intelligent question-and-answer systems are difficult to understand the user's intentions, resulting in low accuracy of reply.

Method used

The answer method based on the large language model is adopted to obtain the candidate question and answer text of the target knowledge base, and the candidate question information is extracted using the question extraction indicator parameters, and the target question is analyzed and disassembled through the question analysis indicator parameters to generate reference sub-question information, thereby improving the accuracy of answer extraction.

Benefits of technology

Through automatic question summary and analysis, the accuracy of answers to questions in professional fields of intelligent question-answer systems is improved, and the dependence on professional knowledge is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597900A_ABST
    Figure CN119597900A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a reply method and device based on a large language model, electronic equipment and a storage medium, relates to the technical field of intelligent questions and answers, and is suitable for the fields of financial science and technology, digital medical treatment and the like. The method comprises the steps of obtaining candidate question and answer texts of a target knowledge base based on a preset knowledge category, and obtaining question extraction indication parameters; performing question extraction on the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information; obtaining target problem information; performing problem analysis on the target problem information according to a preset problem analysis indication parameter to obtain problem analysis information; performing question splitting on the target question information according to the question analysis information to obtain reference sub-question information; and performing answer extraction on the candidate question and answer text according to the reference sub-question information and the candidate question information to obtain target answer information. According to the embodiment of the invention, the reply accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent question-answering technology, and is applicable to the fields of financial technology, digital medicine, and more particularly to a reply method and device, an electronic device, and a storage medium based on a large language model. Background Art

[0002] Intelligent question answering system is a subfield of natural language processing, which aims to design and develop systems that can parse, understand and answer natural language questions raised by users.

[0003] In related technologies, intelligent question-and-answer systems are often general-purpose and directly answer questions based on the questions raised. If the questions are simple, accurate answers can be output. However, when it comes to questions in professional fields, it is difficult to understand the questions raised by users, resulting in low accuracy of answers. For example, in the insurance field, the intelligent question-and-answer system directly matches the target question with the historical questions and outputs the answer. For professional insurance business questions, the intelligent question-and-answer system finds it difficult to understand the insurance business questions raised, so the output answer is less accurate and still requires professional insurance agents to assist in answering the questions. Therefore, how to improve the accuracy of the answers has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a reply method and device, an electronic device and a storage medium based on a large language model, aiming to improve the accuracy of the reply.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a reply method based on a large language model, the method comprising:

[0006] Obtain candidate question and answer texts of the target knowledge base based on preset knowledge categories, and obtain question extraction indication parameters;

[0007] Extracting questions from the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information;

[0008] Get target problem information;

[0009] Performing problem analysis on the target problem information according to preset problem analysis indication parameters to obtain problem analysis information;

[0010] Decomposing the target question information according to the question analysis information to obtain reference sub-question information;

[0011] Answers are extracted from the candidate question and answer texts according to the reference sub-question information and the candidate question information to obtain target answer information.

[0012] In some embodiments, the question extraction indication parameter includes: text segmentation indication information, question extraction indication information and text semantic information, wherein the text semantic information is the semantic information of the candidate question and answer text;

[0013] The step of extracting questions from the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information includes:

[0014] Segment the candidate question and answer text according to the text segmentation instruction information to obtain candidate text segments;

[0015] Extracting questions from the candidate text segments according to the question extraction indication information to obtain preliminary question information;

[0016] Performing a criticality assessment on the preliminary question information according to the text semantic information to obtain question criticality assessment data; wherein the question criticality assessment data represents the criticality of the preliminary question information in the candidate question and answer text;

[0017] The candidate question information is screened out from the preliminary question information according to the question criticality assessment data.

[0018] In some embodiments, performing a criticality assessment on the preliminary question information according to the text semantic information to obtain question criticality assessment data includes:

[0019] Performing semantic understanding on the preliminary question information to obtain preliminary question semantic information;

[0020] The preliminary question semantic information and the text semantic information are correlated to obtain the question criticality assessment data.

[0021] In some embodiments, the question parsing information includes: question category, question length information and target question semantic information;

[0022] The step of decomposing the target question information according to the question analysis information to obtain reference sub-question information includes:

[0023] Decomposing the target question information according to the question category and the target question semantic information to obtain candidate sub-question information;

[0024] Expanding the candidate sub-question information according to the question length information and the target question semantic information to obtain expanded sub-question information;

[0025] The candidate sub-question information and the extended sub-question information are concatenated to obtain the reference sub-question information.

[0026] In some embodiments, extracting answers from the candidate question and answer texts according to the reference sub-question information and the candidate question information to obtain target answer information includes:

[0027] Vectorize the reference sub-problem information to obtain a reference sub-problem vector;

[0028] Vectorizing the candidate question information to obtain a candidate question vector;

[0029] Calculate the similarity between the reference sub-question vector and the candidate question vector to obtain question similarity;

[0030] Filtering selected question information from the candidate question information according to the question similarity and the preset number of questions;

[0031] The answer is extracted from the candidate question and answer text according to the selected question information to obtain the target answer information.

[0032] In some embodiments, extracting answers from the candidate question and answer texts according to the selected question information to obtain the target answer information includes:

[0033] Extracting candidate answer information from the candidate question and answer text according to the selected question information;

[0034] Performing a relevance evaluation on the target question information and the candidate answer information to obtain relevance evaluation data;

[0035] Filtering selected answer information from the candidate answer information according to a preset relevance threshold and the relevance evaluation data;

[0036] The selected answer information is fused to obtain the target answer information.

[0037] In some embodiments, after parsing the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information, the method further includes:

[0038] Acquire updated question and answer text of the candidate question and answer text according to a preset time interval information period;

[0039] The candidate question information is updated according to the updated question and answer text and the question extraction indication parameter.

[0040] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a reply device based on a large language model, the device comprising:

[0041] A preliminary acquisition module, used to acquire candidate question and answer texts of a target knowledge base based on preset knowledge categories, and to acquire question extraction indication parameters;

[0042] A question extraction module, used to extract questions from the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information;

[0043] A target acquisition module is used to obtain target problem information;

[0044] A problem analysis module, used to analyze the target problem information according to preset problem analysis indication parameters to obtain problem analysis information;

[0045] A problem decomposition module is used to decompose the target problem information according to the problem analysis information to obtain reference sub-problem information;

[0046] The answer extraction module is used to extract the answer from the candidate question and answer text according to the reference sub-question information and the candidate question information to obtain the target answer information.

[0047] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0048] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0049] The answering method and device based on a large language model, electronic device and storage medium proposed in the present application obtain candidate question and answer texts in a target knowledge base that conforms to a preset knowledge category, and extract candidate question information in the candidate question and answer texts according to question extraction indication parameters to achieve automatic question summarization of question and answer texts. When the answer is determined, the target question information is parsed according to the question parsing indication parameters to obtain question parsing information, and then the target question information is disassembled according to the question parsing information to obtain reference sub-question information, so as to achieve automatic understanding of the question and disassemble the reference sub-question information that represents the true intention of the target question information. Therefore, the target answer information is extracted from the candidate question and answer text by referring to the sub-question information and the candidate question information, making the answer generation operation easier and the obtained answer information more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a flowchart of a reply method based on a large language model provided in an embodiment of the present application;

[0051] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.

[0052] Figure 3 yes Figure 2 Flow chart of step S203 in FIG.

[0053] Figure 4 yes Figure 1 Flow chart of step S105 in FIG.

[0054] Figure 5 yes Figure 1 Flow chart of step S106 in FIG.

[0055] Figure 6 yes Figure 5 Flow chart of step S505 in FIG.

[0056] Figure 7 is a flowchart of a reply method based on a large language model provided in another embodiment of the present application;

[0057] Figure 8 is a schematic diagram of the structure of a reply device based on a large language model provided in an embodiment of the present application;

[0058] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0062] First, some nouns involved in this application are analyzed:

[0063] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0064] Large Language Model (LLM): A natural language processing model based on deep learning that can understand and generate human language. Large language models usually use the Transformer architecture and learn language rules and knowledge by training on massive text data. The larger the scale of training data, the more powerful the model is, and it can handle more complex language tasks, such as text generation, translation, question answering, and summarization.

[0065] Intelligent Question-Answering (QA): is a natural language processing (NLP) technology that can understand user questions and provide corresponding answers.

[0066] Prompt: It is an instruction or request issued to the Large Language Model (LLM). It can be a simple sentence or a complex structure with multiple parts, such as a detailed description containing background information, instructions, and the expected output format. A good prompt is crucial to obtaining high-quality LLM output because the prompt directly affects the model's understanding and generation results.

[0067] An intelligent question-and-answer system is a system that automatically responds to questions raised by users. Existing intelligent question-and-answer systems are often general and can answer a variety of simple questions. However, when it comes to specific fields, because the intelligent question-and-answer system lacks an in-depth understanding of problems in specific fields, it is difficult for the existing intelligent question-and-answer system to understand problems in specific fields, resulting in low accuracy of responses. For example, in the insurance field, professional insurance agents have rich insurance business knowledge and experience and can provide more accurate responses to specific insurance business issues, but the intelligent question-and-answer system lacks insurance business knowledge training and the accuracy of the responses is relatively low. In addition, if the user lacks insurance-related experience and finds it difficult to clearly express insurance business issues, it is difficult to accurately understand the user's intentions if the intelligent question-and-answer system is used to respond, resulting in inaccurate responses to questions.

[0068] Based on this, the embodiments of the present application provide a reply method and device, an electronic device and a storage medium based on a large language model, which is intended to first extract candidate question and answer texts from the target knowledge base, and extract candidate question information from the candidate question and answer texts according to the question extraction indication parameters, and summarize the existing questions in advance. Then, when the user raises the target question information, the target question information is first parsed according to the question parsing indication parameters to obtain the question parsing information, so as to decompose the target question information into reference sub-question information according to the question parsing information, and extract the target answer information from the candidate question and answer text through the correlation between the reference sub-question information and the candidate question information. Therefore, by summarizing the existing questions in advance, when asking and answering questions, the questions are first automatically parsed, the main question information is identified according to the question parsing information, and then the reply is completed according to the main question information, so as to improve the accuracy of the reply.

[0069] The reply method and device based on the large language model, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the reply method based on the large language model in the embodiments of the present application is described.

[0070] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0071] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0072] The reply method based on a large language model provided in the embodiment of the present application relates to the field of intelligent question-answering technology, and is applicable to the fields of financial technology, digital medicine, etc. The reply method based on a large language model provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a reply method based on a large language model, etc., but is not limited to the above forms.

[0073] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0074] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0075] Figure 1 is an optional flowchart of a reply method based on a large language model provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0076] Step S101, obtaining candidate question and answer texts of a target knowledge base based on preset knowledge categories, and obtaining question extraction indication parameters;

[0077] Step S102, extracting questions from the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information;

[0078] Step S103, obtaining target question information;

[0079] Step S104, performing problem analysis on the target problem information according to preset problem analysis indication parameters to obtain problem analysis information;

[0080] Step S105, decomposing the target question information according to the question analysis information to obtain reference sub-question information;

[0081] Step S106, extracting answers from the candidate question and answer texts based on the reference sub-question information and the candidate question information to obtain target answer information.

[0082] Steps S101 to S106 shown in the embodiment of the present application are to extract candidate question and answer texts from the target knowledge base according to preset knowledge categories, and determine the question extraction indication parameters of the candidate question and answer texts, so as to extract candidate question information from the candidate question and answer texts according to the question extraction indication parameters, so as to complete the question summarization of the existing question and answer texts in advance. When performing question and answer, the target question information is received, and the target question information is first parsed according to the question parsing indication parameters to obtain question parsing information, so as to understand the content of the target question information, and the target question information is disassembled into reference sub-question information according to the question parsing information, so as to extract the target answer information from the candidate question and answer text through the disassembled reference sub-question information and candidate question information. Therefore, the existing question and answer text is automatically summarized first, and when answering questions, the understanding of the target question that is automatically completed is decomposed again, and then the target answer is found in the question and answer text in combination with the decomposed sub-questions and the summarized questions, which can not only quickly complete the reply, but also improve the accuracy of the reply.

[0083] In step S101 of some embodiments, the target knowledge base stores question and answer texts of multiple knowledge categories, and the target knowledge base is divided into multiple target knowledge sub-bases according to the knowledge categories, and a knowledge category label is set on each target knowledge sub-base. When it is necessary to obtain candidate question and answer texts, the knowledge category related to the question and answer is first determined, that is, the scene information involved in the current question and answer session is determined, and the preset knowledge category is set according to the scene information, and then the selected knowledge sub-base is screened from the target knowledge sub-base according to the preset knowledge category and the knowledge category label, and then the question and answer text is extracted from the selected knowledge sub-base as the candidate question and answer text.

[0084] It should be noted that the question prompt indication parameter is used as an indication parameter for question extraction in the candidate question and answer text, which is used to indicate the questions that need to be extracted from the candidate question and answer text and the extraction method, and provides suggestions for question extraction. It should be further noted that the question extraction indication parameters are different for different description forms of the candidate question and answer text. Specifically, if the description form of the candidate question and answer text is plain text, then the question extraction indication parameter is mainly used to extract the main question from the plain text content; if the description form of the candidate question and answer text is a question and answer pair, the question extraction indication parameter is relatively simpler, and only the question information in the question and answer pair needs to be located and then extracted to obtain the main question.

[0085] In some embodiments, the question extraction indication parameter includes: text segmentation indication information, question extraction indication information and text semantic information. It should be noted that the text segmentation indication information is used to indicate the segmentation operation of the candidate question and answer text, the question extraction indication information is used to indicate the extraction operation of the question in the candidate question and answer text, and the text semantic information is the semantic information of the candidate question and answer text, which is obtained by semantically understanding the candidate question and answer text through a large language model.

[0086] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S204:

[0087] Step S201, segmenting the candidate question and answer text according to the text segmentation instruction information to obtain candidate text segments;

[0088] Step S202, extracting questions from the candidate text segments according to the question extraction instruction information to obtain preliminary question information;

[0089] Step S203, performing a criticality assessment on the preliminary question information according to the text semantic information to obtain question criticality assessment data; wherein the question criticality assessment data represents the criticality of the preliminary question information in the candidate question and answer text;

[0090] Step S204: Screen out candidate question information from the preliminary question information according to the question criticality evaluation data.

[0091] In step S201 of some embodiments, the text segmentation indication information will give different segmentation prompts for candidate question and answer texts according to different description forms. Among them, the text segmentation indication information includes: preprocessing indication information and segmentation length information. The preprocessing indication information is used to indicate the preprocessing of the candidate question and answer text, and the preprocessing includes: removal of repeated content, correction of typos, unification of uppercase and lowercase letters, and filling of missing content, etc. This embodiment does not impose specific restrictions on preprocessing, and the preprocessing operation of the candidate question and answer text can be completed through the existing preprocessing model and preprocessing indication information to obtain accurate candidate question and answer text. The segmentation length information is used to indicate the segmentation length of the segmented text segment. Specifically, if the description form is in pure text form, the candidate question and answer text is first preprocessed according to the preprocessing indication information to obtain the selected question and answer text, and then the selected question and answer text is segmented according to the segmentation length information to obtain the candidate text segment, and the candidate text segment is defined as T i , where i represents the i-th paragraph of text.

[0092] In step S202 of some embodiments, the question extraction indication information is input into the large language model, and the large language model extracts preliminary question information from the candidate text segment according to the question extraction indication information. It should be noted that the question extraction indication information is an identity prompt word, also called Prompt, which gives the large language model an identity information. The large language model is first trained in advance based on the identity prompt word to form a question extraction model that corresponds to the identity prompt word, and then the question extraction of the candidate text segment is completed through the question extraction model to output more accurate preliminary question information.

[0093] For example, if the question-answering scenario is insurance business question-answering, the identity prompt word is "You are an expert in problem summarizing in the insurance field", and the candidate text segment is "Based on the current data feedback, who are the main buyers of critical illness insurance? Young people or old people?", by inputting the identity prompt word and the candidate text segment into the large language model together, the large language model will obtain the training question-answering text related to the insurance field in advance based on the identity prompt word, and train the large language model based on the training question-answering text to obtain a question extraction model that can summarize problems in the insurance field, and then use the trained question extraction model to extract preliminary question information from the candidate text segment, and the preliminary question information can be "Who are the main buyers of critical illness insurance?", "Young people or old people?".

[0094] In step S203 of some embodiments, as disclosed above, the candidate question and answer text will be segmented into at least one candidate text segment, and at least one preliminary question information will also be extracted from the candidate text segment, so in order to extract the main questions in the candidate question and answer text, it is necessary to perform a criticality assessment on each preliminary question information based on the text semantic information. It should be noted that the criticality assessment is to assess the criticality of the preliminary question information in the candidate question and answer text, as the representative degree of the main questions of the candidate question and answer text. Therefore, the question criticality assessment data represents the criticality of the preliminary question information in the candidate question and answer text, and the higher the question criticality assessment data, the higher the criticality of the preliminary question information, and vice versa, the lower the question criticality assessment data, the lower the criticality of the preliminary question information.

[0095] In step S204 of some embodiments, the preliminary question information is sorted according to the question criticality assessment data to obtain a question number, and then the preliminary question information before sorting is used as candidate question information according to the preset extraction quantity and question number to achieve question summary of the candidate question and answer text. It should be noted that in the preliminary question information screening process, the preliminary question information will be processed for question improvement to obtain complete and clearly expressed candidate question information, and then the candidate question information will be listed in the form of a json list.

[0096] It should be noted that the preliminary question information is processed for question perfection by first performing sentence component recognition on the preliminary question information to obtain sentence component recognition information, and then determining the missing component information of the preliminary question information based on the sentence component recognition information, and then extracting the filling sentence from the candidate question and answer text based on the missing component information, and adding the filling sentence to the preliminary question information to obtain the preliminary question information that is complete and accurate in expression.

[0097] For example, as disclosed above, the extracted preliminary question information is "Who are the main buyers of critical illness insurance?", "Is it the young group or the elderly group?", and it is determined that the preliminary question information is "Is it the young group or the elderly group?" The subject component is missing, and the supplementary subject is extracted from the candidate question and answer text as "The main buyers of critical illness insurance", and then the preliminary question information is improved to obtain the improved preliminary question information as "Is the main buyer of critical illness insurance the young group or the elderly group?". Therefore, by improving the preliminary question information in advance, the selected candidate question information can fully and clearly express the question in the question and answer process.

[0098] In steps S201 to S204 shown in this embodiment, the candidate question and answer text is segmented into candidate text segments according to the text segmentation indication information, and preliminary question information is extracted from the candidate text segments through the large language model and the question extraction indication information, so as to achieve accurate extraction of questions. After the question extraction is completed, a criticality assessment is performed on each preliminary question information to determine the criticality of the preliminary question information in the candidate question and answer text, and then the candidate question information is screened from the preliminary question information according to the question criticality assessment data obtained by the assessment, so as to extract the main questions representing the candidate question and answer text, and achieve automatic induction of questions.

[0099] See also Figure 3 In some embodiments, step S203 may include but is not limited to steps S301 to S302:

[0100] Step S301, semantically understand the preliminary question information to obtain preliminary question semantic information;

[0101] Step S302, calculating the correlation between the preliminary question semantic information and the text semantic information to obtain question criticality assessment data.

[0102] In step S301 of some embodiments, the preliminary question information is input into the semantic understanding model, and the preliminary question information is semantically understood by the semantic understanding model to obtain preliminary question semantic information. Specifically, the semantic understanding model performs semantic understanding on the preliminary question information, first extracts preliminary question features of the preliminary question information, then classifies the preliminary question information according to the preliminary question features to obtain question categories, then performs sentiment analysis on the preliminary question information according to the preliminary question features to obtain question sentiment information, and performs intent recognition on the preliminary question information according to the preliminary question features to obtain question intent information, and finally fuses the question category, question sentiment information and question intent information into preliminary question semantic information to obtain question categories, sentiments and intents. Figure 3 The aspects characterize the semantics of preliminary question information.

[0103] In step S302 of some embodiments, text semantic information is also obtained from the category, sentiment and meaning of the candidate question and answer text. Figure 3 The text semantic information is characterized by three aspects, so the text semantic information includes: text category, text sentiment information and text intention information. Specifically, when evaluating the relevance of the preliminary question semantic information and text semantic information, first calculate the correlation between the text category and the question category to obtain the category correlation, calculate the correlation between the text sentiment information and the question sentiment information to obtain the sentiment correlation, then calculate the correlation between the text intention information and the question intention information to obtain the intention correlation, and finally weight the category correlation, sentiment correlation and intention correlation to obtain the question criticality evaluation data. Therefore, through the category, sentiment and intention Figure 3 Evaluating the semantic relevance between the preliminary question information and the candidate question and answer texts from three aspects can more accurately characterize the criticality of the preliminary question information in the candidate question and answer texts.

[0104] In steps S301 to S302 shown in the present embodiment, the semantic correlation between the preliminary question information and the candidate question and answer texts is calculated to determine the question criticality assessment data, and the criticality of the preliminary question information in the candidate question and answer texts is judged by the correlation between the semantics, making the criticality assessment of the preliminary question information easier and more accurate.

[0105] In step S103 of some embodiments, when a user asks a question on the intelligent question-answering system, the question asked by the user is recorded to obtain target question information. It should be noted that there is no restriction on the input method of the target question information, which may specifically include voice input, text input, and picture input, etc. If voice input is adopted, the input voice data is subjected to content recognition to obtain the target question information; if picture input is adopted, the input picture is subjected to OCR recognition to obtain the target question information.

[0106] In step S104 of some embodiments, in order to decompose the target question information into multiple reference sub-question information so as to more accurately represent the meaning of the target question information through multiple reference sub-question information, it is necessary to first perform content analysis on the target question information. In this embodiment, the question analysis indication parameter and the target question information are input into the large language model together, and the content analysis of the target question information is completed by the large language model in combination with the question analysis indication parameter. It should be noted that the question analysis indication parameter serves as the identity guidance information for the large language model to perform content analysis, so that the large language model completes self-training in advance according to the identity guidance information to obtain a content analysis model that conforms to the scenario where the target question information is located, and then performs content analysis on the target question information through the trained content analysis model. Therefore, by training the large language model in advance to have a content analysis model that has content analysis capabilities and conforms to the scenario where the target question information is located, and then completing the analysis of the target question information through the content analysis model, the analysis operation of the target question information is made more accurate.

[0107] Specifically, the problem scenario information and parsing identity information of the target problem information are determined according to the identity guidance information, and then a large amount of training problem information and parsing verification information of the training problem information are obtained according to the problem scenario information. The training text information and parsing identity information are input into the large language model, and the large language model is trained according to the parsing prediction information and parsing verification information output by the large language model to obtain the problem parsing model. Finally, the problem parsing model is used to parse the target problem information to obtain the problem parsing information.

[0108] In some embodiments, question parsing information includes: question category, question length information and target question semantic information, where the question category is the category of the target question information, the question length information is the font length in the target question information, the target question semantic information is the semantic information of the target question information, and the method for obtaining the target question semantic information is the same as the method for obtaining the preliminary question semantic information, which will not be repeated here.

[0109] See also Figure 4 In some embodiments, step S105 may include but is not limited to steps S401 to S403:

[0110] Step S401, decomposing the target question information according to the question category and the target question semantic information to obtain candidate sub-question information;

[0111] Step S402, expanding the candidate sub-question information according to the question length information and the target question semantic information to obtain expanded sub-question information;

[0112] Step S403: concatenate the candidate sub-question information and the extended sub-question information to obtain reference sub-question information.

[0113] In step S401 of some embodiments, a pre-trained problem decomposition model, problem category and target problem semantic information are used to decompose the target problem information to obtain candidate sub-problem information. It should be noted that the problem decomposition model is trained based on the category and semantic information of a large amount of training problem information, and the decomposition operation of the problem information can be directly determined according to the category and semantics of the problem information to obtain multiple sub-problems. Specifically, if the target problem information is recorded as P, multiple candidate sub-problem information obtained after model decomposition is recorded as P j %, and the candidate sub-question information can represent the true meaning of the target question information, so as to output more accurate question information when the user cannot express the question clearly.

[0114] In step S402 of some embodiments, as disclosed above, after the target question information is disassembled, in order to more accurately characterize the true intention of the target question information, the candidate sub-question information needs to be expanded to expand the extended sub-question information with similar semantics and qualified length. Specifically, the qualified length information of the candidate sub-question information is first determined based on the question length information and the preset length information. If the question length information is greater than or equal to the preset length information, the length of the candidate sub-question information is determined to be qualified, otherwise the length of the candidate sub-question information is determined to be unqualified. Then the qualified length information is characterized as the unqualified length of the candidate sub-question information, and the candidate sub-question information is expanded according to the semantic information of the target question, that is, the synonymous questions of the candidate sub-question information are determined as the extended sub-question information according to the semantic information of the target question.

[0115] In step S403 of some embodiments, the expanded sub-question information and the candidate sub-question information obtained by expansion and decomposition are spliced ​​into reference sub-question information, so as to represent the target question information in a more question-oriented manner, thereby representing the true intention of the target question information more accurately.

[0116] In steps S401 to S403 shown in this embodiment, a larger number of reference sub-question information are constructed by disassembling and expanding the target question information to obtain reference sub-question information that represents the true intention of the target question information. Then, answering through the reference sub-question information will improve the accuracy of the answer.

[0117] See also Figure 5 In some embodiments, step S106 may include but is not limited to steps S501 to S505:

[0118] Step S501, vectorizing the reference sub-problem information to obtain a reference sub-problem vector;

[0119] Step S502, vectorizing the candidate question information to obtain a candidate question vector;

[0120] Step S503, calculating the similarity between the reference sub-question vector and the candidate question vector to obtain question similarity;

[0121] Step S504, selecting selected question information from the candidate question information according to question similarity and the preset number of questions;

[0122] Step S505: extract answers from the candidate question and answer texts according to the selected question information to obtain target answer information.

[0123] In steps S501 to S502 of some embodiments, the reference sub-question feature is obtained by extracting the feature of the reference sub-question information, and then the reference sub-question feature is encoded by an encoder to obtain a reference sub-question vector. Further, the feature of the candidate question information is extracted to obtain the candidate question feature, and the candidate question feature is encoded by an encoder to obtain a candidate question vector. Therefore, the reference sub-question information and the candidate question information are represented in the form of vectors, respectively, so as to more easily and accurately calculate the similarity between the reference sub-question information and the candidate question information.

[0124] It should be noted that before conducting question and answering, each candidate question information will be stored in the vector database in the form of a candidate question vector. When confirming the answer, a vector similarity search will be performed in the vector database based on the vectorized reference sub-question information to determine the candidate question vector with high similarity as the selected question vector.

[0125] In step S503 of some embodiments, the similarity between the reference sub-problem vector and the candidate question vector is calculated, and a cosine similarity calculation function, a Euclidean distance calculation function, a Manhattan distance calculation function, a Hamming distance calculation function, etc. may be used. This embodiment does not impose any specific restrictions on the similarity calculation function used for the similarity calculation between the reference sub-problem vector and the candidate question vector.

[0126] It should be noted that, because there are multiple candidate question vectors, if each reference sub-question vector and each candidate question vector are calculated one by one, a large amount of computing resources will be consumed. Therefore, this embodiment first extracts the common feature vectors in the candidate question vectors, performs vector similarity calculation based on the reference sub-question vectors and the common feature vectors to obtain a preliminary similarity, takes the candidate question vector corresponding to the highest preliminary similarity as the selected question vector, and then performs vector similarity calculation based on the reference sub-question vector and each selected question vector, so as to save the resources consumed by the similarity calculation and improve the efficiency of question screening.

[0127] In step S504 of some embodiments, the candidate question information is sorted from large to small according to question similarity, and the candidate question information that is ranked first or a preset number of candidate question information before the ranking is used as the selected question information, that is, the selected question information with a high matching degree with the reference sub-question information is screened out.

[0128] In step S505 of some embodiments, a target question and answer text is extracted from the candidate question and answer texts by selecting question information, and answer information is extracted from the target question and answer text as target answer information.

[0129] In steps S501 to S505 shown in the present embodiment, the reference sub-question information and the candidate question information are represented in vector form, and selected question information having a high similarity with the reference sub-question information is screened out from the candidate question information by means of vector similarity retrieval. Then, the target answer information is extracted from the candidate question and answer texts according to the selected question information, so that the operation of obtaining the target answer information is fast and accurate.

[0130] See also Figure 6 In some embodiments, step S505 includes but is not limited to steps S601 to S604:

[0131] Step S601, extracting candidate answer information from the candidate question and answer texts according to the selected question information;

[0132] Step S602, performing relevance evaluation on the target question information and the candidate answer information to obtain relevance evaluation data;

[0133] Step S603, selecting selected answer information from candidate answer information according to a preset relevance threshold and relevance evaluation data;

[0134] Step S604, the selected answer information is fused to obtain target answer information.

[0135] In step S601 of some embodiments, the target question and answer text is screened out from the candidate question and answer text according to the selected question information, and then the answer in the target question and answer text is extracted as the candidate answer information. It should be noted that there are multiple reference sub-question information, so there are multiple selected question information, and then there are multiple candidate answer information, but not every candidate answer information matches the target question information, so the candidate answer information needs to be further screened to select the target answer information with high relevance to the target question information.

[0136] In step S602 of some embodiments, by evaluating the correlation between the target question information and the candidate answer information, that is, evaluating whether the candidate answer information and the target question information are correlated, the accuracy of the candidate answer information as a response to the target question information can be characterized by the correlation evaluation data. Specifically, by identifying the question category and question intent of the target question information, and then identifying the answer category and answer intent of the candidate answer information, a first similarity is obtained by performing a correlation calculation based on the question category and the answer category, and then a second similarity is obtained by calculating the correlation between the question intent and the answer intent, and the first similarity and the second similarity are spliced ​​into correlation evaluation data to more accurately judge the correlation between the candidate answer information and the target question information from the two aspects of category and intent.

[0137] In step S603 of some embodiments, candidate answer information is filtered based on relevance evaluation data and a relevance threshold, and only candidate answer information with relevance evaluation data greater than or equal to the relevance threshold is selected as selected answer information, and candidate answer information with relevance evaluation data less than the relevance threshold is filtered out, thereby reducing the situation of outputting incorrect answers.

[0138] It should be noted that if the relevance evaluation data of each candidate answer information is less than the relevance threshold, then the prompt information of no answer is directly output, indicating that there is no answer matching the target question information in the target knowledge base, reducing the situation of compiling answer output. For example, if in a medical scenario, the target database only stores candidate question and answer fragments related to cancer, and the target question information is "What are the symptoms of acute gastroenteritis?" If no highly relevant answer is found, the prompt information of no answer is directly output, and the prompt information of no answer is "I don't know", to prevent the output of wrong answers and improve the accuracy of the response.

[0139] In step S604 of some embodiments, as disclosed above, there are multiple selected question information, so there is also at least one selected answer information, and at least one selected answer information is fused into target answer information to obtain more accurate and comprehensive target answer information. Specifically, this embodiment uses a large language model to complete the fusion operation of at least one selected answer information to obtain clear and comprehensive target answer information, rather than simply splicing the answer information.

[0140] In steps S601 to S604 shown in this embodiment, during the answer extraction process, it is necessary to determine the correlation between the extracted candidate answer information and the target question information, filter out candidate answer information with low correlation, and merge candidate answer information with high correlation into target answer information to obtain more accurate target answer information and improve the accuracy of responses during question and answering.

[0141] See also Figure 7In some embodiments, after step S103, the reply method based on the large language model may also include but is not limited to steps S701 to S702:

[0142] Step S701, obtaining updated question and answer texts of candidate question and answer texts according to a preset time interval information period;

[0143] Step S702: updating the candidate question information according to the updated question and answer text and the question extraction indication parameter.

[0144] In step S701 of some embodiments, in order to allow the intelligent question-answering system to output more accurate and comprehensive answers, the candidate question-answering text needs to be updated regularly to obtain updated question-answering text. It should be noted that the updated question-answering text can be used as a replacement text for the candidate question-answering text, or it can be a newly added text for the candidate question-answering text. If the candidate question-answering text is a replacement text, the updated question-answering text will replace the candidate question-answering text; if the updated question-answering text is a newly added text, the content of the candidate question-answering text will be increased according to the updated question-answering text.

[0145] In step S702 of some embodiments, question extraction is performed on the updated question and answer text according to the question prompt parameters to obtain updated question information, and the candidate question information is updated according to the updated question information. It should be noted that if the updated question and answer text is a replacement text, the candidate question information will be replaced by the updated question information; if the updated question and answer text is a newly added text, the updated question information will be supplemented to the candidate question information to achieve the expansion of the candidate question information. It should be further explained that the operation of extracting the updated question information of the updated question and answer text according to the question prompt parameters is similar to the operation of extracting the candidate question information of the candidate question and answer text according to the question prompt parameters, and will not be repeated here.

[0146] In step S701 to step S702 shown in this embodiment, the question and answer text in the target knowledge base is updated regularly to update the candidate question information, which can improve the accuracy of the answer during the question and answer process.

[0147] The embodiment of the present application takes the medical field as an example. Before conducting medical knowledge questions and answers, the question and answer texts of multiple medical categories are stored in the local knowledge base (equivalent to the target knowledge base mentioned above) in advance, and then the description form of the question and answer text is identified. If the description form is in plain text form, the question and answer text is divided into multiple text segments, and then the large language model is trained into a question extraction model matching the medical field according to the identity prompt words, and the identity prompt words can be "You are an expert in problem summary in the medical field" to train a question extraction model with medical experience and strong problem summary ability. Then, the preliminary question information is extracted from the text segment by the question extraction model, and the preliminary question information is semantically understood to obtain the preliminary question semantic information, and the semantic relevance is calculated based on the preliminary question semantic information and the text semantic information to obtain the question criticality evaluation data. Therefore, the criticality of the preliminary question information in the candidate question and answer text is characterized by the question criticality evaluation data, so as to select the preliminary question information with the largest question criticality evaluation data or the number of extracted before sorting as the candidate question information. Then, the candidate question information is vectorized to obtain the candidate question vector, and the candidate question vector is stored in the vector database as a database for subsequent answer retrieval.

[0148] When starting the medical knowledge question and answer, the medical question input by the user in the intelligent question and answer system is first received, and the content of the medical question is parsed. It should be noted that the medical question and the identity guidance information are input into the large language model together, and the identity guidance information can be "You are an expert in problem disassembly and refinement in the medical field". The large language model collects a large amount of relevant training question information and parsing verification information of the training question information in advance according to the identity guidance information, so as to train the large language model into a problem parsing model through the training question information and the parsing verification information, and parse the medical question through the problem parsing model to obtain the problem parsing information. Then, according to the problem parsing information, continue to input it into the trained problem disassembly model, and the problem disassembly model is also a large language model with problem disassembly function, and the medical problem is disassembled into multiple medical sub-questions through the problem disassembly model combined with the problem parsing information. Then, each medical sub-question is converted into a vector form to obtain a medical sub-question vector, and a vector similarity search is performed in the vector database according to each medical sub-question vector to retrieve the selected question information whose vector similarity meets the preset similarity threshold, and the candidate question and answer text corresponding to the selected question information is used as the target question and answer text. Candidate answer information is extracted from the target question and answer text, and the correlation between each candidate answer information and the medical question is calculated to obtain the question relevance. The candidate answer information whose question relevance is greater than or equal to the preset relevance is spliced ​​into the target answer information to achieve accurate answer retrieval.

[0149] Therefore, in the process of answering, the existing question and answer texts will be summarized in advance, and the question summary will be completed according to the semantics and identity prompt words in the question and answer text during the summary process, so as to summarize the question information that can accurately represent the question and answer text. At the same time, when processing the questions raised by the user, the questions are first parsed and sub-questions that are more in line with the true intention of the questions are generated, so as to complete the answer retrieval through more accurate sub-questions and questions summarized in advance, output more accurate answer information, and improve the accuracy of the reply.

[0150] See also Figure 8 The embodiment of the present application further provides a reply device based on a large language model, which can implement the above-mentioned reply method based on a large language model, and the device includes:

[0151] A preliminary acquisition module 801 is used to acquire candidate question and answer texts of a target knowledge base based on a preset knowledge category, and to acquire question extraction indication parameters;

[0152] A question extraction module 802 is used to extract questions from the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information;

[0153] The target acquisition module 803 is used to acquire target problem information;

[0154] The problem analysis module 804 is used to analyze the target problem information according to the preset problem analysis indication parameters to obtain problem analysis information;

[0155] The problem decomposition module 805 is used to decompose the target problem information according to the problem analysis information to obtain reference sub-problem information;

[0156] The answer extraction module 806 is used to extract answers from the candidate question and answer texts according to the reference sub-question information and the candidate question information to obtain target answer information.

[0157] The specific implementation of the reply device based on the large language model is basically the same as the specific implementation of the reply method based on the large language model mentioned above, and will not be repeated here.

[0158] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned reply method based on a large language model when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0159] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0160] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0161] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the reply method based on the large language model in the embodiment of this application;

[0162] Input / output interface 903, used to implement information input and output;

[0163] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0164] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0165] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0166] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned reply method based on the large language model is implemented.

[0167] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory 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 embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor 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.

[0168] The answering method and device based on the large language model, the electronic device and the storage medium provided in the embodiments of the present application extract candidate question information from the candidate question and answer text in advance according to the question extraction indication parameters, and complete the induction of the questions in advance. When determining the answer, the target question information is parsed according to the question parsing indication parameters to obtain the question parsing information, and then the target question information is disassembled into reference sub-question information according to the question parsing information to construct the reference sub-question information representing the true intention of the target question information. Then, the target answer information is extracted from the candidate question and answer text through the reference sub-question information and the candidate question information, which not only makes the answer determination operation easier, but also improves the accuracy of the answer.

[0169] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0170] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0171] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0172] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0173] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application 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 data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0174] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0175] In the several embodiments provided in the present application, it should be understood that the disclosed 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 above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0176] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0178] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0179] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A reply method based on a large language model, characterized in that: The method comprises: Obtain candidate question and answer texts of the target knowledge base based on preset knowledge categories, and obtain question extraction indication parameters; Extracting questions from the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information; Get target problem information; Perform problem analysis on the target problem information according to preset problem analysis indication parameters to obtain problem analysis information; Decompose the target question information according to the question analysis information to obtain reference sub-question information; Answers are extracted from the candidate question and answer texts according to the reference sub-question information and the candidate question information to obtain target answer information.

2. The method according to claim 1, characterized in that The question extraction indication parameters include: text segmentation indication information, question extraction indication information and text semantic information, wherein the text semantic information is the semantic information of the candidate question and answer text; The step of extracting questions from the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information includes: Segment the candidate question and answer text according to the text segmentation instruction information to obtain candidate text segments; Extracting questions from the candidate text segments according to the question extraction indication information to obtain preliminary question information; Performing a criticality assessment on the preliminary question information according to the text semantic information to obtain question criticality assessment data; wherein the question criticality assessment data represents the criticality of the preliminary question information in the candidate question and answer text; The candidate question information is screened out from the preliminary question information according to the question criticality assessment data.

3. The method according to claim 2, characterized in that The step of performing a criticality assessment on the preliminary question information according to the text semantic information to obtain question criticality assessment data includes: Performing semantic understanding on the preliminary question information to obtain preliminary question semantic information; The preliminary question semantic information and the text semantic information are correlated to obtain the question criticality assessment data.

4. The method according to any one of claims 1 to 3, characterized in that: The question parsing information includes: question category, question length information and target question semantic information; The step of decomposing the target question information according to the question analysis information to obtain reference sub-question information includes: Decomposing the target question information according to the question category and the target question semantic information to obtain candidate sub-question information; Expanding the candidate sub-question information according to the question length information and the target question semantic information to obtain expanded sub-question information; The candidate sub-question information and the extended sub-question information are concatenated to obtain the reference sub-question information.

5. The method according to any one of claims 1 to 3, characterized in that: The step of extracting answers from the candidate question and answer text according to the reference sub-question information and the candidate question information to obtain target answer information includes: Vectorize the reference sub-problem information to obtain a reference sub-problem vector; Vectorizing the candidate question information to obtain a candidate question vector; Calculate the similarity between the reference sub-question vector and the candidate question vector to obtain question similarity; Filtering selected question information from the candidate question information according to the question similarity and the preset number of questions; The answer is extracted from the candidate question and answer text according to the selected question information to obtain the target answer information.

6. The method according to claim 5, characterized in that The step of extracting answers from the candidate question and answer texts according to the selected question information to obtain the target answer information includes: Extracting candidate answer information from the candidate question and answer text according to the selected question information; Performing a relevance evaluation on the target question information and the candidate answer information to obtain relevance evaluation data; Filtering selected answer information from the candidate answer information according to a preset relevance threshold and the relevance evaluation data; The selected answer information is fused to obtain the target answer information.

7. The method according to any one of claims 1 to 3, characterized in that: After parsing the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information, the method further includes: Acquire updated question and answer text of the candidate question and answer text according to a preset time interval information period; The candidate question information is updated according to the updated question and answer text and the question extraction indication parameter.

8. A reply device based on a large language model, characterized in that: The device comprises: A preliminary acquisition module, used to acquire candidate question and answer texts of a target knowledge base based on preset knowledge categories, and to acquire question extraction indication parameters; A question extraction module, used to extract questions from the candidate question and answer text according to the question extraction indication parameter to obtain candidate question information; A target acquisition module is used to obtain target problem information; A problem analysis module, used to analyze the target problem information according to preset problem analysis indication parameters to obtain problem analysis information; A problem decomposition module is used to decompose the target problem information according to the problem analysis information to obtain reference sub-problem information; The answer extraction module is used to extract the answer from the candidate question and answer text according to the reference sub-question information and the candidate question information to obtain the target answer information.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the large language model-based reply method described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the large language model-based reply method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Intelligent question answering method and device based on emotional tendency and storage medium

    CN120030134A

  • Answer generation method and device, equipment, storage medium and product

    CN121009991A

  • Running control method and device of reply model, storage medium and electronic equipment

    CN121212376A

  • Question and answer method and device based on responder standing

    CN121901381A