Recommendation question generation method and recommendation question generation equipment
By constructing a knowledge text block set and vector library, high-quality recommendation questions are generated and filtered, solving the problems of narrow question range and insufficient professionalism caused by relying on limited dialogue context in existing technologies, and realizing efficient and accurate recommendation question generation and matching.
Patent Information
- Application Number
- CN202511784026.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies rely on limited dialogue context when generating recommendation questions, resulting in a narrow scope of questions, insufficient professionalism and accuracy, and difficulty in effectively guiding users to explore in-depth knowledge.
By acquiring a set of knowledge text blocks, an intelligent agent generates diverse and high-quality candidate recommendation questions, which are then converted into vectors to build a recommendation question vector library. This enables semantic storage and efficient indexing, and vector similarity matching is used to quickly filter relevant questions.
It improves the accuracy and coverage of recommended questions, enhances the response efficiency and professionalism of the question recommendation system, and ensures the professionalism and relevance of the question sources.
Smart Images

Figure CN121765134A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method and device for generating recommendation questions. Background Technology
[0002] In intelligent question-answering systems, knowledge service platforms, and knowledge recommendation scenarios in vertical industries, providing users with "recommended questions" is an important means of guiding users to explore in depth and promoting interaction. By recommending other questions related to the user's current question, the system can help users gain a more comprehensive understanding of relevant knowledge and improve information acquisition efficiency.
[0003] Currently, existing technologies have proposed methods for generating recommendation questions using large language models. For example, based on the user's current question, a current answer to that question is first generated. Then, the user's historical questions, historical answers, the current question, and the current answer are used together as contextual information, and a large language model is used to generate recommendation questions based on this contextual information. However, this type of technology has certain limitations. Because the generation of recommendation questions is highly dependent on and limited to a limited dialogue context (i.e., the user's historical and current question-and-answer records), the range of generated questions is relatively narrow. Furthermore, in scenarios lacking rich dialogue history (such as when a user asks a question for the first time or at the beginning of a conversation), the professionalism and accuracy of the recommendation questions may be insufficient, making it difficult to effectively guide users to explore deeper knowledge.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a method and device for generating recommendation questions, which aims to improve the professionalism and accuracy of the generated recommendation questions, thereby effectively guiding users to conduct in-depth knowledge exploration.
[0006] To achieve the above objectives, this application proposes a method for generating recommendation questions, the method comprising: Obtaining user information; The user question is converted into a vector and matched with vectors in a preset recommendation question vector library to obtain a target vector. The recommendation question vector library includes vectors converted from each first candidate recommendation question. Each first candidate recommendation question is generated by a preset first agent based on a preset first prompt word and each knowledge text block in a preset knowledge text block set. The first prompt word is used to prompt the first agent to generate a question to recommend to the user based on the knowledge text block. The recommendation question for output is determined based on the candidate recommendation questions corresponding to the target vector.
[0007] Optionally, if the first evaluation result corresponding to the first candidate recommendation question indicates that the relevance between the first candidate recommendation question and the knowledge text block meets the first preset requirement, the first candidate recommendation question is converted into a vector and added to the recommendation question vector library. The first evaluation result is obtained by a preset second agent based on a preset second prompt word, the knowledge text block and the first candidate recommendation question. The second prompt word is used to prompt the second agent to evaluate the relevance between the knowledge text block and the first candidate recommendation question, and to generate an evaluation result based on the relevance.
[0008] Optionally, after the step of obtaining the user's question, the method further includes: A first tool invocation scheme is obtained by analyzing the user's question based on a preset third prompt word and a preset third intelligent agent. The third prompt word is used to prompt the third intelligent agent to select a recommended question generation tool that matches the domain of the user's question from a preset toolset and generate an invocation scheme for the selected tool. The toolset includes at least one recommended question generation tool corresponding to a vertical knowledge domain. When the first tool invocation scheme is to invoke the recommendation question generation tool corresponding to the target vertical knowledge domain, the steps of converting the user question into a vector and matching it with the vector in the preset recommendation question vector library to obtain the target vector are performed for the target recommendation question vector library corresponding to the target vertical knowledge domain, and determining the recommendation question to be output based on the candidate recommendation question corresponding to the target vector. The target recommendation question vector library is a recommendation question vector library constructed based on the target knowledge text block set, and the target knowledge text block set is a set of knowledge text blocks that contain knowledge text blocks belonging to the target vertical knowledge domain.
[0009] Optionally, the toolset further includes a recommendation question generation tool corresponding to a general knowledge domain; after the step of obtaining the first tool invocation scheme by analyzing the user's question based on a preset third intelligent agent, the toolset further includes: When the first tool invocation scheme is to invoke the recommendation question generation tool corresponding to the general knowledge domain, at least one second candidate recommendation question is generated by a preset fourth intelligent agent based on a preset fourth prompt word and the user question. The fourth prompt word is used to prompt the fourth intelligent agent to generate a question in the general knowledge domain based on the user question for recommendation to the user. The recommendation question for output is determined based on the second candidate recommendation question.
[0010] Optionally, after the step of obtaining the user's question, the method further includes: If no vector matching the vector transformed from the user question is obtained from the recommended question vector library, the following steps are performed: generating at least one second candidate recommended question based on a preset fourth prompt word and the user question by a preset fourth agent, and determining the recommended question for output based on the second candidate recommended question.
[0011] Optionally, the fourth prompt word is further used to prompt the fourth agent to determine the knowledge type to which the user question belongs and to generate a question that matches the knowledge type; and / or, the fourth prompt word is further used to prompt the fourth agent to generate questions related to general knowledge in the vertical knowledge domain for recommendation to the user when the user question is determined to be a question in a vertical knowledge domain, and to generate questions in the general knowledge domain for recommendation to the user when the user question is determined to be a question in a general knowledge domain.
[0012] Optionally, after the step of generating at least one second candidate recommendation question based on a preset fourth prompt word and the user question by a preset fourth agent, the method further includes: The fifth intelligent agent, based on a preset fifth prompt word, the user question, and the second candidate recommendation question, analyzes the data to obtain a second evaluation result corresponding to the second candidate recommendation question. The fifth prompt word is used to prompt the fifth intelligent agent to evaluate the degree of correlation between the user question and the second candidate recommendation question, and to generate an evaluation result based on the degree of correlation. When the second evaluation result indicates that the relevance between the second candidate recommendation question and the user question meets the second preset requirement, the step of determining the question to be recommended to the user based on the second candidate recommendation question is executed. Otherwise, return to the step of generating at least one second candidate recommendation question by a preset fourth agent based on a preset fourth prompt word and the user question.
[0013] Optionally, the fifth prompt word is also used to prompt the fifth agent to output an evaluation result containing a score for the second candidate recommendation question, and is also used to prompt the fifth agent to use a general knowledge domain scoring rule to score the second candidate recommendation question when determining that the user question is a question in a general knowledge domain, and to use a vertical domain scoring rule to score the input second candidate recommendation question when determining that the user question is a question in a vertical knowledge domain.
[0014] Furthermore, to achieve the above objectives, this application also proposes a recommendation question generation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the recommendation question generation method as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the recommendation question generation method described above.
[0016] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the recommendation question generation method described above.
[0017] In this application, a set of knowledge text blocks is acquired as the knowledge foundation. For each knowledge text block in the set, a first intelligent agent, guided precisely by a first prompt word, systematically generates diverse and high-quality candidate recommendation questions from each knowledge text block, ensuring the professionalism of the question sources. By converting the first candidate recommendation questions into vectors and constructing a recommendation question vector library, semantic storage and efficient indexing of pre-generated questions are achieved. Through precise vector similarity matching, the most semantically relevant recommendation questions to the user's current question can be quickly selected from a massive number of pre-generated questions. This application implements an efficient and accurate recommendation question generation and matching mechanism, which can quickly recommend relevant high-quality questions based on the user's current question. It effectively overcomes the shortcomings of existing technologies, such as limited recommendation scope and insufficient professionalism due to reliance on limited dialogue context, and significantly improves the accuracy, coverage, and response efficiency of the question recommendation system. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the first embodiment of the method for generating recommendation questions in this application. Figure 2This is a schematic diagram of the overall architecture involved in the implementation method of the recommended question generation method in this application; Figure 3 A schematic diagram of the recommendation question generation tool architecture corresponding to the vertical knowledge domain involved in the first implementation method of the recommendation question generation method of this application; Figure 4 This is a schematic diagram of the recommendation question generation tool architecture corresponding to the vertical knowledge domain involved in the first implementation method of the recommendation question generation method of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the recommended question generation method in the embodiments of this application.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] Currently, existing technologies have proposed methods for generating recommendation questions using large language models. For example, based on the user's current question, a current answer to that question is first generated. Then, the user's historical questions, historical answers, the current question, and the current answer are used together as contextual information, and a large language model is used to generate recommendation questions based on this contextual information. However, this type of technology has certain limitations. Because the generation of recommendation questions is highly dependent on and limited to a limited dialogue context (i.e., the user's historical and current question-and-answer records), the range of generated questions is relatively narrow. Furthermore, in scenarios lacking rich dialogue history (such as when a user asks a question for the first time or at the beginning of a conversation), the professionalism and accuracy of the recommendation questions may be insufficient, making it difficult to effectively guide users to explore deeper knowledge.
[0025] In this embodiment, a set of knowledge text blocks is acquired as the knowledge foundation. For each knowledge text block in the set, a first intelligent agent, guided precisely by the first prompt word, systematically generates diverse and high-quality candidate recommendation questions from each knowledge text block, ensuring the professionalism of the question sources. By converting the first candidate recommendation questions into vectors and constructing a recommendation question vector library, semantic storage and efficient indexing of pre-generated questions are achieved. Through precise vector similarity matching, the most semantically relevant recommendation questions to the user's current question can be quickly selected from a massive number of pre-generated questions. This embodiment implements an efficient and accurate recommendation question generation and matching mechanism, which can quickly recommend relevant high-quality questions based on the user's current question. It effectively overcomes the shortcomings of existing technologies, such as limited recommendation scope and insufficient professionalism due to reliance on limited dialogue context, and significantly improves the accuracy, coverage, and response efficiency of the question recommendation system.
[0026] The following presents a first embodiment of the method for generating recommendation questions in this application. (Refer to...) Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the recommended question generation method of this application. The executing entity of the recommended question generation method in this embodiment can be a device with program execution capabilities, specifically a server, personal computer, mobile phone, or other general computing service device. In some embodiments, a question recommendation system can be deployed in this device, and the recommended question generation method of this application embodiment can be executed by running this question recommendation system; in some embodiments, the question recommendation system can be a subsystem of an intelligent question-answering system or interfaced with an intelligent question-answering system to feed back the generated recommended questions to the intelligent question-answering system, which then outputs them to the user to guide deeper interaction between the user and the intelligent question-answering system; furthermore, in other possible embodiments, the question recommendation system can also run independently, and the generated recommended questions can be directly output to the user or used as input to other types of systems (such as knowledge navigation systems, learning tutoring systems, etc.) to guide the user to explore relevant knowledge domains. In this embodiment, the recommended question generation method includes steps S10~S40: Step S10: Obtain user questions; User questions are questions that users use to query information. The method of obtaining user questions is not limited in this embodiment. For example, in a question recommendation system, user questions can be obtained by the system through a user question acquisition module. This module serves as the input interface for the question recommendation system, and its specific implementation includes, but is not limited to: a question input component deployed in the user interface to directly collect the question text input by the user; or an API (Application Programming Interface) set up in the backend of the question recommendation system to receive user question data from other applications or services. After obtaining the user question through this module, the question recommendation system can proceed with subsequent vector transformation and matching processes based on the user question.
[0027] For example, a user interface (such as the user interface of a question-and-answer system) can be pre-set to obtain user questions input by the user through the user interface, or a user interface can be pre-set for users or other systems to call, and user questions can be obtained through the parameter data passed in by the API.
[0028] Step S20: Convert the user question into a vector and match it with vectors in a preset recommended question vector library to obtain a target vector. The recommended question vector library includes vectors converted from each first candidate recommended question. Each first candidate recommended question is generated by a preset first agent based on a preset first prompt word and each knowledge text block in a preset knowledge text block set. The first prompt word is used to prompt the first agent to generate a question to recommend to the user based on the knowledge text block.
[0029] After obtaining the user's question, it can be converted into a vector, using the same method as converting the first candidate recommendation question into a vector. The resulting vector is then matched with vectors in the recommendation question vector library to obtain the target vector. In a specific implementation, the target vector can be one or more vectors with the highest similarity to the vectors converted from the user's question, or it can be a vector with a similarity greater than a certain threshold to the vectors converted from the user's question.
[0030] The question recommendation system can pre-deploy a recommended question vector library (either manually built or built by other systems before deployment), or the recommended question vector library can be pre-built by the question recommendation system itself. In some implementations, the pre-deployed or built recommended question vector library can also be dynamically updated during the operation of the question recommendation system. The following details the construction process of the recommended question vector library. It is understood that this construction process can be implemented by the question recommendation system itself, or by other systems (built and then deployed within the question recommendation system).
[0031] A recommendation question vector library is constructed using knowledge text blocks from a knowledge text block set. The knowledge text block set includes at least one knowledge text block, which is a text unit with relatively complete semantics and may contain certain knowledge content. In one feasible implementation, knowledge text blocks can be obtained by partitioning knowledge base documents. Specifically, knowledge text blocks can be obtained by acquiring knowledge base documents and preprocessing them. Preprocessing may include document reading and parsing, and using a semantic segmentation algorithm to divide the document into multiple text blocks with complete semantics, i.e., knowledge text blocks. The semantic segmentation algorithm can be based on principles such as semantic coherence, paragraph structure, or topic consistency to ensure that each knowledge text block carries a relatively independent knowledge point or semantic concept. By partitioning the knowledge base document into knowledge text blocks, structured and semantically complete input units can be provided for subsequent question generation.
[0032] It should be noted that the agents in each embodiment of this application refer to agents based on Large Language Models (LLMs). These agents complete specific tasks by inputting specially designed or constructed prompts into the LLM. The LLM in each agent can be implemented using an open-source general-purpose LLM, or it can be implemented using a fine-tuned LLM based on a general-purpose LLM using a training dataset relevant to a specific task. Furthermore, the LLM in each agent in each embodiment can be the same or different LLMs. It should be noted that when fine-tuning the LLM, the training dataset can be constructed based on the input and output data of the task; the specific construction method is not limited here.
[0033] In this embodiment, a pre-defined agent (hereinafter referred to as the first agent for distinction) is used to generate candidate recommendation questions based on knowledge text blocks. A prompt word pre-defined for the first agent is called the first prompt word for distinction. The function of the first prompt word is to prompt the first agent (specifically, the large language model within the first agent) to generate questions for recommendation to the user based on the input text block (i.e., knowledge text blocks in the knowledge text block set). This embodiment does not limit the specific content of the first prompt word, as long as it contains content that can achieve this function. For example, the first prompt word could be set as: "You are a user recommendation question generation expert. Please generate questions for recommendation to the user based on the input knowledge text block." In a feasible implementation, the first prompt word may also include at least one of the following prompts: the number of questions to be generated, input / output examples, and output format requirements; wherein, the input / output examples are used to provide a reference paradigm for the large language model to generate questions. One input / output example includes an input example and an output example. The input example is a knowledge text block, and the output example can be a question related to the content of the knowledge text block; the output format requirements are used to standardize the format of the large language model's output results, for example, requiring output in JSON format.
[0034] For each knowledge text block in the knowledge text block set, a first agent can pre-generate candidate recommendation questions (hereinafter referred to as first candidate recommendation questions for distinction). In this way, at least one first candidate recommendation question can be generated for each knowledge text block. If multiple first candidate recommendation questions need to be generated for each knowledge text block, this can be achieved by designing prompts in the first prompt word that indicate the number of questions to be generated, or by having the first agent generate first candidate recommendation questions multiple times for the knowledge text block.
[0035] In a specific implementation, a first intelligent agent can input a knowledge text block and a first prompt word into its corresponding large language model. Under the prompting effect of the first prompt word, the large language model generates and outputs a question to recommend to the user based on the knowledge text block. This output question serves as the first candidate recommendation question.
[0036] In one feasible implementation, for each first candidate recommendation question generated based on each knowledge text block, the first candidate recommendation question can be converted into a vector, and the converted vector can be added to the recommendation question vector library corresponding to the knowledge text block set. Converting the first candidate recommendation question into a vector can be achieved using existing text vectorization methods, such as mapping text sentences into fixed-dimensional vector representations using pre-trained language models like BERT or Sentence-BERT.
[0037] It should be noted that the recommendation question vector library can be configured to include only vectors transformed from the first candidate recommendation question, or it can also be configured to include vectors transformed from candidate recommendation questions obtained through other means (such as professional knowledge questions directly obtained from external knowledge sources as candidate recommendation questions). It is understood that each vector included in the recommendation question vector library has a corresponding associated candidate recommendation question. In specific implementations, the association between vectors and candidate recommendation questions can be recorded using tables or other methods.
[0038] It should be noted that the recommendation question vector library corresponding to the knowledge text block set can be constructed all at once when the knowledge text block set is first obtained, or it can be expanded by adding the vector of the first candidate recommendation question generated based on the new knowledge text block to the recommendation question vector library when a new knowledge text block is added to the knowledge text block set. That is, knowledge text blocks in the knowledge text block set can be added, deleted, and modified, and correspondingly, vectors in the recommendation question vector library can also be added, deleted, and modified.
[0039] In one feasible implementation, when the recommendation question vector library is constructed by a recommendation question system, the recommendation question generation method further includes steps S40-S60: Step S40: Obtain the knowledge text block set, wherein the knowledge text block set includes at least one of the knowledge text blocks; Step S50: For each knowledge text block, the first agent generates at least one first candidate recommendation question based on the first prompt word and the knowledge text block; Step S60: Convert each of the first candidate recommendation questions into vectors and add them to the recommendation question vector library corresponding to the knowledge text block set.
[0040] Step S30: Determine the recommendation question for output based on the candidate recommendation questions corresponding to the target vector.
[0041] The candidate recommendation question associated with the matched target vector can be determined as the output recommendation question. Alternatively, when multiple target vectors are matched, one of the candidate recommendation questions associated with each target vector can be selected as the output recommendation question. There are many specific implementation methods, and no limitation is made here. Furthermore, this embodiment does not limit the output method of the finally determined output recommendation question. For example, it can be output through a user interface, returned through an API, or stored in a database or server.
[0042] In this embodiment, a set of knowledge text blocks is acquired as the knowledge foundation. For each knowledge text block in the set, a first intelligent agent, guided precisely by the first prompt word, systematically generates diverse and high-quality candidate recommendation questions from each knowledge text block, ensuring the professionalism of the question sources. By converting the first candidate recommendation questions into vectors and constructing a recommendation question vector library, semantic storage and efficient indexing of pre-generated questions are achieved. Through precise vector similarity matching, the most semantically relevant recommendation questions to the user's current question can be quickly selected from a massive number of pre-generated questions. This embodiment implements an efficient and accurate recommendation question generation and matching mechanism, which can quickly recommend relevant high-quality questions based on the user's current question. It effectively overcomes the shortcomings of existing technologies, such as limited recommendation scope and insufficient professionalism due to reliance on limited dialogue context, and significantly improves the accuracy, coverage, and response efficiency of the question recommendation system.
[0043] In one feasible implementation, the process of constructing the recommendation question vector library further includes: when the first evaluation result corresponding to the first candidate recommendation question indicates that the relevance between the first candidate recommendation question and the knowledge text block meets the first preset requirement, the first candidate recommendation question is converted into a vector and added to the recommendation question vector library. The first evaluation result is obtained by a preset second agent analyzing based on a preset second prompt word, the knowledge text block, and the first candidate recommendation question. The second prompt word is used to prompt the second agent to evaluate the relevance between the knowledge text block and the first candidate recommendation question, and to generate an evaluation result based on the relevance.
[0044] In this embodiment, a pre-defined agent (hereinafter referred to as the second agent for distinction) is used to evaluate the first candidate recommendation question. A pre-defined prompt word for the second agent is called the second prompt word for distinction. The function of the second prompt word includes prompting the second agent (specifically, prompting the large language model within the second agent) to evaluate the relevance between the input text block (i.e., the knowledge text block) and the candidate recommendation question (i.e., the first candidate recommendation question), and generating an evaluation result based on the relevance. This embodiment does not limit the specific content of the second prompt word; it only needs to contain content that achieves this function. For example, the second prompt word could be set as: "You are a question quality evaluation expert. Please evaluate the relevance between the input text block and the candidate recommendation question, and generate an evaluation result based on the relevance." In one feasible implementation, the second prompt word may further include at least the following prompt content: specific evaluation rules, input / output examples, and output format requirements; wherein, the evaluation rules may include, for example, prompting the form of the evaluation results output by the large language model, prompting the correspondence between different relevance levels of the large language model and different evaluation results, etc.; the input / output examples are used to provide reference examples for the evaluation task of the large language model, and an input / output example includes an input example and an output example, the input example being a text block and a question, and the output example being the evaluation result of the text and the question; the output format requirements are used to standardize the format of the evaluation results output by the large language model, for example, requiring output in JSON format.
[0045] For each first candidate recommendation question and its corresponding knowledge text block, a second agent can be used to analyze the first candidate recommendation question and the knowledge text block and output the corresponding evaluation results (hereinafter referred to as the first evaluation results for distinction).
[0046] In a specific implementation, a second intelligent agent can input the second prompt word, the first candidate recommendation question, and its corresponding knowledge text block into its corresponding large language model. Under the prompting effect of the second prompt word, the large language model evaluates the relevance between the first candidate recommendation question and its corresponding knowledge text block and outputs the evaluation result, which is the first evaluation result.
[0047] The first preset requirement is a pre-set requirement used to filter first candidate recommendation questions. It aims to select first candidate recommendation questions with a high degree of relevance to the corresponding knowledge text block, while eliminating those with a low degree of relevance. The specific form of the first preset requirement varies depending on the specific form of the first evaluation result, and this embodiment does not impose any restrictions on it. For example, when the first evaluation result is a score representing the degree of relevance, the first preset requirement could be: the score is greater than a set threshold (e.g., in a percentage system, this threshold could be set to 80); when the first evaluation result is a binary classification result representing relevance, the first preset requirement could be: the result is relevant.
[0048] When the first evaluation result indicates that the relevance between the first candidate recommendation question and the knowledge text block meets the first preset requirement, it means that the relevance between the first candidate recommendation question and the corresponding knowledge text block is relatively high. In this case, the first candidate recommendation question is converted into a vector and added to the recommendation question vector library. When the first evaluation result indicates that the relevance between the first candidate recommendation question and the knowledge text block does not meet the first preset requirement, it means that the relevance between the first candidate recommendation question and the corresponding knowledge text block is relatively low or not relevant. In this case, the knowledge text block can be used again to generate a corresponding first candidate recommendation question using the first agent, and then evaluated using the second agent, i.e., a retry is performed. In a specific implementation, it can be set to stop retrying until the first evaluation result meets the first preset condition, or it can be set to stop retrying after a certain number of retries.
[0049] In one feasible implementation, to increase the likelihood that the first candidate recommendation question generated during retry meets the first preset requirement and to improve the construction efficiency of the recommendation question vector library, during retry, in addition to using the knowledge text block and the first prompt word as input data for the large language model by the first agent, the first evaluation result corresponding to the first candidate recommendation question that does not meet the first preset requirement is also used as input data for the large language model. This allows the large language model to generate a first candidate recommendation question that better meets the first preset requirement based on the analysis of the first evaluation result and under the guidance of "failure experience".
[0050] By having a second intelligent agent evaluate the relevance of the questions generated by the first intelligent agent, it is ensured that only high-quality and highly relevant questions will be included in the subsequent recommendation question vector library. This improves the quality and accuracy of the questions ultimately recommended to the user, ensuring that the questions recommended to the user are both relevant and accurate, thereby enhancing user experience and system reliability.
[0051] In one feasible implementation, when the recommendation question vector library is constructed by a recommendation question system, after the first agent generates the first candidate question based on the first prompt word and knowledge text block, the recommendation question generation method further includes steps S70-S80: Step S70: The second intelligent agent, based on the second prompt word, the knowledge text block, and the first candidate recommendation question, performs analysis to obtain the first evaluation result corresponding to the first candidate recommendation question.
[0052] Step S80: If the first evaluation result indicates that the relevance between the first candidate recommendation question and the knowledge text block meets the first preset requirement, then execute step S60; otherwise, return to step S50.
[0053] Based on the first embodiment described above, a second embodiment of the recommendation question generation method of this application is proposed. In this embodiment, content that is the same as or similar to that of the first embodiment can be referred to the above description and will not be repeated hereafter. In this embodiment, the recommendation question generation method further includes A10~A30: Step A10: A first tool invocation scheme is obtained by a preset third agent analyzing the user question based on a preset third prompt word. The third prompt word is used to prompt the third agent to select a recommended question generation tool that matches the domain of the user question from a preset toolset and generate an invocation scheme for the selected tool. The toolset includes at least one recommended question generation tool corresponding to a vertical knowledge domain.
[0054] In this embodiment, a toolset including at least two different domains for generating recommendation questions can be pre-set to address user questions from different knowledge domains and generate recommendation questions in the domain to which the user question belongs as much as possible. The at least two different domains can include at least two vertical knowledge domains, or include one general knowledge domain and at least one vertical knowledge domain. A vertical knowledge domain refers to a domain division with a specific professional scope and specialized knowledge system, as opposed to a general knowledge domain. A general knowledge domain covers widely applicable basic knowledge and general information, not limited to a specific professional scope. For example, photovoltaic inverter technology, as a vertical knowledge domain, involves highly specialized and clearly defined technical knowledge such as maximum power point tracking algorithms, grid-connected control strategies, and islanding protection; while a general knowledge domain includes cross-domain basic knowledge such as "how to save electricity" or "what is alternating current."
[0055] In this embodiment, to accurately analyze the knowledge domain to which the user's question belongs and accurately match the recommended question generation tool for that knowledge domain, a pre-defined agent (hereinafter referred to as the third agent for distinction) is used to match the recommended question generation tool based on the user's question. A prompt word pre-set for the third agent is called the third prompt word for distinction. The function of the third prompt word includes prompting the third agent (specifically, prompting the large language model in the first agent) to select a recommended question generation tool from the given toolset that matches the domain to which the input question (i.e., the user's question) belongs, and generating a calling scheme for the selected tool. This embodiment does not limit the specific content of the third prompt word, as long as it contains content that can achieve this function. For example, the third prompt could be set as: "You are a user question recommendation expert who will select appropriate tools (vertical knowledge domain question recommendation tools and general knowledge domain question recommendation tools) to obtain answers based on user questions for intelligent and accurate recommendations; Tool Card: ..."; where Tool Cards can include a functional description of each tool, input / output parameter specifications (Schema), input / output examples (referring to examples of the tool's input and output, different from the input / output examples given to the large language model in the third agent), or security labels, etc.; the functional description explains the tool's purpose and capabilities, the input / output parameter specifications define the data format of the calling interface, the input / output examples demonstrate typical usage examples, and the security labels identify the tool's usage restrictions and permission requirements; it should be noted that the information in the tool card can be set as needed, and its specific content is not limited here.
[0056] In one feasible implementation, the third prompt word may further include at least one of the following prompts: input / output examples (referring to the input / output examples given to the large language model in the third agent) and output format requirements. The input / output examples provide a reference paradigm for the large language model to invoke generation tools. One input / output example includes an input example and an output example. The input example is a question, and the output example can be a positive or negative example. A positive example can be an invocation scheme for a recommended question generation tool that matches the domain of the question, while a negative example can be an invocation scheme for a recommended question generation tool that does not match the domain of the question. The third prompt word may include multiple input / output examples, which can include both positive and negative examples. Multiple input / output examples can also cover different domains and different degrees of ambiguity. The domain refers to the knowledge domain to which the question belongs, and the degree of ambiguity refers to the degree of ambiguity when determining the knowledge domain to which the question belongs. This allows the large language model of the third agent to match recommended question generation tools for different domains / different degrees of ambiguity as accurately as possible. The output format requirements are used to standardize the format of the large language model's output results, for example, requiring output in JSON format.
[0057] In one feasible implementation, the third prompt word may also include prompting content that serves the following purpose: prompting the third agent to first generate candidate tools and the reasons for selecting each candidate tool from the toolset, then reflect on and evaluate each candidate tool and the reasons for selection, and generate a tool calling scheme based on the reflection and evaluation results; this prompting content can guide the large language model to perform multi-step reasoning, and improve the accuracy and reliability of tool selection through the thought process of generating candidates and evaluating and reflecting, especially when facing user questions with ambiguous domain boundaries or ambiguity.
[0058] For the acquired user questions, a tool invocation scheme (hereinafter referred to as the first tool invocation scheme) can be generated based on the user question using a third intelligent agent. In a specific implementation, the user question and the third prompt word can be input into its corresponding large language model through the third intelligent agent. Under the prompting effect of the third prompt word, the large language model selects a recommended question generation tool that matches the domain of the user question from the given toolset and outputs the first tool invocation scheme.
[0059] In one feasible implementation, a third intelligent agent can obtain at least the following information from the user's historical dialogue records, historical dialogue rounds, user preferences, geographic information, and language information in the intelligent dialogue system. This obtained information, the current user question, and the third prompt word are then input into the corresponding large language model to obtain a first tool invocation scheme generated by the large language model. The historical dialogue records, historical dialogue rounds, user preferences, geographic information, and language information provide the contextual basis for the dialogue in the third intelligent agent's large language model, thereby making the generated recommendation question more relevant to the content of the user's current dialogue and thus better able to guide deeper user interaction.
[0060] In one feasible implementation, the question recommendation system may include a user question acquisition module, a third intelligent agent, a toolset, and a final recommendation result acquisition module. After acquiring a user question, the user question acquisition module can first input the user question into the third intelligent agent. The third intelligent agent generates a first tool invocation scheme based on the acquired user question, and invokes the corresponding recommendation question generation tool according to the first tool invocation scheme, obtains the result returned by the tool, determines the final recommendation question based on the result, and outputs the recommendation question to the final recommendation result acquisition module. The final recommendation result acquisition module outputs the acquired final recommendation question, for example, by visually displaying it to the front-end user or storing it in a database.
[0061] Step A20: When the first tool invocation scheme is to invoke the recommendation question generation tool corresponding to the target vertical knowledge domain, steps S20 and S30 are executed for the target recommendation question vector library corresponding to the target vertical knowledge domain. The target recommendation question vector library is a recommendation question vector library constructed based on the target knowledge text block set, and the target knowledge text block set is a set of knowledge text blocks that contain knowledge text blocks belonging to the target vertical knowledge domain.
[0062] The recommendation question generation tool corresponding to the vertical knowledge domain can be implemented based on the recommendation question vector library constructed in the first embodiment above. Specifically, the knowledge text blocks in the knowledge text block set can all come from the same vertical knowledge domain. Therefore, the candidate recommendation questions associated with the recommendation question vector library constructed based on the knowledge text block set also belong to the questions of the vertical knowledge domain. The recommendation question generation tool corresponding to the vertical knowledge domain can be constructed based on the recommendation question vector library. Specifically, the recommendation question vector library can be used as a component of the recommendation question generation tool corresponding to the vertical knowledge domain. The tool can also include functional modules that can implement the above steps S20 and S30. In some implementations, the first intelligent agent, the second intelligent agent, and the functional modules that can implement the above steps S10 to S80 can also be included as components of the tool. That is, the recommendation question generation tool corresponding to the vertical knowledge domain can be used to construct a recommendation question vector library based on the acquired knowledge text block set of the vertical knowledge domain using the first intelligent agent (or also using the second intelligent agent). The recommendation question generation tool corresponding to the vertical knowledge domain can be called by the third intelligent agent. Based on the user question input by the third intelligent agent, it is converted into a vector and matched in the recommendation question vector library. The matching result (e.g., the candidate recommendation question associated with the matched vector) is fed back to the third intelligent agent. Then, the third intelligent agent determines the final recommendation question based on the result returned by the tool and outputs the recommendation question.
[0063] It is understandable that if the toolset includes recommendation question generation tools for at least two vertical knowledge domains, then at least two sets of knowledge text blocks corresponding to the vertical knowledge domains can be obtained. Based on the recommendation question vector library built from each set of knowledge text blocks, recommendation question generation tools for at least two vertical knowledge domains can be built according to the tool construction method described above.
[0064] To distinguish them, when the first tool invocation scheme involves invoking a recommendation question generation tool corresponding to a vertical knowledge domain, this vertical knowledge domain is referred to as the target vertical knowledge domain. The set of knowledge text blocks corresponding to the target vertical knowledge domain (all contained knowledge text blocks belonging to the target vertical knowledge domain) is called the target knowledge text block set, and the recommendation question vector library built based on the target knowledge text block set is called the target recommendation question vector library. It can be understood that if the toolset includes only one recommendation question generation tool corresponding to a vertical knowledge domain, then the target vertical knowledge domain refers to that unique vertical knowledge domain. However, if the toolset includes recommendation question generation tools corresponding to at least two vertical knowledge domains, then the target vertical knowledge domain could be one of those at least two vertical knowledge domains, i.e., the vertical knowledge domain that best matches the user's question, determined by the large language model analysis of the third agent.
[0065] When the first tool invocation scheme involves invoking a recommendation question generation tool corresponding to the target vertical knowledge domain, steps S20 and S30 are executed for the target recommendation question vector library corresponding to the target vertical knowledge domain. In a feasible implementation, a third agent can input the user question into the recommendation question generation tool corresponding to the target vertical knowledge domain according to the first tool invocation scheme, invoke the tool to convert the user question into a vector, match it in the tool's recommendation question vector library, obtain the matching result returned by the tool, determine the final recommendation question based on the matching result, and output the recommendation question.
[0066] In this embodiment, a third intelligent agent, guided by a third prompt word, intelligently analyzes the domain characteristics of the user's question and generates a precise tool invocation scheme, achieving intelligent routing between the question and professional tools. By invoking a professional domain-specific question generation tool, it utilizes a domain-specific question vector library for accurate matching. This achieves intelligent tool selection and professional question recommendation based on the user's question domain, effectively improving the professionalism and accuracy of recommended questions in cross-domain scenarios and solving the technical challenge of a single model failing to accommodate multi-domain professional knowledge.
[0067] Based on the first and / or second embodiments of the recommendation question generation method described above, a third embodiment of the recommendation question generation method of this application is proposed. In this embodiment, content that is the same as or similar to the first and second embodiments described above can be referred to the above description and will not be repeated hereafter. In this embodiment, after step A10, steps A30 to A40 are further included: Step A30: When the first tool invocation scheme is to invoke the recommendation question generation tool corresponding to the general knowledge domain, at least one second candidate recommendation question is generated by a preset fourth intelligent agent based on a preset fourth prompt word and the user question. The fourth prompt word is used to prompt the fourth intelligent agent to generate a question in the general knowledge domain based on the user question for recommendation to the user.
[0068] In this embodiment, a pre-defined agent (hereinafter referred to as the fourth agent for distinction) is used to generate general knowledge domain questions based on user questions. A pre-defined prompt word for the fourth agent is called the fourth prompt word for distinction. The function of the fourth prompt word is to prompt the fourth agent (specifically, the large language model within the fourth agent) to generate general knowledge domain questions based on the input question (i.e., the user question) for recommendation to the user. This embodiment does not limit the specific content of the fourth prompt word, as long as it contains content that can achieve this function. For example, the fourth prompt word could be set as: "You are a general knowledge question generation expert and will generate general questions based on the current user question for recommendation." In a feasible embodiment, the second prompt word may also include at least the following prompt content: the number of questions to be generated, input / output examples, and output format requirements; wherein, the input / output examples are used to provide a reference paradigm for the large language model to generate questions, and an input / output example includes an input example and an output example. The input example is a question, and the output example can be a question related to the content of the question; the output format requirements are used to standardize the format of the large language model's output results, for example, requiring output in JSON format.
[0069] In this embodiment, the toolset may also include a recommendation question generation tool corresponding to a general knowledge domain. The recommendation question generation tool corresponding to the general knowledge domain can be implemented based on the aforementioned fourth agent; specifically, the fourth agent can be incorporated as a component of the recommendation question generation tool corresponding to the general knowledge domain.
[0070] In the first tool invocation scheme, which involves invoking a recommendation question generation tool corresponding to a general knowledge domain, a fourth agent generates at least one candidate recommendation question (hereinafter referred to as the second candidate recommendation question for distinction) based on the fourth prompt word and the user question. Specifically, the fourth agent can input the fourth prompt word and the user question into its corresponding large language model. Under the prompting effect of the fourth prompt word, the large language model generates and outputs a question to recommend to the user based on the user question; this output question serves as the second candidate recommendation question.
[0071] Step A40: Determine the recommendation question for output based on the second candidate recommendation question.
[0072] In specific implementations, each second candidate recommendation question can be directly used as the output recommendation question and output, or the second candidate recommendation questions can be evaluated, filtered, and then the output recommendation question can be determined based on the subsequent processing results and output.
[0073] In one feasible implementation, a third intelligent agent may input the user's question into a recommendation question generation tool corresponding to the general knowledge domain according to a first tool invocation scheme. The tool is then invoked to generate at least one second candidate recommendation question using a fourth intelligent agent based on a fourth prompt word and the user's question. The tool determines the question to be recommended to the user based on the second candidate recommendation questions generated by the fourth intelligent agent and returns it to the third intelligent agent. The third intelligent agent determines the final recommendation question based on the returned result and outputs the recommendation question.
[0074] In this embodiment, when the user's question belongs to a general knowledge domain, the fourth agent, guided by the fourth prompt word, directly generates a second candidate recommendation question in the general knowledge domain based on the user's question. This ensures the immediacy and breadth of question recommendation in general scenarios, realizes a lightweight recommendation path in the general knowledge domain, and effectively complements the recommendation path in the vertical knowledge domain. This enables the system to flexibly respond to user questions of different levels of expertise, significantly improving the domain adaptability and service coverage of the question recommendation system.
[0075] In one feasible implementation, after step A30, steps A50 to A60 are further included: Step A50: The fifth intelligent agent, based on a preset fifth prompt word, the user question, and the second candidate recommendation question, analyzes the data to obtain a second evaluation result corresponding to the second candidate recommendation question. The fifth prompt word is used to prompt the fifth intelligent agent to evaluate the correlation between the user question and the second candidate recommendation question, and to generate an evaluation result based on the correlation.
[0076] In this embodiment, a pre-defined agent (hereinafter referred to as the fifth agent for distinction) is used to evaluate the second candidate recommendation question. A pre-defined prompt word for the fifth agent is called the fifth prompt word for distinction. The function of the fifth prompt word is to prompt the fifth agent (specifically, the large language model within the fifth agent) to evaluate the relevance between the user's question and the candidate recommendation question (i.e., the second candidate recommendation question), and to generate an evaluation result based on the relevance. This embodiment does not limit the specific content of the fifth prompt word; it only needs to contain content that achieves this function. For example, the fifth prompt word could be set as: "You are a question quality evaluation expert. Please evaluate the relevance between the input user's question and the candidate recommendation question, and generate an evaluation result based on the relevance." In one feasible implementation, the fifth prompt may further include at least the following prompts: specific evaluation rules, input / output examples, and output format requirements; wherein, the evaluation rules may include, for example, prompting the form of the evaluation results output by the large language model, and prompting the correspondence between different relevance levels of the large language model and different evaluation results; the input / output examples are used to provide reference examples for the evaluation task of the large language model, and an input / output example includes an input example and an output example, where the input example is two questions, and the output example may be the evaluation result of the relevance between the two questions; the output format requirements are used to standardize the format of the evaluation results output by the large language model, for example, requiring output in JSON format.
[0077] For each second candidate recommendation question and its corresponding user question, the fifth agent can be used to analyze the second candidate recommendation question and the user question, and output the corresponding evaluation results (hereinafter referred to as the second evaluation results for distinction).
[0078] In a specific implementation, the fifth agent can input the fifth prompt word, the second candidate recommendation question, and the corresponding user question into its corresponding large language model. Under the prompting effect of the fifth prompt word, the large language model evaluates the relevance between the second candidate recommendation question and the corresponding user question and outputs the evaluation result, which is the second evaluation result.
[0079] Step A60: If the second evaluation result indicates that the relevance between the second candidate recommendation question and the user question meets the second preset requirement, then execute step A40; otherwise, return to step A30.
[0080] The second preset requirement is a pre-set requirement for filtering second candidate recommendation questions. It aims to select second candidate recommendation questions with a high degree of relevance to the corresponding user question, while eliminating those with a low degree of relevance. The specific form of the second preset requirement varies depending on the specific form of the second evaluation result, and this embodiment does not impose any restrictions on it. For example, when the second evaluation result is a score representing the degree of relevance, the second preset requirement could be: the score is greater than a set threshold (e.g., in a percentage system, this threshold could be set to 80); when the second evaluation result is a binary classification result representing relevance, the second preset requirement could be: the result is relevant.
[0081] When the second evaluation result indicates that the relevance between the second candidate recommendation question and the user question meets the second preset requirement, it means that the relevance between the second candidate recommendation question and the corresponding user question is relatively high. In this case, step A40 is executed, that is, the question to be recommended to the user is determined based on the second candidate recommendation question. When the second evaluation result indicates that the relevance between the second candidate recommendation question and the user question does not meet the second preset requirement, it means that the relevance between the second candidate recommendation question and the corresponding user question is relatively low or not relevant. In this case, the user question can be used again to generate a corresponding second candidate recommendation question using the fourth intelligent agent, and then evaluated using the fifth intelligent agent, that is, a retry is performed. In a specific implementation, it can be set to stop retrying until the second evaluation result meets the second preset condition, or it can be set to stop retrying after a certain number of retries.
[0082] In one feasible implementation, to increase the likelihood that the second candidate recommendation question generated during retry meets the second preset requirements and to improve the efficiency of constructing the recommendation question vector library, during retry, in addition to using the fourth agent to take the user question and the fourth prompt word as input data for the large language model, the second evaluation result corresponding to the second candidate recommendation question that does not meet the second preset requirements can also be used as input data for the large language model. This allows the large language model to generate a second candidate recommendation question that better meets the second preset requirements based on the analysis of the second evaluation result and under the guidance of "failure experience".
[0083] By having the fifth agent evaluate the relevance of the questions generated by the fourth agent, it is ensured that only high-quality and highly relevant questions will be included in the subsequent recommendation question vector library. This improves the quality and accuracy of the questions ultimately recommended to the user, ensuring that the questions recommended to the user are both relevant and accurate, thereby enhancing user experience and system reliability.
[0084] In one feasible implementation, the recommendation question generation tool corresponding to the general knowledge domain includes a fourth agent and a fifth agent. The third agent, according to a first tool invocation scheme, inputs the user question into the recommendation question generation tool corresponding to the general knowledge domain, invokes the tool, and utilizes the fourth agent to generate at least one second candidate recommendation question based on a fourth prompt word and the user question. The tool then utilizes the fifth agent to evaluate the user question and the second candidate recommendation questions based on the fifth prompt word, generating a second evaluation result. After filtering and retrying the second candidate recommendation questions based on the second evaluation result, the determined question for recommendation to the user is returned to the third agent. The third agent determines the final recommendation question based on the returned result and outputs the recommendation question.
[0085] In one feasible implementation, after step S10, step A70 is further included: if no vector matching the vector transformed from the user question is obtained from the recommended question vector library, steps A30 and A40 are performed.
[0086] When the first tool invocation scheme involves calling the recommendation question generation tool corresponding to the target vertical knowledge domain, it is possible that no vector matching the vector transformed from the user question can be obtained from the target recommendation question vector library. For example, the similarity between the vectors in the target recommendation question vector library and the vectors transformed from the user question is not greater than the set threshold. In other words, no candidate recommendation questions in the target vertical knowledge domain with a high degree of relevance to the user question have been found. To avoid the situation of no recommendation results, a recommendation question generation tool corresponding to the general knowledge domain can be used to generate the final recommendation question based on the user question as a supplementary solution.
[0087] It's important to note that the recommendation question generation tool for vertical knowledge domains relies on a vertical knowledge base. However, this knowledge base has a limited scope; the knowledge text blocks in the set may not cover all knowledge within the vertical knowledge domain. Therefore, the candidate recommendation questions associated with the recommendation question vector library for that vertical knowledge domain may also not cover all questions within that domain. If a user's question exceeds the knowledge base's scope and is a vertical domain question, the tool will return an empty result (i.e., no vector matching the vector transformed from the user's question was found). For example, if the knowledge text block set for a vertical knowledge domain contains only knowledge related to inverter design, but the user asks a question related to energy storage design, the returned result might be empty. In contrast, the recommendation question generation tool for general knowledge domains generates recommendation questions based on the user's question and does not rely on a knowledge base, so it will not return an empty result.
[0088] In one feasible implementation, if the third agent finds that the result returned by the recommendation question generation tool corresponding to the target vertical knowledge domain is empty, it can generate a new tool invocation scheme (hereinafter referred to as the second tool invocation scheme). The second tool invocation scheme can be fixed as a scheme to invoke the recommendation question generation tool corresponding to the general knowledge domain, or it can be a tool invocation scheme regenerated by the third agent through a large language model. Specific prompt words can be designed to prompt the large language model to generate a tool invocation scheme different from the first tool invocation scheme. In the second tool invocation scheme, which invokes the recommendation question generation tool corresponding to the general knowledge domain, the third agent invokes the tool to obtain the question to recommend to the user, determines the final recommendation question based on the result returned by the tool, and outputs it.
[0089] In one feasible implementation, when the second tool invocation scheme is generated by a third agent using a large language model, the third prompt word can be adjusted. For example, a new prompt can be added with the following function: indicating that the third agent previously invoked a recommendation question generation tool corresponding to the target vertical knowledge domain but returned an empty result; the third agent analyzes the user's question based on the adjusted third prompt word to obtain the second tool invocation scheme. With the added prompt from the adjusted third prompt word, the generated second tool invocation scheme can differ from the previous first tool invocation scheme, avoiding repeated selection of invalid tools, improving the success rate of tool invocation, and enhancing the overall robustness of the system.
[0090] In one feasible implementation, the fourth prompt word is further used to prompt the fourth agent to determine the knowledge type to which the user question belongs and to generate a question that matches the knowledge type. Multiple knowledge types can be categorized within a general knowledge domain, and the prompt word can guide the large language model of the fourth agent to generate a question that matches the knowledge type of the input question (i.e., the user question) for recommendation. This guides the large language model to perform more refined semantic analysis, thereby generating recommendation questions that are consistent with the user question in terms of knowledge type, enhancing the logical coherence and user experience of the recommendation questions. For example, the fourth prompt word could include the following prompt: "You are a general knowledge question generation expert and will generate general (including basic knowledge, self-awareness, or industry-wide general knowledge) questions (e.g., three) based on the current user question for recommendation," where basic knowledge, self-awareness, and industry-wide general knowledge are the three knowledge types.
[0091] Since the first tool invocation scheme involves calling the recommendation question generation tool corresponding to the target vertical knowledge domain, the user's question might belong to the target vertical knowledge domain. If the recommendation question generation tool for the target vertical knowledge domain returns an empty result, and the recommendation question generation tool for the general knowledge domain needs to be called, the question generated by the fourth agent might be a question from the general knowledge domain. This could lead to the fifth agent evaluating it as not being relevant enough to the user's question belonging to the target vertical knowledge domain, thus failing to obtain a final recommendation question. To avoid this situation, in one feasible implementation, the fourth prompt word also includes prompting content with the following function: prompting the fourth agent to generate general knowledge-related questions within the vertical knowledge domain for recommendation when the user's question is determined to be a vertical knowledge domain question, and to generate general knowledge domain questions for recommendation when the user's question is determined to be a general knowledge domain question. This ensures that the fourth agent's large language model, under the influence of the fourth prompt word, can generate relevant general knowledge questions as supplementary recommendations even when the user's question belongs to the vertical knowledge domain but no matching result is found in the corresponding tool, effectively avoiding gaps in recommendation results and improving the system's service completeness. For example, the fourth prompt can include the following prompt: "You are a general knowledge question generation expert. You will generate general (including basic knowledge, self-awareness, or industry-wide general knowledge) questions (such as three) based on the current user's question for recommendation. If the user's question is a question in a vertical knowledge domain, then general knowledge questions in that industry domain will be generated."
[0092] In one feasible implementation, the fifth prompt word is also used to prompt the fifth agent to output an evaluation result containing a score for the second candidate recommendation question, and is also used to prompt the fifth agent to use a general knowledge domain scoring rule to score the second candidate recommendation question when determining that the user question is a question in a general knowledge domain, and to use a vertical domain scoring rule to score the input second candidate recommendation question when determining that the user question is a question in a vertical knowledge domain.
[0093] Since user questions may belong to a specific vertical knowledge domain or not to a general knowledge domain, different scoring rules can be used when evaluating user questions from different domains and their corresponding candidate recommendation questions. By prompting the fifth agent in the fifth prompt to select the appropriate scoring rule based on the domain of the user question, the correlation between the final selected candidate recommendation questions and the user question can be improved. For example, the fifth prompt could include the following: "If the original question is a general knowledge question, please follow the following evaluation rules: ...; If the original question is a vertical knowledge domain question, please follow the following evaluation rules: ...."
[0094] In one feasible implementation, the general knowledge domain scoring rule can be a rule used to represent the scores corresponding to different degrees of relevance between the user's question and the generated candidate recommendation questions, and the rule conforms to the principle that the higher the degree of relevance between the user's question and the generated candidate recommendation questions, the higher the score. This rule can be specifically designed as needed, as long as it meets the above requirements. For example, the general knowledge domain scoring rule can be set as follows: "0: indicates that the generated question is not related to the original question content; (0,20]: indicates that the generated question has a low degree of relevance to the original question content; (20,60]: indicates that the generated question has a certain degree of relevance to the original question content; (60,90]: indicates that the generated question has a high degree of relevance to the original question content; (90,100]: indicates that the generated question has a very high degree of relevance to the original question content."
[0095] In one feasible implementation, the vertical domain scoring rule can be a rule used to represent the different degrees of correlation between the user's question and the generated candidate recommendation questions, and the different degrees of correlation between the generated candidate recommendation questions and the general knowledge of the vertical knowledge domain to which the user's question belongs. Furthermore, this rule conforms to the principle that the higher the degree of correlation between the user's question and the generated candidate recommendation questions, the higher the score; and the higher the degree of correlation between the generated candidate recommendation questions and the general knowledge of the vertical knowledge domain to which the user's question belongs, the higher the score. This rule can be specifically designed as needed, as long as it meets the above requirements. For example, the vertical domain scoring rules can be set as follows: "0: indicates that the generated question is not related to the original question and does not conform to the general knowledge of this industry domain; (0,20]: indicates that the generated question has a low degree of relevance to the original question and does not conform to the general knowledge of this industry domain; (20,60]: indicates that the generated question has a certain degree of relevance to the original question and generally conforms to the general knowledge of this industry domain; (60,90]: indicates that the generated question has a high degree of relevance to the original question and a high degree of conformity with the general knowledge of this industry domain; (90,100]: indicates that the generated question has a very high degree of relevance to the original question and a very high degree of conformity with the general knowledge of this industry domain."
[0096] To aid in understanding the above embodiments of the recommendation question generation method of this application, an example combining the recommendation question generation method of the above embodiments is proposed. In this example, recommendation question generation is implemented through the following multi-agent architecture: 1. A vertical domain recommendation problem generation agent, VQG-Agent (also known as the first agent), and a general knowledge domain recommendation problem generation agent, GQG-Agent (also known as the fourth agent). VQG-Agent generates recommendation problems using segmented documents (i.e., knowledge text blocks); GQG-Agent generates recommendation problems using user questions.
[0097] 2. The VQV-Agent (the second agent) scores the vertical domain recommendation problems, and the GQV-Agent (the fifth agent) scores the general knowledge domain recommendation problems. The VQV-Agent scores the vertical domain recommendation problems (the first candidate recommendation problems) generated by the VQV-Agent. If the score is above a threshold, it passes; otherwise, it is fed back to the VQV-Agent for regeneration. The GQV-Agent scores the general knowledge domain recommendation problems (the second candidate recommendation problems) generated by the GQV-Agent. If the score is above a threshold, it passes; otherwise, it is fed back to the GQV-Agent for regeneration.
[0098] 3. Question Recommendation Agent QR-Agent (also known as the third agent): This agent can effectively identify the user's intent and dynamically select recommended question generation tools corresponding to vertical knowledge domains and general knowledge domains in the toolset to achieve adaptive and efficient processing of different types of user questions.
[0099] Through the above multi-agent architecture design, a multi-agent collaborative architecture for problem generation, problem scoring, and problem recommendation has been established, which can achieve expert-level quality in problem recommendation while ensuring processing efficiency.
[0100] Based on the above multi-agent architecture, referring to Figure 2 The overall architecture can be set (e.g., the architecture of a question recommendation system), including a user question acquisition module, a QR-Agent, a toolset, and a module for obtaining the final recommendation results; the toolset can include recommendation question generation tools corresponding to vertical knowledge domains and recommendation question generation tools corresponding to general knowledge domains; refer to... Figure 3 The recommendation question generation tools corresponding to the vertical knowledge domain may include VQG-Agent and VQV-Agent, and may also include a vertical domain knowledge base document acquisition module, a document preprocessing module, a recommendation question vector library construction module, and a vector matching module; see reference Figure 4 Recommendation question generation tools for general knowledge domains may include GQG-Agent and GQV-Agent.
[0101] Based on the overall architecture above, the method for generating recommendation questions may include the following steps: Step 1: Obtain the questions asked by users through the user question acquisition module; Step 2: Obtain the user question from Step 1 via QR-Agent, analyze the user question to generate an initial plan for the tools to be called (i.e., the first tool call plan), and then use this plan to call the corresponding tools in the toolset; Step 3: Obtain the results returned by the corresponding tool through the QR-Agent; Step 4: Use the QR-Agent to analyze and judge the results returned by the tool: One scenario is: based on the user's question, call the recommendation question generation tool corresponding to the vertical knowledge domain or the recommendation question generation tool corresponding to the general knowledge domain. If there is a returned result, i.e. a specific recommendation question, then output it to the module that obtains the final recommendation result. Another scenario is: if the recommendation question generation tool corresponding to the vertical knowledge domain is called based on the user's question and the result is empty, then the recommendation question generation tool corresponding to the general knowledge domain will be called again to obtain the answer and output it to the module that obtains the final recommendation result. The recommended result will become a general knowledge question in the industry as a supplementary solution.
[0102] Step 5: Obtain the final recommendation result module. The module obtains the final result returned by the QR-Agent in Step 4 above, which is used to visualize the result for the front-end user or store it in the database.
[0103] For tools for generating recommendation questions corresponding to vertical knowledge domains, please refer to... Figure 3 The system comprises the following modules: a vertical domain knowledge base document acquisition module for acquiring vertical domain knowledge base documents; a document preprocessing module for preprocessing vertical domain knowledge base documents, including document reading and parsing, and dividing the documents into multiple text blocks with complete semantics (i.e., knowledge text blocks) using a semantic segmentation algorithm, and passing them to VQG-Agent; VQG-Agent for generating first candidate recommendation questions from the preprocessed text blocks, and passing them to VQV-Agent; VQV-Agent for scoring the first candidate recommendation questions, passing them if they are above a threshold (e.g., 80 points), and regenerating them if they are below a threshold; a recommendation question vector library construction module for converting the first candidate recommendation questions generated by VQG-Agent and filtered by VQV-Agent into vectors and storing them in the recommendation question vector library; and a vector matching module for converting the acquired user questions into vectors and matching them with vectors in the recommendation question vector library, and then returning the matching results to QR-Agent.
[0104] Here is an example of the prompt word (i.e., the first prompt word) for VQG-Agent: "(1) Task Description: You are a vertical domain question generation expert who will generate as many professional questions as possible based on the text content of the vertical domain for recommendation purposes.
[0105] (2) Examples of few-shots are as follows: Input: Product A is a new energy product with very high quality and the ability to generate high economic benefits. Product A's specifications are as follows: Maximum input voltage 550V, rated input voltage 300V…
[0106] Output: {"question": "What are the parameters of product A? / What is the maximum input voltage of product A? / What is the rated input voltage of product A? / ..."} (3) Output format requirements: Please output the results in JSON format. Here is an example of the prompt word (i.e., the second prompt word) for VQV-Agent: "(1) Task Description: You are a quality assessment expert for a specific domain. Please refer to the following evaluation rules and provide your evaluation results.
[0107] (2) Judging rules: 0: Indicates that the generated questions are unrelated to the original document content and lack professionalism; (0,20]: Indicates that the generated question has a low degree of relevance to the original document content and lacks professionalism; (20,60): This indicates that the generated question is somewhat related to the content of the original document, but its professional level is generally average; (60,90): This indicates that the generated question is highly relevant and professional to the original document content; (90,100]: Indicates that the generated question is highly relevant and professional to the content of the original document; (3) Examples of few-shots are as follows: Original text: The parameter data of product A are as follows: maximum input voltage 550V, rated input voltage 300V...
[0108] The generated questions are: {"question": "What are the parameters of product A? / What is the maximum input voltage of product A? / What is the rated input voltage of product A? / ..."} Output: {"score": "100", "Reason for judgment": "According to the judgment rules, the original text mainly contains product parameters and values. The generated questions are highly relevant and professional to the original document content. Therefore, the judgment result is: 100."} (4) Output format requirements: Please output the results in JSON format. For tools for generating recommendation questions in general knowledge domains, please refer to... Figure 4 The process involves: GQG-Agent generating a second candidate recommendation question based on the obtained user question and passing it to GQV-Agent; GQV-Agent scoring the second candidate recommendation question, passing it if it is above a threshold (e.g., 80 points), and regenerating it if it is below a threshold, returning the result to QR-Agent.
[0109] Here is an example of a prompt word (also known as the fourth prompt word) for GQG-Agent: "(1) Task Description: You are a general knowledge question generation expert who will generate general questions (such as three) based on the current user's question, including basic knowledge, self-awareness, or industry-wide general knowledge, for recommendation purposes. If the user's question is a vertical domain question, then general knowledge for that industry domain will be generated.
[0110] (2) Examples of few-shots are as follows: Input: Who are you? Output: {"question": "Who created you? / Are you ChatGPT? / What can you do? / ...} (3) Output format requirements: Please output the results in JSON format. Here is an example of the prompt word (also known as the fifth prompt word) for GQV-Agent: "(1) Task Description: You are an issue quality assessment expert. Please refer to the following assessment rules and provide your assessment results.
[0111] (2) Judging rules: If the original question is a general knowledge question, please follow these evaluation rules: 0: Indicates that the generated question is unrelated to the original question. (0,20): indicates that the generated question has a low degree of relevance to the original question; (20,60]: Indicates that the generated question has some relevance to the original question; (60,90]: Indicates that the generated question has a high relevance to the original question. (90,100]: Indicates that the generated question is highly related to the original question. If the original question is a vertical domain knowledge question, please refer to the following evaluation rules: 0: Indicates that the generated question is unrelated to the original question and does not conform to general knowledge in this industry field; (0,20]: This indicates that the generated question has a low correlation with the original question and does not conform to the general knowledge of this industry field; (20,60]: This indicates that the generated question is related to the original question and generally conforms to the common knowledge in this industry field; (60,90]: This indicates that the generated question is highly relevant to the original question and highly consistent with the general knowledge of this industry field; (90,100]: This indicates that the generated question is highly relevant to the original question and highly consistent with the general knowledge of this industry field; (3) Examples of few-shots are as follows: Original text: Who are you? The generated question is: {"question": "Who created you? / Are you ChatGPT? / What can you do? / ..."} Output: {"score": "100", "Judgment Reason": "According to the judging rules, the original question belongs to the self-awareness category, and the generated question is highly relevant to the original question. Therefore, the judgment result is: 100."} (4) Output format requirements: Please output the results in JSON format. The multi-agent architecture provided in this example, along with the overall system architecture and recommendation question generation method based on this multi-agent architecture, has the following significant technical advantages: 1. The multi-source problem generation path ensures the richness and coverage of recommendations.
[0112] A dual-path question generation mechanism is employed: on the one hand, a document-driven, vertical-domain recommendation question generation agent (VQG-Agent) combines knowledge base content to generate precise recommendation questions tailored to specific professional fields; on the other hand, a user-question-driven, general knowledge domain recommendation question generation agent (GQG-Agent) generates highly relevant supplementary suggestions from the user's perspective. This dual-engine mechanism effectively enhances the diversity and contextual adaptability of recommendation questions, covering multi-level user needs such as professional knowledge points, industry topics, and general questions.
[0113] 2. Introduce a problem quality assessment agent to ensure the accuracy and reliability of recommended problems.
[0114] VQV-Agent and GQV-Agent, acting as question-scoring agents, can automatically assess the quality of each generated question, ensuring that the output is linguistically fluent, semantically complete, and context-relevant. Questions with scores below a preset threshold are fed back to the question-generating agent for regeneration, forming a closed-loop optimization process. This significantly improves the accuracy and professionalism of the recommended questions, effectively avoiding low-quality outputs that are "general" or "semantically redundant."
[0115] 3. Supports question recommendation in both vertical and general scenarios, intelligently adapting to the needs of users with different knowledge backgrounds.
[0116] By recognizing user intent through QR-Agent and dynamically selecting tool modules, the system can automatically determine whether the current question is suitable for invoking the vertical domain knowledge question recommendation tool (such as professional scenarios like inverters, wind power, and medical care). If no match is found, it falls back to the recommendation question generation tool corresponding to the general knowledge domain, achieving full coverage support for both industry users and general users. This mechanism is particularly suitable for complex use cases where the knowledge base is limited but user questions are infinitely expandable.
[0117] 4. A multi-agent collaborative architecture design with adaptive scheduling capabilities improves system processing efficiency and intelligence.
[0118] A collaborative architecture was designed, consisting of three types of agents: question generation, question scoring, and question recommendation. These agents automatically collaborate through judgment results and feedback logic, ensuring both efficient task execution and improved accuracy and contextual fit of the recommendations. This architecture exhibits good module decoupling and scalability, allowing for rapid expansion with new agents or replacement of the recommendation engine module as needed.
[0119] 5. The system is highly robust and the recommended path is highly stable. Since the generation of vertical domain recommendation questions relies on industry knowledge bases, their coverage is inherently limited. Traditional systems often face the awkward situation of "no recommendations" when the knowledge base is not matched. To address this issue, a fallback mechanism ensures that at least one general recommendation path is always available, fundamentally solving the problem of output failure caused by knowledge gaps in question recommendation systems. This gives the system greater stability and better user experience assurance.
[0120] 6. High degree of automation and low reliance on manual labor, suitable for large-scale deployment scenarios.
[0121] All recommendation generation, scoring, judgment, and output are completed automatically by the intelligent agent, greatly reducing the cost of manual intervention. It is particularly suitable for application scenarios that require the automatic generation of high-quality questions, such as enterprise knowledge question-and-answer systems, intelligent customer service platforms, and online education recommendation engines, and has good practical implementation capabilities and commercial value.
[0122] In summary, by integrating the semantic understanding capabilities of a large language model, the quality control mechanism for recommendation questions, and the dynamic collaboration logic among multiple agents, an intelligent, professional, and highly adaptable question recommendation system has been constructed. This system not only improves the user experience but also provides strong underlying support for semantic recommendation-based intelligent interactive platforms.
[0123] This application provides a recommended question generation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the recommended question generation method in the above embodiment.
[0124] The following is for reference. Figure 5 It shows a schematic diagram of a recommended question generation device suitable for implementing embodiments of this application. Figure 5 The recommended question generation device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0125] like Figure 5As shown, the problem-generating device may include a processing unit 1001 (e.g., a DSP processor), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the problem-generating device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: an input device 1007 including, for example, a microphone, an accelerometer, etc.; an output device 1008 including, for example, a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 allows the problem-generating device to communicate wirelessly or wiredly with other devices to exchange data. Although a problem-generating device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. It can be implemented alternatively or with more or fewer systems.
[0126] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0127] Compared with the prior art, the beneficial effects of the recommendation question generation device provided in this application embodiment are the same as the beneficial effects of the recommendation question generation method provided in the above embodiments, and will not be repeated here.
[0128] It should be understood that the various parts disclosed in the embodiments of this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0129] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the recommendation question generation method in the above embodiments.
[0130] The computer-readable storage medium provided in this application embodiment may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0131] The aforementioned computer-readable storage medium may be included in the problem-generating device; or it may exist independently and not assembled into the problem-generating device.
[0132] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the problem-generating device, cause the problem-generating device to perform the functions defined in the methods of the embodiments disclosed in this application.
[0133] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0134] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0135] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0136] The readable storage medium provided in this application embodiment is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-described method for generating recommendation questions. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application embodiment are the same as the beneficial effects of the method for generating recommendation questions provided in the above-described embodiments, and will not be repeated here.
[0137] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the recommendation question generation method described above.
[0138] Compared with the prior art, the beneficial effects of the computer program product provided in this application embodiment are the same as the beneficial effects of the recommendation question generation method provided in the above embodiment, and will not be repeated here.
[0139] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for generating a recommendation question, characterized by, The recommendation question generation method comprises: obtaining a user question; converting the user question into a vector and matching the vector with vectors in a preset recommendation question vector library to obtain a target vector, wherein the recommendation question vector library comprises vectors converted from each first candidate recommendation question, and each first candidate recommendation question is generated by a preset first intelligent agent based on a preset first prompt word and each knowledge text block in a preset knowledge text block set, and the first prompt word is used to prompt the first intelligent agent to generate a question for recommending to a user according to the knowledge text block; determining a recommendation question for output according to a candidate recommendation question corresponding to the target vector.
2. The method of claim 1, wherein, In a case where a first evaluation result corresponding to the first candidate recommendation question represents that a correlation degree between the first candidate recommendation question and a knowledge text block meets a first preset requirement, the first candidate recommendation question is converted into a vector and added to the recommendation question vector library, and the first evaluation result is obtained by a preset second intelligent agent based on a preset second prompt word, the knowledge text block and the first candidate recommendation question, the second prompt word is used to prompt the second intelligent agent to evaluate the correlation degree between the knowledge text block and the first candidate recommendation question, and generate an evaluation result according to the correlation degree.
3. The method of claim 1, wherein, The step of obtaining a user question further comprises: obtaining a first tool calling scheme by a preset third intelligent agent based on a preset third prompt word and the user question, wherein the third prompt word is used to prompt the third intelligent agent to select a recommendation question generation tool matching a domain of the user question from a preset tool set, and generate a calling scheme of the selected tool, and the tool set at least comprises a recommendation question generation tool corresponding to a vertical knowledge domain; in a case where the first tool calling scheme is a calling scheme of a recommendation question generation tool corresponding to a target vertical knowledge domain, performing the steps of converting the user question into a vector and matching the vector with vectors in a preset recommendation question vector library to obtain a target vector, and determining a recommendation question for output according to a candidate recommendation question corresponding to the target vector, wherein the target recommendation question vector library is a recommendation question vector library constructed based on a target knowledge text block set, and the target knowledge text block set is a knowledge text block set in which each knowledge text block belongs to the target vertical knowledge domain.
4. The method of claim 3, wherein, The tool set further comprises a recommendation question generation tool corresponding to a general knowledge domain; the step of obtaining a first tool calling scheme by a preset third intelligent agent based on a preset third prompt word and the user question further comprises: In a case where the first tool calling scheme is to call the recommendation question generation tool corresponding to the general knowledge field, at least one second candidate recommendation question is generated by a preset fourth agent based on a preset fourth prompt word and the user question, wherein the fourth prompt word is used to prompt the fourth agent to generate a question of a general knowledge field according to the user question for recommendation to a user; The recommendation question for output is determined according to the second candidate recommendation question.
5. The method of claim 4, wherein, After the step of acquiring the user question, the method further includes: In a case where no vector matching the vector converted from the user question is acquired from the recommendation question vector library, the step of generating at least one second candidate recommendation question by the preset fourth agent based on the preset fourth prompt word and the user question, and determining the recommendation question for output according to the second candidate recommendation question is performed.
6. The method of claim 5, wherein, The fourth prompt word is further used to prompt the fourth agent to determine a knowledge type to which the user question belongs, and generate a question matching the knowledge type; and / or the fourth prompt word is further used to prompt the fourth agent to generate a question related to general knowledge in a vertical knowledge field for recommendation to a user in a case where it is determined that the user question is a question of the vertical knowledge field, and generate a question of a general knowledge field for recommendation to a user according to the user question in a case where it is determined that the user question is a question of the general knowledge field.
7. The method of claim 5, wherein the question generation is performed by a question generation model. After the step of generating at least one second candidate recommendation question by the preset fourth agent based on the preset fourth prompt word and the user question, the method further includes: A second evaluation result corresponding to the second candidate recommendation question is obtained by a preset fifth agent based on a preset fifth prompt word, the user question and the second candidate recommendation question, wherein the fifth prompt word is used to prompt the fifth agent to evaluate a correlation degree between the user question and the second candidate recommendation question, and generate an evaluation result according to the correlation degree; In a case where the second evaluation result represents that the correlation degree between the second candidate recommendation question and the user question meets a second preset requirement, the step of determining the question for recommendation to a user according to the second candidate recommendation question is performed; Otherwise, the step of generating at least one second candidate recommendation question by the preset fourth agent based on the preset fourth prompt word and the user question is returned.
8. The method of claim 7, wherein, The fifth prompt word is further used to prompt the fifth agent to output an evaluation result containing a score of the second candidate recommendation question, and further used to prompt the fifth agent to score the second candidate recommendation question using a general knowledge field scoring rule in a case where it is determined that the user question is a question of a general knowledge field, and score the second candidate recommendation question using a vertical field scoring rule in a case where it is determined that the user question is a question of a vertical knowledge field.
9. The method of claim 3, wherein, The third prompt word is also used to prompt the third intelligent agent to first generate candidate tools and selection reasons of each candidate tool from the tool set, and then perform reflection evaluation based on each candidate tool and the selection reason, and generate a tool calling scheme according to the reflection evaluation result. 10.A recommendation question generation device characterized by comprising: The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the recommended question generation method according to any one of claims 1 to 9.
