Intelligent question answering method and device based on multi-field knowledge driving, equipment and storage medium

By retrieving multiple preset domain knowledge bases based on user questions in a multi-domain question-answering system, obtaining target knowledge fragments, and generating tool description information, the problem of high error rate in tool selection for large language models is solved, and the accuracy of user question answers is improved.

CN122489718APending Publication Date: 2026-07-31CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MERCHANTS BANK
Filing Date
2026-05-21
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing multi-domain question answering systems, while retaining the ability to isolate knowledge permissions in each domain, struggle to reduce the error rate in selecting large language model tools, resulting in insufficient accuracy in answering user questions.

Method used

By retrieving target knowledge fragments from multiple pre-defined domain knowledge bases based on user questions, and determining tool description information corresponding to each pre-defined domain knowledge base based on these fragments, the user questions and tool description information are used as input to a large language model to generate target tools and tool input parameter information. Finally, the target tool outputs the answer to the question.

Benefits of technology

While maintaining knowledge access control, the error rate in selecting large language model tools was reduced, and the accuracy of answering user questions was improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489718A_ABST
    Figure CN122489718A_ABST
Patent Text Reader

Abstract

This application discloses an intelligent question-answering method, apparatus, device, and storage medium based on multi-domain knowledge-driven technology, relating to the field of natural language processing technology. The method includes: retrieving multiple preset domain knowledge bases based on a user question to obtain multiple target knowledge fragments; determining the description information of tools corresponding to each preset domain knowledge base based on each target knowledge fragment; using the user question and the description information of each tool as input to a large language model to obtain the target tool output by the large language model and its corresponding tool input parameters; and using the tool input parameters and the user question as input to the target tool to obtain the question answer output by the target tool. This solves the technical problem of increased tool selection error rate in large language models due to blurred domain boundaries while preserving the isolation capability of knowledge permissions across domains, and achieves the technical effect of improving the accuracy of user question answers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing technology, and in particular to an intelligent question-answering method, apparatus, device, and storage medium based on multi-domain knowledge-driven approaches. Background Technology

[0002] As artificial intelligence technology penetrates vertical industries, the application scenarios of multi-domain knowledge question-answering systems are becoming increasingly complex, requiring a single system to simultaneously handle multiple professional knowledge bases with isolated access permissions. This necessitates that the system accurately respond to user questions that cross domains or have ambiguous boundaries, while maintaining independent management and access control of knowledge in each domain.

[0003] Existing multi-domain question-answering systems employ two design approaches. The first approach encapsulates knowledge retrieval for each domain as an independent tool, which is then selected and invoked by a large language model based on its description. However, when the boundaries of domain knowledge are ambiguous, the model struggles to accurately distinguish tools based on static descriptions due to the "illusion phenomenon," leading to an increased error rate in tool selection. The second approach stores multi-domain knowledge in a single database, relying on retrieval algorithms to obtain knowledge. While this approach can handle ambiguous boundary issues, the mixed storage makes it impossible to differentiate knowledge access permissions by domain, creating data security risks.

[0004] Therefore, how to reduce the error rate of large language model tool selection while preserving the ability to isolate knowledge permissions in various domains is a technical problem that needs to be solved to improve the accuracy of user question answers. Summary of the Invention

[0005] The main purpose of this application is to provide an intelligent question-answering method, device, equipment, and storage medium based on multi-domain knowledge-driven technology, aiming to solve the technical problem of reducing the error rate of large language model tool selection while preserving the knowledge access control capabilities of each domain.

[0006] To achieve the above objectives, this application proposes an intelligent question-answering method based on multi-domain knowledge, the method comprising: Based on the user's question, multiple preset domain knowledge bases are retrieved to obtain multiple target knowledge fragments; Based on each of the target knowledge fragments, determine the description information of the tools corresponding to each of the preset domain knowledge bases; The user question and the description information of each tool are used as input to the large language model to obtain the target tool and the corresponding tool input parameter information output by the large language model. The tool's input parameters and the user's question are used as inputs to the target tool to obtain the target tool's output answer.

[0007] In one embodiment, the step of retrieving multiple preset domain knowledge bases based on user questions to obtain multiple target knowledge fragments includes: Based on the user's question, multiple preset domain knowledge bases are retrieved to obtain the related knowledge fragments and corresponding first relevance scores in each preset domain knowledge base; Based on the associated knowledge fragments and the first relevance score, the relevance scores of each knowledge fragment in each of the preset domain knowledge bases are adjusted to obtain a second relevance score; Based on the second relevance score, multiple target knowledge fragments are selected from the knowledge fragments in each of the preset domain knowledge bases.

[0008] In one embodiment, the step of retrieving multiple preset domain knowledge bases based on the user's question, and obtaining related knowledge fragments and corresponding first relevance scores in each preset domain knowledge base, includes: Obtain user system privileges and user issues; Based on the system permissions, multiple preset domain knowledge bases are determined; Based on the user question, multiple preset domain knowledge bases are retrieved to obtain the first relevance score of each knowledge fragment in each preset domain knowledge base; The knowledge fragments whose first relevance score is greater than a preset score threshold are used as the associated knowledge fragments of each preset domain knowledge base.

[0009] In one embodiment, adjusting the relevance scores of each knowledge fragment in each of the preset domain knowledge bases based on the associated knowledge fragments and the first relevance score to obtain a second relevance score includes: Based on each of the first relevance scores, the first penalty factor is obtained; The number of related knowledge fragments in each of the preset domain knowledge bases is used as the second penalty factor; Based on the first penalty factor and the second penalty factor, the relevance scores of each knowledge fragment in each preset domain knowledge base are adjusted to obtain a second relevance score.

[0010] In one embodiment, selecting multiple target knowledge fragments from knowledge fragments in each of the preset domain knowledge bases based on the second relevance score includes: The number of samples is determined based on the number of items in the preset domain knowledge base; The knowledge segment with the highest relevance score was used as the sampling basis; Based on the number of samples and the sampling criteria, multiple target knowledge segments are selected from the knowledge segments of each preset domain knowledge base.

[0011] In one embodiment, the step of using the tool input parameters and the user question as input to the target tool to obtain the question answer output by the target tool includes: Based on the user's question, a preset domain knowledge base corresponding to the target tool is retrieved to obtain multiple answer knowledge fragments; The tool's input parameters, the knowledge fragments of each answer, and the user's question are used as inputs to the target tool to obtain the question's answer output by the target tool.

[0012] In one embodiment, after taking the user question and the description information of each tool as input to the large language model to obtain the target tool and corresponding tool input parameter information output by the large language model, the process includes: Obtain the divergent problem parameters corresponding to the target tool; Using the divergent question parameters as input to the large language model, the large language model generates a divergent question based on the user question, the divergent question parameters, and the tool input parameter information. The tool's input parameters and the divergent problem are used as inputs to the target tool to obtain the target tool's output answer.

[0013] Furthermore, to achieve the above objectives, this application also proposes an intelligent question-answering device based on multi-domain knowledge, the intelligent question-answering device based on multi-domain knowledge comprising: The retrieval module is used to retrieve multiple preset domain knowledge bases based on user questions and obtain multiple target knowledge fragments. The description module is used to determine the description information of the tools corresponding to each preset domain knowledge base based on each of the target knowledge fragments; The tool module is used to take the user question and the description information of each tool as input to the large language model, and obtain the target tool and the corresponding tool input parameter information output by the large language model; The output module is used to take the tool's input parameters and the user's question as input to the target tool, and obtain the answer to the question output by the target tool.

[0014] Furthermore, to achieve the above objectives, this application also proposes an intelligent question-answering device based on multi-domain knowledge-driven methods. The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the intelligent question-answering method based on multi-domain knowledge-driven methods described above.

[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the intelligent question-answering method based on multi-domain knowledge as described above.

[0016] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the intelligent question-answering method based on multi-domain knowledge as described above.

[0017] This application retrieves multiple preset domain knowledge bases based on user questions to obtain multiple target knowledge fragments; based on each target knowledge fragment, it determines the description information of the tool corresponding to each preset domain knowledge base; it uses the user question and the description information of each tool as input to a large language model to obtain the target tool and corresponding tool input parameter information output by the large language model; it uses the tool input parameter information and the user question as input to the target tool to obtain the question answer output by the target tool. By employing the technical means of retrieving target knowledge fragments from multiple preset domain knowledge bases based on user questions and determining the description information of the corresponding tool in each preset domain knowledge base based on these target knowledge fragments, this application solves the technical problem of increased tool selection error rate in large language models due to blurred domain boundaries while preserving the isolation capability of knowledge permissions in each domain, thus achieving the technical effect of improving the accuracy of user question answers. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating an embodiment of the intelligent question-answering method based on multi-domain knowledge in this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the intelligent question-answering method based on multi-domain knowledge in this application; Figure 3 This is a flowchart illustrating Embodiment 3 of the intelligent question-answering method based on multi-domain knowledge in this application; Figure 4This is an overall structural diagram provided for Embodiment 3 of the intelligent question-answering method based on multi-domain knowledge in this application; Figure 5 This is a schematic diagram of the module structure of an intelligent question-answering device based on multi-domain knowledge-driven embodiments of this application; Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the intelligent question-answering method based on multi-domain knowledge in the embodiments of this application.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0024] The main solution of this application embodiment is as follows: retrieval of multiple preset domain knowledge bases based on user questions to obtain multiple target knowledge fragments; determination of the description information of tools corresponding to each preset domain knowledge base based on each target knowledge fragment; input of the user question and the description information of each tool as input to a large language model to obtain the target tool and corresponding tool input parameter information output by the large language model; and input of the tool input parameter information and the user question as input to the target tool to obtain the question answer output by the target tool.

[0025] In this embodiment, for ease of description, the following description will focus on an intelligent question-answering system driven by multi-domain knowledge.

[0026] Existing multi-domain question-answering systems employ two design approaches. The first approach encapsulates domain-specific knowledge retrieval into independent tools, which are then selected and invoked by a large language model based on their descriptions. However, when domain knowledge boundaries are ambiguous, the model struggles to accurately distinguish tools based on static descriptions due to the "illusion phenomenon," leading to an increased tool selection error rate. The second approach stores multi-domain knowledge in a single database, relying on retrieval algorithms to obtain knowledge. While this approach can handle ambiguous boundary issues, the mixed storage makes it impossible to differentiate knowledge access permissions by domain, creating data security risks.

[0027] This application provides a solution that, by employing a technical means of retrieving target knowledge fragments from multiple preset domain knowledge bases based on user questions and determining the description information of the corresponding tools in each preset domain knowledge base based on the target knowledge fragments, solves the technical problem of increased error rate in the selection of large language model tools due to the ambiguity of domain boundaries while preserving the ability to isolate knowledge permissions in each domain, and achieves the technical effect of improving the accuracy of user question answers.

[0028] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as an intelligent question-answering system based on multi-domain knowledge. The following description uses an intelligent question-answering system based on multi-domain knowledge as an example to illustrate this embodiment and the subsequent embodiments.

[0029] Based on this, embodiments of this application provide an intelligent question-answering method driven by multi-domain knowledge, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the intelligent question-answering method based on multi-domain knowledge driven by this application.

[0030] In this embodiment, the intelligent question-answering method based on multi-domain knowledge includes steps S10 to S40: Step S10: Retrieve multiple preset domain knowledge bases based on the user's question to obtain multiple target knowledge fragments; It should be noted that user questions are unanswered questions posed by users in natural language, the preset domain knowledge base is an independent set of knowledge pre-divided according to business domains, and the target knowledge fragment is a text unit related to the user question retrieved from each preset domain knowledge base.

[0031] For example, the user's question is input into the retrieval module in the form of a string. The retrieval module performs semantic matching between the user's question and knowledge fragments in multiple preset domain knowledge bases to obtain a relevance score for each knowledge fragment. Knowledge fragments with relevance scores exceeding a preset threshold are output as target knowledge fragments.

[0032] It is understandable that, since different preset domain knowledge bases are physically or logically independent, step S10 can retrieve knowledge from multiple knowledge bases in parallel without mixing knowledge from different domains, thus avoiding the problem of indistinguishable permissions caused by mixed knowledge storage and improving the data security of the system.

[0033] Step S20: Based on each of the target knowledge fragments, determine the description information of the tools corresponding to each of the preset domain knowledge bases; It should be noted that the descriptive information is text content used to explain the knowledge range that each tool can handle to the large language model. The large language model is a natural language processing model trained on massive amounts of text, such as DeepSeek.

[0034] Specifically, the target knowledge fragments obtained in step S10 are grouped according to the preset domain knowledge base from which they originate. The target knowledge fragments in each group are then spliced ​​together to form the description information of the tool corresponding to that group. Each preset domain knowledge base corresponds to one tool, and the description information of each tool is composed of the target knowledge fragments retrieved from that knowledge base.

[0035] Understandably, since the description information is dynamically generated based on the actual retrieved target knowledge fragments rather than pre-written static text, step S20 enables the description information to match the current semantic context of the user's question, avoiding the problem of large language models misunderstanding the function of tools due to the ambiguity of domain boundaries when using static tool descriptions, thereby improving the accuracy of tool selection.

[0036] Step S30: The user question and the description information of each tool are used as input to the large language model to obtain the target tool and the corresponding tool input parameter information output by the large language model; It should be noted that the target tool is one of the tools selected by the large language model from multiple tools, and the tool input parameter information is the calling parameters generated by the large language model for the target tool.

[0037] For example, the user's question and the description information of each tool are concatenated into a prompt text input to the large language model. The large language model performs reasoning on the prompt text, outputs a tool identifier as the target tool, and outputs a parameter object as the tool's input parameter information.

[0038] Understandably, since the description information of each tool contains target knowledge fragments related to the user's problem, the large language model can make a selection based on the content of these knowledge fragments rather than just the tool name or static description. Therefore, step S30 can reduce the probability of the large language model selecting the wrong tool due to the illusion phenomenon, thereby improving the accuracy of tool selection.

[0039] Step S40: Use the tool input parameters and the user question as input to the target tool to obtain the answer to the question output by the target tool.

[0040] It should be noted that the answer to the question is the response generated by the target tool based on the user's question and the tool's input parameters.

[0041] It is understandable that, since the target tool only needs to process the knowledge in its corresponding preset domain knowledge base after it is selected, step S40 can complete the answer generation while maintaining knowledge access isolation, thus avoiding the knowledge leakage problem that may be caused by cross-tool mixed retrieval and improving the compliance of answer generation.

[0042] In one feasible implementation, step S40 may include: retrieving a preset domain knowledge base corresponding to the target tool based on the user question to obtain multiple answer knowledge fragments; using the tool input parameter information, each of the answer knowledge fragments, and the user question as input to the target tool to obtain the question answer output by the target tool.

[0043] It should be noted that the answer knowledge fragments are knowledge units obtained from a secondary retrieval of the user's question from the preset domain knowledge base corresponding to the target tool.

[0044] Specifically, the user's question is input into the target tool's preset domain knowledge base for retrieval, resulting in multiple answer knowledge fragments. These answer knowledge fragments, along with the tool's input parameters and the user's question, are then input into the target tool, which integrates this information to generate the answer to the question.

[0045] In this embodiment, by separating the target knowledge fragment from the answer knowledge fragment, the problem of incomplete information coverage that may occur when the same batch of knowledge fragments is used for both the preliminary retrieval and the final answer retrieval is solved.

[0046] The above are merely feasible implementations of step S40 provided in this embodiment. This embodiment does not specifically limit the specific implementation of step S40.

[0047] This embodiment provides an intelligent question-answering method based on multi-domain knowledge-driven approaches. It retrieves multiple preset domain knowledge bases based on user questions to obtain multiple target knowledge fragments. Based on each target knowledge fragment, it determines the description information of the tool corresponding to each preset domain knowledge base. The user question and the description information of each tool are used as input to a large language model to obtain the target tool output by the large language model and its corresponding input parameters. The tool input parameters and the user question are used as input to the target tool to obtain the question answer output by the target tool. By employing the technical means of retrieving target knowledge fragments from multiple preset domain knowledge bases based on user questions and determining the description information of the corresponding tools in each preset domain knowledge base based on these target knowledge fragments, this method solves the technical problem of increased tool selection error rate in the large language model due to blurred domain boundaries while preserving the isolation capability of knowledge permissions in each domain. This achieves the technical effect of improving the accuracy of user question answers.

[0048] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S10 of the intelligent question-answering method based on multi-domain knowledge includes steps S11 to S13: Step S11: Search multiple preset domain knowledge bases according to the user's question to obtain the related knowledge fragments and corresponding first relevance scores in each preset domain knowledge base; It should be noted that the related knowledge fragments are knowledge units related to the user's question retrieved from a predefined domain knowledge base, and the first relevance score is a numerical value used to quantify the degree of semantic matching between the related knowledge fragments and the user's question.

[0049] Understandably, since each preset domain knowledge base independently returns its search results, step S11 can obtain the original search results of each knowledge base, avoiding the problem of mutual interference between search results of different knowledge bases, thereby improving the accuracy of search results of each knowledge base.

[0050] In one feasible implementation, step S11 may include: obtaining the user's system permissions and user questions; determining multiple preset domain knowledge bases based on the system permissions; retrieving multiple preset domain knowledge bases based on the user questions to obtain a first relevance score for each knowledge fragment in each preset domain knowledge base; and taking the knowledge fragments with the first relevance score greater than a preset score threshold as associated knowledge fragments in each preset domain knowledge base.

[0051] It should be noted that system permissions are the set of permissions granted to a user to access a specific preset domain knowledge base. Each knowledge fragment in the preset domain knowledge base is the smallest independent knowledge unit stored in the knowledge base. The preset score threshold is the lower limit value of the relevance score used to filter related knowledge fragments.

[0052] For example, system permissions are input in the form of a permission list. Based on this permission list, the system filters out the preset domain knowledge bases that the user is authorized to access and concurrently calls the application programming interface for retrieving the knowledge bases. The user's question is input into these knowledge bases for vector similarity retrieval, and the first relevance score of each knowledge fragment is obtained. Knowledge fragments with a first relevance score greater than a preset score threshold are filtered out as associated knowledge fragments. It should be noted that each knowledge base can be temporarily set to return a maximum of 5 recall messages. In this case, the number of knowledge fragments in each domain knowledge base may not be consistent.

[0053] In this embodiment, by filtering accessible knowledge bases based on system permissions before retrieval, the problem of data permission leakage that may result from unauthorized knowledge bases being retrieved is solved.

[0054] The above are merely feasible implementations of step S11 provided in this embodiment. This embodiment does not specifically limit the specific implementation of step S11.

[0055] Step S12: Based on the associated knowledge fragments and the first relevance score, adjust the relevance scores of each knowledge fragment in each of the preset domain knowledge bases to obtain the second relevance score; It should be noted that the second relevance score is a corrected value used for sampling and ranking, obtained by adjusting the first relevance score.

[0056] Understandably, since the penalty factor increases with the number of selected items, step S12 can reduce the probability of knowledge fragments being selected repeatedly in the same knowledge base, avoiding the problem of knowledge fragments from a single knowledge base excessively crowding out the sampling space, thereby improving the balance of sampling from multiple knowledge bases.

[0057] In one feasible implementation, step S12 may include: obtaining a first penalty factor based on each of the first relevance scores; using the number of related knowledge fragments in each of the preset domain knowledge bases as a second penalty factor; and adjusting the relevance scores of each knowledge fragment in each of the preset domain knowledge bases according to the first penalty factor and the second penalty factor to obtain a second relevance score.

[0058] It should be noted that the first penalty factor can be a range factor calculated based on the distribution range of the first relevance scores of all related knowledge fragments, or other statistics calculated based on the first relevance scores of all related knowledge fragments, such as expectation or mean difference. The second penalty factor is a quantity factor calculated based on the number of selected related knowledge fragments in each knowledge base.

[0059] Specifically, the difference between the maximum and minimum values ​​of the first relevance scores of all related knowledge fragments is calculated as the first penalty factor. The number of selected related knowledge fragments in each preset domain knowledge base is used as the second penalty factor for that knowledge base. The first relevance score of each knowledge fragment in the knowledge base is divided by one and then multiplied by the second penalty factor and the first penalty factor to obtain the second relevance score.

[0060] For example, a penalty mechanism was used for the number of selected items and the score. The more items selected in each group, the lower the original score of each group would be. The main formula used was as follows:

[0061] Where g is the first penalty factor, which is the range of relevance scores for all knowledge segments. This assigns a relevance score to all knowledge fragments. `max` represents the maximum value, and `min` represents the minimum value.

[0062] The range and the number of entries will both be used as penalty factors to adjust the scores of knowledge fragments in the preset domain knowledge base. The adjustment formula is as follows:

[0063] Where score is the score of a certain knowledge segment, n is the number of related knowledge segments that have been selected in a certain preset domain, and g is the first penalty factor. The score is the adjusted score for this knowledge segment.

[0064] In this embodiment, a first penalty factor is used to reflect the global score gap and a second penalty factor is used to reflect the local selection density, which solves the problem that uniform sampling may lose high-value knowledge in scenarios with high score gaps.

[0065] The above are merely feasible implementations of step S12 provided in this embodiment. This embodiment does not specifically limit the specific implementation of step S12.

[0066] Step S13: Select multiple target knowledge fragments from the knowledge fragments in each of the preset domain knowledge bases based on the second relevance score.

[0067] Understandably, since the selection criterion is the adjusted second relevance score, which incorporates the global score difference and local selection density, step S13 tends to select high-scoring knowledge segments when the score difference is large and tends to select each knowledge base in a balanced manner when the score difference is small. This avoids the problem that a single sampling strategy cannot adapt to different score distribution scenarios, thereby improving the adaptability of the sampling strategy.

[0068] In one feasible implementation, step S13 may include: determining the number of sample entries based on the number of the preset domain knowledge bases; using the knowledge segment with the highest second relevance score as the sampling basis; and selecting multiple target knowledge segments from the knowledge segments of each of the preset domain knowledge bases based on the number of sample entries and the sampling basis.

[0069] It should be noted that the number of samples is the total number of target knowledge fragments to be selected, and the sampling basis is the feature value of the knowledge fragments used for comparison in each round of selection.

[0070] Specifically, the number of knowledge bases in the preset domain is multiplied by two to obtain the number of samples. In each round of selection, the knowledge fragment with the highest second relevance score is selected from all unselected knowledge fragments. This selection process is repeated until the number of selected knowledge fragments reaches the number of samples.

[0071] In this embodiment, the problem of information waste that may result from fixed allocation of sampling quantities for each knowledge base is solved by globally selecting the highest-scoring knowledge fragment in each round.

[0072] The above are merely feasible implementations of step S13 provided in this embodiment. This embodiment does not specifically limit the specific implementation of step S13.

[0073] This embodiment provides an intelligent question-answering method based on multi-domain knowledge. It retrieves multiple preset domain knowledge bases based on the user's question, obtaining related knowledge fragments and corresponding first relevance scores in each preset domain knowledge base. Based on the related knowledge fragments and the first relevance scores, the relevance scores of each knowledge fragment in each preset domain knowledge base are adjusted to obtain a second relevance score. Multiple target knowledge fragments are selected from the knowledge fragments in each preset domain knowledge base based on the second relevance score. By employing a technique of adjusting relevance scores based on a penalty factor before sampling, the method avoids the problem of over-sampling from a single knowledge base leading to missing information in other knowledge bases. It also solves the technical problem of balancing score differences and sampling balance in multi-knowledge base sampling, thus achieving the technical effect of maintaining information integrity in multi-knowledge base scenarios.

[0074] Based on the first and second embodiments of this application, in this third embodiment, the content that is the same as or similar to that in embodiments one and two above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 The intelligent question-answering method based on multi-domain knowledge-driven approach further includes steps S31 to S33 after step S30: Step S31: Obtain the divergence problem parameters corresponding to the target tool; It should be noted that the divergent question parameter is a set of instruction text used to instruct the large language model to generate similar questions.

[0075] Specifically, the pre-set divergent problem parameters are read from the configuration information of the target tool. These divergent problem parameters include the requirements for the number and format of similar problems to be generated.

[0076] Understandably, since the divergence problem parameters are independent parameters pre-configured for each tool, step S31 can set different divergence strategies for different tools, avoiding the problem of mismatched divergence range caused by all tools using the same divergence parameters, thereby improving the targeting of the divergence problem.

[0077] Step S32: Use the divergent question parameters as input to the large language model to obtain the divergent question generated by the large language model based on the user question, the divergent question parameters, and the tool input parameter information; It should be noted that the divergence problem is an extension problem of large language models based on user questions, which generate semantically similar but different expressions.

[0078] Specifically, the divergent question parameters, user question, and tool input parameters are concatenated and input into the large language model. The large language model then generates several divergent questions that are semantically similar to the user question, according to the requirements of the divergent question parameters.

[0079] Understandably, since the large language model references both the user question and the target knowledge fragment when generating divergent questions, step S32 can make the generated questions relevant to domain knowledge, avoiding the problem of the model fabricating irrelevant divergent questions based solely on the user question, thereby reducing model illusion.

[0080] Step S33: Use the tool input parameters and the divergent question as input to the target tool to obtain the answer to the question output by the target tool.

[0081] Specifically, the user's question and various divergent questions are sequentially input into the target tool's corresponding preset domain knowledge base for retrieval. The answer knowledge fragments obtained from each retrieval are merged and input into the target tool along with the tool's input parameters. The target tool then integrates this information to generate the answer to the question.

[0082] Understandably, since the retrieval input includes user questions and multiple divergent questions, step S33 can expand the coverage of knowledge retrieval, avoiding the risk of missing relevant knowledge if only user questions are used for retrieval, thereby improving the completeness of the answer.

[0083] This embodiment provides an intelligent question-answering method driven by multi-domain knowledge. It obtains divergent question parameters corresponding to the target tool; uses these parameters as input to a large language model to obtain a divergent question generated by the model based on the user question, the divergent question parameters, and the tool's input parameters; and uses the tool's input parameters and the divergent question as input to the target tool to obtain the target tool's output answer. By employing a technique that guides the large language model to generate domain-related divergent questions based on the divergent question parameters, it avoids the problem of the model generating irrelevant divergent questions solely based on the user question, leading to a loss of focus in the search scope. This solves the technical problem of model illusion in traditional question divergence methods, thus achieving the technical effect of evidence-based question divergence and effectively expanding the search scope.

[0084] For example, to help understand the implementation process of the intelligent question-answering method based on multi-domain knowledge driven by this embodiment in conjunction with the above embodiment one, please refer to... Figure 4 , Figure 4 A general structural diagram of an intelligent question-answering method based on multi-domain knowledge is provided, specifically: according to Figure 4The correspondence between the knowledge base and tools shown is illustrated in this embodiment. The intelligent question-answering method performs a pre-retrieval step. Specifically, after the system obtains the question posed by the user in natural language, it searches multiple preset domain knowledge bases in parallel based on the user's question. Figure 4 The example demonstrates three independent domain knowledge bases, each storing knowledge from different business domains. The system semantically matches user questions with knowledge fragments in each knowledge base, retrieves relevant knowledge fragments from each base, and calculates a first relevance score for each fragment. Then, based on a second penalty factor calculated from the number of selected fragments in each knowledge base and the first penalty factor calculated from the score distribution of all fragments, the relevance scores of each knowledge fragment are adjusted to obtain a second relevance score. Finally, the number of samples is determined according to the preset number of domain knowledge bases, and multiple target knowledge fragments are selected from each knowledge base using the fragment with the highest second relevance score as the sampling criterion. The target knowledge fragments output by this pre-retrieval process are grouped according to their source knowledge base, with each knowledge base corresponding to one tool. Figure 4 The three knowledge bases correspond to three tools, and the system determines the description information of the corresponding tool for the target knowledge fragment in each group.

[0085] The system then proceeds to the tool selection step. Specifically, the system uses the user's question and the descriptions of the tools generated in the previous step as input to the large language model. The large language model analyzes the knowledge scope that each tool can handle based on the target knowledge fragments contained in its description, and outputs a target tool and its corresponding input parameters. In one implementation, the large language model also generates several divergent questions based on the divergent question parameters configured for the tools, thereby expanding the knowledge coverage of subsequent searches. Because the descriptions of each tool are dynamically generated based on the actual retrieved target knowledge fragments, rather than pre-written static text, the large language model can select tools based on knowledge content semantically matching the user's question, rather than solely on the tool name, thus reducing the error rate in tool selection caused by ambiguous domain boundaries.

[0086] The system executes the selected target tool to generate a question answer. Specifically, the system takes the tool's input parameters and the user's question as input to the target tool. The target tool searches its corresponding preset domain knowledge base based on the user's question, obtaining multiple answer knowledge fragments. Then, the tool's input parameters, each answer knowledge fragment, and the user's question are input together into the target tool, which then synthesizes this information and outputs the question answer. If a divergent question is generated in the preliminary steps, the target tool will also use the divergent question as input to obtain more relevant answer knowledge fragments. Through the above process, Figure 4The multi-knowledge-base and multi-tool architecture shown achieves the selection of large language model tools based on dynamic knowledge content while maintaining independent storage and permission isolation for each knowledge base, ultimately obtaining accurate answers to user questions.

[0087] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the intelligent question-answering method based on multi-domain knowledge. Any simple modifications based on this technical concept are within the scope of protection of this application.

[0088] This application also provides an intelligent question-answering device based on multi-domain knowledge, please refer to... Figure 5 The intelligent question-answering device based on multi-domain knowledge includes: The retrieval module 10 is used to retrieve multiple preset domain knowledge bases based on user questions to obtain multiple target knowledge fragments; The description module 20 is used to determine the description information of the tools corresponding to each preset domain knowledge base based on each of the target knowledge fragments; Tool module 30 is used to take the user question and the description information of each tool as input to the large language model to obtain the target tool and the corresponding tool input parameter information output by the large language model; The output module 40 is used to take the tool input parameters and the user question as input to the target tool to obtain the answer to the question output by the target tool.

[0089] The intelligent question-answering device based on multi-domain knowledge-driven technology provided in this application, employing the intelligent question-answering method based on multi-domain knowledge-driven technology in the above embodiments, can solve the technical problem of reducing the error rate of tool selection in large language models while preserving the knowledge permission isolation capability of each domain. Compared with the prior art, the beneficial effects of the intelligent question-answering device based on multi-domain knowledge-driven technology provided in this application are the same as those of the intelligent question-answering method based on multi-domain knowledge-driven technology provided in the above embodiments, and other technical features in the intelligent question-answering device based on multi-domain knowledge-driven technology are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0090] The retrieval module 10 is further configured to retrieve multiple preset domain knowledge bases based on user questions, obtain related knowledge fragments and corresponding first relevance scores in each preset domain knowledge base; adjust the relevance scores of each knowledge fragment in each preset domain knowledge base based on the related knowledge fragments and the first relevance scores to obtain a second relevance score; and select multiple target knowledge fragments from the knowledge fragments in each preset domain knowledge base based on the second relevance scores.

[0091] The retrieval module 10 is further configured to obtain the user's system permissions and user questions; determine multiple preset domain knowledge bases based on the system permissions; retrieve multiple preset domain knowledge bases based on the user questions to obtain a first relevance score for each knowledge fragment in each preset domain knowledge base; and take the knowledge fragments with the first relevance score greater than a preset score threshold as the associated knowledge fragments of each preset domain knowledge base.

[0092] The retrieval module 10 is further configured to obtain a first penalty factor based on each of the first relevance scores; use the number of related knowledge fragments in each of the preset domain knowledge bases as a second penalty factor; and adjust the relevance scores of each knowledge fragment in each of the preset domain knowledge bases according to the first penalty factor and the second penalty factor to obtain a second relevance score.

[0093] The retrieval module 10 is further configured to determine the number of sample entries based on the number of the preset domain knowledge bases; use the knowledge segment with the highest second relevance score as the sampling basis; and select multiple target knowledge segments from the knowledge segments of each preset domain knowledge base based on the number of sample entries and the sampling basis.

[0094] The output module 40 is further configured to retrieve a preset domain knowledge base corresponding to the target tool based on the user question, and obtain multiple answer knowledge fragments; and use the tool input parameter information, each of the answer knowledge fragments and the user question as input to the target tool to obtain the question answer output by the target tool.

[0095] The output module 40 is further configured to obtain the divergent question parameters corresponding to the target tool; use the divergent question parameters as input to the large language model to obtain the divergent question generated by the large language model based on the user question, the divergent question parameters, and the tool input parameter information; use the tool input parameter information and the divergent question as input to the target tool to obtain the question answer output by the target tool.

[0096] This application provides a multi-domain knowledge-driven intelligent question-answering device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the multi-domain knowledge-driven intelligent question-answering method in Embodiment 1 above.

[0097] The following is for reference. Figure 6This document illustrates a structural schematic diagram of a multi-domain knowledge-driven intelligent question-answering device suitable for implementing embodiments of this application. The multi-domain knowledge-driven intelligent question-answering device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The intelligent question-answering device based on multi-domain knowledge shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0098] like Figure 6 As shown, a multi-domain knowledge-driven intelligent question-answering device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the multi-domain knowledge-driven intelligent question-answering device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the multi-domain knowledge-driven intelligent question-answering device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a multi-domain knowledge-driven intelligent question-answering device with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0099] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0100] The intelligent question-answering device based on multi-domain knowledge-driven technology provided in this application, employing the intelligent question-answering method based on multi-domain knowledge-driven technology in the above embodiments, can solve the technical problem of reducing the error rate of tool selection in large language models while preserving the knowledge permission isolation capability of each domain. Compared with the prior art, the beneficial effects of the intelligent question-answering device based on multi-domain knowledge-driven technology provided in this application are the same as those of the intelligent question-answering method based on multi-domain knowledge-driven technology provided in the above embodiments, and other technical features in this intelligent question-answering device based on multi-domain knowledge-driven technology are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0101] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0102] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0103] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the intelligent question-answering method based on multi-domain knowledge driven in the above embodiments.

[0104] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0105] The aforementioned computer-readable storage medium may be included in a multi-domain knowledge-driven intelligent question-answering device; or it may exist independently and not be assembled into a multi-domain knowledge-driven intelligent question-answering device.

[0106] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a multi-domain knowledge-driven intelligent question-answering device, the device performs the following actions: retrieval of multiple preset domain knowledge bases based on the user's question to obtain multiple target knowledge fragments; determination of description information of tools corresponding to each preset domain knowledge base based on each target knowledge fragment; input of the user's question and the description information of each tool to a large language model to obtain the target tool and corresponding tool input parameter information output by the large language model; and input of the tool input parameter information and the user's question to the target tool to obtain the question answer output by the target tool.

[0107] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0108] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0109] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0110] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the aforementioned intelligent question-answering method based on multi-domain knowledge. This addresses the technical problem of reducing the error rate in selecting large language model tools while preserving the isolation capabilities of knowledge permissions across different domains. Compared to existing technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the intelligent question-answering method based on multi-domain knowledge provided in the above embodiments, and will not be elaborated upon here.

[0111] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the intelligent question-answering method based on multi-domain knowledge as described above.

[0112] The computer program product provided in this application solves the technical problem of reducing the error rate in selecting large language model tools while preserving the ability to isolate knowledge permissions in various domains. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the intelligent question answering method based on multi-domain knowledge driven provided in the above embodiments, and will not be repeated here.

[0113] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. An intelligent question-answering method based on multi-domain knowledge-driven approach, characterized in that, The method includes: Based on the user's question, multiple preset domain knowledge bases are retrieved to obtain multiple target knowledge fragments; Based on each of the target knowledge fragments, determine the description information of the tools corresponding to each of the preset domain knowledge bases; The user question and the description information of each tool are used as input to the large language model to obtain the target tool and the corresponding tool input parameter information output by the large language model. The tool's input parameters and the user's question are used as inputs to the target tool to obtain the target tool's output answer.

2. The method as described in claim 1, characterized in that, The process involves retrieving multiple preset domain knowledge bases based on user questions to obtain multiple target knowledge fragments, including: Based on the user's question, multiple preset domain knowledge bases are retrieved to obtain the related knowledge fragments and corresponding first relevance scores in each preset domain knowledge base; Based on the associated knowledge fragments and the first relevance score, the relevance scores of each knowledge fragment in each of the preset domain knowledge bases are adjusted to obtain a second relevance score; Based on the second relevance score, multiple target knowledge fragments are selected from the knowledge fragments in each of the preset domain knowledge bases.

3. The method as described in claim 2, characterized in that, The step of retrieving multiple preset domain knowledge bases based on user questions to obtain related knowledge fragments and corresponding first relevance scores in each preset domain knowledge base includes: Obtain user system privileges and user issues; Based on the system permissions, multiple preset domain knowledge bases are determined; Based on the user question, multiple preset domain knowledge bases are retrieved to obtain the first relevance score of each knowledge fragment in each preset domain knowledge base; The knowledge fragments whose first relevance score is greater than a preset score threshold are used as the associated knowledge fragments of each preset domain knowledge base.

4. The method as described in claim 2, characterized in that, The step of adjusting the relevance scores of each knowledge fragment in each of the preset domain knowledge bases based on the associated knowledge fragments and the first relevance score to obtain a second relevance score includes: Based on each of the first relevance scores, the first penalty factor is obtained; The number of related knowledge fragments in each of the preset domain knowledge bases is used as the second penalty factor; Based on the first penalty factor and the second penalty factor, the relevance scores of each knowledge fragment in each preset domain knowledge base are adjusted to obtain a second relevance score.

5. The method as described in claim 2, characterized in that, The step of selecting multiple target knowledge fragments from each of the preset domain knowledge bases based on the second relevance score includes: The number of samples is determined based on the number of items in the preset domain knowledge base; The knowledge segment with the highest relevance score was used as the sampling basis; Based on the number of samples and the sampling criteria, multiple target knowledge segments are selected from the knowledge segments of each preset domain knowledge base.

6. The method as described in claim 1, characterized in that, The process of using the tool's input parameters and the user's question as input to the target tool to obtain the target tool's output answer includes: Based on the user's question, a preset domain knowledge base corresponding to the target tool is retrieved to obtain multiple answer knowledge fragments; The tool's input parameters, the knowledge fragments of each answer, and the user's question are used as inputs to the target tool to obtain the question's answer output by the target tool.

7. The method according to any one of claims 1 to 6, characterized in that, After taking the user question and the description information of each tool as input to the large language model, and obtaining the target tool and corresponding tool input parameter information output by the large language model, the method further includes: Obtain the divergent problem parameters corresponding to the target tool; Using the divergent question parameters as input to the large language model, the large language model generates a divergent question based on the user question, the divergent question parameters, and the tool input parameter information. The tool's input parameters and the divergent problem are used as inputs to the target tool to obtain the target tool's output answer.

8. An intelligent question-answering device based on multi-domain knowledge-driven technology, characterized in that, The device includes: The retrieval module is used to retrieve multiple preset domain knowledge bases based on user questions and obtain multiple target knowledge fragments. The description module is used to determine the description information of the tools corresponding to each preset domain knowledge base based on each of the target knowledge fragments; The tool module is used to take the user question and the description information of each tool as input to the large language model, and obtain the target tool and the corresponding tool input parameter information output by the large language model; The output module is used to take the tool's input parameters and the user's question as input to the target tool, and obtain the answer to the question output by the target tool.

9. An intelligent question-answering device based on multi-domain knowledge-driven technology, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the intelligent question-answering method based on multi-domain knowledge as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the intelligent question-answering method based on multi-domain knowledge as described in any one of claims 1 to 7.