Question and answer method and device based on large model, storage medium and electronic equipment

By determining and dividing the domain knowledge base in the big model question and answer system, generating index information, and matching questions, the problem of insufficient accuracy in the knowledge question and answer of specific domains is solved, and more accurate answer output is achieved.

CN119848222AActive Publication Date: 2025-04-18ANT ZHIXIN HANGZHOU INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510333579.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-04-18
Estimated Expiration
2045-03-19

AI Technical Summary

Technical Problem

In the prior art, large models lack understanding of knowledge in specific domains when dealing with professional questions and answers to specific domains, resulting in inaccurate answers.

Method used

By determining the domain knowledge base, dividing documents, predicting the questions asked by text blocks, generating index information, and matching user's questions with index information, obtaining relevant text blocks as input to the big model information.

Benefits of technology

Improve the accuracy of the big model in specific domain knowledge questions and answers, and guide the big model to output more accurate answers through more accurate relevant information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848222A_ABST
    Figure CN119848222A_ABST
Patent Text Reader

Abstract

The invention discloses a question answering method and device based on a large model, a storage medium and electronic equipment. And determining a domain knowledge base, dividing each document contained in the domain knowledge base, and determining each text block according to a division result. And for each text block, predicting a question asked by the text block as a prediction question corresponding to the text block, and determining index information according to each text block and the prediction question corresponding to each text block. And when a target question of the user is received, matching the target question with the index information to obtain related information. Because the index information is determined according to the prediction problem corresponding to each text block and each text block, that is, the index information comprises multiple types, the related information in the method is determined by integrating the similarity between the target problem and the multiple types of index information, the correlation with the target problem is stronger, and the accuracy of the target problem is improved. Domain knowledge with higher correlation with the target question can be provided for the large model, and the large model is guided to output a more accurate target answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present specification relates to the field of computer technology, and in particular to a question-answering method, device, storage medium, and electronic device based on a large model. Background Art

[0002] The big model has powerful natural language processing and text generation capabilities. However, since the training data of the big model cannot include professional knowledge in various fields, when the big model handles professional questions and answers about knowledge in a specific field, it will give inaccurate answers due to lack of understanding of the knowledge in that specific field.

[0003] In order to solve the above problems, an enhanced retrieval method has been proposed. According to the questions raised by the users, relevant content of the questions is retrieved from the external knowledge base containing knowledge in a specific field. The large model gives the answer to the question based on the retrieved relevant content.

[0004] However, in the existing enhanced retrieval method, only the similarity between the question raised by the user and the text blocks contained in the external knowledge base is used to search the external knowledge base to determine the relevant information. The retrieval method in the prior art is single, resulting in inaccurate relevant information. The relevant content retrieved by the prior art provides limited specific domain knowledge for the large model, resulting in low accuracy of the large model's answer.

[0005] Therefore, this specification provides a question answering method based on a large model. Summary of the invention

[0006] This specification provides a question-answering method, device, storage medium and electronic device based on a large model to at least partially solve the above-mentioned problems existing in the prior art.

[0007] This manual adopts the following technical solutions: This specification provides a question-answering method based on a large model, including: Determine a domain knowledge base, divide each document contained in the domain knowledge base, and determine each text block according to the division result; For each text block, predict the question asked about the text block as the predicted question corresponding to the text block; Determining index information of each text block according to each text block and the prediction problem corresponding to each text block; When a target question raised by a user is received, the target question is matched with the index information to obtain a text block related to the target question as relevant information; the target question and the relevant information are input into the big model to obtain a target answer given by the big model.

[0008] Optionally, the target question is matched with the index information to obtain a text block related to the target question as relevant information, specifically including: Determine a text block matching the target question according to the similarity between the target question and each text block; determine a predicted question matching the target question as a related question according to the similarity between the target question and the predicted questions corresponding to each text block; The text blocks matching the target question and the text blocks corresponding to the related questions are used as the related text blocks; According to the relevant text blocks, relevant information is determined.

[0009] Optionally, determining relevant information according to the relevant text blocks specifically includes: Deduplication is performed on the related text blocks to obtain deduplicated related text blocks; Determine the relevance scores between each relevant text block after deduplication and the target question respectively; According to each relevance score, a specified number of related text blocks are determined from each related text block after deduplication as related information.

[0010] Optionally, the text block includes a child text block and a parent text block; The documents contained in the domain knowledge base are divided, and the text blocks are determined according to the division results, specifically including: Dividing each document contained in the domain knowledge base to obtain each parent text block; For each parent text block, the parent text block is divided to obtain the child text blocks contained in the parent text block.

[0011] Optionally, the target question is matched with the index information to obtain a text block related to the target question as relevant information, specifically including: Determine a subtext block matching the target question according to the similarity between the target question and each subtext block; determine a predicted question matching the target question as a related question according to the similarity between the target question and the predicted questions corresponding to each subtext block; The sub-text blocks matching the target question and the sub-text blocks corresponding to the relevant questions are used as relevant text blocks; According to the relevant text blocks, relevant information is determined.

[0012] Optionally, determining the index information of each text block according to each text block and the prediction problem corresponding to each text block specifically includes: For each parent text block, extract a summary of the parent text block to determine a summary text of the parent text block; Each of the sub-text blocks, the prediction question corresponding to each of the sub-text blocks, and the summary text of each of the parent text blocks are used as index information of each of the text blocks.

[0013] Optionally, the target question is matched with the index information to obtain a text block related to the target question as relevant information, specifically including: According to the similarity between the target question and each sub-text block, a sub-text block matching the target question is determined; according to the similarity between the target question and the predicted questions corresponding to each sub-text block, a predicted question matching the target question is determined as a related question; according to the similarity between the target question and the summary texts of each parent text block, a summary text matching the target question is determined as a related summary; The sub-text blocks matching the target question, the sub-text blocks corresponding to the relevant question, and the sub-text blocks included in the parent text block corresponding to the relevant summary are used as the relevant text blocks; According to the relevant text blocks, relevant information is determined.

[0014] Optionally, determining relevant information according to the relevant text blocks specifically includes: Determine relevant information according to the parent text blocks corresponding to each of the relevant text blocks.

[0015] Optionally, the target question is matched with the index information to obtain a text block related to the target question as relevant information, specifically including: Obtain the historical conversations of the user; Input the historical dialogue and the target question into the big model, identify the omitted description in the target question, and supplement the target question according to the identified omitted description to obtain a first standard question; According to a preset glossary, identifying the professional terms contained in the first specification question; When it is determined that the professional term included in the first standard question is a non-standard expression, the non-standard expression is replaced with a standard expression in the term list to obtain a second standard question; The second standard question is matched with the index information, and according to the matching result, a text block related to the target question is determined as relevant information.

[0016] Optionally, before matching the target question with the index information to obtain a text block related to the target question as relevant information, the method further includes: Determining that the target problem is of a specified type; If the target question is not of the specified type, determine the keyword tag corresponding to the target question among the preset keyword tags, and based on the keyword tag corresponding to the target question, determine the text block related to the target question among the text blocks as relevant information.

[0017] Optionally, the target question is matched with the index information to obtain a text block related to the target question as relevant information, specifically including: Splitting the target problem to obtain sub-problems of the target problem; For each sub-question, the sub-question is matched with the index information to obtain a text block related to the sub-question as relevant information of the sub-question.

[0018] Optionally, the target question and the relevant information are input into a large model to obtain a target answer given by the large model, specifically including: For each sub-question, the sub-question and related information of the sub-question are input into the large model to obtain a sub-answer to the sub-question given by the large model; Integrate the sub-answers to each sub-question to get the target answer.

[0019] This specification provides a question-answering device based on a large model, the device comprising: A division module determines a domain knowledge base, divides each document contained in the domain knowledge base, and determines each text block according to the division result; A prediction question determination module predicts, for each text block, the question asked about the text block as the prediction question corresponding to the text block; An index information determination module, which determines the index information of each text block according to each text block and the prediction question corresponding to each text block; The answering module, when receiving a target question raised by a user, matches the target question with the index information to obtain a text block related to the target question as relevant information; inputs the target question and the relevant information into the large model to obtain the target answer given by the large model.

[0020] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned large model-based question-answering method is implemented.

[0021] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned large model-based question-answering method when executing the program.

[0022] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects: In the question-answering method based on the big model provided in this specification, a domain knowledge base is determined, and each document contained in the domain knowledge base is divided. Based on the division results, each text block is determined. For each text block, the question asked about the text block is predicted as the predicted question corresponding to the text block. Based on each text block and the predicted question corresponding to each text block, the index information of each text block is determined. When a target question raised by a user is received, the target question is matched with the index information to obtain a text block related to the target question as relevant information. The target question and the relevant information are input into the big model to obtain the target answer given by the big model.

[0023] Because the index information in this method is determined based on the prediction questions and text blocks corresponding to each text block, that is, the index information contains multiple types, the relevant information in this method is determined by the similarity between the target question and multiple types of index information, and has a stronger relevance to the target question. Therefore, the relevant information obtained in this method can provide the large model with domain knowledge that is more relevant to the target question, and guide the large model to output a more accurate target answer. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings: Figure 1 A flowchart of a large model-based question-answering method in this specification; Figure 2 A schematic diagram of the composition of index information provided in an embodiment of this specification; Figure 3 A schematic diagram of executing a question-answering process provided in an embodiment of this specification; Figure 4 A flowchart of a text block determination method provided in an embodiment of this specification; Figure 5 A schematic diagram of the composition of index information provided in an embodiment of this specification; Figure 6 A flowchart of a method for determining index information provided in an embodiment of this specification; Figure 7 A method corresponding to Figure 6 Schematic diagram of index information composition; Figure 8 A schematic diagram of executing a question-answering process provided in an embodiment of this specification; Fig. 9A schematic diagram of executing a question-answering process provided in an embodiment of this specification; Fig.10 A schematic diagram of executing a question-answering process provided in an embodiment of this specification; Fig.11 A schematic diagram of executing a question-answering process provided in an embodiment of this specification; Fig.12 A schematic diagram of a question-answering device based on a large model in this specification; Fig.13 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0027] Figure 1 The following is a flowchart of a question-answering method based on a large model in this specification, which specifically includes the following steps: S100: Determine a domain knowledge base, divide each document contained in the domain knowledge base, and determine each text block according to the division result.

[0028] In this specification, the device used for performing large model-based question answering can be a server, or an electronic device such as a desktop computer, a laptop computer, etc. For ease of description, the large model-based question answering method provided in this specification is described below using only the server as the execution subject.

[0029] The domain knowledge base in this specification corresponds to the specific problem domain of the question-and-answer method in this specification, and is a database containing the domain knowledge of the specific problem domain. This specification does not limit the specific content of the domain knowledge base. For example, if the problem domain is related to the financial risk assessment of a certain working group, the domain knowledge base is the financial risk assessment data of the working group, which may include assessment criteria, assessment recommendations, assessment conclusions of the assessed members, etc. If the problem domain is a network security-related issue, the domain knowledge base may include network security time cases, vulnerability management specifications, compliance standards, etc. of a certain department.

[0030] In the implementation of enhanced retrieval, it is necessary to match relevant information in the domain knowledge base through the target question raised by the user. Usually, in order to achieve more accurate matching, the content in the domain knowledge base is first divided into multiple text fragments as sub-text blocks.

[0031] This specification does not limit the specific method of content division, and any text segmentation method can be used. For example, rule-based segmentation can set segmentation rules according to chapters, paragraphs, etc., and semantic-based segmentation can use machine learning to learn contextual semantics and then perform segmentation based on semantics.

[0032] After content division, the obtained text blocks can be used to match with user questions to determine the text blocks with higher similarity to user questions and guide the large model to reason about problems in specific fields.

[0033] S102: For each text block, predict the question asked about the text block as the predicted question corresponding to the text block.

[0034] In this method, in order to obtain more types of content that match the target question and make the matching range more diversified, the server predicts the question asked about each text block as the predicted question corresponding to the text block.

[0035] Specifically, in one embodiment, the server may input the text block into the large model, so that the large model parses the content of the text block and asks questions about the content of the text block to obtain prediction questions for the text block. In this embodiment, the server may limit the number of prediction questions output by the large model, so that the large model outputs a preset number of prediction questions. Alternatively, the number of prediction questions output by the large model may not be limited, so that the large model can flexibly determine how many prediction questions to output based on the content of the sub-text block.

[0036] In another embodiment, the predicted questions may also be obtained by asking questions manually, and the server may obtain, for each sub-text block, the predicted questions that are manually annotated for the sub-text block.

[0037] A predicted question for a text block is a question that is predicted to be asked about the text block. The answer to the predicted question can be determined based on at least part of the content in the text block. This specification does not limit the number of predicted questions for a sub-text block, which can be one or more.

[0038] Taking the financial risk assessment data of a certain working group as an example, if a text block is: Compliance assessment focuses on the compliance of member countries with 40 standards, and is divided into four levels according to the compliance status: "Compliance" (C, full compliance), "Generally compliant" (LC, there are a few defects, most of them can be fully compliant), "Partial compliance" (PC, there are serious defects, most of them are not complied with) and "Non-compliance" (NC, all or part of the requirements are not applicable due to defects in national structure, laws or mechanisms).

[0039] The predicted questions for the sub-text may include: "What does compliance assessment mainly focus on", "How many levels are compliance assessment divided into", "What does C stand for", "What does LC stand for", "What does PC stand for", "What does NC stand for", etc.

[0040] The predicted questions of each sub-text will be used to match the target question input by the user, so as to determine a more accurate text block related to the target question based on the matched predicted questions, so as to obtain more accurate relevant information.

[0041] Since there are differences in the grammatical structures of interrogative sentences and descriptive sentences, the target questions input by users are usually interrogative sentences. Directly matching the target questions with text blocks may not produce accurate matching results, resulting in inaccurate determination of relevant information.

[0042] In this specification, the questions that may be asked for each text block are predicted in advance, so when matching, predicted questions that are very similar to or even exactly the same as the target question may be matched. Then, the server can accurately locate the user's intention based on the text block corresponding to the predicted question, determine more accurate relevant information, and finally get a more accurate answer based on the relevant information when reasoning with the large model.

[0043] S104: Determine index information of each text block according to each text block and the prediction problem corresponding to each text block.

[0044] Figure 2 A schematic diagram of the composition of index information provided in an embodiment of this specification, in Figure 2 In the corresponding embodiment, the index information includes two types of content, namely, the prediction question corresponding to each text block and each text block itself.

[0045] The index information in this manual is the content that needs to be matched with the user's question. Compared with the conventional index information that only contains one type of content of the text block itself, the index information in this manual is richer in composition.

[0046] The text block itself is used to match the semantic similarity of the answer to the target question, and the sub-text block with the same or similar words as the target question may be retrieved. The predicted question corresponding to the sub-text block is used to match the consistency of the question statement and the semantic similarity of the question to the target question, and the predicted question with the target question statement and semantics completely consistent may be determined. Through this embodiment, the server can perform mixed retrieval of the user's question in the index information of various types of content to determine more accurate relevant information.

[0047] S106: When receiving a target question raised by a user, the target question is matched with the index information to obtain a text block related to the target question as relevant information; the target question and the relevant information are input into the big model to obtain a target answer given by the big model.

[0048] After the above index information is determined, the server may store the index information. When receiving a target question raised by a user, the server matches the target question with the index information and obtains a text block related to the target question as relevant information.

[0049] In one or more embodiments of the present specification, the server matches the target question with various types of content included in the index information simultaneously to determine relevant information.

[0050] Specifically, the server uses each sub-text block included in the index information and the prediction question corresponding to each sub-text block as each candidate content, and then determines a specified number of candidate contents from each candidate content as related content according to the similarity between the target question and each candidate content.

[0051] When the relevant content determined by the server is a text block, the text block is used as the relevant information. When the relevant content determined by the server is a prediction question, the text block corresponding to the prediction question is used as the relevant information.

[0052] Therefore, in this specification, through various types of index information, the text blocks related to the target question are comprehensively determined to obtain relevant information, which can enable more accurate retrieval in the domain knowledge base.

[0053] The server inputs the retrieved relevant information together with the target question into the big model, so that the big model can infer the target question based on the relevant information and obtain an accurate target answer.

[0054] In the question-answering method based on the big model provided in this specification, a domain knowledge base is determined, and each document contained in the domain knowledge base is divided. Based on the division results, each text block is determined. For each text block, the question asked about the text block is predicted as the predicted question corresponding to the text block. Based on each text block and the predicted question corresponding to each text block, the index information of each text block is determined. When a target question raised by a user is received, the target question is matched with the index information to obtain a text block related to the target question as relevant information. The target question and the relevant information are input into the big model to obtain the target answer given by the big model.

[0055] Because the index information in this method is determined based on the prediction questions and text blocks corresponding to each text block, that is, the index information contains multiple types, the relevant information in this method is determined by the similarity between the target question and multiple types of index information, and has a stronger relevance to the target question. Therefore, the relevant information obtained in this method can provide the large model with domain knowledge that is more relevant to the target question, and guide the large model to output a more accurate target answer.

[0056] In the above step S106, the server may also match the target question with various types of content included in the index information to determine relevant information.

[0057] First, the server determines the text blocks that match the target question based on the similarity between the target question and each text block. According to the similarity between the target question and the predicted questions corresponding to each text block, the server determines the predicted questions that match the target question as related questions.

[0058] Specifically, the server may vectorize each text block and the prediction problem corresponding to each text block through a text embedding model, and determine a first feature vector of each text block and a second feature vector of the prediction problem of each text block.

[0059] After receiving the user's target question, the server vectorizes the target question through the above text embedding model to determine the target feature vector of the target question. Then, based on the similarity between the target question and each first feature vector, the server determines the text blocks corresponding to the first specified number of first feature vectors in the text blocks corresponding to each first feature vector as the text blocks matching the target question. Based on the similarity between the target question and each second feature vector, the server determines the predicted questions corresponding to the second specified number of second feature vectors in the predicted questions corresponding to each second feature vector as the related questions.

[0060] Then, the server may use the text blocks matching the target question and the text blocks corresponding to the related questions as the related text blocks.

[0061] Specifically, the server uses the text block that matches the target question as the first text block, and uses the text block corresponding to the relevant question as the second text block, and uses the first text block and the second text block as relevant text blocks.

[0062] Finally, the server determines the relevant information based on the relevant text blocks.

[0063] Because the first text block is at least one text block related to the target question selected from the text blocks contained in the domain knowledge base, that is, the first text block is the original content in the domain knowledge base, and the related question is further predicted based on the content of the sub-text, not the original content in the domain knowledge base. When reasoning with a large model, it is necessary to rely on the original content in the domain knowledge base to provide a reasoning basis for the large model. If it is not the original content, it may provide inaccurate information for the large model, resulting in inaccurate reasoning results. Therefore, in this embodiment, after the server determines the predicted question related to the target question, it needs to use the text block corresponding to the predicted question as the second text block, that is, as part of the relevant information.

[0064] Figure 3 A schematic diagram of executing a question-answering process provided in an embodiment of this specification is shown in FIG. Figure 3 As shown, the server matches the target question with each text block and the prediction question corresponding to each text block, determines the first text block and the second text block, and determines the relevant information of the input large model based on the first text block and the second text block.

[0065] The relevant information determined in this embodiment includes both a first text block determined based on the text block and a second text block determined based on the prediction question corresponding to the text block. The relevant information is determined by combining the first text block and the second text block. The determined relevant information has a high similarity with the target question in terms of the semantics of the content itself and the semantics of the prediction question, and can provide a more accurate reasoning basis for the large model.

[0066] The server may determine the relevant information according to the relevant text blocks in a variety of ways.

[0067] In one embodiment, the server may include all relevant text blocks as relevant information.

[0068] However, because the text block itself and the predicted question of the text block are semantically similar, the first text block obtained by matching the target question with each text block and the second text block obtained by matching the target question with the predicted question corresponding to each text block may contain the same text block.

[0069] Therefore, in order to reduce information redundancy, in one embodiment, the server may deduplicate the related text blocks consisting of the first text block and the second text block, and use the deduplicated related text blocks as related information. The related information in this embodiment is input into the large model, because the redundant information contained in the related information is reduced, the reasoning speed of the large model can be improved while ensuring the accuracy of reasoning.

[0070] In one embodiment, because the number of determined first text blocks and the number of second text blocks may be large, the number of related text blocks is also large, the amount of related information input into the large model is large, and the large model determines the target answer based on the related information at a slow speed.

[0071] Therefore, in order to further improve the reasoning speed of the large model, the server can sort each related text block according to the relevance between each related text block and the target question, and further screen each related text block based on the sorting result to determine some related text blocks as relevant information.

[0072] Specifically, the server determines the relevance score between each relevant text block and the target question. This specification does not limit the method for determining the relevance score.

[0073] The server can use any existing relevance evaluation algorithm to determine the relevance score, such as the term frequency-inverse document frequency (TF-IDF) algorithm, the Best Matching 25 (BM25) algorithm, etc. The relevance score can also be determined by machine learning, and the neural network model is used to extract features of each text block and the target question. Based on the extracted features, the neural network model outputs the relevance score of each text block and the target question. Alternatively, the relevance score can also be determined by a large model, that is, the server inputs each text block, the target question, and the prompt word into the large model, and the prompt word explicitly causes the large model to evaluate the relevance of each text block with the target question and output the relevance score corresponding to each text block.

[0074] After determining the relevance score corresponding to each text block, the server sorts the text blocks according to the relevance score of each text block, and determines a specified number of related text blocks in descending order of relevance scores as related information.

[0075] In another embodiment, in order to obtain relevant information without duplication and with a small amount of data, the above-mentioned embodiment of determining relevant information by removing duplication and the embodiment of determining relevant information by screening can be used in a superimposed manner.

[0076] Specifically, the server removes duplicates from each relevant text block to obtain each relevant text block after duplication. Then, the server determines the relevance score between each relevant text block after duplication and the target question, and determines a specified number of relevant text blocks from each relevant text block after duplication as relevant information according to each relevance score.

[0077] In one or more embodiments of the present specification, the server may also adopt a multi-level division method to determine each text block, and the text block in the present specification includes a child text block and a parent text block.

[0078] In the above step S100, the server can Figure 4 The steps shown identify each text block. Figure 4 A flowchart of a text block determination method provided in an embodiment of this specification is shown in FIG. Figure 4 As shown, the method specifically comprises the following steps: S200: Divide each document contained in the domain knowledge base to obtain each parent text block.

[0079] S202: For each parent text block, divide the parent text block to obtain child text blocks contained in the parent text block.

[0080] In step S100, if the domain knowledge base is divided into text blocks through one division, and there is no overlap between the text blocks obtained by the division, then the text blocks contained in the finally determined related information are independent of each other and do not contain context information. This results in limited domain knowledge provided to the large model, which is not conducive to the reasoning of the large model.

[0081] In this embodiment, a two-partition method is used to determine the parent text block and the child text block. Because the child text block is divided inside the parent text block, the parent text block is composed of multiple child text blocks, and the parent text block provides context information for the child text blocks it contains. When determining relevant information based on the text blocks in this embodiment, relevant information containing context can be determined, providing richer domain knowledge for the large model.

[0082] Based on the above Figure 4 In the illustrated embodiment, in the above step S106, the server may also determine the relevant information in the following manner.

[0083] First, the server determines the subtext blocks that match the target question based on the similarity between the target question and each subtext block. According to the similarity between the target question and the predicted questions corresponding to each subtext block, the server determines the predicted questions that match the target question as related questions.

[0084] Then, the server may use the sub-text blocks matching the target question and the sub-text blocks corresponding to the related questions as the related text blocks.

[0085] Specifically, the server uses the sub-text block that matches the target question as the first text block, and uses the sub-text block corresponding to the relevant question as the second text block, and uses the first text block and the second text block as the relevant text blocks.

[0086] Finally, the server determines the relevant information based on the relevant text blocks.

[0087] Figure 5 A schematic diagram of the composition of index information provided in an embodiment of this specification, in Figure 5 In the corresponding embodiment, the index information includes two types of content, namely, the prediction question corresponding to each sub-text block and each sub-text block itself.

[0088] In this embodiment, the specific steps of matching the target question with each sub-text block, the specific steps of matching the target question with the predicted question corresponding to each sub-text block, and the specific steps of determining relevant information based on the relevant text block are similar to the specific steps of matching the target question with each text block, the specific steps of matching the target question with the predicted question corresponding to each text block, and the specific steps of determining relevant information based on the relevant text block involved in the embodiment related to the above-mentioned step S106, and reference may be made to the description of the above-mentioned corresponding content.

[0089] Because the sub-text block is a more fine-grained division result of the domain knowledge base, it can usually contain more specific semantics. The relevant information determined based on the sub-text block is a more fine-grained matching result of the semantics of the target question, and has a higher semantic similarity with the target question. Therefore, when reasoning with the large model, a more accurate target answer can be obtained based on the relevant information in this embodiment.

[0090] Based on the above Figure 4 In the illustrated embodiment, in the above step S104, in order to perform a more accurate search, the server may also determine another type of index information through the parent text block to enrich the type of index information.

[0091] In one embodiment, the server may use each parent text block as another type of index information, and each child text block and the predicted question corresponding to each child text block as mixed index information for matching with the target question.

[0092] However, considering that the content of a parent text block is usually long, the child text blocks contained in a parent text block may have different semantic themes. Directly using the parent text block to match the target question may make it difficult to locate the semantic theme expressed by the target question, resulting in inaccurate matching.

[0093] Therefore, in another embodiment, the server may Figure 6 The steps shown determine the index information. Figure 6 A flowchart of a method for determining index information provided in an embodiment of this specification is shown in FIG. Figure 6 As shown, the method specifically comprises the following steps: S300: For each parent text block, extract a summary of the parent text block to determine a summary text of the parent text block.

[0094] S302: taking each of the sub-text blocks, the prediction question corresponding to each of the sub-text blocks, and the summary text of each of the parent text blocks as index information of each of the text blocks.

[0095] Figure 7 A method corresponding to Figure 6 The index information composition diagram is as follows: Figure 7 As shown, the index information consists of each sub-text block, the prediction question of each sub-text block, and the summary text of each parent text block.

[0096] The summary text is a description of the main content of the parent text block. The summary text is shorter and more concise. Using the summary text as index information can not only improve the matching speed, but also achieve more accurate semantic matching with the target question.

[0097] Based on the above Figure 6 In the illustrated embodiment, when the index information consists of each sub-text block, the predicted question of each sub-text block, and the summary text of each parent text block, in the above step S106, the server may also determine the relevant information according to the following method.

[0098] First, the server determines the sub-text blocks that match the target question based on the similarity between the target question and each sub-text block. According to the similarity between the target question and the predicted questions corresponding to each sub-text block, the predicted question that matches the target question is determined as the relevant question. According to the similarity between the target question and the summary text of each parent text block, the summary text that matches the target question is determined as the relevant summary.

[0099] In this step, the specific method for determining the sub-text block that matches the target question, and the specific method for determining the related questions are similar to the specific steps of determining the text block that matches the target question and the related questions based on the text block obtained by one division in the embodiment related to the above-mentioned step S106. For details, please refer to the description of the above-mentioned corresponding content.

[0100] When determining the relevant summaries, the server pre-vectorizes the summary text of each parent text block through the above-mentioned text embedding model to obtain the third feature vector of each summary text. After receiving the user's target question, the server vectorizes the target question through the text embedding model to determine the target feature vector of the target question. The server determines the third specified number of summary texts in the summary texts corresponding to each third feature vector as the relevant summaries based on the similarity between the target feature vector and each third feature vector.

[0101] Then, the server uses the sub-text block matching the target question, the sub-text block corresponding to the relevant question, and each sub-text block included in the parent text block corresponding to the relevant summary as each relevant text block.

[0102] Specifically, the server uses the sub-text block that matches the target question as the first text block. Uses the sub-text block corresponding to the relevant question as the second text block. Uses each sub-text block included in the parent text block corresponding to the relevant summary as the third text block. Uses the first text block, the second text block, and the third text block as relevant text blocks. And determines the relevant information based on each relevant text block.

[0103] Because the summary text is not the original content in the domain knowledge base, the server needs to determine the original content of the relevant summary based on the relevant summary, that is, to use the child text blocks contained in the parent text block corresponding to the relevant summary as the third text block to ensure that the large model can determine the accurate domain information based on the third text block.

[0104] Because the division levels of the first text block and the second text block are both sub-text blocks, the sub-text blocks contained in the parent text block, rather than the parent text block, are used as the third text block in order to unify the division level of the third text block with the first text block and the second text block. Because when the division level is not unified, the text lengths of the text blocks contained in the relevant information input into the large model vary, which is not conducive to accurate reasoning of the large model.

[0105] Figure 8 A schematic diagram of executing a question-answering process provided in an embodiment of this specification is shown in FIG. Figure 8 As shown, the server matches the target question with each text block, the predicted question corresponding to each text block, and the summary text of each parent text block, respectively, to obtain the first text block, the second text block, and the third text block that match the target question, and based on the first text block, the second text block, and the third text block, determines the relevant information of the input large model.

[0106] Based on the above Figure 5 or Figure 7In a corresponding embodiment, that is, when the index information consists of each sub-text block and the prediction question corresponding to each sub-text block, or the index information consists of each sub-text block, the prediction question corresponding to each sub-text block and the summary text of each parent text block, in the above step S106, the server can also determine the relevant information according to the following method.

[0107] The server may determine each related text block in the manner described in any of the above embodiments. In the above embodiments, the division level corresponding to the related text block is the child text block. The related information is determined according to the parent text block corresponding to each related text block.

[0108] The content of the sub-text block is shorter and contains more specific semantic information, which can more accurately locate the user's intention in the matching of the target question. However, due to the length limitation and lack of context information, when the sub-text block is provided to the large model as relevant information, the large model may not be able to understand the complete semantics of the sub-text block due to the lack of context information, resulting in inaccurate reasoning. The parent text block consists of multiple sub-text blocks, which provides context information for each sub-text block it contains.

[0109] Therefore, the method of this embodiment matches the target question at the level of the sub-text block and determines the relevant information of the input large model at the level of the parent text block, combining the advantages of the accurate positioning of the sub-text block in the matching process and the contextual information contained in the parent text block.

[0110] In the above step S106, because the target question input by the user may not be standardized, the server may first normalize the target question to determine a more accurate user intention and provide a more accurate answer to the target question.

[0111] First, the server obtains the user's historical conversations.

[0112] Specifically, the server may obtain all historical conversations contained in the historical question and answer records of the user, or a specified number of historical conversations in the historical question and answer records, as needed.

[0113] Alternatively, in some real-time scenarios, a user may initiate conversations in different conversation groups, and the contents of different conversation groups are independent of each other. Then the server may obtain all historical conversations of the user in the current conversation group, or a specified number of historical conversations in the current conversation group.

[0114] Secondly, the server inputs the historical conversation and the target question into the big model, identifies the omitted descriptions in the target question, and supplements the target question based on the identified omitted descriptions to obtain the first standard question.

[0115] According to language habits, in continuous conversations, users usually use elliptical descriptions. They will not repeat the content that has been mentioned in the historical conversation. In this case, the target question entered by the user may be incomplete in structure. If the target question originally entered by the user is input into the large model, the large model cannot accurately identify the user's intention and cannot give an accurate answer.

[0116] For example, in a certain conversation scenario, the target question entered by the user in the previous conversation of the current conversation is "How is the CDD in country A?" (here CDD is the abbreviation of Customer Due Diligence, and its full Chinese name is Customer Due Diligence. The target question entered by the user does not contain the full English name or Chinese name of CDD), and the target question entered in the current conversation is "What about region B?"

[0117] The server can determine that the target question in the current conversation is an abbreviated description based on the target question in the previous conversation, supplement the current target question as "How is the CDD in area B doing", and use "How is the CDD in area B doing" as the first standard question.

[0118] Next, the server identifies the professional terms contained in the first standard question according to the preset term list, and determines whether the professional terms contained in the first standard question are non-standard expressions. If so, the non-standard expressions are replaced with standard expressions in the term list to obtain the second standard question. If not, the first standard question is used as the second standard question.

[0119] The non-standard expressions here may be colloquial expressions, typos, English abbreviations, etc. In the term table, various professional terms included in the professional field of the question-and-answer scenario are stored, as well as the correspondence between the standard expressions of each professional term and various possible non-standard expressions.

[0120] For example, if the English abbreviation is used as a non-standard expression, when the first standard question is "How is the CDD in region B?", the server can identify that "CDD" in the first standard expression is a non-standard expression based on the terminology list, and determine that the standard expression corresponding to "CDD" in the terminology list is "customer due diligence", so the second standard expression is determined to be "How is the customer due diligence in region B?"

[0121] Then, the server matches the second standard question with the index information determined in step S104 to obtain a text block related to the target question as relevant information. The specific method of determining the relevant information here can refer to the description of the corresponding content in the above step S106.

[0122] In this embodiment, two normalization operations are included, namely, supplementing the omitted description to determine the first normalization problem, and replacing the professional terminology to determine the second normalization problem. In this embodiment, the above two normalization operations are described by taking supplementing the omitted description first and then replacing the professional terminology as an example.

[0123] In another embodiment, the two normalization operations can be performed simultaneously, that is, the server identifies the non-standard description of the professional terms contained in the target question while supplementing the target question with an abbreviated description according to the historical dialogue.

[0124] It should be noted that this embodiment is a scenario in which two normalization operations are used in combination. In fact, the two normalization operations can also be used separately.

[0125] If the normalization operation of supplementing the omitted description is used alone, after determining the first standardized question, the server directly matches the relevant information according to the first standardized question, and uses the first standardized question as the input of the large model. If the normalization operation of replacing professional terms is used alone, the omit description is not supplemented. The server directly replaces the non-standard description in the target question to obtain the second standardized question, matches the relevant information according to the second standardized question, and uses the second standardized question as the input of the large model.

[0126] In one or more embodiments of the present specification, the server may perform integrity verification on the target question to ensure that the target question can fully answer the user's intent before further processing.

[0127] In a scenario, the content contained in the domain knowledge base is described for different content categories, and the descriptions under each content category are similar. The content category is the narrative theme of the domain knowledge base, and the domain knowledge base is described according to each content category.

[0128] Take the financial risk assessment data of a certain working group as an example. In this domain knowledge base, there are assessment reports for each assessed member, and the content and structure of the assessment reports of different assessment members are similar. For example, the assessment report of assessment member 1 includes the assessment results of professional supervision, the assessment results of preventive measures supervision, and rectification suggestions. The assessment report of assessment member 2 also includes the assessment results of professional supervision, the assessment results of preventive measures supervision, and rectification suggestions. The assessment members in this example are content categories.

[0129] In this case, if the target question is "What are the evaluation results of professional supervision?", because there is no clear content dimension in the target question, that is, the target question does not contain any information about the evaluation members. Even if the target question is input to the big model, the big model cannot determine the real user intention and does not know which evaluation member the user wants to know about the evaluation results of professional supervision, so the big model cannot give an accurate answer.

[0130] In order to prevent the large model from being unable to perform accurate reasoning due to incomplete semantics of the target question, in the above step S106, the server performs semantic analysis on the target question to determine whether the target question corresponds to any content category.

[0131] If yes, the target question is matched with the index information to determine the relevant information of the target question. The specific method of determining the relevant information can refer to the description of the specific steps of determining the relevant information in step S106 above.

[0132] If not, the user is prompted to re-enter the target question to end the reasoning process of the target question in advance and save computing resources.

[0133] Furthermore, in addition to identifying the content category of the target question, the server can also perform sentence structure analysis on the target question to determine the completeness of the target question. When the sentence structure components of the target question are incomplete, it is usually impossible to express the complete semantics and the user's true intention.

[0134] For example, the target question "Financial security in Region B" does not have an object, so it is not clear what the user wants to ask about financial security in Region B. Even if such a target question is input into the big model, it is difficult to get an accurate answer. Therefore, when the sentence structure is detected to be incomplete, the user is prompted to re-enter the target question.

[0135] The above-mentioned content category identification and structural integrity identification can be performed either one or both according to actual conditions. When both are performed, the order of the two identification methods is not limited, and they can be performed simultaneously or sequentially.

[0136] In the above Figure 1 In the illustrated embodiment, when determining relevant information, the target question is matched with the index information of each text block in terms of vector similarity to determine the relevant information.

[0137] In fact, the server can also match the target question with each text block by using a tag matching method. In this embodiment, the server needs to determine the tag of each text block in the domain knowledge base before the above step S106. This specification does not limit the method of determining the tag, and can use manual annotation or keyword extraction, or any existing tag determination method.

[0138] Then, in step S106, after receiving the target question, the label of the target question is determined, and then the server screens each text block in the domain knowledge base according to the label of the target question, and determines the text block whose label is consistent with the target question as the relevant information.

[0139] Considering that label matching is a simple string matching, not a semantic matching, and its accuracy is lower than that of vector similarity matching, this manual Figure 1 However, it is not adopted in the embodiment shown. However, it is precisely because the tag matching is a string matching, compared with the vector similarity matching, the calculation process is simpler, the computing resources consumed in the matching process are less, and the matching speed is higher.

[0140] For target questions that can be answered clearly in the domain knowledge base, the relevant information retrieved during the retrieval of such questions is highly correlated with the keywords contained in the target questions, and the relevant information retrieved in the domain knowledge base is relatively fixed. In this case, label matching can be used to quickly locate relevant information.

[0141] For target questions that cannot be answered clearly in the domain knowledge base, a large model is required to infer the answers based on the relevant information retrieved from the domain knowledge base. The relevant information retrieved for such questions has a strong correlation with the semantics of the target question itself, and vector similarity matching can be used to achieve a more accurate semantic match.

[0142] Therefore, in one or more embodiments of the present specification, the server can combine the advantages of the two retrieval methods, and in step S106, before matching the target question with the index information, first determine whether the target question is of a specified type. The specified type indicates that the target question type for which the relevant information can be determined by vector similarity matching, and the non-specified type is the target question type for which the relevant information can be determined by label matching.

[0143] This specification does not limit the specific classification method of the specified type, which can be set according to needs. For example, query questions, non-open questions and other types can be used as specified types, and the specified type can also be flexibly determined according to the specific content of the documents contained in the domain knowledge base.

[0144] When the server determines that the target question is of a specified type, according to any embodiment corresponding to step S106, vector similarity matching is performed between the target question and the index information of each text block to determine relevant information.

[0145] When the server determines that the target question is not of the specified type, it performs label matching on the target question and each text block in the domain knowledge base, and determines the text block related to the target question as relevant information.

[0146] Specifically, the server determines the keyword tag corresponding to the target question from among the preset keyword tags, and determines, according to the keyword tag corresponding to the target question, a text block related to the target question from among the text blocks as relevant information.

[0147] Fig. 9 A schematic diagram of executing a question-answering process provided in an embodiment of this specification is shown in FIG. Fig. 9 As shown in , when the target question is not of the specified type, the label matching method is used to determine the relevant information. When the target question is of the specified type, the vector similarity matching method is used to determine the relevant information. Fig. 9 A specific method of vector similarity matching is listed in the dotted box, and the content in the dotted box can be replaced by any vector similarity matching method in the embodiment corresponding to S106.

[0148] The server matches the target question with each text block and the prediction question corresponding to each text block, determines the first text block and the second text block, and determines the relevant information of the input large model based on the first text block and the second text block.

[0149] In one embodiment, when each document contained in the domain knowledge base contains clear summary text about specific content, when a user asks a summary question about the specific content, the server can directly query the summary text of the specific question in each text block as relevant information.

[0150] For example, when the domain knowledge base is the financial risk assessment data of a certain working group, the domain knowledge base contains the working group's assessment report for each assessment member. The assessment report includes both the assessment conclusions for each assessment project and a summary description of the assessment situation based on the assessment conclusions of each assessment project.

[0151] The evaluation conclusion of a single evaluation project and the text blocks corresponding to the summary description of the evaluation situation can be marked with the content label of the summary text. When the user asks what the evaluation conclusion of a certain evaluation project is, or what the overall evaluation situation of a certain evaluation member is, the label can be directly matched in the text blocks contained in the domain knowledge base to determine the summary text required by the user.

[0152] In the scenario of this embodiment, the server may set a content tag for each text block contained in the domain knowledge base before the above step S106. The content tag may include summary content and non-summary content. A keyword tag is set for each text block. The keyword tag is a keyword contained in the text block, which can indicate which aspect the text block is describing. The content tag and the keyword tag can be obtained by manual annotation or extracted by a large model based on the semantics of the text block.

[0153] For example, in a text block 1, the evaluation results of occupational supervision, the evaluation results of preventive measures supervision, and rectification suggestions are included. The keyword tags of this text block can be "the first evaluation result of occupational supervision", "the second evaluation result of occupational supervision", "first-level suggestions", "second-level suggestions", etc. In another text block, the evaluation results of occupational supervision, the evaluation results of preventive measures supervision, and rectification suggestions are included. The keyword tags of this text block can be "the first evaluation result of preventive measures supervision", "the second evaluation result of preventive measures supervision", "first-level suggestions", "second-level suggestions", etc.

[0154] Based on the application scenario of this embodiment, the server can flexibly determine the designated type according to the specific content of the documents contained in the domain knowledge base, and use the target question with the content label as summary content as the designated type.

[0155] Before matching the target question with the index information in step S106, the server determines the content tag corresponding to the target question according to the semantics of the target question, and determines whether the content tag is summary content.

[0156] If so, it is determined that the target question is of the specified type, then it is determined that the target question is not of the specified type, and the target question is matched with the index information by vector similarity matching according to any embodiment related to the above step S106 to determine relevant information.

[0157] If not, use tag matching to determine relevant information.

[0158] Specifically, the server determines the keyword tag corresponding to the target question according to the semantics of the target question, matches the keyword tag corresponding to the target question with the keyword tags of each text block, and determines the text block whose keyword tag is consistent with the target question as the relevant information.

[0159] Furthermore, in another embodiment, in order to more accurately match summary questions according to tags, the summary content can be further subdivided into full-text summary content and single-item summary content, that is, the content tag consists of full-text summary content, single-item summary content and non-summary content.

[0160] The degree of summary of the sub-text block of the full-text summary type is higher, usually it is a summary of a longer content. The degree of summary of the sub-text block of the single summary type is lower, usually it is a summary of a shorter content.

[0161] For example, if a certain content in the domain knowledge base is the evaluation result of professional supervision, then under this content level, it may include the evaluation results of professional supervision of multiple evaluation members, and the evaluation result of professional supervision of one evaluation member may include the evaluation results of the evaluation member in multiple evaluation projects.

[0162] According to the above example, when the domain knowledge base is the financial risk assessment data of a certain working group, the domain knowledge base contains the working group's assessment report for each assessment member. The assessment report includes both the assessment conclusions for each assessment project and a summary description of the assessment situation based on the assessment conclusions of each assessment project.

[0163] The text block corresponding to the evaluation conclusion of a single evaluation item can be marked as single item summary content. The text block corresponding to the summary description of the evaluation situation can be marked as full text summary content.

[0164] When the content tag of the target question is full-text summary content, in each sub-text block with a content tag of the full-text summary type, the relevant information of the target question is determined according to the sub-text block consistent with the keyword tag of the target question.

[0165] When the content tag of the target question is a single summary content, in each sub-text block with a content tag of the single summary type, the relevant information of the target question is determined according to the sub-text consistent with the keyword tag of the target question.

[0166] In one or more embodiments of the present specification, the target question input by the user may be relatively long, or the logical reasoning process of the target question may be relatively complex. If such a target question is directly matched with the index information, the accuracy of the relevant information obtained by matching may not be high because the key information in the target question cannot be located. Then, when the relevant information is subsequently input into the large model, it is impossible to provide accurate domain knowledge for the large model, resulting in the large model being unable to output an accurate answer.

[0167] Therefore, in the above step S106, after obtaining the target question, the server can split the target question to obtain the sub-questions contained in the target question. Then, for each sub-question, the sub-question is matched with the index information to obtain a text block related to the sub-question as the relevant information of the sub-question.

[0168] This specification does not limit the method of splitting the target problem, and the target problem can be split according to punctuation marks or through a large model.

[0169] Compared with the target question, the understanding and reasoning process of the sub-question is relatively simple, which helps the large model extract key information of the sub-question to provide targeted answers.

[0170] For comparison-type target questions, the server needs to first identify the comparison object in the target question and split the target question into sub-questions for the comparison object.

[0171] For example, in a scenario, the target question is "Who performs better in the evaluation results of occupational regulation, Country A or Country C?", then the target question can be divided into sub-question 1: "The evaluation results of occupational regulation in Country A" and sub-question 2: "The evaluation results of occupational regulation in Country C", a total of two sub-questions.

[0172] For complex and long questions, the server can split the target question into multiple simple questions.

[0173] For another example, in one scenario, the target question is "What types of non-profit organizations are there in country D? What activities do these non-profit organizations mainly carry out? What is the main source of funding? Do they obtain funding from other countries or regions?" Then the target question can be divided into sub-question 1: "What types of non-profit organizations are there in country D?", sub-question 2: "What activities do these non-profit organizations in country D mainly carry out?", sub-question 3: "What is the main source of funding for these non-profit organizations in country D?", sub-question 4: "Do these non-profit organizations in country D obtain funding from other countries or regions?", a total of four sub-questions.

[0174] Sub-problems are used to match target information. By splitting the target problem into sub-problems, the sub-problems can be input into the large model for reasoning in subsequent steps, which can simplify the reasoning process of the large model and obtain more accurate target answers.

[0175] Based on the above embodiment, when the target problem is split into multiple sub-problems, in the above step S106, the server can input the sub-problem and related information of each sub-problem into the big model to obtain the sub-answer for the sub-problem output by the big model.

[0176] Then, the server integrates the sub-answers of each sub-question to obtain the target answer. The integration operation can be sentence concatenation, that is, concatenating the sub-answers of each sub-question into the target answer.

[0177] Alternatively, the integration operation can also be semantic fusion, that is, the sub-answers of each sub-question are input into the big model again, and then the big model semantically fuses the sub-answers and outputs the target answer. Compared with the above sentence splicing operation, the sentence connection in the target answer obtained in this embodiment is more natural and the target answer has better coherence.

[0178] Fig.10 A schematic diagram of executing a question-answering process provided in an embodiment of this specification is shown in FIG. Fig.10 The dotted box in the figure is illustrated as a method for determining relevant information, and the content in the dotted box can be replaced by any method for determining relevant information in the embodiment corresponding to the above step S106.

[0179] like Fig.10 As shown in the figure, the target problem is divided into three sub-problems, and for each sub-problem, the relevant information of the sub-problem is determined. Then the sub-problem and the relevant information of the sub-problem are input into the big model to obtain the sub-answer of the sub-problem. Finally, the sub-answers are integrated to obtain the target answer.

[0180] In one or more embodiments of this specification, in combination with the above embodiments, the execution process of a question-answering method can be as follows: Fig.11 As shown, Fig.11 A schematic diagram of executing a question-and-answer process provided in an embodiment of this specification.

[0181] like Fig.11 As shown, when the user's target question is received in step S106, the target question is normalized and integrity verified at one time. After the integrity verification, the normalized and semantically complete target question is split into three sub-questions.

[0182] Next, the server executes the relevant information determination step shown in the dashed box for each sub-question to determine the relevant information for each sub-question. Fig.11 In the related information determination step shown in the dotted box, the server first determines whether the target question is of a specified type.

[0183] If so, then according to the vector similarity matching method, the sub-question is matched with three types of index information, namely, each sub-text block, the prediction question of each sub-text block and the summary text of each parent text block, to determine the first text block, the second text block and the third text block as relevant text blocks. The division level of the relevant text blocks is sub-text blocks. The server can use the relevant text blocks as relevant information, or use the parent text blocks of the relevant text blocks as relevant information.

[0184] If not, a sub-text block that is consistent with the sub-question tag is determined by tag matching, and the determined sub-text block, or the parent text block of the determined sub-text block, is used as relevant information.

[0185] Then, the server inputs the sub-question and the related information of the sub-question into the big model to obtain the sub-answer of the sub-question. Finally, the sub-answers of each sub-question are integrated to obtain the target answer of the target question.

[0186] The above is the question-answering method based on the big model provided in this specification. Based on the same idea, this specification also provides a corresponding question-answering device based on the big model, such as Fig.12 shown.

[0187] Fig.12 A schematic diagram of a question-answering device based on a large model provided in this specification specifically includes: The division module 400 is used to determine a domain knowledge base, divide each document contained in the domain knowledge base, and determine each text block according to the division result; A predicted question determination module 402 is used to predict, for each text block, a question to be asked about the text block as a predicted question corresponding to the text block; An index information determination module 404, configured to determine index information of each text block according to each text block and a prediction question corresponding to each text block; The answer module 406 is used to match the target question with the index information when receiving the target question raised by the user, and obtain a text block related to the target question as relevant information; input the target question and the relevant information into the big model to obtain the target answer given by the big model.

[0188] Optionally, the answer module 406 is specifically used to determine a text block that matches the target question based on the similarity between the target question and the text blocks; determine a predicted question that matches the target question as a related question based on the similarity between the target question and the predicted questions corresponding to the text blocks, use the text block that matches the target question and the text block corresponding to the related question as related text blocks, and determine related information based on the related text blocks.

[0189] Optionally, the answer module 406 is specifically used to deduplicate the relevant text blocks to obtain the deduplicated relevant text blocks, determine the correlation scores between the deduplicated relevant text blocks and the target question respectively, and determine a specified number of relevant text blocks in the deduplicated relevant text blocks as relevant information based on the correlation scores.

[0190] Optionally, the text block includes child text blocks and parent text blocks, and the division module 400 is specifically used to divide the documents contained in the domain knowledge base to obtain parent text blocks, and for each parent text block, divide the parent text block to obtain child text blocks contained in the parent text block.

[0191] Optionally, the answer module 406 is specifically used to determine the sub-text block that matches the target question based on the similarity between the target question and the sub-text blocks; determine the predicted question that matches the target question based on the similarity between the target question and the predicted questions corresponding to the sub-text blocks, as the related questions, use the sub-text block that matches the target question and the sub-text block corresponding to the related questions as related text blocks, and determine relevant information based on the related text blocks.

[0192] Optionally, the index information determination module 404 is specifically used to extract a summary of each parent text block, determine the summary text of the parent text block, and use the child text blocks, the prediction questions corresponding to the child text blocks, and the summary text of the parent text blocks as the index information of the text blocks.

[0193] Optionally, the answer module 406 is specifically used to determine the sub-text block that matches the target question based on the similarity between the target question and the sub-text blocks; determine the predicted question that matches the target question as a related question based on the similarity between the target question and the predicted questions corresponding to the sub-text blocks; determine the summary text that matches the target question as a related summary based on the similarity between the target question and the summary texts of the parent text blocks, and use the sub-text blocks matching the target question, the sub-text blocks corresponding to the related questions, and the sub-text blocks contained in the parent text block corresponding to the related summary as related text blocks, and determine relevant information based on the related text blocks.

[0194] Optionally, the answer module 406 is specifically configured to determine relevant information according to the parent text blocks corresponding to the relevant text blocks.

[0195] Optionally, the answer module 406 is specifically used to obtain the user's historical conversations, input the historical conversations and the target question into a large model, identify the omitted descriptions in the target question, and supplement the target question based on the identified omitted descriptions to obtain a first standard question, identify the professional terms included in the first standard question based on a preset glossary, and when it is determined that the professional terms included in the first standard question are non-standard expressions, replace the non-standard expressions with standard expressions in the glossary to obtain a second standard question, match the second standard question with the index information, and determine the text block related to the target question as relevant information based on the matching result.

[0196] Optionally, the answer module 406 is specifically used to determine whether the target question is of a specified type. If the target question is not of the specified type, the keyword tag corresponding to the target question is determined among the preset keyword tags, and based on the keyword tag corresponding to the target question, the text block related to the target question is determined among the text blocks as relevant information.

[0197] Optionally, the answer module 406 is specifically used to split the target problem to obtain sub-problems of the target problem, and for each sub-problem, match the sub-problem with the index information to obtain a text block related to the sub-problem as relevant information of the sub-problem.

[0198] Optionally, the answer module 406 is specifically used to input the sub-problem and related information of each sub-problem into the big model, obtain the sub-answer of the sub-problem given by the big model, and integrate the sub-answers of each sub-problem to obtain the target answer.

[0199] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The proposed large-model based question answering method.

[0200] This manual also provides Fig.13 The schematic structure diagram of the electronic device shown in FIG. Fig.13 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The question-answering method based on the large model. Of course, in addition to the software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0201] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0202] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.

[0203] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0204] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0205] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0206] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0207] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0208] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0209] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0210] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0211] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0212] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0213] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0214] This specification may 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. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0215] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0216] The above description is only an embodiment of this specification and is not intended to limit this specification. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this application.

Claims

1. A question-answering method based on a large model, characterized in that: include: Determine a domain knowledge base, divide each document contained in the domain knowledge base, and determine each text block according to the division result; For each text block, predict the question asked about the text block as the predicted question corresponding to the text block; Determining index information of each text block according to each text block and the prediction problem corresponding to each text block; When receiving a target question raised by a user, matching the target question with the index information to obtain a text block related to the target question as relevant information; The target question and the related information are input into the big model to obtain the target answer given by the big model.

2. The method according to claim 1, characterized in that The target question is matched with the index information to obtain a text block related to the target question as relevant information, specifically including: Determine a text block matching the target question according to the similarity between the target question and each text block; determine a predicted question matching the target question as a related question according to the similarity between the target question and the predicted questions corresponding to each text block; The text blocks matching the target question and the text blocks corresponding to the related questions are used as the related text blocks; According to the relevant text blocks, relevant information is determined.

3. The method according to claim 2, characterized in that According to the relevant text blocks, relevant information is determined, including: Deduplication is performed on the related text blocks to obtain deduplicated related text blocks; Determine the relevance scores between each relevant text block after deduplication and the target question respectively; According to each relevance score, a specified number of related text blocks are determined from each related text block after deduplication as related information.

4. The method according to claim 1, characterized in that The text block includes a child text block and a parent text block; The documents contained in the domain knowledge base are divided, and the text blocks are determined according to the division results, specifically including: Dividing each document contained in the domain knowledge base to obtain each parent text block; For each parent text block, the parent text block is divided to obtain the child text blocks contained in the parent text block.

5. The method according to claim 4, characterized in that The target question is matched with the index information to obtain a text block related to the target question as relevant information, specifically including: Determine a subtext block matching the target question according to the similarity between the target question and each subtext block; determine a predicted question matching the target question as a related question according to the similarity between the target question and the predicted questions corresponding to each subtext block; The sub-text blocks matching the target question and the sub-text blocks corresponding to the relevant questions are used as relevant text blocks; According to the relevant text blocks, relevant information is determined.

6. The method according to claim 4, characterized in that Determining index information of each text block according to each text block and the prediction problem corresponding to each text block specifically includes: For each parent text block, extract a summary of the parent text block to determine a summary text of the parent text block; Each of the sub-text blocks, the prediction question corresponding to each of the sub-text blocks, and the summary text of each of the parent text blocks are used as index information of each of the text blocks.

7. The method according to claim 6, characterized in that The target question is matched with the index information to obtain a text block related to the target question as relevant information, specifically including: According to the similarity between the target question and each sub-text block, a sub-text block matching the target question is determined; according to the similarity between the target question and the predicted questions corresponding to each sub-text block, a predicted question matching the target question is determined as a related question; according to the similarity between the target question and the summary texts of each parent text block, a summary text matching the target question is determined as a related summary; The sub-text blocks matching the target question, the sub-text blocks corresponding to the relevant question, and the sub-text blocks included in the parent text block corresponding to the relevant summary are used as the relevant text blocks; According to the relevant text blocks, relevant information is determined.

8. The method according to claim 5 or 7, characterized in that According to the relevant text blocks, relevant information is determined, including: Determine relevant information according to the parent text blocks corresponding to each of the relevant text blocks.

9. The method according to claim 1, matching the target question with the index information to obtain a text block related to the target question as relevant information, specifically comprising: Obtain the historical conversations of the user; Input the historical dialogue and the target question into the big model, identify the omitted description in the target question, and supplement the target question according to the identified omitted description to obtain a first standard question; According to a preset glossary, identifying the professional terms contained in the first specification question; When it is determined that the professional term included in the first standard question is a non-standard expression, the non-standard expression is replaced with a standard expression in the term list to obtain a second standard question; The second standard question is matched with the index information, and according to the matching result, a text block related to the target question is determined as relevant information.

10. The method according to claim 1, characterized in that Before matching the target question with the index information to obtain a text block related to the target question as relevant information, the method further includes: Determining that the target problem is of a specified type; If the target question is not of the specified type, determine the keyword tag corresponding to the target question among the preset keyword tags, and determine the text block related to the target question among the text blocks based on the keyword tag corresponding to the target question as relevant information.

11. The method according to claim 1, characterized in that The target question is matched with the index information to obtain a text block related to the target question as relevant information, specifically including: Splitting the target problem to obtain sub-problems of the target problem; For each sub-question, the sub-question is matched with the index information to obtain a text block related to the sub-question as relevant information of the sub-question.

12. The method according to claim 11, characterized in that Inputting the target question and the relevant information into the big model to obtain the target answer given by the big model specifically includes: For each sub-question, the sub-question and related information of the sub-question are input into the large model to obtain a sub-answer to the sub-question given by the large model; Integrate the sub-answers to each sub-question to get the target answer.

13. A question-answering device based on a large model, characterized in that: include: A division module determines a domain knowledge base, divides each document contained in the domain knowledge base, and determines each text block according to the division result; A prediction question determination module predicts, for each text block, the question asked about the text block as the prediction question corresponding to the text block; An index information determination module, which determines the index information of each text block according to each text block and the prediction question corresponding to each text block; The answer module, when receiving a target question raised by a user, matches the target question with the index information and obtains a text block related to the target question as relevant information; The target question and the related information are input into the big model to obtain the target answer given by the big model.

14. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 12 is implemented.

15. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Insurance knowledge question-answer pair acquisition method and device, equipment and storage medium

    CN117709359A

  • Question and answer method and device based on large model

    CN118885579A

  • Question answering method and device and computer readable storage medium

    CN119166792A

  • Automatic question answering method and tax knowledge question answering method

    CN119621920A

  • Large model knowledge base construction method based on multi-granularity retrieval

    CN119647581A

Cited By

  • Information processing method and device based on large model, electronic equipment and storage medium

    CN120429415A

  • Intelligent customer service knowledge question answering method based on RAG

    CN120804274A