User question information response method and device, equipment, medium and program product

By introducing semantic search and vector search technology into the big model intelligent assistant, combined with the agent database to generate the agent call link, the problems of high resource loss and low accuracy in the application of subdivided professional fields in the existing technology are solved, and the problem of high resource loss and low accuracy is realized. Efficient and accurate response to user problems.

CN119415661APending Publication Date: 2025-02-11CHINA LIFE INSURANCE CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Existing large-model smart assistants cannot effectively reduce resource losses in applications in subdivided professional fields, and the answers are low.

Method used

By obtaining the problem information input by the user, searching private domain knowledge information from the preset private domain knowledge base based on semantic search and vector search, and generating an agent call link in combination with the agent database, dynamically calling the agent to respond to user problems.

Benefits of technology

It realizes efficient response to user questions in subdivided professional fields, reduces resource losses, and improves the accuracy and relevance of answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415661A_ABST
    Figure CN119415661A_ABST
Patent Text Reader

Abstract

The invention relates to a user question information response method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring question information input by a user; based on semantic retrieval and vector retrieval, retrieving corresponding private domain knowledge information from a preset private domain knowledge base; obtaining a first cue word according to the question information, the private domain knowledge information and a pre-configured agent database; inputting the first prompt word into the large model, obtaining an agent calling link through the large model, and calling a corresponding agent according to the agent calling link; obtaining a second prompt word, inputting the second prompt word and an execution result obtained by calling the corresponding agent according to the agent calling link into the large model, and determining whether the execution result meets a condition or not through the large model; if yes, response information for the problem information is output based on the execution result. By adopting the method, resource loss caused by fixed code development can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, computer-readable storage medium and computer program product for responding to user question information. Background Art

[0002] With the development of computer technology, large-scale Copilot intelligent assistants have emerged. That is, users can use chat to let large-scale intelligent assistants complete related operations or answer related questions. A large-scale assistant that implements a specific task is called an Agent. The commonly used large-scale intelligent assistant application solution is to let the large model select a specific Agent to solve the user's problem based on the user's problem. However, this solution cannot achieve application in subdivided professional fields. If the Agent call links in different scenarios are written as fixed codes to solve application problems in subdivided professional fields, there will be a problem of high resource loss. Summary of the invention

[0003] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for responding to user question information that can reduce resource loss in response to the above technical problems.

[0004] In a first aspect, the present application provides a method for responding to user question information, comprising:

[0005] Get the question information entered by the user;

[0006] Based on semantic retrieval and vector retrieval, private domain knowledge information corresponding to the question information is retrieved from a preset private domain knowledge base;

[0007] Obtaining a first prompt word according to the question information, the private domain knowledge information and a pre-configured agent database; the agent database includes agent skill introduction information, agent requirement parameters and agent output data format information;

[0008] Input the first prompt word into the big model, obtain an agent calling link through the big model, and call the corresponding agent according to the agent calling link; the agent calling link includes agent information to be called and a calling sequence corresponding to the agent;

[0009] Obtain a second prompt word, input the second prompt word and an execution result obtained by calling a corresponding agent according to the agent calling link into the large model, and determine whether the execution result meets a condition through the large model;

[0010] If satisfied, output response information to the question information based on the execution result.

[0011] In one embodiment, after determining whether the execution result satisfies a condition through the large model, the method further includes:

[0012] If not satisfied, obtaining a third prompt word according to the execution result, the private domain knowledge information and the question information;

[0013] Inputting the third prompt word into the large model, obtaining an updated agent call link through the large model, and calling a corresponding agent according to the updated agent call link to obtain an updated execution result;

[0014] Response information to the question information is output based on the updated execution result.

[0015] In one embodiment, after obtaining the updated execution result, the method further includes:

[0016] Based on the updated execution result, an updated second prompt word is obtained, and the execution result obtained by calling the corresponding agent according to the agent call link is returned to the big model, and the step of determining whether the execution result meets the condition is performed through the big model until the execution result meets the condition.

[0017] In one of the embodiments, the first prompt word includes at least the question information, the private domain knowledge information, agent function information in a pre-configured agent database, decision reference information, and decision execution logic.

[0018] In one of the embodiments, the second prompt word at least includes the problem information, the private domain knowledge information, the execution result, the decision reference information and the decision execution logic.

[0019] In one embodiment, the retrieving private domain knowledge information corresponding to the question information from a preset private domain knowledge base based on semantic retrieval and vector retrieval includes:

[0020] Using the M3E-embedding model to convert the question information into a question vector and convert the private domain knowledge information in the preset knowledge base into a private domain knowledge vector;

[0021] Calculating the vector similarity between the question vector and each of the private domain knowledge vectors, and based on the similarity calculation result, recalling candidate private domain knowledge information corresponding to the question information from the preset knowledge base;

[0022] The candidate private domain knowledge information is reranked using a BGE-reranker model, and the private domain knowledge information corresponding to the question information is determined from the reranked candidate private domain knowledge information.

[0023] In one embodiment, the preset private domain knowledge base is a database that includes at least one of pre-constructed professional knowledge, common problems, solutions and industry standard specifications in a professional field.

[0024] In a second aspect, the present application also provides a device for responding to user question information, including:

[0025] A question information acquisition module is used to obtain question information input by the user;

[0026] A private domain knowledge retrieval module, used to retrieve the private domain knowledge information corresponding to the question information from a preset private domain knowledge base based on semantic retrieval and vector retrieval;

[0027] An agent call link generation module is used to obtain a first prompt word according to the problem information, the private domain knowledge information and a pre-configured agent database; the agent database includes agent skill introduction information, agent requirement parameters and agent output data format information; the first prompt word is input into a large model, an agent call link is obtained through the large model, and a corresponding agent is called according to the agent call link; the agent call link includes agent information to be called and a call sequence corresponding to the agent;

[0028] The question information response module is used to obtain a second prompt word, input the second prompt word and the execution result obtained by calling the corresponding agent according to the agent calling link into the big model, and determine whether the execution result meets the conditions through the big model; if so, output response information to the question information based on the execution result.

[0029] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.

[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect.

[0031] In a fifth aspect, the present application further 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.

[0032] The above-mentioned method, device, computer equipment, computer-readable storage medium and computer program product for responding to user question information obtain the question information input by the user; then based on semantic retrieval and vector retrieval, retrieve the private domain knowledge information corresponding to the question information from the preset private domain knowledge base; then obtain the first prompt word based on the question information, the private domain knowledge information and the pre-configured agent database; the agent database includes agent skill introduction information, agent requirement parameters and agent output data format information; then input the first prompt word into the big model, obtain the agent call link through the big model, and call the corresponding agent according to the agent call link; the agent call link includes the agent information that needs to be called and the corresponding call order of the agent; then obtain the second prompt word, input the second prompt word and the execution result obtained by calling the corresponding agent according to the agent call link into the big model, and determine whether the execution result meets the conditions through the big model; if satisfied, output response information for the question information based on the execution result. In the present application, before generating the first prompt word for the user's question, first use semantic retrieval technology and vector retrieval technology to search for relevant private domain knowledge information in the preset private domain knowledge base, and then dynamically introduce the relevant private domain knowledge information into the prompt word project of the large model to generate the first prompt word, so that the large model can refer to the private domain knowledge inside the server in addition to its own knowledge to realize the decision of the intelligent agent call link. After the path planning, that is, after the intelligent agent call link is generated, when the intelligent agent execution phase is completed, the execution result and private domain knowledge information corresponding to the intelligent agent are handed over to the large model for decision-making through the prompt word project again. If the execution result matches the private domain knowledge information in the preset private domain knowledge base, the large model determines that this process is over and returns the response result. In addition, the intelligent agent call link in the method of the present application is flexible and controllable. After the internal related information is changed due to business problems, the corresponding change of the call link can be realized by synchronizing the new content to the preset private domain knowledge base. Compared to solving application problems in niche professional fields by writing the agent call links in different scenarios as fixed codes, the solution provided in this application integrates vector retrieval technology into the process of large-model intent recognition and agent selection, so that the decision of the large model can refer to the internal professional knowledge in the preset private domain knowledge base, so that the industry's general large models can meet the diversified needs of more professional niche fields without fine-tuning training, reducing the resource loss caused by fixed code development. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0034] FIG1 is a schematic flow chart of a method for responding to user question information in one embodiment;

[0035] FIG2 is a flowchart of the next step when the large model determines that the execution result does not meet the conditions in one embodiment;

[0036] Figure 3 It is a flowchart of the intelligent robot assistant construction process based on the fusion of large model MultiAgent and vector retrieval in another embodiment;

[0037] Figure 4 A structural block diagram of a device for responding to user question information in one embodiment;

[0038] FIG. 5 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0040] In the scenario where the big model Copilot intelligent assistant is applied in private domain knowledge question and answer, the big model has great limitations in identifying user intentions and judging which agents are needed for the current operation, and the accuracy of the answers is low.

[0041] In traditional technology, if you want to implement a large-model intelligent agent assistant in a subdivided professional field, you need to manually complete a large amount of rule code writing and write the agent call links in different scenarios as fixed codes, but the development time and labor cost are high, the efficiency is low, and fast iteration cannot be achieved. Therefore, there is an urgent need for a large-model intelligent agent assistant that can implement a subdivided professional field and reduce resource consumption to respond to user input question information.

[0042] In one embodiment, as shown in FIG1 , a method for responding to user question information is provided. This embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0043] Step S202, obtaining question information input by the user.

[0044] The user input may refer to a user inputting a question or making a query through a certain interface, such as a web form, a chat interface, etc.

[0045] The question information may refer to a query or request raised by a user in an interactive system, which is usually expressed in a natural language and includes a problem that is desired to be solved, information to be obtained, and the like.

[0046] Step S204: based on semantic retrieval and vector retrieval, retrieve the private domain knowledge information corresponding to the question information from the preset private domain knowledge base.

[0047] Among them, semantic retrieval can refer to an information retrieval technology that obtains relevant information by understanding the meaning (semantics) of the questions entered by users, rather than relying solely on keyword matching. Semantic retrieval can capture context and potential meanings, thereby improving the accuracy of retrieval.

[0048] Among them, vector retrieval can refer to a retrieval method based on the vector space model, which converts text information into vectors (usually using embedding technology) and performs retrieval by calculating the similarity between vectors. Vector retrieval can effectively process high-dimensional data and improve retrieval efficiency and effectiveness.

[0049] Among them, the preset private domain knowledge base can refer to a database with specific subject content as the main body, which stores knowledge and information related to the subject. The private domain knowledge base only contains internal information that is valuable to users and is more targeted and accurate than public information sources.

[0050] Among them, private domain knowledge information may refer to information retrieved from a preset private domain knowledge base, which can help answer questions raised by users.

[0051] Step S206, obtaining a first prompt word according to the question information, the private domain knowledge information and the pre-configured agent database, wherein the agent database includes agent skill introduction information, agent requirement parameters and agent output data format information.

[0052] The pre-configured agent database may refer to a database holding agent capabilities and characteristics, and may include the following:

[0053] Agent skill introduction information: describes the skills and functions of the agent and what tasks it can perform.

[0054] Agent requirement parameters: Indicates the input parameters and conditions required by the agent when performing tasks.

[0055] Agent output data format information: specifies the data format and structure of the results returned by the agent.

[0056] Among them, the first prompt word can refer to a keyword or phrase generated based on question information, private domain knowledge information and a pre-configured agent database, which can provide context for the agent call.

[0057] Step S208, input the first prompt word into the large model, obtain the agent call link through the large model, and call the corresponding agent according to the agent call link. The agent call link includes the agent information to be called and the calling order of the agent.

[0058] Among them, the large model can refer to a large pre-trained machine learning model, which can generate text and solve problems based on the input information, and can be used to generate intelligent agent call links.

[0059] Among them, the agent calling link can refer to a structure that describes the steps and sequence of calling an agent, including the agent information that needs to be called and the order of calling, so as to coordinate the cooperation of multiple agents in complex tasks.

[0060] Step S210, obtaining a second prompt word, inputting the second prompt word and the execution result obtained by calling the corresponding agent according to the agent calling link into the big model, and determining whether the execution result meets the condition through the big model.

[0061] Among them, the second prompt word can refer to another group of keywords or phrases generated after the intelligent agent is executed, which is used to input into the large model to determine whether the execution result obtained by calling the corresponding intelligent agent according to the intelligent agent call link meets the conditions.

[0062] The execution result may refer to the output result generated after the corresponding agent executes the operation according to the agent call link.

[0063] Step S212: If satisfied, output response information to the question information based on the execution result.

[0064] The response information may refer to feedback information generated in response to user questions, and may be a presentation of solutions or related information to meet user needs.

[0065] Exemplarily, the user submits question information through the chat interface or input box, and the server receives the question information and starts processing. First, the server uses semantic retrieval technology to analyze the user input, understand its content and determine the information the user needs. Secondly, the private domain knowledge base is searched for related knowledge information through vector retrieval to obtain more accurate information. Then, based on the user's question information and the knowledge information obtained from the private domain knowledge base, combined with the information in the agent database, a first prompt word is constructed, which can effectively describe the task to be performed. Next, the first prompt word is input into the big model to generate an agent call link, which contains the order and required information of calling the agent. The big model calls the corresponding agent in turn according to the agent call link to perform specific operations and obtain the execution results of each agent. After the agent performs the operation, the server obtains the second prompt word and inputs it into the big model together with the execution result. The big model determines whether the execution result meets the question information raised by the user. If it meets, the final response information is generated according to the execution result and fed back to the user.

[0066] In the above-mentioned method for responding to user question information, before the big model performs path planning (generating the first prompt word) for the user question, it first uses semantic retrieval technology and vector retrieval technology to search for relevant private domain knowledge information in the preset private domain knowledge base, and dynamically introduces the relevant private domain knowledge information into the prompt word project of the big model to generate the first prompt word, so that the model can refer to the private domain knowledge inside the server in addition to its own knowledge to realize the decision of the intelligent agent call link. After the path planning, that is, after the intelligent agent call link is generated, when the intelligent agent execution phase is completed, the execution result and private domain knowledge information corresponding to the intelligent agent are again handed over to the big model for decision-making through the prompt word project. If the execution result matches the private domain knowledge information in the preset private domain knowledge base, the big model determines that this process is over and returns the response result. In addition, the intelligent agent call link in this method is flexible and controllable. After the internal related information is changed due to business problems, the corresponding change of the call link can be realized as long as the new content is synchronized to the preset private domain knowledge base. Compared with solving application problems in niche professional fields by writing the agent call links in different scenarios as fixed codes, the solution provided by this application integrates vector retrieval technology into the process of large-model intent recognition and agent selection, so that the decision of the large model can refer to the internal professional knowledge in the preset private domain knowledge base, so that the industry's general large models can meet the diversified needs of more professional niche fields without fine-tuning training, reducing the resource loss caused by fixed code development.

[0067] In an exemplary embodiment, as shown in FIG2 , after the above step S210 determines whether the execution result meets the condition through the large model, it also includes:

[0068] Step S302: If not satisfied, a third prompt word is obtained according to the execution result, the private domain knowledge information and the question information.

[0069] Among them, the third prompt word can be a new prompt word generated based on the execution results, private domain knowledge information and problem information, and can be used to generate a new intelligent agent call link in order to solve the problem information based on the execution results, that is, to improve problem handling.

[0070] Exemplarily, the server inputs the second prompt word and the execution result obtained by calling the corresponding agent according to the agent call link into the big model, and determines whether the execution result meets the conditions through the big model. If the execution result does not meet the conditions, a third prompt word is generated based on the execution result, private domain knowledge information and user question information.

[0071] Step S304, input the third prompt word into the large model, obtain the updated agent call link through the large model, and call the corresponding agent according to the updated agent call link to obtain the updated execution result.

[0072] Among them, the updated agent calling link may refer to the agent calling link generated by the large model based on the third prompt word, which is used to call the agent to obtain other information based on the execution result to solve the problem information.

[0073] Exemplarily, the server inputs the third prompt word into the big model, and the big model generates an updated agent call link based on the new information provided by the third prompt word. The big model calls the corresponding agent according to the updated agent call link to obtain an updated execution result.

[0074] Step S306: outputting response information to the question information based on the updated execution result.

[0075] Exemplarily, after obtaining the updated execution result, that is, after obtaining the updated execution result by adjusting the agent call link, the server will generate the final response information based on the updated execution result and feed it back to the user.

[0076] In this embodiment, through the second round of processing of the problem information, that is, when the first execution result of the problem information does not meet the conditions, the server generates a third prompt word based on the execution result and feeds it back to the big model. The big model identifies and corrects the shortcomings of the execution result to obtain an updated execution result. This can obtain a result that better meets user needs and improves the accuracy and relevance of the response to the problem information.

[0077] In an exemplary embodiment, after executing the updated execution result in the above step S304, it can also include: obtaining an updated second prompt word based on the updated execution result, returning to the execution step of inputting the second prompt word and the execution result obtained by calling the corresponding agent according to the agent call link into the big model, and determining whether the execution result meets the condition through the big model until the execution result meets the condition.

[0078] The updated second prompt word may be input into the large model to determine whether the updated execution result meets the conditions.

[0079] Exemplarily, the server obtains an updated second prompt word based on the updated execution result, returns to execute the step of inputting the second prompt word and the execution result obtained by calling the corresponding agent according to the agent call link into the big model, and determining whether the execution result meets the condition through the big model, that is, inputting the updated second prompt word and the updated execution result into the big model, and determining whether the updated execution result meets the condition through the big model, if the condition is met, execute the above step S306; if the condition is not met, continue to execute steps S302 to S304 until the latest execution result meets the condition.

[0080] In this embodiment, through this dynamic and iterative execution process, the server can continuously optimize and adjust the output response until the large model determines that it meets the user's needs, thereby improving the accuracy of the response and ensuring that the final output information can effectively answer the user's questions.

[0081] In an exemplary embodiment, the first prompt word includes at least question information, private domain knowledge information, agent function information in a pre-configured agent database, decision reference information, and decision execution logic.

[0082] Exemplarily, the first prompt word may include [role definition], [callable agents], [background knowledge], [goal], and [current action], as shown below:

[0083]

Role Definition

[0084] You are an intelligent decision-making assistant. Next, you need to decide which tools to call to solve the problem based on the user input.

[0085]

Callable Agents

[0086] Agent1

[0087] 1. Functions and usage scenarios:

[0088] 2. Input the ginseng:

[0089] ```json

[0090] {

[0091] “param”:””

[0092] }

[0093] ```

[0094] Sample output:

[0095] ```json

[0096] {

[0097] “param”:””

[0098] }

[0099] ```

[0100]

Background knowledge

[0101] $RAG_RESULT

[0102]

Target

[0103] $USER_INPUT

[0104]

Current Action

[0105] Refer to [Background Knowledge] to determine the Agent that needs to be called to achieve [Goal], and give the order of the call links.

[0106] In the first prompt above, Agent means an intelligent agent; Agents means multiple intelligent agents, and callable Agents means multiple candidate intelligent agents; $RAG_RESULT means the private knowledge information corresponding to the problem information retrieved from the preset private knowledge base; $USER_INPUT means the problem information input by the user. Callable Agents contains the agent function information in the pre-configured agent database, such as functions and usage scenarios, input parameters, and output samples; decision reference information can refer to [Role Definition]: You are an intelligent decision assistant, and next you need to decide which tools to call to solve the problem based on the user input. Decision execution logic can refer to [Current Action]: Refer to [Background Knowledge] to determine the Agent that needs to be called to achieve [Goal], and give the order of call links.

[0107] In this embodiment, the first prompt word contains private domain knowledge information, so that when the large model generates an agent call link through the first prompt word, it can use internal relevant professional knowledge to select and call the most relevant agent, which can improve the overall task processing speed and reduce the response time.

[0108] In an exemplary embodiment, the second prompt word includes at least question information, private domain knowledge information, execution result, decision reference information and decision execution logic.

[0109] For example, the second prompt words may include [role definition], [goal], [currently completed content], [background knowledge], and [current action], which may be specifically as follows:

[0110]

Role Definition

[0111] You are a decision maker, tasked with planning tool calls based on the goals that need to be achieved and the background knowledge.

[0112]

Target

[0113] $user_input

[0114]

Currently completed content

[0115] Agent1 output:

[0116] ```json

[0117] ## output

[0118] ```

[0119] Agent2 output:

[0120] ```json

[0121] ## output

[0122] ```

[0123]

Background knowledge

[0124] $RAG_RESULT

[0125]

Current Action

[0126] You need to determine whether the current content can achieve the [goal]. If so, the process ends and the result is output directly. If the [goal] has not been achieved, continue with tool chain planning.

[0127] In the second prompt above, $user_input indicates the question information input by the user; [Currently completed content] indicates the execution result obtained by calling the corresponding agent according to the agent call link, and Agent1 output indicates the output result of one of the agents; $RAG_RESULT indicates the private domain knowledge information corresponding to the question information retrieved from the preset private domain knowledge base; continuing the tool link planning means generating a new agent call link according to the obtained execution result; the decision reference information can refer to [Role definition]: you are a decision maker, and the task is to achieve the goal as needed, as well as the call link of the background knowledge planning tool. The decision execution logic can refer to [Current action]: you need to determine whether the currently obtained content can achieve the [goal]. If so, the process ends and the result is output directly; if the [goal] has not been achieved, continue the tool link planning.

[0128] In this embodiment, the second prompt word includes private domain knowledge information and execution results, so that when the large model uses the second prompt word to judge whether the execution result meets the conditions, it can use internal relevant professional knowledge to make the most comprehensive judgment. The large model can judge whether the process can be terminated based on the execution result based on the second prompt word and output response information. If the conditions for ending the process are not met, a new intelligent agent call link will continue to be generated according to the new information. Based on this, the execution results can be iteratively updated to improve the accuracy and relevance of the final response information.

[0129] In an exemplary embodiment, the above step S204 may specifically include:

[0130] Step S41, using the M3E-embedding model to convert question information into a question vector and convert private domain knowledge information in a preset knowledge base into a private domain knowledge vector.

[0131] Among them, the M3E-embedding model may refer to M3E (Massive Mixed Multi-lingualEmbedding, multimodal multi-task embedding model), which is a text embedding model, that is, a machine learning model used to convert information in multiple modalities such as text, voice, image, etc. into fixed-dimensional vectors. It is mainly aimed at multilingual scenarios, and especially optimizes the processing capabilities of Chinese text. It performs an embedding process on multiple input data to generate corresponding vector representations, so that different types of information can be compared and calculated in the same space. The M3E series models have a wide range of application scenarios, supporting both homogeneous text similarity calculations (such as sentence matching) and heterogeneous text retrieval (such as cross-domain information retrieval).

[0132] The question vector may be a vector representation formed by converting the question information raised by the user through the M3E-embedding model. This vector can capture the meaning and context of the question and can be used for subsequent similarity calculations.

[0133] Among them, private domain knowledge vectors are vectors formed by converting the private domain knowledge information preset in the knowledge base through the M3E-embeding model. These vectors can represent the semantic content of each knowledge item. Compared with simple text, vectors can be more conveniently used for mathematical calculations and comparisons.

[0134] Step S42, calculating the vector similarity between the question vector and each private domain knowledge vector, and based on the similarity calculation result, recalling the candidate private domain knowledge information corresponding to the question information from the preset knowledge base.

[0135] Among them, vector similarity is an indicator used to quantify the similarity between two vectors. Commonly used calculation methods include cosine similarity, Euclidean distance, Manhattan distance, etc. Through vector similarity, the matching degree between the problem vector and each private domain knowledge vector can be determined.

[0136] Among them, the candidate private domain knowledge information is the knowledge items that are highly relevant to the current problem selected by calculating the similarity between the problem vector and various private domain knowledge vectors. These candidate items will be further processed and sorted to determine the final selected private domain knowledge.

[0137] Exemplarily, the server can calculate the vector similarity between the question vector and each private domain knowledge vector. Based on the similarity calculation result, the server can confirm the private domain knowledge vector above the similarity threshold according to a pre-set similarity threshold, and recall the candidate private domain knowledge information corresponding to the question information from the preset knowledge base.

[0138] Step S43: rerank the candidate private domain knowledge information using the BGE-reranker model, and determine the private domain knowledge information corresponding to the question information from the reranked candidate private domain knowledge information.

[0139] Among them, the BGE-Reranker model may refer to a cross encoder model for reranking search results to improve the accuracy of information retrieval, wherein "BGE" stands for "Bidirectional Generative Embedding", which means that the model uses bidirectional generative embedding features to optimize the effects of text matching and information retrieval. The use of this model helps to rerank a set of top-k documents and refine the ranking of query-related documents returned by other models (such as dense retrievers). The model is highly effective in tasks such as search engines, question answering systems, and retrieval enhanced generation (RAG) pipelines. In this embodiment, the BGE-Reranker model is a model for reranking candidate private domain knowledge information, which re-evaluates the relevance of the candidate items by considering the contextual information of the user's question, and finally outputs the private domain knowledge information that best matches the user's question.

[0140] Exemplarily, the server uses the BGE-reranker model to rerank the candidate private domain knowledge information, and determines the private domain knowledge information corresponding to the question information from the reranked candidate private domain knowledge information, that is, determines one or more private domain knowledge information that ultimately have the highest degree of match with the question information based on the ranking result, and the number of private domain knowledge information obtained is set according to actual needs and is not specifically limited here.

[0141] In this embodiment, by using the M3E-embedding model in the recall stage and the BGE-reranker model in the reranking stage, the retrieval quality and the relevance of the retrieval results can be improved.

[0142] In an exemplary embodiment, the preset private domain knowledge base is a database that includes at least one of the pre-constructed professional knowledge, common problems, solutions, and industry standards and specifications in a professional field. Among them, the pre-constructed professional knowledge in a professional field may include theoretical knowledge, practical experience, and professional literature, etc.; common problems can be used to quickly respond to common inquiries that users may encounter in the professional field, including question templates and corresponding solutions, etc.; solutions can refer to answers or measures specifically for specific problems or needs, including technical solutions, strategies and methods, etc.; industry standards and specifications can refer to relevant rules, regulations, standards and specifications to ensure that all content meets industry requirements. Through the above-mentioned preset private domain knowledge base, relevant professional knowledge, common problems and solutions can be quickly obtained, which improves the efficiency of information acquisition and the accuracy of decision-making; the industry standards and solutions in the preset private domain knowledge base provide a reliable decision-making basis for the big model, thereby improving the accuracy of the decision-making process.

[0143] In an exemplary embodiment, Figure 3As shown, a process for constructing an intelligent robot assistant based on the fusion of large model MultiAgent and vector retrieval is also provided. The intelligent robot assistant (agent) constructed according to the process can respond to user question information, which may specifically include:

[0144] Step S11, obtain the question information input by the user, that is, obtain the user input; based on semantic retrieval and vector retrieval, retrieve the private domain knowledge information corresponding to the question information from the preset private domain knowledge base; that is, obtain the relevant background knowledge in the field from the private domain knowledge base through vector retrieval that combines semantic matching and keyword retrieval; wherein, vector retrieval based on the fusion of semantic similarity and keyword retrieval can refer to: retrieval through RAG technology, specifically, vector retrieval in current RAG technology generally uses a combination of semantic matching and keyword retrieval. The retrieval process is divided into two parts: recall and reranking. The M3E-embedding model is used in the recall stage, and the BGE-reranker model is used in the reranking stage. The use of the BGE-Reranker model in the industry can be combined with other components in RAG (such as the Embedding model) to improve the retrieval quality and the relevance of the generated results.

[0145] Step S12, obtaining a first prompt word according to the question information, private domain knowledge information and a pre-configured agent database; the agent database includes agent skill introduction information, agent requirement parameters and agent output data format information; inputting the first prompt word into the big model, obtaining an agent call link through the big model, and calling the corresponding agent according to the agent call link; the agent call link includes agent information to be called and the call sequence corresponding to the agent; wherein, Figure 3 As shown in the figure, the internal knowledge (relevant background knowledge in the field) retrieved by the vector is introduced into the decision-making process of the agent calling link through the (Prompt) prompt word engineering. The specific prompt words of the path planning node can be as follows:

[0146]

Role Definition

[0147] You are an intelligent decision-making assistant. Next, you need to decide which tools to call to solve the problem based on the user input.

[0148]

Callable Agents

[0149] Agent1

[0150] 1. Functions and usage scenarios:

[0151] 2. Input the ginseng:

[0152] ```json

[0153] {

[0154] “param”:””

[0155] }

[0156] ```

[0157] Sample output:

[0158] ```json

[0159] {

[0160] “param”:””

[0161] }

[0162] ```

[0163]

Background knowledge

[0164] $RAG_RESULT

[0165]

Target

[0166] $USER_INPUT

[0167]

Current Action

[0168] Refer to [Background Knowledge] to determine the Agent that needs to be called to achieve [Goal], and give the order of the call links.

[0169] Refer to the above prompts and Figure 3 The above step S13 is based on the user input, the agent database (including the skill introduction of each Agent agent, the parameters to be provided, the returned data format and other basic information) and the prompt word engineering through the big model capability of the big model to obtain the agent call link (such as Figure 3 The agent calling link shown may include agent 1-agent 2-agent 4 and agent 1-agent 3-agent 4, and each agent needs to input parameters before executing a task). Then the big model calls the agent to execute the corresponding task according to the agent calling link to obtain the execution result.

[0170] Step S13, obtain the second prompt word, input the second prompt word and the execution result obtained by calling the corresponding agent according to the agent call link into the big model, and determine whether the execution result meets the condition through the big model; if it meets the condition, output the response information to the question information based on the execution result. Figure 3As shown, after obtaining the execution result, the second prompt word is obtained through the prompt word engineering based on the relevant background knowledge in the field and the execution result, and then the execution result is judged based on the second prompt word and the execution result through the big model capability of the big model whether the execution result meets the conditions (whether the goal corresponding to the input problem information can be achieved). If yes, the result is output, and if not, the tool chain planning (updating the intelligent agent calling chain) is continued. The prompt words corresponding to the problem processing and calling intelligent agent stage in the above step S15 can be specifically as follows:

[0171]

Role Definition

[0172] You are a decision maker, tasked with planning tool calls based on the goals that need to be achieved and the background knowledge.

[0173]

Target

[0174] $user_input

[0175]

Currently completed content

[0176] Agent1 output:

[0177] ```json

[0178] ## output

[0179] ```

[0180] Agent2 output:

[0181] ```json

[0182] ## output

[0183] ```

[0184]

Background knowledge

[0185] $RAG_RESULT

[0186]

Current Action

[0187] You need to determine whether the current content can achieve the [goal]. If so, the process ends and the result is output directly. If the [goal] has not been achieved, continue with tool chain planning.

[0188] Through the design of the above prompt words, the large model can determine the subsequent action plan and select the appropriate Agent to handle the problem at each stage by referring to the background knowledge and the current known status.

[0189] In this embodiment, this technical solution integrates vector retrieval technology into the process of large model intention recognition and agent intelligent body selection, so that the decision of the large model can refer to internal professional knowledge, so that the general large model in the industry can achieve diversified needs in more professional and subdivided fields without fine-tuning training. This technical solution mainly enhances the agent scheduling capability of the large model through RAG, so that the large model can not only understand the request, but also fully refer to the information in the private domain knowledge base when calling the appropriate agent. Each agent is responsible for a specific task (such as database query, analysis, API call, etc.), and the RAG model contextually enhances the request by querying the knowledge base and guides how to combine different agents. Before the large model performs path planning for user problems, the rag retrieval enhancement technology is first used to search for relevant information in the knowledge base. The information is dynamically introduced into the prompt word engineering of the large model, so that the model can refer to the internal private domain knowledge in addition to its own knowledge to realize the decision of the agent call link. After the path planning, the execution phase is completed, and the current state and background knowledge base information are handed over to the large model for decision-making through the prompt word engineering. If the current information matches the information in the knowledge base, the large model determines that this process is over and returns the result. The calling link of this method is flexible and controllable. After the internal related information is changed due to business problems, the corresponding change of the calling link can be achieved by simply synchronizing the new content to the knowledge base.

[0190] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0191] Based on the same inventive concept, the embodiment of the present application also provides a device for responding to user question information for implementing the method for responding to user question information involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations of the embodiments of the device for responding to one or more user question information provided below can refer to the limitations of the method for responding to user question information above, and will not be repeated here.

[0192] In an exemplary embodiment, Figure 4As shown, a device for responding to user question information is provided, including: a question information acquisition module 901, a private domain knowledge retrieval module 902, an agent call link generation module 903 and a question information response module 904, wherein:

[0193] The question information acquisition module 901 is used to acquire the question information input by the user;

[0194] The private domain knowledge retrieval module 902 is used to retrieve the private domain knowledge information corresponding to the question information from the preset private domain knowledge base based on semantic retrieval and vector retrieval;

[0195] The agent call link generation module 903 is used to obtain a first prompt word according to the question information, private domain knowledge information and a pre-configured agent database; the agent database includes agent skill introduction information, agent requirement parameters and agent output data format information; the first prompt word is input into the large model, the agent call link is obtained through the large model, and the corresponding agent is called according to the agent call link; the agent call link includes agent information to be called and the calling order of the agent;

[0196] The question information response module 904 is used to obtain the second prompt word, input the second prompt word and the execution result obtained by calling the corresponding agent according to the agent call link into the big model, and determine whether the execution result meets the conditions through the big model; if so, output response information to the question information based on the execution result.

[0197] In an exemplary embodiment, the device for responding to user question information also includes an execution result updating module, which is used to obtain a third prompt word based on the execution result, private domain knowledge information and question information if it is not satisfied; input the third prompt word into the big model, obtain an updated agent call link through the big model, and call the corresponding agent according to the updated agent call link to obtain an updated execution result; output response information to the question information based on the updated execution result.

[0198] In an exemplary embodiment, the above-mentioned execution result updating module is also used to obtain an updated second prompt word based on the updated execution result, return to the execution step of inputting the second prompt word and the execution result obtained by calling the corresponding agent according to the agent call link into the big model, and determine whether the execution result meets the condition through the big model until the execution result meets the condition.

[0199] In an exemplary embodiment, the private domain knowledge retrieval module 902 is further used to convert the question information into a question vector using the M3E-embeding model and to convert the private domain knowledge information in the preset knowledge base into a private domain knowledge vector; calculate the vector similarity between the question vector and each private domain knowledge vector, and based on the similarity calculation result, recall the candidate private domain knowledge information corresponding to the question information from the preset knowledge base; rerank the candidate private domain knowledge information using the BGE-reranker model, and determine the private domain knowledge information corresponding to the question information from the reranked candidate private domain knowledge information.

[0200] Each module in the above-mentioned user question information response device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0201] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for responding to user question information is implemented.

[0202] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0203] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0204] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0205] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0206] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0207] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0208] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0209] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for responding to user question information, characterized in that: The method comprises: Get the question information entered by the user; Based on semantic retrieval and vector retrieval, private domain knowledge information corresponding to the question information is retrieved from a preset private domain knowledge base; Obtaining a first prompt word according to the question information, the private domain knowledge information and a pre-configured agent database; the agent database includes agent skill introduction information, agent requirement parameters and agent output data format information; Input the first prompt word into the big model, obtain an agent calling link through the big model, and call the corresponding agent according to the agent calling link; the agent calling link includes agent information to be called and a calling sequence corresponding to the agent; Obtain a second prompt word, input the second prompt word and an execution result obtained by calling a corresponding agent according to the agent calling link into the large model, and determine whether the execution result meets a condition through the large model; If satisfied, output response information to the question information based on the execution result.

2. The method according to claim 1, characterized in that After determining whether the execution result meets the condition through the large model, the method further includes: If not satisfied, obtaining a third prompt word according to the execution result, the private domain knowledge information and the question information; Inputting the third prompt word into the large model, obtaining an updated agent call link through the large model, and calling a corresponding agent according to the updated agent call link to obtain an updated execution result; Response information to the question information is output based on the updated execution result.

3. The method according to claim 2, characterized in that After obtaining the updated execution result, the method further includes: Based on the updated execution result, an updated second prompt word is obtained, and the execution result obtained by calling the corresponding agent according to the agent call link is returned to the big model, and the step of determining whether the execution result meets the condition is performed through the big model until the execution result meets the condition.

4. The method according to claim 1, characterized in that The first prompt word includes at least the question information, the private domain knowledge information, agent function information in a pre-configured agent database, decision reference information, and decision execution logic.

5. The method according to claim 1, characterized in that The second prompt word includes at least the problem information, the private domain knowledge information, the execution result, decision reference information and decision execution logic.

6. The method according to claim 1, characterized in that The step of retrieving private domain knowledge information corresponding to the question information from a preset private domain knowledge base based on semantic retrieval and vector retrieval includes: Using the M3E-embedding model to convert the question information into a question vector and convert the private domain knowledge information in the preset knowledge base into a private domain knowledge vector; Calculating the vector similarity between the question vector and each of the private domain knowledge vectors, and based on the similarity calculation result, recalling candidate private domain knowledge information corresponding to the question information from the preset knowledge base; The candidate private domain knowledge information is reranked using a BGE-reranker model, and the private domain knowledge information corresponding to the question information is determined from the reranked candidate private domain knowledge information.

7. The method according to claim 1, characterized in that The preset private domain knowledge base is a database that includes at least one of pre-built professional knowledge, common problems, solutions and industry standard specifications in a professional field.

8. A device for responding to user question information, characterized in that: The device comprises: A question information acquisition module is used to obtain question information input by the user; A private domain knowledge retrieval module, used to retrieve the private domain knowledge information corresponding to the question information from a preset private domain knowledge base based on semantic retrieval and vector retrieval; An agent call link generation module is used to obtain a first prompt word according to the problem information, the private domain knowledge information and a pre-configured agent database; the agent database includes agent skill introduction information, agent requirement parameters and agent output data format information; the first prompt word is input into a large model, an agent call link is obtained through the large model, and a corresponding agent is called according to the agent call link; the agent call link includes agent information to be called and a call sequence corresponding to the agent; The question information response module is used to obtain a second prompt word, input the second prompt word and the execution result obtained by calling the corresponding agent according to the agent calling link into the big model, and determine whether the execution result meets the conditions through the big model; if so, output response information to the question information based on the execution result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, 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 7 are implemented.

Citation Information

Patent Citations

  • Knowledge matching enhanced large language model question and answer method based on knowledge base

    CN117473063A

  • Multi-agent intelligent retrieval engine and man-machine interaction system and method

    CN118132762A

  • Task processing method, device and equipment based on large model agent arrangement, storage medium and program product

    CN118819778A

  • Digital-intelligent power regulation and control question answering method and system based on large language model

    CN119003742A

  • A system for generating answers to multiple questions using rag-based generative artificial intelligence technology

    KR102710159B1

Cited By

  • Customer service reply method, device and equipment based on service agent

    CN119646166A

  • Traditional Chinese medicine prescription data analysis method and device based on OCR (Optical Character Recognition) and large model

    CN119811698A

  • A Chinese medicine prescription data parsing method and device based on OCR recognition and large models

    CN119811698B

  • Specified video monitoring and playing method and device based on intelligent agent, and storage medium

    CN119854582A

  • Intelligent agent interaction method and device, medium, equipment and computer program product

    CN120066353A