Intelligent response generation method and system, electronic device and computer readable storage medium
Patent Information
- Application Number
- CN202610545559.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-23
- Publication Date
- 2026-09-01
AI Technical Summary
[0006]为了解决上述问题,本申请提供一种智能响应生成方法及系统、电子设备和计算机可读存储介质,以克服生物医药领域中,工具之间协同困难、使用门槛高的问题
Smart Images

Figure CN122673237A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, specifically to an intelligent response generation method and system, a quantum computer, and a computer-readable storage medium. Background Technology
[0002] The Agent Big Model, also known as the Intelligent Agent Big Model, is a large language model system with autonomous planning and execution capabilities and the ability to invoke external tools. It can understand the vague and complex intentions expressed by users in natural language, transform them into actionable goals, and then automatically break down grand goals into a series of clear sub-tasks and steps. It then completes the specific operations by invoking external tools (such as computing tools and database query tools). In other words, the Agent Big Model marks a crucial leap in the evolution of artificial intelligence from "content generation" to "autonomous intelligence," possessing the ability to solve complex real-world problems.
[0003] Currently, in the field of scientific computing, agent-based large models have been applied to scenarios such as automated experimental design, data analysis, and tool invocation. However, applying agent-based large models to the highly complex and specialized field of biomedicine still faces multiple challenges.
[0004] The biomedical field is characterized by the following features: it involves massive, multi-source, and heterogeneous data on gene sequences, protein structures, metabolic pathways, drug molecules, enzyme reactions, fermentation conditions, and yields, titers, and other parameters documented in the literature. This knowledge is highly fragmented, scattered across thousands of specialized databases (e.g., UniProt, PDB, ChEMBL), patent documents, and academic literature (including preprints and formal publications). Furthermore, the field's frontiers advance rapidly, and knowledge is frequently updated. Simultaneously, research and development in this field heavily relies on a range of specialized simulation / prediction tools, such as molecular docking (e.g., AutoDock), molecular dynamics simulations (e.g., GROMACS), quantum chemical calculations, and various genomic analysis workflows. These tools typically run independently, with varying parameter formats and complex calling methods (mostly via command line), leading to difficulties in tool collaboration and a high barrier to entry.
[0005] Therefore, how to deeply integrate the Agent large model into the biomedical R&D system and automatically realize intelligent retrieval of multi-source knowledge, automatic scheduling of professional tools, and end-to-end execution of complex computing processes remains a key issue that urgently needs to be addressed in the intelligent transformation of this field. Summary of the Invention
[0006] To address the aforementioned issues, this application provides an intelligent response generation method and system, electronic device, and computer-readable storage medium to overcome the difficulties in collaboration between tools and the high barriers to entry in the biomedical field.
[0007] According to a first aspect of this application, an intelligent response generation method is provided. This method is applied to an intelligent response generation system, which includes a human-computer interaction interface, an Agent large-scale model module, a knowledge retrieval module, and a tool invocation module. The method includes: receiving query information input by a user through the human-computer interaction interface; identifying the user's query intent based on the query information through the Agent large-scale model module; dynamically planning and executing invocation logic for the knowledge retrieval module and the tool invocation module based on the query intent to obtain invocation results. The knowledge retrieval module is coupled to the Agent large-scale model module for performing knowledge retrieval based on the user query, and the tool invocation module is coupled to the Agent large-scale model module based on a standardized tool invocation protocol for managing and invoking external tools; and generating query results based on the invocation results through the Agent large-scale model module to respond to the query information.
[0008] In one implementation of the first aspect, the knowledge retrieval module and / or tool invocation module are selectively invoked according to the query intent, including: if the query intent is professional question answering, the knowledge retrieval module is invoked through the Agent large model module, and the knowledge context obtained by invoking the knowledge retrieval module is used as the invocation result; if the query intent is tool invocation, the tool invocation module is invoked through the Agent large model module, and the calculation result obtained by invoking the tool invocation module is used as the invocation result; if the query intent includes both professional question answering and tool invocation, the invocation order of the knowledge retrieval module and the tool invocation module is planned through the Agent large model module, and the knowledge retrieval module and the tool invocation module are invoked sequentially according to the planned invocation order, and the knowledge context obtained by invoking the knowledge retrieval module and the calculation result obtained by invoking the tool invocation module are used as the invocation result.
[0009] In one implementation of the first aspect, the Agent large model module calls the tool calling module, and the calculation result obtained by calling the tool calling module is used as the calling result. This includes: using the Agent large model module to determine the external tools to be called and their execution order based on query information; using the Agent large model module to extract the calling parameters of each external tool to be called from the query information; using the Agent large model module to send a tool calling request to the tool calling module based on the execution order and calling parameters; and in response to the tool calling request, using the tool calling module to execute each external tool to be called sequentially to obtain the calculation result, and using the calculation result as the calling result.
[0010] In one implementation of the first aspect, in response to a tool invocation request, the tool invocation module sequentially executes each external tool to be invoked to obtain the calculation result, including: the tool invocation module performs intelligent verification of the relevant information of the external tool to be invoked based on the pre-registered tool configuration information, wherein the intelligent verification includes at least one of automatic parameter verification, input file validity check, automatic output directory generation, task lifecycle management, and streaming progress push.
[0011] In one implementation of the first aspect, in response to a tool invocation request, the tool invocation module sequentially executes each external tool to be invoked to obtain the calculation result, including: during the execution of each external tool to be invoked, the tool invocation module monitors the execution status of each external tool to be invoked in real time and sends the execution status to the Agent large model module.
[0012] In one implementation of the first aspect, the knowledge retrieval module is invoked through the Agent large model module, and the knowledge context obtained by invoking the knowledge retrieval module is used as the invocation result. This includes: generating a retrieval invocation request based on query information through the Agent large model module, wherein the retrieval invocation request includes at least the query information; sending the retrieval invocation request to the knowledge retrieval module through the Agent large model module; and in response to the retrieval invocation request, performing knowledge retrieval through the knowledge retrieval module to obtain the knowledge context, and using the knowledge context as the invocation result.
[0013] In one implementation of the first aspect, based on the retrieval request, a knowledge retrieval module is used to obtain the knowledge context, including: translating the query information into at least one other language through the knowledge retrieval module, denoted as the translated query information; and performing knowledge retrieval using the query information and the translated query information respectively to obtain the knowledge context.
[0014] In one implementation of the first aspect, generating query results based on the call result to respond to query information includes: when the query intent is professional Q&A, and the call result is the knowledge context obtained by calling the knowledge retrieval module, generating query results based on the call result to respond to query information includes: generating query results based on the knowledge context and query information through the Agent large model module; when the query intent is tool call, and the call result is the calculation result obtained by calling the tool call module, generating query results based on the call result to respond to query information includes: integrating the calculation result through the Agent large model module to generate query results; when the query intent includes both professional Q&A and tool call, and the call result includes both the knowledge context obtained by calling the knowledge retrieval module and the calculation result obtained by calling the tool call module, generating query results based on the call result to respond to query information includes: integrating the query information, knowledge context, and calculation result through the Agent large model module to generate query results.
[0015] In one implementation of the first aspect, the standardized tool invocation protocol is the model context protocol.
[0016] In one implementation of the first aspect, the external tools include at least one of the following: protein sequence generation tools, protein-small molecule affinity prediction tools, molecular docking tools, biosynthetic pathway prediction tools, protein structure prediction tools, and end-to-end tools.
[0017] According to a second aspect of this application, an intelligent response generation system is provided, comprising: a human-computer interaction interface for receiving query information input by a user; an Agent large-scale model module for identifying the user's query intent based on the query information; selectively invoking a knowledge retrieval module and / or a tool invocation module based on the query intent to obtain invocation results; and generating query results based on the invocation results to respond to the query information, wherein the knowledge retrieval module is coupled to the Agent large-scale model module and is used to perform knowledge retrieval in response to the Agent large-scale model module's invocation of the knowledge retrieval module; and the tool invocation module is coupled to the Agent large-scale model module based on a standardized tool invocation protocol and is used to execute external tools in response to the Agent large-scale model module's invocation of the tool invocation module.
[0018] According to a third aspect of this application, an electronic device is provided, comprising: a memory; and a processor, the memory for storing a computer program, the processor executing the computer program to cause the electronic device to perform the smart response generation method as provided in the first aspect of this application.
[0019] According to a fourth aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the intelligent response generation method as provided in the first aspect of this application.
[0020] This application provides an intelligent response generation method and system, an electronic device, and a computer-readable storage medium. The intelligent response generation method receives query information input by a user through a human-computer interaction interface; it identifies the user's query intent based on the query information using an Agent large-scale model module; and it selectively invokes a knowledge retrieval module and / or a tool invocation module based on the query intent to obtain the invocation results. The knowledge retrieval module is coupled to the Agent large-scale model module for knowledge retrieval based on the user query, while the tool invocation module is coupled to the Agent large-scale model module based on a standardized tool invocation protocol for managing and invoking external tools. Finally, the Agent large-scale model module generates query results to respond to the query information based on the invocation results. In other words, the above-mentioned intelligent response generation method utilizes the Agent large-scale model module to parse the user's input query information to identify their query intent, and dynamically plans and executes invocation logic based on this query intent. This invocation logic includes scheduling and execution information for at least one knowledge retrieval module and / or at least one tool invocation module, thereby achieving organic synergy between knowledge retrieval and tool invocation, solving the problem of the separation of intelligent retrieval and tool invocation and the lack of a unified scheduling mechanism in the biomedical field. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 The diagram shown is a flowchart of an intelligent response generation method provided in an embodiment of this application.
[0023] Figure 2 The diagram shown is a flowchart illustrating a method for obtaining call results by calling a tool through an Agent large model module, according to an embodiment of this application.
[0024] Figure 3 The diagram shown is a flowchart illustrating a method for obtaining results by calling a knowledge retrieval module according to an embodiment of this application.
[0025] Figure 4 The diagram shown is a schematic diagram of an intelligent response generation system provided in an embodiment of this application.
[0026] Figure 5 The diagram shown is a block diagram of an exemplary electronic device provided in an embodiment of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0028] To facilitate understanding, a brief introduction to the relevant terms mentioned in the embodiments of this application will be given first.
[0029] MCP (Model Context Protocol) is a standardized tool invocation protocol used to define the interaction specifications between large language models and external tools. The MCP protocol specifies the standard interfaces for tool description formats (including tool name, description, parameter definitions, etc.), invocation methods (including parameter passing, result return, etc.), and error handling, enabling large language models to understand the functionality of tools and invoke them correctly. The MCP protocol supports dynamic tool registration and discovery, facilitating system expansion and maintenance.
[0030] RAG (Retrieval-Augmented Generation) is a technical solution that combines information retrieval with text generation. The RAG system first retrieves knowledge fragments relevant to the user's query from an external knowledge base (such as a vector database), then inputs the retrieved knowledge context along with the user's query into a large language model to generate an answer based on the retrieved knowledge. RAG technology can enhance the generative capabilities of large language models, reduce the illusion problem of large language models, and improve the accuracy and reliability of answers, making it particularly suitable for domain-specific question-answering scenarios that require referencing external knowledge.
[0031] As mentioned earlier, how to deeply integrate large-scale agent models into the biomedical R&D system and automatically achieve integrated scheduling and collaboration of knowledge retrieval and tool invocation remains a key issue that urgently needs to be addressed in the intelligent transformation of this field. In-depth analysis reveals that the current challenges of intelligent computing in the biomedical field are specifically reflected in the following aspects: (1) Disconnect between RAG technology and tool invocation: In the existing system, RAG technology is mainly used for knowledge retrieval and text generation, while tool invocation is used to perform specific computational tasks. The two are independent functional modules and lack an effective coordination mechanism. When users need to both retrieve relevant knowledge and perform computational tasks, they need to manually switch between the RAG system and the tool invocation system, which cannot achieve an organic combination of knowledge retrieval and tool execution. For example, when a user queries "how to predict the binding affinity of proteins to drugs", the RAG system can provide relevant literature and knowledge, but it cannot directly call the affinity prediction tool for calculation. The user needs to call the tool system separately, resulting in a disconnect between knowledge retrieval and tool execution, and a fragmented user experience.
[0032] (2) Lack of a unified tool integration framework for Agent models: Although existing large Agent models have the ability to call tools, different tools use different calling interfaces and parameter formats, lacking a unified integration framework. In the biomedical field, there are a large number of professional algorithm tools (such as protein sequence generation, affinity prediction, molecular docking, etc.), each with unique parameter requirements and calling methods. Agent models need to be adapted separately for each tool, resulting in high integration costs and difficult maintenance.
[0033] (3) Lack of intelligent verification mechanism for tool calls: Existing tool call systems mostly involve simple parameter passing and lack intelligent mechanisms such as parameter validity verification, input file format checking, and path security verification. In biomedical computing, the validity of input data directly affects the accuracy of calculation results, but existing systems often only discover parameter errors or file format problems during the tool execution stage, leading to calculation failure or incorrect results, lacking pre-verification and prevention mechanisms.
[0034] (4) Lack of real-time monitoring of tool execution: Most existing tool calling systems are synchronous calling modes. When the tool execution time is long (such as molecular dynamics simulation which takes several hours), users cannot know the execution progress in real time and can only wait for the final result. In complex biomedical calculation processes, multiple tools need to be executed in series, but there is a lack of a unified progress tracking mechanism. Users cannot know which step is currently being executed or how much longer it is expected to take, which affects the user experience.
[0035] (5) Lack of unified orchestration for collaborative tool execution: In the biomedical field, complex computational tasks often require the execution of multiple tools in series (such as from retrosynthetic pathway prediction → protein sequence generation → affinity prediction → molecular docking → structure prediction → molecular dynamics simulation), but existing systems lack a unified workflow orchestration mechanism. Users need to manually call each tool and manually manage the data transfer between tools, which is prone to errors and inefficient.
[0036] (6) Insufficient coverage of multilingual knowledge retrieval: Although the existing RAG system supports multilingual knowledge retrieval, it is mostly a single-language retrieval mode, that is, Chinese queries retrieve Chinese documents and English queries retrieve English documents, resulting in insufficient cross-language knowledge integration. In the biomedical field, a large number of high-quality documents are in English, but users may ask questions in Chinese, and the existing system cannot make full use of cross-language knowledge resources.
[0037] In view of this, this application proposes a smart response generation method and system, an electronic device, and a computer-readable storage medium to solve the above problems.
[0038] Figure 1 The diagram shown is a flowchart illustrating an intelligent response generation method according to an embodiment of this application. This method is applied to an intelligent response generation system, which includes a human-computer interaction interface, an Agent large model module, a knowledge retrieval module, and a tool invocation module. Figure 1 As shown, the method includes the following steps: Step S110: Receive query information input by the user through the human-computer interaction interface.
[0039] The human-computer interaction interface in this application can be implemented as a text-based dialogue interface, a voice interaction interface, a graphical user interface, a file / data upload interface, or an augmented reality / mixed reality interface, etc., allowing users to interact with text, files, data, voice, and images. Information retrieval is typically a user's natural language command or a structured request.
[0040] Step S120: Identify the user's query intent based on the query information using the Agent large model module.
[0041] The Agent Big Model module in this application is implemented based on the Agent Big Model and is used to provide Agent-based intelligent services for the biomedical field. For example, the Agent Big Model module can be an Agent Big Model itself, or it can be an Agent Big Model combined with other functional modules.
[0042] In this application, the Agent large model module identifies the query intent based on the query information through a deep semantic understanding and classification decision-making process. The goal is to accurately map the user's fuzzy and diverse natural language expressions to the query intent that the system can process.
[0043] Specifically, in one embodiment of this application, the Agent big model module may include an intent recognition module to identify the type of user query intent based on the Agent big model. Query intents include general dialogue, specialized question and answer, tool invocation, and composite intents (i.e., including both specialized question and answer and tool invocation).
[0044] When the query intent is a general conversation, it means the user's need is for social or auxiliary communication unrelated to core business. For example, the user enters the query "What's the weather like today?"
[0045] When the query intent is professional Q&A, it means the user's need is to find static knowledge such as literature, concepts, and experimental methods. For example, the query information is "What is the working principle of CRISPR-Cas9?"
[0046] When the query intent is a tool call, it means the user's need is to perform a specific calculation or simulation task. For example, the query information is "predict the affinity of protein P12345 for small molecules SMILES".
[0047] When the query intent is a composite intent, it means that the user's need is to perform knowledge retrieval and calculations in a certain logical order. For example, the query information is "How to design a yeast strain that can produce a high yield of artemisinin precursor (the synthetic pathway needs to be checked first, and then the strain design tool needs to be called)".
[0048] In the subsequent description of the embodiments of this application, the focus is on cases where the query intent is professional question and answer, tool invocation, or a combination of these intents. This does not mean that the query intent of the embodiments of this application can only be professional question and answer, tool invocation, or a combination of these intents.
[0049] Step S130: Based on the query intent, the Agent large model module dynamically plans and executes the calling logic for the knowledge retrieval module and the tool calling module to obtain the calling results.
[0050] In this application, the knowledge retrieval module is coupled to the Agent large model module for knowledge retrieval based on user queries. The tool invocation module is coupled to the Agent large model module based on a standardized tool invocation protocol for managing and invoking external tools. The coupling of these two functional modules can mean that a tight collaborative interface and interaction process have been established between them, enabling them to function as part of a collaborative system, automatically exchanging data and invoking functions to jointly complete more complex tasks.
[0051] In step S130, the Agent large model module dynamically plans and executes the calling logic of the knowledge retrieval module and the tool calling module within the same Agent large model module through the unified intent recognition result, so as to realize the integrated scheduling of the knowledge retrieval module and the tool calling module.
[0052] In one embodiment of this application, based on the query intent, the Agent large model module dynamically plans and executes the calling logic of the knowledge retrieval module and the tool calling module to obtain the calling result. This includes: if the query intent is professional question answering, the Agent large model module calls the knowledge retrieval module, and the knowledge context obtained from calling the knowledge retrieval module is used as the calling result; if the query intent is tool calling, the Agent large model module calls the tool calling module, and the calculation result obtained from calling the tool calling module is used as the calling result; if the query intent includes both professional question answering and tool calling, the Agent large model module plans the calling order of the knowledge retrieval module and the tool calling module, and calls the knowledge retrieval module and the tool calling module in sequence according to the planned calling order, and uses the knowledge context obtained from calling the knowledge retrieval module and the calculation result obtained from calling the tool calling module as the calling result.
[0053] Alternatively, external tools may include, but are not limited to, the following: (1) Protein sequence generation tool (diffseq_protein_gen), which can generate protein sequences based on diffusion models.
[0054] (2) Protein-small molecule activity prediction tool (protein_affinity_predict): The QDTA (Quantitative Drug-Target Affinity) model is used to predict the binding affinity between proteins and drug molecules.
[0055] (3) Molecular docking tool (qubo_docking): Use QUBO Docking (based on the FABind Plus model) to perform protein-ligand molecular docking and predict the optimal conformation and binding mode of the ligand molecule at the protein binding site.
[0056] (4) Biosynthetic pathway prediction tool (bionavi_pathway_prediction): The BioNavi model is used to predict the biosynthetic pathway of a compound. Starting from the target compound (SMILES format), possible biosynthetic pathways are deduced in reverse.
[0057] (5) Protein structure prediction tool (protenix_batch_inference): Uses the Protenix model to predict the three-dimensional structure of proteins in batches and generates PDB format structure files from FASTA sequence files.
[0058] (6) Full pipeline: an integrated pipeline of multiple biomedical algorithm tools, including BioNavi retrosynthetic pathway prediction, DiffSequence protein sequence generation, QDTA affinity prediction, Protenix structure prediction, QUBO Docking molecular docking, GROMACS molecular dynamics simulation and other steps.
[0059] Figure 2 The diagram shown is a flowchart illustrating a method for obtaining call results through an Agent large model module calling a tool calling a module, according to an embodiment of this application. Figure 2 As shown, in one embodiment of this application, the process of calling the tool calling module through the Agent large model module to obtain the calling result includes the following steps: Step S210: Using the Agent large model module, determine the external tools to be invoked and their execution order based on the query information.
[0060] In step S210, the Agent large model module decomposes the complex goal described by the user in natural language into an executable sequence of subtasks by querying information, and determines the execution order of each subtask in the sequence. Subsequently, intelligent tool monitoring is performed using the intelligent tool detection function of the tool manager. Based on keyword matching and tool descriptions, the most suitable external tool (i.e., the external tool to be invoked) is selected for each subtask in the sequence. In this embodiment, the Agent large model module interacts with the tool invocation module through the tool manager.
[0061] It should be noted that each subtask can correspond to one or more external tools to be invoked, and the execution order of each subtask determines the execution order of each external tool to be invoked.
[0062] Step S220: Extract the calling parameters of each external tool to be invoked from the query information through the Agent large model module.
[0063] For example, LLM-assisted parameter extraction techniques can be used to automatically extract the structured parameters (such as sequences, structures, patterns, etc.) required by the tool from unstructured user query information as calling parameters. Missing parameters can also be collected gradually through multi-turn dialogues.
[0064] Step S230: Based on the execution order and call parameters, send a tool call request to the tool call module through the Agent large model module.
[0065] In this embodiment, the Agent large model module can send a tool invocation request to the tool invocation module through the tool manager and the tool invocation protocol. This tool invocation request includes at least information regarding the execution order and invocation parameters.
[0066] In one embodiment of this application, the tool invocation protocol can be a tool invocation protocol such as OpenAI's Function Calling, Anthropic's Tool Use, or LangChain's Tool interface. Preferably, the tool invocation protocol can be the MCP protocol.
[0067] As an emerging standardized protocol, the MCP protocol boasts superior cross-platform compatibility and scalability, supporting flexible tool description and parameter definition mechanisms. It is particularly suitable for application scenarios in the biomedical field where algorithms are diverse and complexly integrated. In contrast, other protocols are often tied to specific vendor technology stacks, lacking unified standardization support, which hinders the unified access and management of tools from multiple sources and of various types.
[0068] Therefore, it can be seen that by using the more flexible and standardized tool integration framework of the MCP protocol, the intelligent response generation method provided in this application can solve the problems of high tool integration cost and difficult maintenance caused by the lack of a unified tool integration framework for the Agent model mentioned above.
[0069] Step S240: In response to the tool call request, execute each external tool to be called in sequence through the tool call module to obtain the calculation result, and use the calculation result as the call result.
[0070] In step S240, in response to the tool call request, the tool call module can communicate with the remote MCP server via the HTTP / SSE protocol and execute the corresponding professional algorithms (such as DiffSequence protein sequence generation, QUBO molecular docking, BioNavi retrosynthetic analysis, Protenix structure prediction, etc.) in the execution order. The final calculation results (including generated sequences, prediction results, file paths, etc.) are used as the call results. The call results are returned to the tool manager via the MCP protocol. The tool manager converts the results into a standardized ToolResult format and returns it to the Agent large model module.
[0071] In one embodiment of this application, the tool invocation module may include a tool registration module. This tool registration module centrally manages the configuration information (i.e., pre-registered tool configuration information) of all algorithm tools through an algorithm registry. Exemplarily, the configuration information may include tool identifier, name, description, type, script path, Conda environment, required parameters, optional parameters, parameter mapping, timeout, etc. It should be noted that the specific content of the configuration information can be flexibly selected according to actual conditions, and this application does not limit it in this regard. Through the algorithm registry, new algorithm tools can be easily added without modifying the core code.
[0072] In one embodiment of this application, the tool invocation module may further include a tool execution module. For example, the tool execution module can dynamically construct and execute executable commands based on pre-registered tool configuration information (e.g., tool identifier and parameters). Before, during, and after tool execution, the tool execution module can provide multiple intelligent safeguards. For example, it supports parameter whitelist verification, path normalization, input file validity checks, and automatic generation of output directories.
[0073] Optionally, the tool execution module can perform validity checks and security filtering on the calling parameters of each tool. For example, before executing a tool, the tool execution module can use a parameter whitelist mechanism. Since the parameter whitelist mechanism only allows the transmission of parameters declared in the pre-registered tool configuration information, it can prevent parameter injection attacks. Furthermore, the tool execution module can also perform security checks on path parameters to prevent path traversal attacks.
[0074] The tool execution module can check or modify parameters through parameter verification and automatic modification mechanisms. For example, before executing a tool, the module can automatically check whether the required parameters for each tool are provided, and fill in the default values for optional parameters. For special modes of specific tools (such as the antibody mode of a protein sequence generation tool which requires an antigen parameter), the system performs conditional parameter validation, automatically prompting for missing parameters or using default values. For unspecified output directories, the system automatically generates standardized output directory paths based on the sessionUid, ensuring the orderly management of result files.
[0075] The tool execution module can also verify the validity of input files; that is, it can perform strict validity checks on the input files of each tool. Verification can include: path normalization, file existence check, file format validation, and content validity check.
[0076] Path normalization, for example, converts external paths into standard internal paths within the container. File format validation includes, for example, for CSV files, the tool execution module checks for the existence of required columns (such as pdb_id, SMILES, sequence, etc.) and performs format validation on each row of data, providing clear error messages and row numbers when illegal data is found. For PDB files, the tool execution module extracts the pdb_id from the filename and matches it with the pdb_id in the CSV file to ensure data consistency. Content validity checks may include ensuring that protein sequences contain only the 20 standard amino acid letters and that the SMILES string conforms to chemical formula specifications.
[0077] In one embodiment of this application, the tool invocation module may further include a tool monitoring module, which monitors the tool execution status in real time and supports functions such as task stopping, progress streaming, and log recording.
[0078] Optionally, task termination can be supported through a task lifecycle management mechanism. As mentioned earlier, the Agent large model module can decompose complex goals described in natural language into a sequence of executable subtasks. Therefore, the tool invocation module can maintain a task registry to record the execution status (preparing / running), process handle, start time, progress file path, and other information for each subtask. The tool invocation module can terminate currently executing subtasks based on the task registry (e.g., by sending a SIGTERM signal and forcibly killing the task after a timeout) and clean up related resources. The tool invocation module also supports timeout control; for example, different timeout times can be set according to the tool type (e.g., a timeout of 3600 seconds for molecular docking tools and 10800 seconds for full-process tools). After a timeout, the subtask corresponding to that tool will be automatically terminated and an error message will be returned.
[0079] During the execution of each external tool to be invoked, the tool execution module monitors the execution status of each tool in real time and sends the execution status to the Agent large model module. For example, a streaming progress transmission mechanism can be used to achieve streaming progress push. For instance, for tools with long execution times (such as full-process tools or batch structure prediction tools), the tool execution module uses SSE (Server-Sent Events) technology to achieve real-time progress push. During tool execution, the tool execution module writes progress information to a JSONL-formatted progress file, including step number, step title, step data, timestamp, etc. The client receives progress updates in real time by accessing the ` / api / progress / {sessionUid} / stream` endpoint, enabling visual tracking of the "Design-Build-Test-Learn" (DBTL) cycle. The tool execution module also supports a heartbeat mechanism and timeout warnings to ensure connection stability. Therefore, the intelligent response generation method provided in this application can solve the problem of poor user experience caused by the lack of real-time monitoring during tool execution, as mentioned above.
[0080] As can be seen from the above, the intelligent response generation method provided in this application can solve the problem of calculation failure or erroneous results caused by the lack of intelligent verification mechanism in tool calls, as mentioned above, and greatly improve the user experience and system reliability.
[0081] In one embodiment of this application, the tool invocation module may further include a tool collaboration module, which supports the sequential execution of multiple tools to realize complex biomedical computational processes.
[0082] For example, the tool collaboration module can support the sequential execution of multiple tools through a collaborative execution mechanism, enabling complex biomedical computational workflows through end-to-end tools. The module can automatically manage data transfer between tools (e.g., the output of one tool serving as the input of another), ensuring data format compatibility. Furthermore, the module can support skipping specific steps (e.g., skip_protenix, skip_bionavi), providing flexible workflow configuration capabilities.
[0083] Therefore, the intelligent response generation method provided in this application can solve the inefficiency and error-proneness problems caused by the lack of unified orchestration in the collaborative execution of tools mentioned above.
[0084] Figure 3 The diagram shown is a flowchart illustrating a method for obtaining results by invoking a knowledge retrieval module according to an embodiment of this application. Figure 3 As shown, in one embodiment of this application, the Agent large model module calls the knowledge retrieval module to obtain the call result, including the following steps: Step S310: The Agent large model module generates a retrieval call request based on the query information, wherein the retrieval call request includes at least the query information.
[0085] Step S320: Send the retrieval request to the knowledge retrieval module through the Agent large model module.
[0086] The knowledge retrieval module can include a biomedical knowledge layer, a vector retrieval layer, and an intelligent enhancement layer to work together to complete knowledge retrieval.
[0087] The biomedical knowledge layer is used to construct and manage a multi-source heterogeneous knowledge base in the biomedical field. This layer includes a structured knowledge storage module for storing structured knowledge in the biomedical field, including structured data such as gene sequences, protein structures, metabolic pathways, and drug molecules. It also includes an unstructured document management module for managing unstructured documents in the biomedical field, including text data such as academic papers, textbooks, technical manuals, and experimental reports. Furthermore, it includes a knowledge graph construction module for building a knowledge graph in the biomedical field and establishing semantic associations between entities, relationships, and attributes. Finally, it includes a document chunking and vectorization module. This module employs a two-stage segmentation method based on a Markdown-based intelligent chunking strategy. For example, it first performs semantic segmentation at the title level, then recursively segments excessively long paragraphs at the character level, and finally converts document chunks into high-dimensional vector representations through an embedding model. This ensures that document chunks maintain semantic integrity while conforming to the input length limitations of the vector model. The biomedical knowledge layer effectively integrates knowledge in the biomedical field through the construction and management of multi-source heterogeneous knowledge bases, covering multiple sub-fields such as genes, proteins, metabolism, and drugs; and improves the computability of knowledge by establishing semantic associations of entities, relationships, and attributes through knowledge graph construction.
[0088] The vector retrieval layer enables efficient multimodal knowledge retrieval. This layer includes a vector database module, employing FAISS to build a high-performance vector index, supporting large-scale vector similarity searches. It also includes a multilingual retrieval module, supporting bilingual (Chinese and English) retrieval and enabling cross-language knowledge retrieval through a query translator, thus improving knowledge coverage. Furthermore, it includes a hybrid retrieval strategy module, combining the retrieval results of original and translated queries, and achieving more comprehensive knowledge retrieval through deduplication and merging algorithms. Finally, it includes a similarity calculation and filtering module, calculating the similarity between query vectors and document vectors based on cosine similarity or L2 distance (i.e., Euclidean distance), and filtering low-relevance documents according to preset thresholds.
[0089] The intelligent enhancement layer improves retrieval quality and generation effectiveness. This layer includes a query rewriting module, which intelligently rewrites user-input queries based on dialogue history context, enhancing the semantic expression and contextual relevance of the query. It also includes a hypothetical document embedding module, which generates hypothetical answers using a large language model and utilizes these hypothetical answers for vector retrieval, improving retrieval relevance and accuracy. Furthermore, it includes a document reordering module, which uses a cross-encoder model to precisely reorder the retrieved documents, selecting the most relevant documents based on query-document relevance scores. Finally, it includes a context construction module, which integrates the reordered documents into a structured knowledge context, providing high-quality knowledge input for the generation module.
[0090] As can be seen from the above, the intelligent response generation method provided in this application significantly improves the accuracy and relevance of retrieval through a multi-stage retrieval optimization strategy, combined with vector retrieval, hypothetical document embedding optimization, and cross-encoder reordering.
[0091] Step S330: In response to the retrieval call request, the knowledge retrieval module is used to retrieve the knowledge context, and the knowledge context is used as the call result.
[0092] In one embodiment of this application, based on a retrieval request, a knowledge retrieval module is used to obtain a knowledge context, including: translating query information into at least one other language using the knowledge retrieval module, denoted as the translated query information; and performing knowledge retrieval using the query information and the translated query information respectively to obtain the knowledge context.
[0093] The knowledge retrieval module employs a multilingual knowledge fusion mechanism. A query translator translates Chinese queries into English or English queries into Chinese, performs vector retrieval separately, and then merges the results to achieve cross-language knowledge retrieval. This solves the problem mentioned earlier where insufficient multilingual knowledge retrieval coverage prevented the full utilization of cross-language knowledge resources, thereby improving the comprehensiveness of knowledge coverage.
[0094] For example, this functionality can be achieved through the multilingual retrieval module and the hybrid retrieval strategy module of the vector retrieval layer.
[0095] Step S140: Generate query results based on the call result through the Agent large model module to respond to the query information.
[0096] In one embodiment of this application, when the query intent is professional question answering, the call result is the knowledge context obtained by calling the knowledge retrieval module. In this case, the Agent large model module can generate query results based on the knowledge context and query information (i.e., retrieval-enhanced generation). When the query intent is tool calling, the call result is the calculation result obtained by calling the tool execution module. In this case, the Agent large model module can integrate the calculation results to generate query results. When the query intent includes both professional question answering and tool calling, the call result includes both the knowledge context obtained by calling the knowledge retrieval module and the calculation result obtained by calling the tool execution module. In this case, the Agent large model module can integrate the query information, knowledge context, and calculation results to generate query results.
[0097] Specifically, the above functions can be achieved through the generation and optimization module of the Agent large model module.
[0098] For example, when the result of the call is the retrieved knowledge context, the generation optimization module can integrate the retrieved knowledge context with the user query to construct complete input information that includes historical dialogue, knowledge context and current query. Then, the Agent big model module generates the answer based on the Agent big model, and finally obtains the query result.
[0099] For example, when the result of the call is the calculation result obtained by the tool execution module, the generation optimization module can integrate the corresponding calculation results and use them directly as the query result; or it can use the calculation results as supplementary information, call the knowledge retrieval module again to perform knowledge retrieval, and finally generate the answer based on the knowledge context obtained from the knowledge retrieval, thus achieving a deep integration of professional question answering and calculation tasks.
[0100] For example, when the query result includes both knowledge context and calculation result, the generation optimization module can integrate the query information, knowledge context and calculation result to generate the query result, thereby realizing the deep integration of professional question answering and calculation task.
[0101] Furthermore, in one embodiment of this application, the Agent large model module may also include a quality assessment module, which uses multi-dimensional assessment metrics to continuously evaluate and optimize the performance of the intelligent response generation system executing the intelligent response generation method, so as to ensure the quality of the intelligent service. Specifically, the assessment metrics include context relevance, precision, recall, answer relevance, fidelity, and tool invocation accuracy, etc.
[0102] The aforementioned intelligent response generation method utilizes the Agent large-scale model module to parse user-input query information to identify their query intent. Based on this intent, it dynamically plans and executes invocation logic. This invocation logic includes scheduling and execution information for at least one knowledge retrieval module and / or at least one tool invocation module, thereby achieving organic synergy between knowledge retrieval and tool invocation. This solves the problem of fragmented intelligent retrieval and tool invocation and the lack of a unified scheduling mechanism in the biomedical field. Furthermore, the method integrates RAG knowledge retrieval functionality and professional algorithm tool invocation functionality into the Agent large-scale model module through the MCP tool invocation framework. This allows the module to intelligently select whether to use RAG for knowledge retrieval or invoke professional algorithm tools for computation based on user intent, achieving unified scheduling and collaborative operation of knowledge retrieval and tool invocation.
[0103] The above is an introduction to the intelligent response generation method provided in the embodiments of this application. This method can be used by... Figure 4 The intelligent response generation system shown is executed.
[0104] Figure 4 The diagram shown is a schematic diagram of an intelligent response generation system provided in an embodiment of this application. Figure 4 As shown, the system 400 includes: The human-computer interaction interface 410 is used to receive query information input by the user; The Agent large-scale model module 420 is used to identify the user's query intent based on the query information; based on the query intent, the Agent large-scale model module dynamically plans and executes the call logic to the knowledge retrieval module 430 and the tool invocation module 440 to obtain the call results; and generates query results based on the call results to respond to the query information. The knowledge retrieval module 430 is coupled to the Agent large model module and is used to perform knowledge retrieval in response to the Agent large model module's call to the knowledge retrieval module; The tool invocation module 440 is coupled to the Agent large model module based on a standardized tool invocation protocol, and is used to execute external tools in response to the Agent large model module's invocation of the tool invocation module.
[0105] Furthermore, as one implementation method, the Agent large model module 420 is also used to: if the query intent is professional question answering, call the knowledge retrieval module 430 and use the knowledge context obtained from calling the knowledge retrieval module as the call result; if the query intent is tool calling, call the tool calling module 440 and use the calculation result obtained from calling the tool calling module as the call result; if the query intent includes both professional question answering and tool calling, plan the calling order of the knowledge retrieval module 430 and the tool calling module 440, call the knowledge retrieval module 430 and the tool calling module 440 according to the planned calling order, and use the knowledge context obtained from calling the knowledge retrieval module and the calculation result obtained from calling the tool calling module as the call result.
[0106] Furthermore, as one implementation, when the Agent large model module 420 is used to call the tool calling module, the Agent large model module 420 is also used to: determine the external tools to be called and the execution order of the external tools to be called according to the query information; extract the calling parameters of each external tool to be called from the query information; send a tool calling request to the tool calling module through the Agent large model module based on the execution order and calling parameters; in response to the tool calling request, the tool calling module 440 is also used to execute each external tool to be called in sequence to obtain the calculation result, and return the calculation result to the Agent large model module 420 as the calling result.
[0107] Furthermore, as an implementation method, the tool invocation module 440 is also used to perform intelligent verification of the relevant information of the external tool to be invoked based on the pre-registered tool configuration information, wherein the intelligent verification includes at least one of automatic parameter verification, input file legality check, automatic output directory generation, task lifecycle management, and streaming progress push.
[0108] Furthermore, as one implementation method, during the execution of each external tool to be invoked, the tool invocation module 440 is also used to monitor the execution status of each external tool to be invoked in real time and send the execution status to the Agent large model module 420.
[0109] Furthermore, as one implementation, when the Agent large model module 420 calls the knowledge retrieval module 430, the Agent large model module 420 is also used to: generate a retrieval call request based on the query information, wherein the retrieval call request includes at least the query information; send the retrieval call request to the knowledge retrieval module; in response to the retrieval call request, the knowledge retrieval module 430 is also used to perform knowledge retrieval to obtain the knowledge context, and return the knowledge context as the call result to the Agent large model module 420.
[0110] Furthermore, as one implementation method, the knowledge retrieval module 430 is also used to: translate the query information into at least one other language, denoted as the translated query information; and perform knowledge retrieval using the query information and the translated query information respectively to obtain the knowledge context.
[0111] Furthermore, as one implementation, when the query intent is professional question answering, the call result is the knowledge context obtained by calling the knowledge retrieval module, and the Agent large model module 420 is also used to generate query results based on the knowledge context and query information; when the query intent is tool calling, the call result is the calculation result obtained by calling the tool calling module, and the Agent large model module 420 is also used to integrate the calculation result to generate query results; when the query intent includes both professional question answering and tool calling, the call result includes both the knowledge context obtained by calling the knowledge retrieval module and the calculation result obtained by calling the tool calling module, and the Agent large model module 420 is also used to integrate the query information, knowledge context, and calculation result to generate query results.
[0112] Furthermore, as one implementation method, the standardized tool invocation protocol is the model context protocol.
[0113] Furthermore, as one implementation method, the external tools include at least one of the following: protein sequence generation tools, protein-small molecule affinity prediction tools, molecular docking tools, biosynthetic pathway prediction tools, protein structure prediction tools, and end-to-end tools.
[0114] It should be understood that, for the sake of convenience and brevity, the specific working scenarios, processes, effects, and other details of each module in the above system 400 can be referred to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0115] This application also provides an electronic device. Figure 5 The diagram shown is a block diagram of an exemplary electronic device provided in an embodiment of this application. (Refer to...) Figure 5 The electronic device 500 includes a memory 510 and a processor 520. The memory 510 stores a computer program, and the processor 520 runs the computer program to enable the electronic device 500 to implement the intelligent response generation method provided in any of the foregoing embodiments.
[0116] Electronic device 500 may also include a power supply component configured to perform power management of electronic device 500, a wired or wireless network interface configured to connect electronic device 500 to a network, and an input / output (I / O) interface. Electronic device 500 can be operated based on an operating system stored in memory 510, such as Windows Server. TM Mac OSX TMUnix TM Linux TM FreeBSD TM Or similar.
[0117] Specifically, in one embodiment of this application, the electronic device can be replaced with an optical quantum computer, which executes the methods proposed in the embodiments of this application. An optical quantum computer is a quantum computing device that uses photons (light particles) as qubits for information processing.
[0118] A typical optical quantum computer mainly consists of a single-photon source, an optical quantum chip, and a detection system. The single-photon source generates high-quality single photons, which serve as the carriers of qubits, by exciting quantum dots with lasers or by spontaneous parametric down-conversion (SPDC). The optical quantum processor is composed of optical components such as optical fibers, waveguides, beam splitters, phase modulators, and mirrors to achieve optical transmission and logical operations (e.g., Hadamard gates or CNOT gates). The detection system measures the final state of the photons (e.g., polarization or path) and outputs the calculation results. For detailed descriptions of the specific processing procedures of an optical quantum computer, please refer to the relevant technical descriptions; they will not be elaborated upon here.
[0119] This application also provides a computer-readable storage medium storing a computer program thereon. When the computer program in the storage medium is executed by the processor 520 of the electronic device 500, the quantum computer 500 is able to implement the intelligent response generation method provided in any of the foregoing embodiments.
[0120] This application also provides a computer program product, which includes instructions that, when executed by the processor 520 of the electronic device 500, enable the electronic device 500 to implement the intelligent response generation method provided in any of the foregoing embodiments.
[0121] The prompting method in this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in this application are performed, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, network equipment, user equipment, core network equipment, OAM, or other programmable device.
[0122] The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM (Operational Information Management) system, or other programmable devices.
[0123] The computer program or instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions may be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium may be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; an optical medium, such as a digital video optical disc; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0124] It is understood that the specific examples provided in this application are only intended to help those skilled in the art better understand the embodiments of this application, and are not intended to limit the scope of the invention.
[0125] It is understood that the various embodiments described in this application can be implemented individually or in combination, and the embodiments of this application are not limited in this respect.
[0126] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this application includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0127] It is understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0128] It is understood that the memory in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Specifically, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0129] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0130] For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be indirect couplings or communication connections between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0131] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0132] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0133] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0134] The above description is merely a specific embodiment of this application, but the scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this invention should be determined by the scope of the claims.
Claims
1. A method for generating intelligent responses, the method being applied to an intelligent response generation system, the system comprising a human-computer interaction interface, an Agent large model module, a knowledge retrieval module, and a tool invocation module, the method comprising: The system receives query information input by the user through the human-computer interaction interface. The Agent large model module identifies the user's query intent based on the query information. Based on the query intent, the Agent large model module dynamically plans and executes the calling logic for the knowledge retrieval module and the tool calling module to obtain the calling result. The knowledge retrieval module is coupled to the Agent large model module and is used to perform knowledge retrieval based on the user query. The tool calling module is coupled to the Agent large model module based on a standardized tool calling protocol and is used to manage and call external tools. The Agent large model module generates query results based on the call result to respond to the query information.
2. The method according to claim 1, characterized in that, The step of dynamically planning and executing the calling logic of the knowledge retrieval module and the tool invocation module based on the query intent, to obtain the invocation result, includes: If the query intent is professional question and answer, then the knowledge retrieval module is called through the Agent big model module, and the knowledge context obtained by calling the knowledge retrieval module is used as the call result; If the query intent is a tool call, then the tool call module is called through the Agent large model module, and the calculation result obtained from calling the tool call module is used as the call result; If the query intent includes both the professional Q&A and the tool call, the calling order of the knowledge retrieval module and the tool call module is planned through the Agent large model module. The knowledge retrieval module and the tool call module are called in sequence according to the planned calling order, and the knowledge context obtained by calling the knowledge retrieval module and the calculation result obtained by calling the tool call module are used as the calling result.
3. The method according to claim 2, characterized in that, The step of calling the tool invocation module through the Agent large model module and using the calculation result obtained from calling the tool invocation module as the invocation result includes: The Agent large model module determines the external tools to be invoked and their execution order based on the query information. The Agent large model module extracts the calling parameters of each external tool to be invoked from the query information. Based on the execution order and the invocation parameters, the Agent large model module sends a tool invocation request to the tool invocation module. In response to the tool call request, the tool call module sequentially executes each of the external tools to be called to obtain the calculation results, and uses the calculation results as the call result.
4. The method according to claim 3, characterized in that, In response to the tool invocation request, the tool invocation module sequentially executes each of the external tools to be invoked to obtain the calculation results, including: The tool invocation module performs intelligent verification of the relevant information of the external tool to be invoked based on the pre-registered tool configuration information. The intelligent verification includes at least one of the following: automatic parameter verification, input file validity check, automatic output directory generation, task lifecycle management, and streaming progress push.
5. The method according to claim 3, characterized in that, In response to the tool invocation request, the tool invocation module sequentially executes each of the external tools to be invoked to obtain the calculation results, including: During the execution of each of the external tools to be invoked, the execution status of each external tool to be invoked is monitored in real time by the tool invocation module, and the execution status is sent to the Agent large model module.
6. The method according to claim 2, characterized in that, The step of calling the knowledge retrieval module through the Agent large model module and using the knowledge context obtained from the call to the knowledge retrieval module as the call result includes: The Agent large model module generates a retrieval request based on the query information, wherein the retrieval request includes at least the query information. The retrieval request is sent to the knowledge retrieval module through the Agent large model module; In response to the retrieval call request, the knowledge retrieval module performs a knowledge retrieval to obtain the knowledge context, and uses the knowledge context as the call result.
7. The method according to claim 6, characterized in that, The step of obtaining the knowledge context by performing knowledge retrieval through the knowledge retrieval module based on the retrieval call request includes: The knowledge retrieval module translates the query information into at least one other language, which is denoted as the translated query information. The knowledge context is obtained by using the query information and the translated query information respectively.
8. The method according to claim 1, characterized in that, The step of generating query results based on the call result to respond to the query information includes: When the query intent is professional question and answer, and the call result is the knowledge context obtained by calling the knowledge retrieval module, then generating the query result based on the call result to respond to the query information includes: generating the query result based on the knowledge context and the query information through the Agent big model module; When the query intent is a tool call, and the call result is the calculation result obtained by calling the tool call module, then generating query results based on the call result to respond to the query information includes: integrating the calculation results through the Agent large model module to generate the query results; When the query intent includes both the professional Q&A and the tool call, and the call result includes both the knowledge context obtained by calling the knowledge retrieval module and the calculation result obtained by calling the tool call module, then generating the query result based on the call result to respond to the query information includes: integrating the query information, the knowledge context, and the calculation result through the Agent large model module to generate the query result.
9. The method according to claim 1, characterized in that, The standardized tool invocation protocol is the model context protocol.
10. The method according to claim 1, characterized in that, The external tools include at least one of the following: protein sequence generation tools, protein-small molecule affinity prediction tools, molecular docking tools, biosynthetic pathway prediction tools, protein structure prediction tools, and end-to-end tools.
11. An intelligent response generation system, the system comprising: Human-computer interaction interface, used to receive query information input by the user; The Agent large model module is used to identify the user's query intent based on the query information; Based on the query intent, the Agent large model module dynamically plans and executes the calling logic for the knowledge retrieval module and the tool calling module to obtain the calling results; And generate query results based on the call result to respond to the query information, wherein, The knowledge retrieval module is coupled to the Agent large model module and is used to perform knowledge retrieval in response to the Agent large model module's call to the knowledge retrieval module; The tool invocation module is coupled to the Agent large model module based on a standardized tool invocation protocol, and is used to execute external tools in response to the Agent large model module's invocation of the tool invocation module.
12. An electronic device, characterized in that, include: Memory; A processor, wherein the memory is used to store a computer program, the processor running the computer program to cause the electronic device to perform the smart response generation method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the intelligent response generation method as described in any one of claims 1 to 10.