Intelligent agent knowledge retrieval method and device based on multi-knowledge mixed recall and medium
By introducing a multi-knowledge hybrid recall method into the knowledge retrieval link of the agent, using the combination of knowledge base, terminology base, question-and-answer database and database, the problems of instability and inaccuracy of knowledge retrieval results are solved, and more efficient and accurate knowledge retrieval and flexible business adaptation are achieved.
Patent Information
- Application Number
- CN202510970406.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-07-14
AI Technical Summary
When the prior art searches knowledge based on the large model associated with the agent, there are problems of unstable and inaccurate knowledge search results, especially when dealing with changes in professional vocabulary and business needs, it leads to poor compatibility and high development costs.
The multi-knowledge hybrid recall method is adopted to build a knowledge retrieval link in the preset search resource library, including the knowledge base, term database, question-and-answer database and database. First, the Q&A pair matching is performed in the Q&A library. When there is no match, the term matching is performed in the term database, and the explanation is combined with the big model to supplement it, and the flexible configuration is used to adapt to different business needs.
It improves the stability and accuracy of knowledge retrieval, reduces long-term waiting, reduces development costs, and improves adaptability and compatibility to new scenarios.
Smart Images

Figure CN120470100A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of large models, intelligent agents and artificial intelligence, and in particular to an intelligent agent knowledge retrieval method, device and medium based on multi-knowledge mixed recall. Background Art
[0002] With the continuous development of artificial intelligence (AI), intelligent agents are increasingly being used in daily life. For example, in knowledge retrieval scenarios, to quickly retrieve the information users need from massive amounts of data, agents can leverage the powerful semantic understanding and generation capabilities of large models associated with them to quickly sort and filter through the vast amount of data, providing users with targeted answers or relevant knowledge expansion.
[0003] However, when related technologies perform knowledge retrieval based on a large model associated with an intelligent agent, there are problems such as unstable and inaccurate knowledge retrieval results. Summary of the Invention
[0004] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, the present disclosure provides an agent knowledge retrieval method based on multi-knowledge hybrid recall, comprising: Determine a knowledge retrieval link of the agent, wherein the knowledge retrieval link is used to represent the knowledge retrieval logic of the agent in a preset retrieval resource library, wherein the preset retrieval resource library includes at least one of a knowledge base, a term base, a question and answer library, and a database; In a case where the knowledge retrieval link represents the knowledge retrieval logic of the agent in the knowledge base, the term base, the question and answer base, and the database, in response to receiving a knowledge retrieval question, performing question-answer pair matching in the question and answer base based on the knowledge retrieval question; When a question-answer pair is matched, the answer in the matched question-answer pair is output as a knowledge retrieval result of the knowledge retrieval question; In the case where no question-answer pair is matched, term matching is performed in the term library based on the knowledge retrieval question, and knowledge retrieval is performed in the question-answer library and / or the database based on the result of the term matching and the knowledge retrieval question to obtain a knowledge retrieval result for the knowledge retrieval question.
[0006] In a second aspect, the present disclosure provides an agent knowledge retrieval device based on multi-knowledge hybrid recall, comprising: a determination module, configured to determine a knowledge retrieval link of an agent, wherein the knowledge retrieval link is configured to represent the knowledge retrieval logic of the agent in a preset retrieval resource library, wherein the preset retrieval resource library includes at least one of a knowledge library, a term library, a question-and-answer library, and a database; a matching module configured to, in response to receiving a knowledge retrieval question, match question-answer pairs in the question-answer repository based on the knowledge retrieval question, when the knowledge retrieval link represents the knowledge retrieval logic of the agent in the knowledge repository, the term repository, the question-answer repository, and the database; A first processing module is configured to, when a question-answer pair is matched, output the answer in the matched question-answer pair as a knowledge retrieval result of the knowledge retrieval question; The second processing module is used to perform term matching in the term library based on the knowledge retrieval question when no question-answer pair is matched, and to perform knowledge retrieval in the question-answer library and / or the database based on the result of the term matching and the knowledge retrieval question to obtain a knowledge retrieval result for the knowledge retrieval question.
[0007] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processing device.
[0008] In a fourth aspect, the present disclosure provides an electronic device, comprising: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect.
[0009] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0010] Through the above technical solution, when the knowledge retrieval link represents the knowledge retrieval logic of the intelligent agent in the knowledge base, term base, question and answer base and database, the question and answer pairs can be matched in the question and answer base based on the knowledge retrieval question, and the corresponding answer can be quickly output when the question and answer pair is matched in the question and answer base. In this way, not only the stability of the answer can be improved, but also the long waiting time caused by calling the large model can be reduced, thereby improving the user experience. In the case that the question and answer pair is not matched in the question and answer base, the term matching can be performed in the term base based on the knowledge retrieval question, so that when there are terms that need to be explained in the knowledge retrieval question, the term explanation in the knowledge retrieval question can be pre-supplemented through the term base, so that the intelligent agent can understand the knowledge retrieval question more accurately, and when performing knowledge retrieval in the question and answer base and / or database, the accuracy and reliability of the knowledge retrieval results can be improved. In addition, since the preset retrieval resource library includes at least one of the knowledge base, term base, question and answer base and database, when determining the knowledge retrieval link of the intelligent body, it can be flexibly configured according to business needs. Compared with the related technology of constructing the knowledge retrieval link through high code, it can reduce the development burden brought about by changes in business needs, achieve better compatibility and reusability, significantly reduce subsequent development costs, and improve the adaptability to new scenario applications.
[0011] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a flowchart of an agent knowledge retrieval method based on multi-knowledge hybrid recall according to an exemplary embodiment of the present disclosure; Figure 2 is a flowchart illustrating an agent knowledge retrieval method based on multi-knowledge hybrid recall according to an exemplary embodiment of the present disclosure; Figure 3 is a flowchart illustrating another agent knowledge retrieval method based on multi-knowledge hybrid recall according to an exemplary embodiment of the present disclosure; Figure 4 is a flowchart illustrating another agent knowledge retrieval method based on multi-knowledge hybrid recall according to an exemplary embodiment of the present disclosure; Figure 5 is a schematic diagram showing a configuration of a knowledge retrieval link according to an exemplary embodiment of the present disclosure; Figure 6 is a schematic diagram showing a configuration of a search resource library node according to an exemplary embodiment of the present disclosure; Figure 7 This is a schematic diagram illustrating a configuration of a search resource library corresponding to an initial search resource library node according to an exemplary embodiment of the present disclosure; Figure 8 is a schematic diagram showing the configuration of another knowledge retrieval link according to an exemplary embodiment of the present disclosure; Figure 9 is a structural block diagram of an intelligent agent knowledge retrieval device based on multi-knowledge hybrid recall according to an exemplary embodiment of the present disclosure; Figure 10 The figure is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0013] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0014] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0015] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0016] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0017] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0018] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0019] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0020] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0021] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0022] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0023] At the same time, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0024] As mentioned in the background art, when the related technology performs knowledge retrieval based on a large model associated with an intelligent agent, there are problems such as unstable knowledge retrieval results and inaccurate knowledge retrieval results.
[0025] For example, in scenarios involving frequently asked questions in enterprises, the standard knowledge retrieval process directly calls the large model to perform knowledge retrieval based on the user's input question. However, due to the uncertainty of the large model's contextual understanding and generation logic, the output of the large model is often unstable and difficult to meet the enterprise's requirements for consistent answers. Furthermore, in query scenarios involving specialized vocabulary, the standard knowledge retrieval process cannot provide supplementary explanations of the specialized vocabulary upfront, resulting in the large model being unable to accurately understand the meaning of the specialized vocabulary, thereby reducing the accuracy and reliability of knowledge retrieval.
[0026] Furthermore, when determining the knowledge retrieval chain, related technologies typically begin by designing the chain based on their specific use cases, and then customizing it through high-code development. However, this approach, coupled with the business, results in poor compatibility, making it difficult to scale and reuse. Once business requirements change or the system needs to be applied in other scenarios, extensive redevelopment is required, resulting in high development costs and low efficiency.
[0027] In view of this, the present disclosure provides an intelligent agent knowledge retrieval method, device and medium based on multi-knowledge hybrid recall to solve the above technical problems.
[0028] The following further explains the embodiments of the present disclosure with reference to the accompanying drawings.
[0029] Figure 1 This is a flow chart of an agent knowledge retrieval method based on multi-knowledge hybrid recall according to an exemplary embodiment of the present disclosure, with reference to Figure 1 The agent knowledge retrieval method based on multi-knowledge hybrid recall may include the following steps: S101: Determine a knowledge retrieval link of an intelligent agent. The knowledge retrieval link is used to represent the knowledge retrieval logic of the intelligent agent in a preset retrieval resource library. The preset retrieval resource library includes at least one of a knowledge base, a term base, a question and answer base, and a database.
[0030] A knowledge base can be a retrieval resource library that supports the collection, segmentation, and indexing of knowledge content from various data sources, and provides RAG (retrieval-augmented generation) capabilities for intelligent agents. Because a knowledge base encompasses knowledge from diverse data sources and provides RAG support for intelligent agents through efficient retrieval and indexing capabilities, it is suitable for various scenarios requiring responses based on local knowledge content. A database can be a retrieval resource library that supports parsing and storing table content according to user-defined rules and supports direct connection to external databases. Because a database can efficiently store, manage, and retrieve structured data, it is suitable for data query scenarios. A question-and-answer library can be a retrieval resource library that supports importing and indexing FAQs (Frequently Asked Questions). FAQs can include frequently asked questions and intercepted questions. Because it can quickly output corresponding answers when user questions match content in the Q&A library, the Q&A library is suitable for frequently asked questions and / or intercepted questions. A term base can be a retrieval resource library that supports structured and unstructured terms. Since the term base can include explanations of terms, the term base can be applied to business knowledge gaps in specific fields and / or data analysis scenarios to assist the intelligent agent in understanding the knowledge retrieval questions input by the user.
[0031] Since the knowledge base, term base, question and answer base and database can adapt to different business scenarios, they can be freely constructed based on the knowledge base, term base, question and answer base and database according to their respective applicable business scenarios and the user's own needs to obtain a knowledge retrieval link that meets the user's own needs.
[0032] S102: In the case where the knowledge retrieval link represents the knowledge retrieval logic of the intelligent agent in the knowledge base, term base, question and answer base and database, in response to receiving a knowledge retrieval question, question and answer pair matching is performed in the question and answer base based on the knowledge retrieval question.
[0033] For example, after receiving a knowledge retrieval question, the similarity between each question-answer pair in the question-answer library and the knowledge retrieval question can be calculated. After obtaining the similarity between each question-answer pair and the knowledge retrieval question, the question-answer pairs can be matched in the question-answer library based on the similarity corresponding to each question-answer pair and the preset similarity threshold.
[0034] Given that a question-answer pair usually includes two parts, a question and an answer, when calculating the similarity between a question-answer pair and a knowledge retrieval question, there is a problem that the content of the answer part is complex and diverse and has a relatively weak correlation with the knowledge retrieval question. As a result, there is a problem of deviation in the similarity calculation, which affects the accuracy and effectiveness of the matching. In addition, since it is necessary to process the question and answer in the question-answer pair at the same time, the amount of data calculation will increase, the efficiency of the similarity calculation will be reduced, and ultimately the efficiency of the knowledge retrieval and the user experience will be affected. Therefore, in a possible way, in order to overcome the impact of the answer part in the similarity calculation process, only the similarity between the question in the question-answer pair and the knowledge retrieval question can be calculated, thereby reducing the amount of calculation, improving the efficiency of the similarity calculation, and overcoming the matching deviation caused by the complexity of the answer part, thereby improving the accuracy of knowledge retrieval and the user experience. That is to say, in a possible way, the question-answer library can include multiple question-answer pairs, and each question-answer pair can include a question and an answer. Accordingly, in response to receiving a knowledge retrieval question, matching question-answer pairs in the question-answer library based on the knowledge retrieval question can include: In response to receiving the knowledge retrieval question, for each question in the question-answer pair, determining the similarity between the question and the knowledge retrieval question; and matching the question-answer pairs in the question-answer database according to the similarity and a second similarity threshold.
[0035] Among them, the similarity between the question and the knowledge retrieval question can be obtained by calculating the text editing distance between the question and the knowledge retrieval question, or by calculating the semantic vector similarity between the question and the knowledge retrieval question. Of course, it can also be calculated by other methods, and the embodiments of the present disclosure do not impose any restrictions on this.
[0036] Among them, matching question and answer pairs in the question and answer database according to the similarity and the second similarity threshold can be: screening the target question and answer pairs in the question and answer database according to the second similarity threshold and the similarity corresponding to each question and answer pair, wherein the similarity corresponding to the target question and answer pair is greater than or equal to the second similarity threshold. If the target question and answer pair is not screened out in the question and answer database, it indicates that after performing knowledge retrieval in the question and answer database, no knowledge retrieval result for the knowledge retrieval question is obtained, and thus further knowledge retrieval can be performed by executing S104. If the target question and answer pair is screened out in the question and answer database, it indicates that after performing knowledge retrieval in the question and answer database, a knowledge retrieval result for the knowledge retrieval question is obtained, and thus knowledge retrieval results for the knowledge retrieval question can be obtained by executing S103, such as Figure 2 shown.
[0037] S103: When a question-answer pair is matched, the answer in the matched question-answer pair is output as a knowledge retrieval result of the knowledge retrieval question.
[0038] The matched question-answer pair may be one or more. When there are multiple matched question-answer pairs, the answers to the multiple question-answer pairs may be outputted as the knowledge retrieval result of the knowledge retrieval question, or the answer to one of the question-answer pairs may be randomly outputted as the knowledge retrieval result of the knowledge retrieval question, or the answer to the question-answer pair with the greatest similarity among the multiple question-answer pairs may be outputted as the knowledge retrieval result of the knowledge retrieval question, and of course other options are possible, and the embodiments of the present disclosure do not impose any restrictions on this.
[0039] S104: If no question-answer pair is matched, term matching is performed in the term base based on the knowledge retrieval question, and knowledge retrieval is performed in the question-answer base and / or database based on the result of the term matching and the knowledge retrieval question to obtain a knowledge retrieval result for the knowledge retrieval question.
[0040] In this embodiment, term matching in a terminology database based on a knowledge retrieval question can be performed by first segmenting the knowledge retrieval question to obtain multiple segmented terms; then, for each segmented term, calculating the semantic similarity between the segmented term and a term in the terminology database, and matching the term in the terminology database based on the semantic similarity and a preset similarity threshold. Alternatively, keyword extraction can be performed on the knowledge retrieval question to obtain target keywords; then, calculating the semantic similarity between the target keywords and the terms in the terminology database, and matching the term in the terminology database based on the semantic similarity and a preset similarity threshold. Of course, term matching in a terminology database can also be performed through other methods, which are not limited in this embodiment.
[0041] It should be understood that the terminology library may generally include terms and term explanations associated with the terms, and the results of term matching generally include two types: the terms are matched in the terminology library and the terms are not matched in the terminology library. When a term is matched in the terminology library, it indicates that there may be terms in the knowledge retrieval problem that need to be explained. Therefore, in order to enable the intelligent agent to understand the knowledge retrieval problem more accurately and conduct subsequent knowledge retrieval, the term explanations associated with the target term and the knowledge retrieval problem can be combined to perform knowledge retrieval in the question and answer library and / or database, thereby improving the accuracy of knowledge retrieval. When the target term is not matched in the terminology library, it indicates that there may be no terms in the knowledge retrieval problem that need to be explained. Therefore, knowledge retrieval can be performed directly in the question and answer library and / or database based on the knowledge retrieval problem to obtain knowledge retrieval results for the knowledge retrieval problem.
[0042] Through the above technical solution, when the knowledge retrieval link represents the knowledge retrieval logic of the intelligent agent in the knowledge base, term base, question and answer base and database, the question and answer pairs can be matched in the question and answer base based on the knowledge retrieval question, and the corresponding answer can be quickly output when the question and answer pair is matched in the question and answer base. In this way, not only the stability of the answer can be improved, but also the long waiting time caused by calling the large model can be reduced, thereby improving the user experience. In the case that the question and answer pair is not matched in the question and answer base, the term matching can be performed in the term base based on the knowledge retrieval question, so that when there are terms that need to be explained in the knowledge retrieval question, the term explanation in the knowledge retrieval question can be pre-supplemented through the term base, so that the intelligent agent can understand the knowledge retrieval question more accurately, and when performing knowledge retrieval in the question and answer base and / or database, the accuracy and reliability of the knowledge retrieval results can be improved. In addition, since the preset retrieval resource library includes at least one of the knowledge base, term base, question and answer base and database, when determining the knowledge retrieval link of the intelligent body, it can be flexibly configured according to business needs. Compared with the related technology of constructing the knowledge retrieval link through high code, it can reduce the development burden brought about by changes in business needs, achieve better compatibility and reusability, significantly reduce subsequent development costs, and improve the adaptability to new scenario applications.
[0043] To facilitate understanding of the intelligent agent knowledge retrieval method based on multi-knowledge mixed recall provided by the present disclosure, the possible implementation methods of the present disclosure are described below.
[0044] In a possible manner, the term base includes terms and term explanations associated with the terms. Accordingly, term matching in the term base based on the knowledge retrieval question may include: Perform word segmentation on the knowledge retrieval question to obtain multiple word segments; for each word segment, determine the semantic similarity between the word segment and the terms in the terminology database, and perform term matching in the terminology database based on the semantic similarity and a first similarity threshold; Accordingly, based on the term matching results and the knowledge retrieval question, a knowledge retrieval is performed in the question-answer library and / or database to obtain a knowledge retrieval result for the knowledge retrieval question, which may include: If the semantic similarity between the target word segmentation and the target term is greater than or equal to a first similarity threshold, a new knowledge retrieval question is obtained based on the term explanation and knowledge retrieval question associated with the target term; based on the new knowledge retrieval question, knowledge retrieval is performed in the question and answer library and / or database to obtain a knowledge retrieval result for the knowledge retrieval question.
[0045] Among them, the semantic similarity between the word segmentation and the terms in the term library can be obtained by calculating the cosine similarity of the word vectors between the word segmentation and the term, or by calculating the edit distance between the word segmentation and the term. Of course, it can also be calculated by other methods, and the embodiments of the present disclosure do not impose any restrictions on this.
[0046] Among them, according to the semantic similarity and the first similarity threshold, the term matching in the term base can be: for each word segment, the target term is screened in the term base according to the first similarity threshold and the similarity between the word segment and each term in the term base, wherein the similarity between the target term and the word segment is greater than or equal to the first similarity threshold. If the target term is not screened out in the term base, it indicates that there may be no terms that need to be explained in the knowledge retrieval question, and thus knowledge retrieval can be directly performed in the question and answer library and / or database based on the knowledge retrieval question to obtain knowledge retrieval results for the knowledge retrieval question. If the target term is screened out in the term base, it indicates that there may be terms that need to be explained in the knowledge retrieval question, and thus a new knowledge retrieval question can be obtained based on the term explanation associated with the target term and the knowledge retrieval question; and then knowledge retrieval can be performed based on the new knowledge retrieval question, such as Figure 3 For example, after obtaining a new knowledge retrieval question, knowledge retrieval can be performed in the question-answer library and / or database to obtain knowledge retrieval results for the knowledge retrieval question, such as Figure 4 shown.
[0047] In a possible manner, the term may include a semantic term and / or an expression term, and the term interpretation includes a natural language interpretation of the semantic term and / or an expression interpretation of the expression term. Accordingly, based on the term interpretation associated with the target term and the knowledge retrieval question, a new knowledge retrieval question is obtained, which may include: When the target term is a semantic term, the knowledge retrieval problem is rewritten based on the natural language interpretation associated with the target term through the big model associated with the intelligent agent to obtain a new knowledge retrieval problem; when the target term is an expression term, the knowledge retrieval problem is expanded based on the expression interpretation associated with the target term through the big model associated with the intelligent agent to obtain a new knowledge retrieval problem.
[0048] It should be understood that semantic terms can refer to descriptions of the meaning, interpretation, and business logic of data or concepts, such as the definition of an indicator and / or the calculation method of an indicator. Expression terms can refer to specific forms used to implement a certain function or calculation, such as the calculation formula of an indicator or the corresponding structured query statement.
[0049] For semantic terms, a first prompt word template can be set in advance. Therefore, when the target semantic term is matched in the term library, the target semantic term, the natural language explanation associated with the target semantic term, and the knowledge retrieval question can be filled into the corresponding position of the first prompt word template to obtain the first prompt word. Then, the first prompt word can be input into the large model associated with the intelligent agent, and the knowledge retrieval question can be rewritten based on the first prompt word through the large model to obtain a new knowledge retrieval question.
[0050] For example, a knowledge retrieval question might be: "What dairy products can be stored at low temperatures?" The target semantic term might be: "low temperature," and the natural language explanation associated with the target semantic term might be: "below 12°C." Rewriting the knowledge retrieval question based on the natural language explanation associated with the target semantic term yields the following new knowledge retrieval question: “What dairy products can be stored at low temperatures (below 12°C)?”
[0051] For expression terms, a second prompt word template can be set in advance. Therefore, when the target expression term is matched in the term library, the target expression term, the expression explanation associated with the target expression term, and the knowledge retrieval question can be filled into the corresponding position of the second prompt word template to obtain the second prompt word. Then, the second prompt word can be input into the large model associated with the intelligent agent, and the knowledge retrieval question can be expanded based on the second prompt word through the large model to obtain a new knowledge retrieval question.
[0052] For example, a knowledge retrieval question can be: "What is the customer conversion rate?" The target expression term can be: "conversion rate", and the expression interpretation associated with the target expression term can be: "count(distinct(case when {{whether to purchase the product}}=='yes' and {{customer stage}}=='leads' then {{username}}else NULL end)) / count(distinct(case when {{customer stage}}=='leads' then {{username}} else NULLend))". After expanding the knowledge retrieval question based on the expression interpretation associated with the target expression term, the new knowledge retrieval question can be: The query statement for conversion rate is: "count(distinct(case when {{whether to purchase product}}=='yes' and {{customer stage}}=='lead' then {{username}}else NULL end)) / count(distinct(casewhen {{customer stage}}=='lead' then {{username}} else NULL end))". Please use this query statement to output the customer's conversion rate.
[0053] Through the above method, term matching can be performed in the term library based on the knowledge retrieval problem, and when the target term is matched, the term in the knowledge retrieval problem can be pre-supplemented in combination with the term explanation associated with the target term, so that the intelligent agent can understand the knowledge retrieval problem more accurately, and when performing knowledge retrieval in the question and answer library and / or database, the accuracy and reliability of the knowledge retrieval results can be improved. In addition, in the data query scenario, when the large model generates complex query statements, there is a situation where the generated query statements are inaccurate. By adding expression terms to the term library, the large model that helps the intelligent agent to generate more accurate query statements in the data query scenario can be enabled, thereby further improving the accuracy and reliability of data queries.
[0054] Among possible approaches, determining the knowledge retrieval link of an agent may include: In response to the configuration operation of the retrieval resource library used by the intelligent agent for knowledge retrieval on the first configuration page, a retrieval resource library node is obtained, wherein the first configuration page is used for users to customize the configuration of the knowledge retrieval link of the intelligent agent, and the retrieval resource library node includes at least one of a knowledge base node, a term base node, a question and answer base node and a database node; in response to the connection configuration operation between the resource library nodes, the knowledge retrieval link of the intelligent agent is obtained.
[0055] For example, the first configuration page may include a first display area and a second display area, and the first display area may be used to display preset retrieval resource library types, and may allow users to select the desired retrieval resource library type, wherein the retrieval resource library type may include a knowledge base type, a term base type, a question and answer base type, and a database type, etc. The second display area may be used to display the retrieval resource library node corresponding to the retrieval resource library type selected by the user, and may allow users to edit the retrieval resource library node displayed in the second display area. Thus, when a user needs to customize the knowledge retrieval link of an intelligent agent, the desired retrieval resource library type may be selected in the first display area according to actual needs, and after selecting the desired retrieval resource library type, the retrieval resource library node corresponding to the desired retrieval resource library type may be displayed in the second display area. Afterwards, the retrieval resource library nodes corresponding to the desired retrieval resource library type may be connected according to actual needs, thereby obtaining the knowledge retrieval link of the intelligent agent. For example, if the required retrieval resource library type is a question-and-answer library type, a term library type, and a knowledge library type, the user can click on the question-and-answer library type, the term library type, and the knowledge library type in the first display area, and then the question-and-answer library node, the term library node, and the knowledge library node will be displayed in the second display area; or the user can drag the question-and-answer library type, the term library type, and the knowledge library type to the second display area, so that the question-and-answer library node, the term library node, and the knowledge library node will be displayed in the second display area. Afterwards, by establishing connection lines between the question-and-answer library node, the term library node, and the knowledge library node, the knowledge retrieval link of the intelligent agent is obtained, such as Figure 5 shown.
[0056] In view of the fact that the preset retrieval resource library type is displayed on the first configuration page, the editing area of the first configuration page will be reduced. Therefore, when the knowledge retrieval link to be configured is relatively complex, it may cause the user to be unable to clearly build and adjust the knowledge retrieval link, increase the difficulty and time cost of user configuration, and thus affect the user experience. Therefore, in a possible way, in order to increase the editing area in the first configuration page, an add control can be displayed on the first configuration page, and when the add control is triggered, the preset retrieval resource library type can be displayed, and after the desired retrieval resource library type is selected in the preset retrieval resource library type, the preset retrieval resource library type is canceled. That is to say, in a possible way, in response to the configuration operation of the retrieval resource library used by the intelligent agent for knowledge retrieval on the first configuration page, the retrieval resource library node is obtained, which may include: In response to the triggering operation of the node adding control in the first configuration page, the preset retrieval resource library type is displayed, wherein the node adding control is used to add the retrieval resource library type for the intelligent agent to perform knowledge retrieval, and the retrieval resource library type includes the knowledge base type, the term base type, the question and answer base type and the database type; in response to the selection operation of the first retrieval resource library type among the preset retrieval resource library types, the target retrieval resource library node belonging to the first retrieval resource library type is obtained.
[0057] For example, Figure 6 As shown, a node adding control 601 can be displayed at the bottom of the first configuration page. When the user triggers the node adding control 601 by clicking or other operations, a pull-up window 602 can be displayed, wherein the pull-up window 602 is used to display the preset retrieval resource library type, such as the knowledge base type, the term base type, the question and answer library type, and the database type, etc. When the user clicks on the term base type, the retrieval resource library node belonging to the term base type can be obtained and displayed on the first configuration page.
[0058] It should be understood that the retrieval resource library node is used to characterize the position of the corresponding retrieval resource library type in the knowledge retrieval link, and the retrieval resource library corresponding to the retrieval resource library type may include one or more. When the retrieval resource library type corresponds to multiple retrieval resource libraries, in order to further configure the knowledge retrieval link according to user needs, after selecting the first retrieval resource library type, the initial retrieval resource library node that does not include the retrieval resource library can be displayed first, and then the target retrieval resource library node belonging to the first retrieval resource library type can be obtained through the configuration operation of the retrieval resource library. In this way, the matching degree between the knowledge retrieval link and the user needs can be further improved, thereby improving the accuracy and reliability of the knowledge retrieval results. That is to say, in a possible way, in response to the selection operation of the first retrieval resource library type in the preset retrieval resource library type, the target retrieval resource library node belonging to the first retrieval resource library type can be obtained, which may include: In response to a selection operation on a first retrieval resource library type among preset retrieval resource library types, an initial retrieval resource library node belonging to the first retrieval resource library type is displayed in a first configuration page, wherein the retrieval resource library corresponding to the initial retrieval resource library node is empty; in response to a triggering operation on the initial retrieval resource library node, a second configuration page for the initial retrieval resource library node is displayed, and in response to a configuration operation on the retrieval resource library corresponding to the initial retrieval resource library node in the second configuration page, a target retrieval resource library node belonging to the first retrieval resource library type is obtained.
[0059] For example, referring to the above example, when the user clicks on a termbase type, the initial termbase node corresponding to the termbase type can be displayed on the first configuration page, such as Figure 7As shown, when the user triggers the initial term base node by a click or other operation, a second configuration page may be displayed on the first configuration page, wherein the second configuration page at least displays a resource configuration control 701 for configuring the retrieval resource base of the initial term base node. When a drop-down control in the resource configuration control 701 is triggered by a click or other operation, a drop-down menu may be displayed, and the drop-down menu may display multiple preset term bases. When one of the term bases is selected, a retrieval resource base node belonging to the term base type is obtained.
[0060] Through the above method, the knowledge retrieval link of the intelligent body can be customized according to user needs on the first configuration page. Compared with the related technology of constructing the knowledge retrieval link through high-code methods, the knowledge retrieval link construction method disclosed in the present invention can effectively reduce the development burden brought about by changes in business needs, achieve better compatibility and reusability, significantly reduce subsequent development costs, and improve adaptability to new scenario applications.
[0061] Among possible approaches, determining the knowledge retrieval link of an agent may include: In response to the configuration operation of the retrieval resource library used by the intelligent agent for knowledge retrieval on the third configuration page, a target retrieval resource library is obtained, wherein the third configuration page is used for the user to configure the knowledge retrieval link of the intelligent agent according to the retrieval logic template, and the target retrieval resource library includes at least one of a knowledge base, a term base, a question and answer base and a database; based on the target retrieval resource library and the retrieval logic template, the knowledge retrieval link of the intelligent agent is determined.
[0062] It should be understood that there can be one or more retrieval logic templates, and the embodiments of the present disclosure do not impose any restrictions on this. When there are multiple retrieval logic templates, the user can select one of the retrieval logic templates to configure the knowledge retrieval link of the intelligent agent, or can select multiple retrieval logic templates to configure the knowledge retrieval link of the intelligent agent. When multiple retrieval logic templates are selected to configure the knowledge retrieval link of the intelligent agent, a test page can be displayed after the configuration is completed for the user to test the knowledge retrieval effects of the configured multiple knowledge retrieval links, and determine the knowledge retrieval link of the intelligent agent based on the test results.
[0063] In a possible manner, in response to the configuration operation on the third configuration page for the retrieval resource library used by the agent for knowledge retrieval, obtaining the target retrieval resource library may include: The preset retrieval resource library types are displayed on the third configuration page, wherein each preset retrieval resource library type is associated with an add control, and the preset retrieval resource library types include knowledge base type, term base type, question and answer library type and database type. The add control is used to add the retrieval resource library corresponding to the retrieval resource library type as the retrieval resource library for the intelligent agent to perform knowledge retrieval; in response to the triggering operation of the add control associated with the second retrieval resource library type in the preset retrieval resource library type, the fourth configuration page for the second retrieval resource library type is displayed, and in response to the resource configuration operation of the second retrieval resource library type on the fourth configuration page, the target retrieval resource library is obtained.
[0064] For example, Figure 8 As shown, the preset search resource library types, such as the knowledge base type, the term base type, the question and answer library type, and the database type, can be displayed on the third configuration page, and the associated add control 801 can be displayed to the right of each preset search resource library type. When the user triggers the add control 801 associated with the second search resource library type by clicking or other operations, the fourth configuration page for the second search resource library type can be displayed, wherein the fourth configuration page can display multiple search resource libraries associated with the second search resource library type, and for each search resource library, an add control 802 can be associated and displayed for using the search resource library as the search resource library corresponding to the second search resource library type in the knowledge search link. When the user triggers the target add control 802 by clicking or other operations, the search resource library corresponding to the target add control 802 is used as the search resource library corresponding to the second search resource library type. For example, when the user triggers the add control 801 associated with the question and answer library type through operations such as clicking, the fourth configuration page for the question and answer library type can be displayed, wherein the fourth configuration page can display the first question and answer library, the second question and answer library and the third question and answer library associated with the question and answer library type. When the user triggers the add control 802 associated with the second question and answer library through operations such as clicking, the second question and answer library can be used as the target retrieval resource library of the question and answer library type and can be displayed on the third configuration page.
[0065] Among them, it is worth mentioning that in order to make the configured knowledge retrieval link more in line with the actual needs of users, when configuring based on the retrieval logic template, you can only configure part of the content in the retrieval logic template. For the content that is not configured in the retrieval logic template, you can directly skip it when generating the knowledge retrieval link.
[0066] For example, if the retrieval logic template is: first, match question-answer pairs in the question-answer database based on the knowledge retrieval question; if no question-answer pairs are matched, match terms in the term database based on the knowledge retrieval question, and then match in the knowledge database based on the term matching results and the knowledge retrieval question. If, when configuring the knowledge retrieval link based on the retrieval logic template, no question-answer pairs are configured, then when determining the knowledge retrieval link for the agent based on the configuration content and the retrieval logic template, the following knowledge retrieval link can be obtained: match terms in the term database based on the knowledge retrieval question, and match in the knowledge database based on the term matching results and the knowledge retrieval question.
[0067] Through the above method, the knowledge retrieval link of the intelligent agent can be configured according to the retrieval logic template on the second configuration page, thereby simplifying the configuration difficulty of the knowledge retrieval link, improving the configuration efficiency of the knowledge retrieval link, and further improving the user experience. In addition, compared with the related art of constructing the knowledge retrieval link through high-code methods, the knowledge retrieval link construction method in this disclosure can effectively reduce the development burden brought about by changes in business needs, achieve better compatibility and reusability, significantly reduce subsequent development costs, and improve the adaptability to new scenario applications.
[0068] Based on the same concept, the embodiment of the present disclosure also provides an intelligent agent knowledge retrieval device based on multi-knowledge mixed recall, such as Figure 9 As shown, the agent knowledge retrieval device 900 based on multi-knowledge mixed recall may include: Determination module 901, for determining a knowledge retrieval link of an agent, where the knowledge retrieval link is used to represent the knowledge retrieval logic of the agent in a preset retrieval resource library, where the preset retrieval resource library includes at least one of a knowledge base, a term library, a question and answer library, and a database; Matching module 902, configured to match question-answer pairs in the question-answer database based on the knowledge retrieval question in response to receiving a knowledge retrieval question, when the knowledge retrieval link represents the knowledge retrieval logic of the agent in the knowledge base, the term base, the question-answer database, and the database; The first processing module 903 is configured to output the answer to the matched question-answer pair as a knowledge retrieval result of the knowledge retrieval question when a question-answer pair is matched; The second processing module 904 is used to perform term matching in the term library based on the knowledge retrieval question when no question-answer pair is matched, and to perform knowledge retrieval in the question-answer library and / or database based on the result of the term matching and the knowledge retrieval question to obtain a knowledge retrieval result for the knowledge retrieval question.
[0069] Through the above-mentioned intelligent agent knowledge retrieval device 900 based on multi-knowledge mixed recall, when the knowledge retrieval link represents the knowledge retrieval logic of the intelligent agent in the knowledge base, term base, question and answer base and database, the question and answer pairs can be matched in the question and answer base based on the knowledge retrieval question, and the corresponding answer can be quickly output when the question and answer pair is matched in the question and answer base. In this way, not only the stability of the answer can be improved, but also the long waiting time caused by calling the large model can be reduced, thereby improving the user experience. In the case that the question and answer pair is not matched in the question and answer base, the term matching can be performed in the term base based on the knowledge retrieval question, so that when there are terms that need to be explained in the knowledge retrieval question, the term explanation in the knowledge retrieval question can be pre-supplemented through the term base, so that the intelligent agent can understand the knowledge retrieval question more accurately, and when performing knowledge retrieval in the question and answer base and / or database, the accuracy and reliability of the knowledge retrieval results can be improved. In addition, since the preset retrieval resource library includes at least one of the knowledge base, term base, question and answer base and database, when determining the knowledge retrieval link of the intelligent body, it can be flexibly configured according to business needs. Compared with the related technology of constructing the knowledge retrieval link through high code, it can reduce the development burden brought about by changes in business needs, achieve better compatibility and reusability, significantly reduce subsequent development costs, and improve the adaptability to new scenario applications.
[0070] In a possible manner, the term library includes terms and term explanations associated with the terms. Accordingly, the second processing module 904 may include: The first processing submodule is used to perform word segmentation processing on the knowledge retrieval question to obtain multiple word segments; a second processing submodule, configured to determine, for each segmented word, a semantic similarity between the segmented word and a term in the terminology library, and perform term matching in the terminology library based on the semantic similarity and a first similarity threshold; A third processing submodule is configured to obtain a new knowledge retrieval question based on the term explanation and the knowledge retrieval question associated with the target term if the semantic similarity between the target word segmentation and the target term is greater than or equal to a first similarity threshold; The retrieval submodule is used to perform knowledge retrieval in the question and answer library and / or database according to the new knowledge retrieval question, and obtain the knowledge retrieval results for the knowledge retrieval question.
[0071] In a possible manner, the terms include semantic terms and / or expression terms, and the term interpretation includes natural language interpretation for the semantic terms and / or expression interpretation for the expression terms. Accordingly, the third processing submodule may include: a first processing unit for rewriting the knowledge retrieval question based on the natural language interpretation associated with the target term by using a large model associated with the agent to obtain a new knowledge retrieval question when the target term is a semantic term; The second processing unit is used to expand the knowledge retrieval question based on the expression interpretation associated with the target term through the large model associated with the intelligent agent when the target term is an expression term, so as to obtain a new knowledge retrieval question.
[0072] In a possible manner, the question-answer library includes multiple question-answer pairs, and each question-answer pair includes a question and an answer. Accordingly, the matching module 902 may include: A first determination submodule is configured to, in response to receiving a knowledge retrieval question, determine, for each question in a question-answer pair, a similarity between the question and the knowledge retrieval question; The matching submodule is used to match question and answer pairs in the question and answer database based on the similarity and the second similarity threshold.
[0073] In a possible manner, the determination module 901 may include: A first configuration submodule is configured to obtain a retrieval resource library node in response to a configuration operation on a first configuration page for a retrieval resource library used by the agent for knowledge retrieval, wherein the first configuration page is used for a user to customize and configure a knowledge retrieval link of the agent, and the retrieval resource library node includes at least one of a knowledge base node, a term base node, a question and answer library node, and a database node; The second configuration submodule is used to obtain the knowledge retrieval link of the intelligent agent in response to the connection configuration operation between the resource library nodes.
[0074] In a possible manner, the first configuration submodule may include: A first display unit, configured to display preset retrieval resource library types in response to a triggering operation on a node adding control in the first configuration page, wherein the node adding control is used to add a retrieval resource library type for the agent to perform knowledge retrieval, and the retrieval resource library types include a knowledge library type, a term library type, a question and answer library type, and a database type; The selection unit is configured to obtain a target retrieval resource repository node belonging to the first retrieval resource repository type in response to a selection operation on a first retrieval resource repository type among preset retrieval resource repository types.
[0075] In a possible manner, the selection unit may include: A display subunit is configured to, in response to a selection operation on a first search resource library type among the preset search resource library types, display an initial search resource library node belonging to the first search resource library type on the first configuration page, wherein the search resource library corresponding to the initial search resource library node is empty; The processing sub-unit is used to display a second configuration page for the initial retrieval resource library node in response to a trigger operation on the initial retrieval resource library node, and obtain a target retrieval resource library node belonging to the first retrieval resource library type in response to a configuration operation on the retrieval resource library corresponding to the initial retrieval resource library node in the second configuration page.
[0076] In a possible manner, the determination module 901 may include: A third configuration submodule is configured to obtain a target retrieval resource library in response to a configuration operation on a third configuration page for a retrieval resource library used by the agent for knowledge retrieval, wherein the third configuration page is used for a user to configure a knowledge retrieval link of the agent according to a retrieval logic template, and the target retrieval resource library includes at least one of a knowledge base, a term base, a question and answer base, and a database; The second determination submodule is used to determine the knowledge retrieval link of the intelligent agent according to the target retrieval resource library and the retrieval logic template.
[0077] In a possible manner, the third configuration submodule may include: A second display unit is configured to display preset search resource library types on the third configuration page, wherein each preset search resource library type is associated with an add control, and the preset search resource library types include a knowledge base type, a term base type, a question and answer base type, and a database type. The add control is configured to add a search resource library corresponding to the search resource library type as a search resource library for the agent to perform knowledge retrieval; The third processing unit is used to display a fourth configuration page for the second search resource library type in response to a triggering operation of adding a control associated with the second search resource library type in the preset search resource library type, and obtain a target search resource library in response to a resource configuration operation of the second search resource library type on the fourth configuration page.
[0078] Based on the same concept, an embodiment of the present disclosure also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processing device, the program implements the steps of any of the above-mentioned intelligent agent knowledge retrieval methods based on multi-knowledge mixed recall.
[0079] Based on the same concept, an embodiment of the present disclosure further provides an electronic device, which may include: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement any step of the above-mentioned intelligent agent knowledge retrieval method based on multi-knowledge mixed recall.
[0080] Based on the same concept, an embodiment of the present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned intelligent agent knowledge retrieval methods based on multi-knowledge mixed recall.
[0081] Reference below Figure 10 , which shows a schematic structural diagram of an electronic device 1000 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0082] like Figure 10 As shown, electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of electronic device 1000 are also stored in RAM 1003. Processing device 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to bus 1004.
[0083] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Figure 10 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0084] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0085] It should be noted that the computer-readable medium described above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a 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, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.
[0086] In some embodiments, communications may be conducted using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0087] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0088] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: determines the knowledge retrieval link of the intelligent agent, which is used to represent the knowledge retrieval logic of the intelligent agent in a preset retrieval resource library, and the preset retrieval resource library includes at least one of a knowledge base, a term base, a question and answer library and a database; when the knowledge retrieval link represents the knowledge retrieval logic of the intelligent agent in the knowledge base, the term base, the question and answer library and the database, in response to receiving a knowledge retrieval question, performs question and answer pair matching in the question and answer library based on the knowledge retrieval question; when a question and answer pair is matched, the answer in the matched question and answer pair is output as the knowledge retrieval result of the knowledge retrieval question; when no question and answer pair is matched, term matching is performed in the term base based on the knowledge retrieval question, and knowledge retrieval is performed in the question and answer library and / or the database based on the result of the term matching and the knowledge retrieval question to obtain a knowledge retrieval result for the knowledge retrieval question.
[0089] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone 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 a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0090] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0091] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.
[0092] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0093] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0094] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the present disclosure is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the scope of the above disclosure. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0095] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0096] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. An agent knowledge retrieval method based on multi-knowledge hybrid recall, characterized in that: include: Determine a knowledge retrieval link of the agent, wherein the knowledge retrieval link is used to represent the knowledge retrieval logic of the agent in a preset retrieval resource library, wherein the preset retrieval resource library includes at least one of a knowledge base, a term base, a question and answer library, and a database; In a case where the knowledge retrieval link represents the knowledge retrieval logic of the agent in the knowledge base, the term base, the question and answer base, and the database, in response to receiving a knowledge retrieval question, performing question-answer pair matching in the question and answer base based on the knowledge retrieval question; When a question-answer pair is matched, the answer in the matched question-answer pair is output as a knowledge retrieval result of the knowledge retrieval question; In the case where no question-answer pair is matched, term matching is performed in the term library based on the knowledge retrieval question, and knowledge retrieval is performed in the question-answer library and / or the database based on the result of the term matching and the knowledge retrieval question to obtain a knowledge retrieval result for the knowledge retrieval question.
2. The agent knowledge retrieval method based on multi-knowledge hybrid recall according to claim 1 is characterized in that: The terminology database includes terms and term explanations associated with the terms, and performing term matching in the terminology database based on the knowledge retrieval question includes: Performing word segmentation processing on the knowledge retrieval question to obtain multiple word segments; For each of the segmented words, determining a semantic similarity between the segmented word and a term in the term library, and performing term matching in the term library based on the semantic similarity and a first similarity threshold; The step of performing a knowledge search in the question-and-answer library and / or the database based on the result of the term matching and the knowledge search question to obtain a knowledge search result for the knowledge search question includes: If the semantic similarity between the target word segmentation and the target term is greater than or equal to a first similarity threshold, a new knowledge retrieval question is obtained according to the term explanation associated with the target term and the knowledge retrieval question; According to the new knowledge retrieval question, knowledge retrieval is performed in the question-and-answer library and / or the database to obtain a knowledge retrieval result for the knowledge retrieval question.
3. The agent knowledge retrieval method based on multi-knowledge hybrid recall according to claim 2 is characterized in that: The term includes a semantic term and / or an expression term, the term interpretation includes a natural language interpretation of the semantic term and / or an expression interpretation of the expression term, and a new knowledge retrieval question is obtained based on the term interpretation associated with the target term and the knowledge retrieval question, including: In the case where the target term is a semantic term, rewriting the knowledge retrieval question based on the natural language interpretation associated with the target term by the macro model associated with the agent to obtain a new knowledge retrieval question; In the case where the target term is an expression term, the knowledge retrieval question is expanded based on the expression interpretation associated with the target term through the large model associated with the agent to obtain a new knowledge retrieval question.
4. The agent knowledge retrieval method based on multi-knowledge hybrid recall according to claim 1 is characterized in that: The question-answer database includes a plurality of question-answer pairs, and each question-answer pair includes a question and an answer. In response to receiving a knowledge retrieval question, matching the question-answer pairs in the question-answer database based on the knowledge retrieval question includes: In response to receiving a knowledge retrieval question, determining, for each question in the question-answer pair, a similarity between the question and the knowledge retrieval question; Matching question and answer pairs is performed in the question and answer database according to the similarity and a second similarity threshold.
5. The agent knowledge retrieval method based on multi-knowledge hybrid recall according to any one of claims 1 to 4, characterized in that: The step of determining a knowledge retrieval link of an intelligent agent includes: In response to a configuration operation on a first configuration page for a retrieval resource library used by an agent for knowledge retrieval, a retrieval resource library node is obtained, wherein the first configuration page is used for a user to customize and configure a knowledge retrieval link of the agent, and the retrieval resource library node includes at least one of a knowledge library node, a term library node, a question and answer library node, and a database node; In response to the connection configuration operation between the resource library nodes, the knowledge retrieval link of the agent is obtained.
6. The agent knowledge retrieval method based on multi-knowledge hybrid recall according to claim 5 is characterized in that: The step of obtaining a retrieval resource library node in response to a configuration operation on the first configuration page for the retrieval resource library used by the agent for knowledge retrieval comprises: In response to a triggering operation of a node adding control in the first configuration page, a preset search resource library type is displayed, wherein the node adding control is used to add a search resource library type for the agent to perform knowledge retrieval, and the search resource library type includes a knowledge library type, a term library type, a question and answer library type, and a database type; In response to a selection operation on a first retrieval resource repository type among the preset retrieval resource repository types, a target retrieval resource repository node belonging to the first retrieval resource repository type is obtained.
7. The agent knowledge retrieval method based on multi-knowledge hybrid recall according to claim 6 is characterized in that: The step of obtaining a target search resource repository node belonging to the first search resource repository type in response to a selection operation on the first search resource repository type among the preset search resource repository types includes: In response to a selection operation on a first search resource repository type among the preset search resource repository types, an initial search resource repository node belonging to the first search resource repository type is displayed on the first configuration page, wherein the search resource repository corresponding to the initial search resource repository node is empty; In response to the triggering operation on the initial retrieval resource repository node, a second configuration page for the initial retrieval resource repository node is displayed, and in response to the configuration operation of the retrieval resource repository corresponding to the initial retrieval resource repository node in the second configuration page, a target retrieval resource repository node belonging to the first retrieval resource repository type is obtained.
8. The agent knowledge retrieval method based on multi-knowledge hybrid recall according to any one of claims 1 to 4, characterized in that: The step of determining a knowledge retrieval link of an intelligent agent includes: In response to a configuration operation on a third configuration page for a search resource library used by an agent for knowledge retrieval, a target search resource library is obtained, wherein the third configuration page is used for a user to configure a knowledge retrieval link of the agent according to a search logic template, and the target search resource library includes at least one of a knowledge base, a term base, a question and answer base, and a database; The knowledge retrieval link of the intelligent agent is determined according to the target retrieval resource library and the retrieval logic template.
9. The agent knowledge retrieval method based on multi-knowledge hybrid recall according to claim 8 is characterized in that: The step of obtaining a target retrieval resource library in response to the configuration operation of the retrieval resource library used by the agent for knowledge retrieval on the third configuration page includes: The third configuration page displays preset search resource library types, wherein each preset search resource library type is associated with an add control. The preset search resource library types include a knowledge base type, a term base type, a question and answer base type, and a database type. The add control is used to add the search resource library corresponding to the search resource library type as a search resource library for the agent to perform knowledge retrieval; In response to the triggering operation of adding a control associated with the second search resource library type in the preset search resource library type, a fourth configuration page for the second search resource library type is displayed, and in response to the resource configuration operation of the second search resource library type on the fourth configuration page, the target search resource library is obtained.
10. An intelligent agent knowledge retrieval device based on multi-knowledge mixed recall, characterized in that: include: a determination module, configured to determine a knowledge retrieval link of an agent, wherein the knowledge retrieval link is configured to represent the knowledge retrieval logic of the agent in a preset retrieval resource library, wherein the preset retrieval resource library includes at least one of a knowledge library, a term library, a question-and-answer library, and a database; a matching module for matching question-answer pairs in the question-answer base based on a knowledge retrieval question in response to receiving a knowledge retrieval question, when the knowledge retrieval link represents the knowledge retrieval logic of the agent in the knowledge base, the term base, the question-answer base, and the database; A first processing module is configured to, when a question-answer pair is matched, output the answer in the matched question-answer pair as a knowledge retrieval result of the knowledge retrieval question; The second processing module is used to perform term matching in the term library based on the knowledge retrieval question when no question-answer pair is matched, and to perform knowledge retrieval in the question-answer library and / or the database based on the result of the term matching and the knowledge retrieval question to obtain a knowledge retrieval result for the knowledge retrieval question.
11. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 9 are implemented.
12. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 9.
13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Information retrieval method based on question and answer library, question and answer system and computing equipment
CN115292459A
Large model question and answer result optimization method, system and device
CN117540010A
Large language model intelligent question and answer work order processing method and device based on optimized knowledge base
CN118535702A
Knowledge intensive question reasoning and generating method based on LLM
CN118798367A
Large language model and knowledge base cooperation method and device based on retrieval enhancement generation
CN119396943A
Cited By
Retrieval method, device and equipment based on large model, medium and product
CN121705395A