Implementation method, system and equipment of commercial intelligent system based on large model ReAct
Through the business intelligence system of the large-model ReAct paradigm and A2A/MCP protocol, the problem of rigid processes of the existing ChatBI platform is solved, independent decision-making and flexible business analysis are realized, and user experience and system adaptability are improved.
Patent Information
- Application Number
- CN202510875086.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-27
AI Technical Summary
The existing ChatBI platform has rigid processing processes, making it difficult to flexibly carry out dynamic task planning and independently make decisions to execute business analysis, the agent operates in isolation and is difficult to coordinate, and the hard-coded tool call method is poorly flexible.
The large-model ReAct paradigm is adopted, and the main agent receives query requests and guides the large language model LLM for circular reasoning, coordinates the functional agent and tool work together, uses the A2A and MCP protocols to achieve loose coupling, dynamically plan and analyze paths and generate decision results.
It realizes an independent decision-making business analysis system, improves user experience, the system has flexibility and scalability, and can quickly adapt to new business scenarios and data sources.
Smart Images

Figure CN120372068A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and particularly to a method, system and device for implementing a business intelligence system based on the large model ReAct. Background Art
[0002] Conversational Business Intelligence (Chat-based Business Intelligence, ChatBI) is an interactive analysis platform that combines Natural Language Processing (NLP) and Business Intelligence (BI).
[0003] Currently, the processing flow architecture of existing ChatBI platforms is as Figure 1 shown. It relies on a pre-set and relatively fixed processing flow to respond to query requests. The process is rather rigid and lacks flexible adaptability. Moreover, its working mode is mainly a single-agent service mode. The agents often operate in isolation. Each single agent has limited context information, which is prone to creating information barriers, and it is difficult to collaborate and lacks dynamism. In addition, the hard-coded tool invocation method adopted also has the problem of poor flexibility.
[0004] Based on this, there is an urgent need for a technical solution that can break the rigid fixed process and achieve dynamic and flexible autonomous decision-making business analysis in a business intelligence system. Summary of the Invention
[0005] To solve the above problems, embodiments of this application provide a method, system and device for implementing a business intelligence system based on the large model ReAct.
[0006] On the one hand, embodiments of this application provide a method for implementing a business intelligence system based on the large model ReAct. The method is applied to a ChatBI platform. The method includes: The main agent receives query request information from a user terminal and guides the large language model LLM to perform cyclic reasoning on the query request information according to a preset ReAct paradigm through a preset Prompt engineering. The cyclic reasoning process includes: Step 1: Thinking stage: Analyze the input information from the upstream task through the LLM and determine the to-be-executed actions corresponding to the downstream tasks. Wherein, the input information is the query request information or the inference action feedback result from Step 3. The to-be-executed actions include one or more action tasks obtained by task decomposition; Step 2: Action Phase: According to each action task corresponding to the action to be executed and its action task type, perform corresponding reasoning actions; wherein, the reasoning actions include at least one or more of the following: select and invoke one or more preset function agents in the function agent pool through a preset communication protocol group, select and invoke one or more preset calling tools in the preset tool set through a preset communication protocol group, or interact with the user to clarify; the preset communication protocol group includes the A2A protocol for communicating with the preset function agent and the MCP protocol for communicating with the preset calling tool; Step 3: Observation Phase: Receive the feedback result of the reasoning action and update the loop reasoning context, and determine whether to trigger the next round of loop reasoning until the preset loop termination condition is met, and obtain each decision analysis result corresponding to the query request information; Generate a query result based on each of the decision analysis results obtained from the loop reasoning and send it to the user terminal; wherein, the query result is a unimodal response result or a multimodal response result.
[0007] On the other hand, an implementation system of a business intelligence system based on the large model ReAct is also provided in an embodiment of the present application. The system is applied to the ChatBI platform; the system includes: A receiving and loop reasoning module, configured to receive, by the main agent, query request information from the user terminal, and guide the large language model LLM to perform loop reasoning on the query request information according to a preset ReAct paradigm through a preset Prompt engineering. The loop reasoning process includes: An analysis and determination sub-module, for Step 1: Thinking Phase: Analyze the input information from the upstream task through the LLM and determine the action to be executed corresponding to the downstream task; wherein, the input information is the query request information or the feedback result of the reasoning action from Step 3; the action to be executed includes one or more action tasks obtained by task decomposition; An execution sub-module, for Step 2: Action Phase: According to each action task corresponding to the action to be executed and its action task type, perform corresponding reasoning actions; wherein, the reasoning actions include at least one or more of the following: select and invoke one or more preset function agents in the function agent pool through a preset communication protocol group, select and invoke one or more preset calling tools in the preset tool set through a preset communication protocol group, or interact with the user to clarify; the preset communication protocol group includes the A2A protocol for communicating with the preset function agent and the MCP protocol for communicating with the preset calling tool; A receiving and determination sub-module, for Step 3: Observation Phase: Receive the feedback result of the reasoning action and update the loop reasoning context, and determine whether to trigger the next round of loop reasoning until the preset loop termination condition is met, and obtain each decision analysis result corresponding to the query request information; A generation module, configured to generate a query result based on each of the decision analysis results obtained through the cyclic reasoning and send the query result to the user terminal; wherein, the query result is a unimodal response result or a multimodal response result.
[0008] In another aspect, an implementation device of a business intelligence system based on the large model ReAct provided by an embodiment of the present application is applied to the ChatBI platform; the device 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 so that the at least one processor can execute an implementation method of a business intelligence system based on the large model ReAct as described above.
[0009] Compared with the prior art, the present application has the following remarkable effects: (1) Through the above technical solution, the present application integrates the ReAct paradigm, the A2A communication protocol, and the MCP tool call protocol to construct a new autonomous decision-making business analysis system architecture. With the large language model-driven main intelligent agent as the core, it coordinates multiple specialized functional intelligent agents and external tools to work together, realizing an end-to-end intelligent analysis process from understanding user intentions, dynamically planning analysis paths, autonomously invoking resources to integrating and presenting results. It solves the technical problem that the existing ChatBI platform has a rigid processing flow and is difficult to flexibly perform dynamic task planning and autonomously make decisions to execute business analysis, effectively improving the user experience of using the ChatBI platform.
[0010] (2) Through the standardized A2A and MCP protocols, the functional intelligent agents and tools achieve loose coupling. According to business requirements, it is convenient to add, delete, or replace functional intelligent agents and tools without large-scale modification of the system core. This "plug-and-play" feature enables the system to quickly adapt to new business scenarios, data sources, and analysis technologies, with extremely strong flexibility and scalability. Description of the Drawings
[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings: Figure 1 It is a schematic diagram of the processing flow architecture of an existing ChatBI platform in an embodiment of the present application; Figure 2 It is a schematic flowchart of an implementation method of a business intelligence system based on the large model ReAct in an embodiment of the present application; Figure 3 It is a schematic diagram of the processing flow architecture of a method for implementing a business intelligence system based on the large model ReAct in the implementation of this application; Figure 4 It is a timing diagram of agent registration and invocation of a method for implementing a business intelligence system based on the large model ReAct in an embodiment of this application; Figure 5 It is a timing diagram of the interaction between the main agent and the invoked tool of a method for implementing a business intelligence system based on the large model ReAct in an embodiment of this application; Figure 6 It is another schematic diagram of the process of a method for implementing a business intelligence system based on the large model ReAct in an embodiment of this application; Figure 7 It is a schematic diagram of the structure of a system for implementing a business intelligence system based on the large model ReAct in an embodiment of this application; Figure 8 It is a schematic diagram of the structure of a device for implementing a business intelligence system based on the large model ReAct in an embodiment of this application. Detailed implementation manners
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments of this application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.
[0013] Figure 1 It is a schematic diagram of the processing flow architecture of the existing ChatBI platform. Query represents the query request information input by the user. The existing ChatBI follows Figure 1 the following fixed process: receiving the user's question -> identifying the intention and entity -> (if the database is involved) generating an SQL statement -> executing the SQL -> obtaining data -> (optional) generating a chart -> returning the result. The process consists of a series of fixed nodes in series or with limited branches. The agents operate in isolation, and the integration of the system and tools usually adopts the hard-coded method.
[0014] Based on this, the embodiments of this application provide a method, system, and device for implementing a business intelligence system based on the large model ReAct to solve the technical problem that the processing flow of the existing ChatBI platform is rigid and it is difficult to flexibly perform dynamic task planning and autonomously make decisions to execute business analysis.
[0015] The following will describe the various embodiments of this application in detail with reference to the drawings.
[0016] An embodiment of the present application provides a method for implementing a business intelligence system based on the large model ReAct. This method is applied to the ChatBI platform, such as Figure 2 shown. This method may include steps S201 - S205: S201, the main agent receives query request information from the user terminal, and guides the large language model LLM to perform cyclic reasoning on the query request information according to the preset ReAct paradigm through the preset Prompt engineering.
[0017] It should be noted that the execution entity of the present application is the server, and the corresponding software product of the present application is deployed on the server. The server, as the execution entity of the method for implementing the business intelligence system based on the large model ReAct, is only an exemplary existence. The execution entity is not limited to the server. In actual use, a server cluster can also be used. The present application does not make specific limitations on this. Figure 3 This is a schematic diagram of the processing flow architecture of the ChatBI platform of the present application, including an input layer module (Messages), a core control layer module, an execution layer module, a tool layer, and an output layer module. The input layer module includes functional modules such as UserInput (user input), topic, and historical information. UserInput receives the original questions, instructions, or requirements of the user and is the "starting point" of the entire system; the topic classifies the user input preliminarily, identifies the core field of the conversation (such as "e-commerce analysis", "supply chain optimization"), and helps the system quickly match tools / agents; the historical information stores the context of multiple rounds of conversations (user questions, system answers, intermediate conclusions, etc.), which can be stored in the form of historical conversation vectors to solve the problem of "long conversation forgetting", and realizes the reuse of historical information in combination with the "memory module".
[0018] The core control layer module includes the ChatBI main agent, the state machine, and the memory module; the ChatBI main agent integrates user input, historical information, system roles (Roles) using a preset prompt engineering, and conducts agent collaboration to determine which tools (Tools), agents (Agents) to call and how to allocate tasks; the core driver of the main agent is based on a pre-trained large language model (Large Language Model, LLM), and the training samples are inference sample data of several query requests. The training samples are input into the LLM for training until the model output accuracy is greater than the preset threshold, or the Qwen332B model can be used, and this application does not make specific limitations in this regard. The state machine is used to manage the "life cycle state" of conversations and tasks to ensure the orderly progress of the process, such as waiting for input, analysis in progress, result output, abnormal interruption, etc. The memory module is used to implement hierarchical storage of "long-term memory + medium-term memory + short-term memory" to solve the problem of long conversation context management. Short-term memory: stores the immediate information of the current conversation turn (such as the user's latest question, temporary data returned by the tool); Medium-term memory: retains the key conclusions of recent conversations (such as "the main reason for the decline in Q1 sales is logistics costs") to support multi-round backtracking; Long-term memory: precipitates the general knowledge of historical conversations (such as industry analysis frameworks, common tool call logics) for model training or cross-scenario reuse.
[0019] The execution layer module (Agents) includes at least preset function agents such as table recall agent, NL2SQL agent, summary agent, and evaluation agent. The preset function agents can also include: user intention clarification agent, data schema understanding agent, complex query decomposition agent, data analysis and insight agent, result interpretation and summary agent, visualization suggestion and generation agent, which are specifically set by the user according to the actual usage scenario. The preset function agents communicate with each other through the A2A protocol. For example, the table recall agent can communicate with the entity extraction agent and the retrieval-augmented generation (RAG) retrieval agent.
[0020] The Tools layer includes each predefined calling tool in the predefined tool set, such as the RAG retrieval tool, and may also include other tools, such as the database connection and query execution tool: responsible for connecting to the database and executing SQL statements. The Code Executor: responsible for executing code snippets such as Python for complex data processing or calculations. The chart generation library API: encapsulates the interfaces of chart libraries such as Matplotlib, Plotly, ECharts, etc. The external knowledge base retrieval engine: used to query unstructured knowledge such as company documents and industry reports. The business rule engine: used to execute predefined business rules. The API calling tool: used to call enterprise internal or third-party API services.
[0021] Among them, the tools are standardizedly called through the unified MCP protocol. The main agent (or the authorized functional agent) can understand the ability description of the tools and generate call instructions that conform to the MCP specification. Each tool needs to provide a clear API interface definition (expected input parameters, parameter types, whether required, description) and output format (success / failure flag, returned data, error message). At the same time, according to the requirements of the MCP protocol, it is necessary to provide the metadata description of the tools so that the LLM can understand and use them.
[0022] The output layer module can include functions such as reverse clarification and outputting answers. When the user input is ambiguous or key information is missing, it actively asks for supplementary information, and integrates the conclusions of each agent to generate the final answer to be fed back to the user, supporting multimodal output (text, charts, voice, etc., which need to be extended in combination with other modules).
[0023] In the embodiment of this application, the structure of the above-mentioned predefined Prompt engineering at least includes the following predefined modules: role definition module, core instruction module, available resource module, functional agent list and description module, tool list and description module, database Schema / domain knowledge module, conversation history module, current user request module, output format requirement module, and dynamic information injection module.
[0024] Among them, role definition: Define the role of the LLM as an intelligent business analysis assistant. Core instructions: Clearly state that it is necessary to follow the ReAct paradigm (Think-Act-Observe) to solve user problems. Available resources: Define the available resources. List and description of functional agents: Agents that can be invoked through the A2A protocol and their capabilities. List and description of tools: Tools that can be invoked through the MCP protocol and their capabilities (as shown in the above example). Database Schema / Domain knowledge: Data structures or background knowledge related to the current analysis topic. Conversation history: The complete interaction record between the current user and the system. Current user request: The latest question asked by the user. Output format requirements: Require the LLM to clearly output the "Thought" process and the finally selected "Action" (which agent / tool to call, or what to reply to the user). Dynamic information injection: In each iteration, it is necessary to dynamically update the actions and observation results of the previous round into the Prompt to form a closed loop.
[0025] In an embodiment of the present application, after the main agent receives the query request information from the user terminal, it further includes: Match the user profile corresponding to the user terminal in the preset user profile database. Among them, the preset user profile database includes several user profiles constructed based on user behavior information. User behavior information at least includes: historical query behavior, concerned business metrics, common chart types, and role permissions. Add the matched user profile to the cyclic reasoning context to enable the LLM to perform cyclic reasoning matching the user profile.
[0026] That is to say, the server of the present application can also be connected to the preset user profile database to record the user profiles of the user terminals that have interacted historically. The user profile can contain user tags constructed based on user behavior information such as historical query behavior, concerned business metrics, common chart types, and role permissions, such as high-frequency financial analysis users, those who prefer bar charts. The user profile can be added to the cyclic reasoning context to adjust the response strategy of the LLM, so as to adjust to a personalized Prompt during the cyclic reasoning process.
[0027] Generally understood, by recording and analyzing information such as the user's historical query behavior, concerned business metrics, common chart types, department or role permissions, etc., a user profile is constructed. When making a ReAct decision, the main agent will refer to the profile information of the current user to provide more personalized services. For example, prioritize showing strategic-level KPI summaries for executive users, recommend more granular regional or product analyses for salespeople; recommend the common chart types preferred by the user according to their preferences.
[0028] In addition, the main agent of this application also has the ability to continuously learn and optimize its ReAct strategy. It can adjust the behavior of the LLM by collecting user feedback (such as likes / dislikes for the results, correction suggestions) or based on the final success / failure status of the task, using reinforcement learning techniques (such as Reinforcement Learning from Human Feedback (RLHF), or Reinforcement Learning (RL) based on task success signals). The goal of optimization is to enable it to make better reasoning judgments during the "thinking" stage and select more effective agent / tool call sequences during the "acting" stage.
[0029] Among them, for RLHF, human annotators are required to score or compare the thinking and action paths of the LLM. For RL based on task success, clear task success criteria need to be defined (such as the user is finally satisfied, the query result is accurate). The collected feedback data is used to update the parameters of the LLM (if fine-tuning is allowed) or to more finely adjust and optimize the Prompt template and strategy.
[0030] The cyclic reasoning process of this application includes the following three steps of S202 - S204, specifically as follows.
[0031] S202, Step 1: Thinking stage: Analyze the input information from the upstream task through the LLM and determine the actions to be executed corresponding to the downstream task.
[0032] Among them, the input information is the query request information or the reasoning action feedback result from Step 3. The actions to be executed include one or more action tasks obtained by task decomposition.
[0033] In the embodiment of this application, analyzing the input information from the upstream task through the LLM and determining the actions to be executed corresponding to the downstream task specifically includes: In the case where the input information is input into the LLM and it is determined that there are multiple action tasks, generate the corresponding subtask sequence. Among them, the subtask sequence is arranged according to the execution order of each action task. The execution order is determined by the LLM according to the input information. According to the subtask sequence, the function agent list and the function information of each agent in the description module, and the tool list and the function information of each tool in the description module, determine the action call sequence. Among them, the action call sequence includes the order of calling each preset function agent and / or each preset call tool that matches each action task according to the subtask sequence. According to the subtask sequence and the action call sequence, generate the actions to be executed corresponding to the acting stage.
[0034] That is to say, when "thinking" and executing according to the preset ReAct paradigm, the LLM can identify the action tasks required to execute the input information, so as to call agents or tools during the action phase, or let the user further supplement the description to clarify the query request. When the LLM identifies that the input information corresponds to multiple action tasks, the LLM can also analyze the execution order of the multiple action tasks at this time, so as to generate a subtask sequence, and generate an action call sequence for acting in the execution order according to the agent function information and tool function information. Thus, the actions to be executed are constructed by combining the two sequences. The upstream task can be step 3, or it can be a task triggered by the main agent or the user terminal.
[0035] In other words, for particularly complex analysis tasks, the main agent can not only select a single agent or tool, but can autonomously and dynamically plan and construct an execution chain composed of multiple agents and tools in a specific order. For example, first call NL2SQL, then execute the query, then call the data analysis agent, and finally call the visualization agent. The system can even dynamically adjust the composition of the subsequent chain according to the intermediate results. The LLM needs to have stronger task decomposition and planning capabilities in the "thinking" stage. This application needs to introduce more complex planning algorithms or utilize the multi-step reasoning ability of the LLM itself, and evaluate the complexity of the task, decompose it into subtasks, then match the most suitable agent or tool for each subtask, and determine their execution order and dependencies.
[0036] S203, Step 2: Action phase: According to each action task corresponding to the action to be executed and its action task type, execute the corresponding reasoning action.
[0037] Among them, the reasoning action includes at least one or more of the following: selecting and calling one or more preset functional agents in the functional agent pool through a preset communication protocol group, selecting and calling one or more preset calling tools in the preset tool set through a preset communication protocol group, or interacting with the user to clarify. The preset communication protocol group includes the A2A protocol for communicating with the preset functional agent and the MCP protocol for communicating with the preset calling tool.
[0038] In the action phase, the server can match the preset functional agent and / or preset calling tool to be used according to the action task type of the action task, the functional agent list and description module, and the tool list and description module, so as to execute the action task in turn. Or if it is necessary to interact with the user to clarify, continue to generate supplementary requirement information for the user to supplement the query request information.
[0039] The functional agent pool contains a group of relatively independent agents dedicated to executing specific subtasks. These agents can be configured according to specific business requirements, such as: User Intent Clarification Agent: Responsible for generating clarification questions when the user input is ambiguous. Data Schema Understanding Agent: Responsible for parsing and understanding metadata such as the table structure, field meanings, and association relationships in the database. NL2SQL Conversion Agent: Responsible for converting the user's natural language query into an accurate SQL statement. Data Retrieval and Recall Agent: Responsible for executing database queries or retrieving information from other data sources (such as knowledge bases, documents). Complex Query Decomposition Agent: Responsible for decomposing complex user requests into multiple executable subqueries or subtasks. Data Analysis and Insight Agent: Responsible for performing statistical analysis, trend prediction, anomaly detection, pattern recognition, etc. on the obtained data to mine potential insights. Result Interpretation and Summary Agent: Responsible for interpreting and summarizing the analysis results (data, charts) in natural language to make them more understandable. Visualization Recommendation and Generation Agent: Responsible for recommending appropriate visualization types based on data characteristics and user intent, and calling a chart library to generate charts.
[0040] Each pre-set functional agent interacts with the main agent or other functional agents through a unified A2A protocol. Each agent has a clear functional positioning, input (task description, data), and output (results, status). Its internal implementation can be rule-based, traditional machine learning models, small dedicated LLMs, or even calling external APIs. The key is that its interface follows the A2A protocol specification.
[0041] The pre-set toolset contains a set of external tools or services that can be called by the main agent or specific functional agents. These tools provide the ability to perform specific operations, such as: Database Connection and Query Execution Tool: Responsible for connecting to the database and executing SQL statements. Code Executor: Responsible for executing code snippets such as Python for complex data processing or calculations. Chart Generation Library Application Programming Interface (API): Encapsulates the interfaces of chart libraries such as Matplotlib, Plotly, ECharts, etc. External Knowledge Base Retrieval Engine: Used to query unstructured knowledge such as company documents and industry reports. Business Rule Engine: Used to execute predefined business rules. API Call Tool: Used to call enterprise internal or third-party API services.
[0042] The tool is standardized for invocation through the unified MCP protocol. The main agent (or the authorized functional agent) can understand the ability description of the tool and generate invocation instructions that conform to the MCP specification. Each tool needs to provide a clear API interface definition and output format. The API interface definition includes expected input parameters, parameter types, whether they are required, and descriptions. The output format includes success / failure flags, returned data, and error messages. At the same time, according to the requirements of the MCP protocol, metadata descriptions of the tool need to be provided so that the LLM can understand and use it.
[0043] In the embodiment of this application, the A2A protocol interface implementation defines the specific specifications for communication between agents. For example, message format: Usually in JSON format, including standard message headers (such as sender_agent_id, receiver_agent_id, message_id, timestamp, message_type (REQUEST, RESPONSE, NOTIFY)) and message bodies (task_description, payload, status_code, result). Interaction mode: Supports request / response mode (for task invocation), and possibly subscription / publish mode (for status updates or event notifications). Service registration and discovery (optional): A mechanism can be implemented to allow functional agents to register their capabilities with a central registry when starting up, facilitating dynamic discovery and selection by the main agent.
[0044] MCP protocol interface implementation: Defines the specific specifications for the interaction between the LLM and the tool. For example, tool description specification: Describes the name, function, input parameters (name, type, description, whether required), output format, possible error codes, etc. of the tool using natural language or a structured format (such as JSON Schema). These descriptions need to be injected into the Prompt of the main agent or queried through a specific mechanism. Invocation instruction format: Defines the structured instruction format (such as a specific JSON structure or function call syntax) that the LLM needs to generate for tool invocation. Result return format: Defines the standardized result format returned to the LLM after the tool execution, including execution status, data, and error messages.
[0045] In addition, the functional agent list and description module of this application includes an agent capability list generated after sending capability registration information to a preset registry based on each preset functional agent. Through the A2A protocol, the main agent can query the preset functional agent that matches the action to be executed through the agent capability list. Among them, the capability registration information at least includes the labels of each preset functional agent and the list of executable task types.
[0046] In other words, this application has a registry for agent registration. Figure 4The sequence diagram for agent registration and invocation is as follows Figure 4 As shown, Functional Agent A and Functional Agent B can send capability registration information, including registered capabilities (agent_id, task_list), to the Registration Center. The registration center can then generate a list of agent capabilities. When the Central Agent queries for available agents and capabilities during the thinking phase, the registration center returns a list of agents and capabilities to the Central Agent. Then, the Central Agent can perform a Request (task request) through the action to be executed, and the functional agent returns a Response (processing result / status). The agent can also actively perform a Notify (event reporting); the Central Agent performs a Notify (status broadcast) based on the event reporting to synchronize the events reported by the event-reporting agent. The Central Agent can select an agent based on capabilities.
[0047] Figure 5 The sequence diagram for the interaction between the Central Agent and the invoked tool under the MCP protocol is as follows Figure 5 As shown, the Central Decision-making Agent (LLM), which is the Central Agent, can generate a tool invocation instruction (JSON) and send it to the system MCP interface layer. The interface layer parses the instruction and invokes the tool (with parameters); after the tool executes, it returns a standard result (JSON), and the system MCP interface layer forwards the standardized result (JSON); the Central Agent parses the result and uses it in subsequent thinking.
[0048] S204, Step 3: Observation phase: Receive the feedback result of the reasoning action and update the loop reasoning context, and determine whether to trigger the next round of loop reasoning until the preset loop termination condition is met, obtaining each decision analysis result corresponding to the query request information.
[0049] The observation phase can accept the feedback result of the reasoning action from Step 3 above and update it to the loop reasoning context. At the same time, analyze whether the current result has answered the user's query request and determine whether the preset loop termination condition is met. If the preset loop termination condition is met, then the decision analysis results of each action task can be output.
[0050] The schematic diagram of the process of executing loop reasoning in this application according to the preset ReAct paradigm of "Think - Act - Observe" is as follows Figure 6 As shown, the process execution logic is described by examples: Step 1: User input reception and preliminary parsing The system receives the natural language business analysis request input by the user through a chat interface or other means.
[0051] The main agent initially understands the user input and may determine at this stage whether clarification is needed. If so, its first action may be to call the "User Intention Clarification Agent" or directly generate a clarification question, thus interacting with the user and receiving user feedback.
[0052] Step 2: Thinking The main agent enters the core thinking process. It comprehensively considers the following information: the clear intention of the current user question, the complete conversation history, the list of available functional agents and their ability descriptions, the available toolset and its ability descriptions, the relevant database Schema information or domain knowledge, the observation results of the previous action (if in an iterative loop), Subsequently, the LLM conducts reasoning and analysis. For example: evaluating whether the current information is sufficient to answer the question? Identifying the type (data query, attribution analysis, prediction, visualization, etc.) and complexity of the question. Judging whether further clarification of the user intention is needed? If no clarification is required, planning what the optimal next action is? Is it to call a certain agent to handle a subtask (such as NL2SQL conversion), directly call a certain tool (such as executing known SQL), or is task decomposition required? Subsequently: The main agent generates one or more candidate action plans internally and evaluates and selects the optimal one. This thinking process can explicitly output its reasoning steps by guiding the LLM through a specific Prompt.
[0053] Step 3: Acting The main agent executes the optimal action determined in the previous thinking step. The actions mainly include the following types: Action Type 1: Call a functional agent The main agent constructs a task request message according to the A2A protocol specification. The message includes the ID of the target agent, the task description (such as converting the following natural language into an SQL query), and the required data or context (such as the natural language question, relevant table structure information). The request is sent to the specified functional agent through the communication interface of the A2A protocol.
[0054] Action Type 2: Call a tool The main agent generates an instruction to call a specific tool according to the MCP protocol specification. The instruction includes the name of the tool and all required parameters (such as the database execution tool requires an SQL statement, and the chart generation tool requires data and chart configuration). The instruction is sent to the tool executor through the MCP communication interface.
[0055] Action Type 3: Interact with the user The main agent generates a natural language text. This text may be a clarification question for the user, a request to confirm intermediate results, a provision of interim conclusions or suggestions, etc. The text is presented to the user through the user interface.
[0056] Step 4: Observation The main agent waits for and receives the results from the executor of the previous action, i.e., the observation results. The sources and types of observation results are diverse: a) From functional agents: The task execution results returned through the A2A protocol (such as generated SQL statements, analysis reports, status codes).
[0057] b) From tools: The tool execution results returned through the MCP protocol (such as queried data tables, generated chart URLs, code execution outputs, success / failure status, error messages).
[0058] c) From the user: The user's answers to clarification questions, confirmations of intermediate results, or further instructions.
[0059] Step 5: Iterative Loop and Termination Conditions The main agent integrates the received observation results into the current knowledge state and conversation history, updating the loop reasoning context. Based on the new observation results, it returns to Step 2 above: Thinking, starting a new round of the ReAct loop. The LLM will evaluate whether the observation results meet the expectations, whether they solve some or all of the problems, and plan the next action accordingly.
[0060] Among them, the preset loop termination conditions include at least one or more of the following: Based on the query request information, the main agent determines that the solution evaluation value of the reasoning action feedback result after loop reasoning is greater than the preset termination threshold. The solution evaluation value includes at least the following dimension evaluation sub-values: information integrity, logical consistency, user intent; The number of iterations of loop reasoning is greater than the preset iteration number threshold; The main agent receives a termination instruction from the user terminal; Based on the functional agent pool and the preset tool set, the main agent determines that it cannot answer the query request information.
[0061] The above preset termination threshold and preset iteration number threshold can be set by the user according to the actual usage scenario and updated regularly according to expert experience. This application does not make specific limitations on this.
[0062] The preset loop termination condition can be generally understood as follows: The central decision-making agent determines that the user's question has been answered satisfactorily, the user clearly expresses satisfaction or ends the conversation, reaches the preset maximum number of iterations or resource limits (to prevent infinite loops), or the central decision-making agent determines that the problem cannot be continued to be solved based on the existing information and capabilities, and explains the situation to the user.
[0063] S205. Generate a query result based on each decision analysis result obtained through loop reasoning and send it to the user terminal.
[0064] Among them, the query result is a unimodal response result or a multimodal response result.
[0065] In this application, when the ReAct loop terminates and the problem is considered solved, the main agent is responsible for integrating the key information in the entire analysis process. It may call the "Result Interpretation and Summary Agent" to convert technical analysis results (such as data tables) into easy-to-understand natural language summaries. It may call the "Visualization Recommendation and Generation Agent" to present the data in a suitable chart form. Finally, the system presents a complete unimodal response result or multimodal response result that may include one or more of the following forms to the user. The forms include: text explanation, structured data, and charts.
[0066] In an embodiment of this application, after performing loop reasoning, the method further includes: Determine the key information of the historical conversation with the user terminal, and encode the key information of the historical conversation into a historical conversation vector to construct a loop reasoning context based on the historical conversation vector.
[0067] That is to say, this application overcomes the problem of context forgetting that may occur when the LLM processes ultra-long conversations. It introduces more advanced dialogue history management technology, vectorized memory: embeds the key information of the historical conversation (user questions, AI answers, important observation results) into the vector space, generates a historical conversation vector, performs similarity retrieval when needed, and injects the most relevant historical information into the current Prompt. Among them, this application can design storage strategies such as KV cache, parameterized memory, and context memory, design short-term and long-term memory retrieval strategies, design compression strategies such as KVzip technology compression strategy and memory reduction graph compression strategy, and design effective memory storage, retrieval, and compression strategies to ensure that in multi-round complex analysis conversations, the central decision-making agent can always access relevant and necessary context information, so as to make coherent and accurate decisions. The specific memory storage, retrieval, and compression strategies can be set by the user according to the actual usage scenario, and this application does not make specific limitations here.
[0068] Meanwhile, the design summary network of this application collaborates to achieve context memory. It can use an auxiliary model or the LLM itself to periodically perform rolling summaries of the conversation history, retain core information, and reduce the length of the Prompt.
[0069] In addition, this application also has an active insight discovery and warning mechanism. Specifically: during the analysis process or background monitoring of this application, it actively discovers potential business opportunities, risk points, abnormal patterns, or key trend changes in the data, and actively pushes them to relevant users in an appropriate manner (such as notifications, suggestions, warnings).
[0070] This application can pre-define in the agent what is a "valuable insight" or an "abnormality requiring warning" (possibly based on rules, statistical thresholds, or machine learning models); it can design a dedicated "insight discovery agent" or "anomaly detection agent", which can be called by the main agent at an appropriate time, or let these agents run continuously in the background. This application does not make specific limitations on this.
[0071] Furthermore, to enhance the system's ability to handle user input errors or unreasonable requests, when the server recognizes that the user's question may have logical contradictions, does not match the currently selected analysis topic / dataset, or is clearly beyond the system's capabilities, the system not only simply reports an error or asks a rhetorical question, but can provide more constructive feedback and guidance. Specifically, for example, when a user suddenly asks about "employee turnover rate" during a conversation about "sales data", the system can recognize the topic switch and intelligently prompt the user: "Your question seems to be different from the current sales analysis topic. Do you want to switch to the human resources analysis topic?" Or, if the user's query conditions are too strict and no data is available, the system can try to relax some conditions and give suggestions. This can be specifically achieved by training the LLM or setting up agents. This application does not make specific limitations on this.
[0072] Through the above technical solutions, this application integrates the ReAct paradigm, A2A communication protocol, and MCP tool call protocol to build a brand-new autonomous decision-making commercial analysis system architecture. With the large language model-driven main agent as the core, it coordinates multiple specialized functional agents and external tools to work together, realizing an end-to-end intelligent analysis process from understanding user intentions, dynamically planning analysis paths, autonomously invoking resources to integrating and presenting results. It solves the technical problem that the existing ChatBI platform has a rigid processing process and is difficult to flexibly perform dynamic task planning and autonomously make decisions to execute commercial analysis, effectively improving the user experience of the ChatBI platform.
[0073] In addition, through the standardized A2A and MCP protocols, the functional agents and tools are loosely coupled. Functional agents and tools can be conveniently added, deleted, or replaced according to business requirements without large-scale modification of the system core. This "plug-and-play" feature enables the system to quickly adapt to new business scenarios, data sources, and analysis technologies, with extremely strong flexibility and scalability.
[0074] To further illustrate the implementation method of the business intelligence system based on the large model ReAct in this application, the application also provides the following two embodiments, which are as follows.
[0075] Embodiment 1: Process a typical query request information for database query and visualization.
[0076] Suppose the user inputs: Help me query the total sales amount of all products in the East China region in the last quarter (assumed to be Q1 in 2025) and generate a bar chart by product category. The system database contains a sales_records table (fields: order_id, product_id, product_category, sales_amount, order_date, region).
[0077] Detailed steps User input reception: The main agent (LLM) receives the user query request information.
[0078] Thought 1: LLM analyzes the request: The intention is to query aggregated data (total sales amount) and perform visualization.
[0079] Identify key information: Time = "Q1 in 2025", Location = "East China region", Indicator = "Total sales amount", Grouping dimension = "Product category", Chart type = "Bar chart".
[0080] Judge information sufficiency: Basically sufficient, and data query can be directly performed.
[0081] Plan the action: First, natural language needs to be converted into SQL, then SQL is executed to obtain data, and finally a chart is generated based on the data. The optimal action is to call the NL2SQL agent.
[0082] Action 1: Call the NL2SQL agent The main agent constructs an A2A request message: receiver_agent_id: "nl2sql_agent" task_name: "convert_nl_to_sql" parameters: {natural_language_query: "Query the total sales amount by product category in the East China region in Q1 of 2025", database_schema: {...sales_records table structure...}}。
[0083] Send a request through the A2A interface.
[0084] Observation 1: Receive the NL2SQL result The NL2SQL agent processes the request and generates an SQL statement.
[0085] Return a response message through A2A: status_code: 200 result: { sql_query: "SELECT product_category, SUM(sales_amount) as total_sales FROM sales_records WHERE order_date >= '2025-01-01' AND order_date < '2025-04-01' AND region = 'East China region' GROUP BY product_category"}。
[0086] Thought 2: The LLM receives the SQL statement.
[0087] Evaluate the SQL: The statement seems reasonable and meets the user's intention.
[0088] Plan the action: The next step is to execute this SQL statement. The optimal action is to call the database execution tool.
[0089] Action 2: Call the database execution tool The main agent constructs an MCP call instruction: tool_name: "database_executor" arguments: { query: "SELECT product_category, SUM(sales_amount) as total_sales FROM sales_records WHERE..."}。
[0090] Send the instruction through the MCP interface.
[0091] Observation 2: Receive the database execution result The database execution tool connects to the database and executes SQL.
[0092] Returns the result through MCP: status: "success" result: { data: [ {"product_category": "Electronics", "total_sales":150000}, {"product_category": "Clothing", "total_sales": 80000}, ... ], error_message: null}.
[0093] Thought 3: The LLM receives the query result data.
[0094] Judge the status: The data has been successfully obtained.
[0095] Plan the action: The user requests to generate a bar chart. The chart generation tool needs to be called. The optimal action is to call the chart generation tool.
[0096] Action 3: Call the chart generation tool The main agent constructs the MCP call instruction: tool_name: "chart_generator" arguments: { data: [ {"product_category": "Electronics", ...}, ... ],chart_type: "bar", x_axis: "product_category", y_axis: "total_sales", title:"Sales of Each Product Category in the East China Region in Q1 2025"}.
[0097] Send the instruction through the MCP interface.
[0098] Observation 3: Receive the chart generation result The chart generation tool calls the underlying library (such as Plotly) to generate the chart.
[0099] Returns the result through MCP: status: "success" result: { chart_url: "http: / / internal-charts.com / chart-uuid-xyz.png",error_message: null} / / Or return the chart object itself.
[0100] Thought 4: The LLM receives the chart URL.
[0101] Judge the status: Both data query and chart generation are completed.
[0102] Plan the action: The task is basically completed, and the results (text summary and chart) need to be integrated and presented to the user. The result interpretation agent can be called, or the main agent can directly organize the language by itself. Assume direct organization.
[0103] Action 4: Reply to the user The main agent generates the final reply: "According to your query, the distribution of the total sales in the East China region in the first quarter of 2025 by product category is as follows:\n[Embed or link to the chart chart_url]\nThe sales of the main categories are: 150,000 yuan for electronic products, 80,000 yuan for clothing...". The reply is presented to the user through the user interface.
[0104] Termination: The ReAct loop ends and the task is completed.
[0105] This embodiment illustrates: It shows how the system completes a composite request including query and visualization by sequentially calling the NL2SQL agent (A2A), the database execution tool (MCP), and the chart generation tool (MCP) through the ReAct loop. Each link reflects the process of "thinking - acting - observing". The A2A and MCP protocols play the role of standardized interfaces. The main agent (LLM) drives the whole process through its reasoning and planning capabilities. The LLM has stronger metacognitive capabilities and dialogue strategies.
[0106] Embodiment 2: Handling a complex analysis request that requires clarification and multi-round interaction Suppose the user input is: "Why has our company's profit decreased recently?" This is a typical open-ended attribution analysis question.
[0107] Detailed steps Request received by the user: The main agent receives the request.
[0108] Thought 1: LLM analyzes the request: The intention is to find out the reasons for the profit decrease.
[0109] Identify the problem: The problem is very open-ended. The time range of "recently" is not clear, the profit indicator is not clear (gross profit? net profit?), the "decrease" requires a comparison benchmark, and the "reasons" may involve multiple aspects such as revenue, cost, and expenses.
[0110] Judging information sufficiency: Seriously insufficient, clarification is necessary.
[0111] Planning actions: Need to ask the user questions to clarify the analysis scope. The optimal action is to call the user intention clarification agent or directly generate clarification questions. Assume direct generation.
[0112] Action 1: Reply to the user (clarification) The main agent generates clarification questions: "Which specific time period's profit are you concerned about (e.g., last month, last quarter)? Compared with which period (e.g., compared with the last cycle, or compared with the same period last year)? Also, do you mean the overall net profit of the company?" Send the questions through the user interface.
[0113] Observation 1: Receive the user's reply User reply: "It refers to the overall net profit of the company last month, compared with the month before last." Thinking 2: The LLM receives the user's reply and updates the context: Time = last month, Metric = overall net profit, Comparison period = the month before last.
[0114] Analysis task: Need to obtain the net profit data of last month and the month before last, make a comparison, and try to find the main driving factors for the decline (change in revenue? change in cost? change in expenses?).
[0115] Planning actions: Action a: Obtain the revenue data of last month and the month before last.
[0116] Action b: Obtain the cost data of last month and the month before last (such as cost of sales, operating cost).
[0117] Action c: Obtain the expense data of last month and the month before last (such as administrative expenses, selling expenses).
[0118] Action d: Calculate the net profit and make a comparison.
[0119] Action e: (Optional) Call the data analysis agent for attribution analysis.
[0120] Select the optimal action sequence: First obtain the data. Can call the data retrieval related agents / tools in parallel or serially. Assume obtaining the revenue and cost data first. The optimal action is to call the NL2SQL agent to generate the query statement and then call the database tool to execute.
[0121] Action 2: Call the NL2SQL agent (obtain revenue and cost) The main agent constructs an A2A request to generate an SQL querying the total revenue and total cost of last month and the month before last.
[0122] Observation 2: Receive SQL statement The NL2SQL agent returns the corresponding SQL statement.
[0123] Action 3: Invoke the database execution tool The main agent constructs an MCP instruction to execute the above SQL.
[0124] Observation 3: Receive revenue and cost data The database tool returns the revenue and cost data for the last month and the month before last.
[0125] Thought 3: The LLM receives the data.
[0126] Analyze the data: It is found that the revenue decreased slightly last month, but the cost increased significantly.
[0127] Judgment: The increase in cost may be the main reason for the decrease in profit. It is necessary to further explore the specific components of the cost increase.
[0128] Plan of action: It is necessary to obtain the detailed component data of the cost (such as raw material cost, labor cost, etc.), or directly invoke the data analysis agent to conduct a more in-depth analysis of the existing data. Assume that the data analysis agent is selected for invocation.
[0129] Action 4: Invoke the data analysis and insight agent The main agent constructs an A2A request: receiver_agent_id: "data_analyzer" task_name: "analyze_profit_change" parameters: { current_period_data: {... revenue and cost of last month...}, previous_period_data: {... revenue and cost of the month before last...}, analysis_focus: "identify drivers for profit drop"}.
[0130] Observation 4: Receive the analysis report The data analysis agent performs calculations and analyzes (it may also invoke other tools or models internally).
[0131] Return the analysis report via A2A: "The net profit decreased from 5 million in the month before last to 3 million last month. The main reason is that the cost of goods sold increased significantly by 1.5 million, of which the increase in raw material procurement cost is the main factor (contributing approximately 1.2 million in increment). The sales revenue decreased slightly by 0.5 million." Thought 4: The LLM received the analysis report.
[0132] Judgment status: The main direct cause of the profit decline has been found (the increase in raw material costs).
[0133] Action plan: This preliminary conclusion can be presented to the user and they can be asked whether they need further analysis of the specific reasons for the increase in raw material costs (such as which materials have increased in price, supplier issues, etc.).
[0134] Action 5: Reply to the user (provide the preliminary conclusion and ask) The main agent generates a reply: "We analyzed and found that the main reason for the decline in the company's overall net profit last month compared to the month before last was a significant increase in the cost of sales, especially the raw material procurement cost increased by approximately 1.2 million yuan. Do you want to continue to dig deeper into which raw material costs have increased?" ...(Based on the user's subsequent feedback, continue the ReAct loop)... If the user wants to continue to dig deeper, the system will plan new actions, such as querying more granular procurement data, calling agents or tools related to supplier analysis, etc.
[0135] Final termination: When the user is satisfied or the system determines that no further analysis is possible, the loop ends and a final analysis summary report is provided.
[0136] Illustration of this embodiment: It shows how the system processes complex analysis requests that are open-ended and require multi-round interaction.
[0137] Highlights the iterative nature of the ReAct paradigm: By repeatedly clarifying with the user and gradually invoking and observing the results of internal agents / tools, it continuously approaches the answer to the question. It demonstrates the core role of the main agent in task decomposition, information evaluation, and dynamic planning. It shows the collaborative work among different functional agents (clarification, NL2SQL, data analysis).
[0138] In addition, in the main agent selection strategy: In the "thinking" stage, when there are multiple available agents or tools that can perform similar tasks, the LLM's selection strategy can be based on the following four strategies: Matching degree of ability description: Select the one with the description that best matches the current subtask requirements. Historical success rate: Prioritize the one with a high success rate in performing similar tasks in the past. Execution cost / speed: When the effects are similar, select the one that is faster or consumes fewer resources. Context dependence: Consider the current conversation state and select the one that can best utilize the context information.
[0139] These strategies can be optimized by setting priority rules in the Prompt or through reinforcement learning. For the transfer of complex data structures, when transferring complex data (such as multi-dimensional data cubes, analysis reports containing text and charts) between agents (through A2A) or between tools and the LLM (through MCP), a standardized format that is easy to serialize and deserialize, such as JSON, should be adopted. For large data, consider transferring references to the data (such as storage paths or IDs), and let the recipient obtain it as needed to avoid transferring too much content in the message body.
[0140] Figure 7 FIG. is a schematic structural diagram of an implementation system of a business intelligence system based on the large model ReAct provided by an embodiment of the present application. As Figure 7 shown, this system adopts the above-mentioned implementation method of a business intelligence system based on the large model ReAct, and the system is applied to the ChatBI platform. The implementation system 700 of the business intelligence system based on the large model ReAct includes: A receiving and cyclic reasoning module 701, configured to receive, by the main agent, query request information from a user terminal, and guide a large language model LLM to perform cyclic reasoning on the query request information according to a preset ReAct paradigm through a preset Prompt engineering. The cyclic reasoning process includes: An analysis and determination sub-module 7011, configured to perform step 1: thinking stage: analyze, by the LLM, input information from an upstream task and determine an action to be executed corresponding to a downstream task. Wherein, the input information is query request information or an inference action feedback result from step 3. The action to be executed includes one or more action tasks obtained by task decomposition.
[0141] An execution sub-module 7012, configured to perform step 2: action stage: execute corresponding inference actions according to each action task corresponding to the action to be executed and its action task type. Wherein, the inference actions include at least one or more of the following: select and call one or more preset functional agents in a functional agent pool through a preset communication protocol group, select and call one or more preset call tools in a preset tool set through a preset communication protocol group, or interact with the user to clarify. The preset communication protocol group includes an A2A protocol for communicating with a preset functional agent and an MCP protocol for communicating with a preset call tool.
[0142] A receiving and determination sub-module 7013, configured to perform step 3: observation stage: receive an inference action feedback result and update the cyclic reasoning context, and determine whether to trigger the next round of cyclic reasoning until a preset cyclic termination condition is met, to obtain each decision analysis result corresponding to the query request information.
[0143] A generation module 702 is configured to generate a query result based on each decision analysis result obtained through cyclic reasoning and send the query result to a user terminal. The query result is a unimodal response result or a multimodal response result.
[0144] Figure 8 FIG. is a schematic structural diagram of an implementation device of a business intelligence system based on the large model ReAct provided by an embodiment of the present application. The device is applied to the ChatBI platform. As Figure 8 shown, the device includes: At least one processor. And a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor. When the instructions are executed by the at least one processor, the at least one processor is enabled to execute an implementation method of a business intelligence system based on the large model ReAct as described above.
[0145] Each embodiment in the present application is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiments.
[0146] The systems and devices provided by the embodiments of the present application correspond one-to-one to the methods. Therefore, the systems and devices also have beneficial technical effects similar to those of the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the systems and devices will not be elaborated here.
[0147] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, commodity or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity or device including the said element.
[0148] The above are only the embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various modifications and changes can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. An implementation method of a business intelligence system based on the large model ReAct, characterized in that The method is applied to the ChatBI platform; the method includes: The main agent receives query request information from the user terminal, and guides the large language model (LLM) to perform cyclic reasoning on the query request information according to a preset ReAct paradigm through a preset Prompt engineering. The cyclic reasoning process includes: Step 1: Thinking stage: Analyze the input information from the upstream task through the LLM and determine the to-be-executed actions corresponding to the downstream task; wherein, the input information is the query request information or the reasoning action feedback result from Step 3; the to-be-executed actions include one or more action tasks obtained by task decomposition. Step 2: Action stage: Execute corresponding reasoning actions according to each action task corresponding to the to-be-executed action and its action task type; wherein, the reasoning actions at least include one or more of the following: Select and call one or more preset functional agents in the functional agent pool through a preset communication protocol group, select and call one or more preset call tools in the preset tool set through a preset communication protocol group, or interact with the user to clarify; the preset communication protocol group includes the A2A protocol for communicating with the preset functional agent and the MCP protocol for communicating with the preset call tool. Step 3: Observation stage: Receive the reasoning action feedback result and update the cyclic reasoning context, and determine whether to trigger the next round of cyclic reasoning until the preset cyclic termination condition is met, and obtain each decision analysis result corresponding to the query request information. Generate a query result based on each decision analysis result obtained from the cyclic reasoning and send it to the user terminal; wherein, the query result is a unimodal response result or a multimodal response result.
2. The implementation method of a business intelligence system based on the large model ReAct according to claim 1, wherein, The preset Prompt engineering at least includes the following predefined modules: Role definition module, Core instruction module, Available resource module, Functional agent list and description module, Tool list and description module, Database Schema / Domain knowledge module, Conversation history module, Current user request module, Output format requirement module, and Dynamic information injection module.
3. The implementation method of a business intelligence system based on the large model ReAct according to claim 1, wherein, Analyze the input information from the upstream task through the LLM and determine the to-be-executed actions corresponding to the downstream task, specifically including: In the case that the input information is input into the LLM and it is determined that there are multiple action tasks in the input information, generate a corresponding subtask sequence; wherein, the subtask sequence is arranged according to the execution order of each action task; the execution order is determined by the LLM according to the input information. Determine an action call sequence according to the subtask sequence, each agent function information in the functional agent list and description module, and each tool function information in the tool list and description module; wherein, the action call sequence includes the order of calling each preset functional agent and / or each preset call tool that matches each action task according to the subtask sequence. Generate the to-be-executed action corresponding to the action stage according to the subtask sequence and the action call sequence.
4. The implementation method of a business intelligence system based on the large model ReAct according to claim 2, characterized in that, The functional agent list and description module includes an agent capability list generated after sending capability registration information of each of the preset functional agents to a preset registration center, so that the main agent can query the preset functional agents matching the to-be-executed action through the agent capability list; wherein, the capability registration information at least includes tags of each of the preset functional agents and a list of executable task types.
5. The implementation method of a business intelligence system based on the large model ReAct according to claim 1, characterized in that, After performing iterative reasoning, the method further includes: Determining historical dialogue key information of the user terminal, and encoding the historical dialogue key information into a historical dialogue vector to construct the iterative reasoning context according to the historical dialogue vector.
6. The implementation method of a business intelligence system based on the large model ReAct according to claim 1, characterized in that, After the main agent receives query request information from the user terminal, the method further includes: Matching a user profile corresponding to the user terminal in a preset user profile database; wherein, the preset user profile database includes a plurality of user profiles constructed based on user behavior information; the user behavior information at least includes: historical query behavior, concerned business metrics, common chart types, and role permissions. Adding the matched user profile to the iterative reasoning context, so that the LLM performs iterative reasoning matching the user profile.
7. The implementation method of a business intelligence system based on the large model ReAct according to claim 1, characterized in that, The preset loop termination condition at least includes one or more of the following: The main agent determines, according to the query request information, that the solution evaluation value of the reasoning action feedback result after iterative reasoning is greater than a preset termination threshold; the solution evaluation value at least includes the following dimension evaluation sub-values: information integrity, logical consistency, and user intent. The number of iterations of the iterative reasoning is greater than a preset iteration number threshold. The main agent receives a termination instruction from the user terminal. The main agent determines, according to the functional agent pool and the preset tool set, that the query request information cannot be answered.
8. The implementation method of a business intelligence system based on the large model ReAct according to claim 1, characterized in that, The preset functional agents at least include one of the following: user intent clarification agent, data schema understanding agent, NL2SQL agent, complex query decomposition agent, data analysis and insight agent, result interpretation and summary agent, visualization suggestion and generation agent; each of the preset functional agents communicates through the A2A protocol.
9. An implementation system of a business intelligence system based on the large model ReAct, characterized in that, The system is applied to the ChatBI platform; the system includes: A receiving and iterative reasoning module, configured to receive, by the main agent, query request information from the user terminal, and guide a large language model LLM to perform iterative reasoning on the query request information according to a preset ReAct paradigm through a preset Prompt engineering, and the iterative reasoning process includes: An analysis and determination sub-module, for step 1: the thinking stage: analyzing, by the LLM, input information from an upstream task and determining a to-be-executed action corresponding to a downstream task; wherein, the input information is the query request information or the reasoning action feedback result from step 3; the to-be-executed action includes one or more action tasks obtained by task decomposition. An execution sub-module, for step 2: Action phase: According to each action task corresponding to the action to be executed and its action task type, perform corresponding reasoning actions; wherein, the reasoning actions include at least one or more of the following: Select and call one or more preset function agents in the function agent pool through a preset communication protocol group, select and call one or more preset calling tools in a preset tool set through a preset communication protocol group, or interact with the user to clarify; the preset communication protocol group includes an A2A protocol for communicating with the preset function agent and an MCP protocol for communicating with the preset calling tool. A receiving and determining sub-module, for step 3: Observation phase: Receive the feedback result of the reasoning action and update the loop reasoning context, and determine whether to trigger the next round of loop reasoning until the preset loop termination condition is met, to obtain each decision analysis result corresponding to the query request information. A generation module, for generating a query result based on each of the decision analysis results obtained from the loop reasoning and sending it to the user terminal; wherein, the query result is a unimodal response result or a multimodal response result.
10. An implementation device of a business intelligence system based on the large model ReAct, characterized in that, The device is applied to the ChatBI platform; the device 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 so that the at least one processor can execute a method for implementing a business intelligence system based on the large model ReAct as described in any one of claims 1-8 above.
Citation Information
Patent Citations
Data security analysis method based on large language model and defense algorithm
CN119203231A
Data security analysis method based on large language model
CN119203232A
End-side large model intelligent task optimization method and device based on graph attention network
CN119250113A
Method for training and evaluating large model in field of table data analysis
CN119415641A
Question and answer method based on thinking chain and intelligent agent and ChatBI system
CN120012760A
Cited By
Generation method and system of task execution engine, electronic equipment and program product
CN120687264A
Task execution engine generation method, system, electronic device, and program product
CN120687264B
Real-time reinforcement learning large language model interaction method and system based on model context protocol
CN120688645A
A real-time reinforcement learning large language model interaction method and system based on a model context protocol
CN120688645B
Financial analysis system and method integrating multi-tool calling
CN120743965A