LLM-based multi-agent financial analysis collaboration method
By constructing a multi-agent collaborative architecture and adopting a large language model and a two-level hierarchical team mechanism, the problem of insufficient agent collaboration in existing technologies is solved, and the automation and efficient decision support for complex financial analysis tasks are realized.
Patent Information
- Application Number
- CN202511911779.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies cannot effectively integrate the capabilities of multiple intelligent agents, lack coordination and flexibility, struggle to handle complex financial analysis tasks, and lack effective task decomposition and iterative optimization mechanisms, resulting in low analysis efficiency.
A multi-agent collaborative architecture based on a large language model is constructed. The general manager agent is used to understand requirements and decompose tasks. A two-level hierarchical collaborative mechanism is adopted to form first-level and second-level agent teams. By combining semantic similarity matching and metadata configuration files, the automatic decomposition and accurate allocation of tasks are realized, and optimization is carried out through an observation-reflection-iteration loop mechanism.
It automates and automates complex financial analysis tasks, improves the depth and efficiency of analysis, enhances the accuracy and reliability of results, and supports efficient end-to-end decision support.
Smart Images

Figure CN122023012A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a multi-agent collaborative financial analysis method based on LLM. Background Technology
[0002] In the financial sector, with the increasing complexity of markets and the continuous growth of data volume, traditional financial analysis methods face numerous challenges. Traditional financial analysis relies heavily on manual operations, requiring analysts to spend significant time collecting data, performing complex calculations and analyses, and writing reports. This method is not only inefficient but also susceptible to human factors, leading to insufficient accuracy and reliability of the analysis results. In recent years, the development of artificial intelligence technology, especially the application of Large Language Models (LLM), has brought new opportunities to financial analysis. LLM, with its powerful natural language processing capabilities, can quickly understand and generate text, providing a new technical means for financial analysis. However, existing financial analysis methods based on LLM mostly remain at the application of a single model, lacking synergy and flexibility. These methods typically can only handle simple financial analysis tasks and often fail to provide comprehensive and in-depth solutions for complex financial problems. Furthermore, existing technologies often lack effective task decomposition and team collaboration mechanisms when handling financial analysis tasks, resulting in inefficient analysis processes and failing to fully realize the potential of LLM.
[0003] In implementing the embodiments of the present invention, the prior art has at least the following problems or defects: the prior art cannot effectively integrate the capabilities of multiple intelligent agents, the accuracy and stability of the output of a single intelligent agent need to be improved and there is a lack of a refined collaborative mechanism, resulting in low analysis efficiency; the prior art usually adopts a flat task allocation mechanism when coordinating multiple intelligent agents, which is difficult to handle complex analysis tasks in the financial field that require deep collaboration among multiple levels and roles; the prior art is insufficient in terms of task decomposition and team building, and cannot flexibly match suitable intelligent agents according to task requirements; the prior art lacks an effective iterative optimization mechanism when dealing with complex financial analysis tasks, and cannot adjust the analysis strategy in a timely manner based on user feedback. Summary of the Invention
[0004] This invention provides a multi-agent financial analysis collaborative method based on LLM, comprising:
[0005] The basic large language model is evaluated, the parameters are fine-tuned based on the evaluation results, agents based on the large language model are registered, and an agent management pool is built.
[0006] Receive financial analysis requests submitted by users via natural language;
[0007] Under the two-level hierarchical collaboration mechanism, the chief intelligent agent calls the large language model through the first preset prompt template to perform thought chain reasoning and decompose the financial analysis requirements;
[0008] The intelligent agent retrieves all output results from the shared message pool, performs weighted fusion based on preset evaluation indicators to generate financial strategies and suggestions, and reports the analysis results to the user and obtains user feedback.
[0009] Furthermore, the intelligent agents include a general intelligent agent, a financial analyst, a data assistant, a data analyst, and a summarizing intelligent agent, each of which is associated with a metadata configuration file containing capability descriptions, tools used, and keywords in the professional field;
[0010] The evaluation indicators include:
[0011] Precision, recall, and F1 score for text classification;
[0012] The generated BLEU, ROUGE, and METEOR values for the text;
[0013] The MRR and NDCG values of the API call;
[0014] The dimensions of fluency, relevance, information content, and diversity in human assessment.
[0015] The decomposition of financial analysis requirements refers to dividing them into financial analysis sub-tasks with dependencies and generating a task dependency graph; and based on the semantic similarity calculation between the description text of each financial analysis sub-task and the metadata configuration file of the financial analyst agent, forming a first-level team that includes matching financial analysts.
[0016] The financial analysts of the first-level team use the second preset prompt template to call the large language model to decompose the subtasks a second time, obtain data processing steps and analysis execution steps, and form a second-level team to execute specific tasks based on the similarity between the steps and the metadata of the data assistant and data analyst.
[0017] The agents in the second-level team invoke their own capabilities and external tools to perform tasks and output the results to the shared message pool.
[0018] The intelligent agent system in this invention comprises five roles: a general manager intelligent agent, a financial analyst, a data assistant, a data analyst, and a summarizing intelligent agent. Each intelligent agent's capabilities are defined and managed through a structured metadata configuration file. This configuration file, in JSON format, explicitly records core information such as the intelligent agent's unique ID, role type, capability description list, available tool list, and professional domain keyword list. The capability description defines the scope of tasks the intelligent agent can perform, the tool list indicates the external APIs or software it can call (such as data interfaces or visualization tools), and the professional domain keywords identify its areas of expertise in finance (such as macroeconomics, industry research, and financial analysis). This metadata not only serves as the intelligent agent's identity "resume" but is also used in the task allocation process to calculate semantic similarity with task requirements, ensuring that the system can accurately match the most suitable intelligent agent based on the specific content of the sub-task, achieving capability-driven dynamic scheduling and efficient collaboration.
[0019] Furthermore, the task dependency graph includes a JSON format representation, comprising: a task ID field, a task description field, and a dependency list field;
[0020] Semantic similarity calculation specifically includes:
[0021] Using a Transformer-based sentence vector model, the task description text D and the capability description text M in the agent's metadata configuration file are respectively converted into vector embeddings. and .
[0022] Furthermore, the observation-reflection-iteration cycle includes:
[0023] Observation: Detect the deviation between the task results and the expected goals, and the corresponding task nodes;
[0024] Reflection: By using a pre-set reflection prompt template, the large language model is invoked to analyze the causes of deviations and generate correction plans;
[0025] Iteration: Create new subtasks or adjust task parameters based on the revised plan and reallocate them to steps.
[0026] Furthermore, communication between intelligent agents uses a structured data format, and messages include:
[0027] Message ID, sender ID, receiver ID, associated task ID, message type, and payload fields;
[0028] The message types include synchronous task allocation, asynchronous task allocation, and result feedback.
[0029] Furthermore, the process of the chief intelligent agent reporting analysis results to the user and obtaining user feedback includes the following steps:
[0030] If the feedback indicates a deviation in the analysis, an observation-reflection-iteration loop is triggered: unsatisfactory task nodes are detected, the causes of the deviation are analyzed and a correction plan is generated, the task is replanned based on the correction plan, and the steps are returned.
[0031] Furthermore, the metadata configuration file includes JSON format and contains:
[0032] The fields include Agent ID, Role Type, Ability Description List, Tool List, and Professional Domain Keyword List.
[0033] The embodiments of the present invention have at least the following beneficial effects:
[0034] By constructing a multi-agent collaborative architecture with clearly defined roles, and combining thought chain reasoning and semantic matching mechanisms, the system achieves automatic decomposition and precise allocation of complex financial analysis tasks, significantly improving the depth and efficiency of analysis. The system employs a structured message communication mechanism to ensure the clarity and efficiency of information transmission between agents, supporting the orderly flow of task instructions, execution results, and feedback information, thus enhancing the reliability of overall collaboration. Through hierarchical team building and a closed-loop optimization mechanism of observation-reflection-iteration, the system can dynamically adjust analysis strategies and continuously improve the quality of results. Simultaneously, a weighted fusion strategy based on multi-dimensional evaluation effectively integrates the results of each sub-task, generating comprehensive and consistent financial recommendations. This achieves end-to-end automation of the analysis process, significantly reducing reliance on manual labor and subjective errors, and providing efficient, intelligent, and iterative technical support for financial decision-making.
[0035] The two-tiered team structure and the closed-loop optimization process of observation-reflection-iteration effectively improve the collaborative efficiency and result quality of financial analysis tasks. By forming primary and secondary teams, the system achieves effective decomposition and parallel processing of complex tasks. The primary team is responsible for macro-level task planning and coordination, while the secondary team focuses on the execution of specific sub-tasks. This hierarchical team architecture enables parallel task processing, accelerating the analysis response time. Simultaneously, the observation-reflection-iteration mechanism dynamically adjusts and re-executes task plans based on user feedback or internal monitoring results, achieving intelligent self-correction and optimization. This improves the system's robustness and the satisfaction of the final results, solving the problem of the lack of effective collaboration and dynamic optimization mechanisms in existing technologies.
[0036] The beneficial effects of this invention are as follows: By constructing a multi-agent collaborative architecture based on a large language model, this invention achieves automated, structured, and intelligent execution of financial analysis tasks. It utilizes a managerial agent for requirement understanding and task decomposition, and dynamically assembles first- and second-level agent teams with specialized divisions of labor through semantic similarity matching and metadata configuration files, forming a two-level hierarchical collaboration mechanism. Each agent collaborates in data acquisition, processing, analysis, and strategy generation within a shared message pool through structured message communication. Furthermore, it introduces an observation-reflection-iteration loop and a user feedback mechanism to achieve deviation detection and continuous optimization, and supports on-demand registration and capability expansion of new agents. This invention significantly improves the accuracy, flexibility, and scalability of complex financial analysis, effectively integrating the inference capabilities of large models with the advantages of tool invocation and multi-role collaboration, achieving an end-to-end closed loop from natural language requirements to high-quality decision recommendations. Attached Figure Description
[0037] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:
[0038] Figure 1 This is a flowchart illustrating a multi-agent financial analysis collaborative method based on LLM provided in an embodiment of the present invention.
[0039] Figure 2 A flowchart of an intelligent agent management mechanism provided in an embodiment of the present invention;
[0040] Figure 3 This is a schematic diagram of a financial multi-agent team formation provided in an embodiment of the present invention;
[0041] Figure 4 This is a schematic diagram of an observation-reflection-iteration cycle process provided in an embodiment of the present invention;
[0042] Figure 5 This is a schematic diagram of a communication protocol provided in an embodiment of the present invention. Detailed Implementation
[0043] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make the invention more thorough and complete, and to fully convey the scope of the invention to those skilled in the art.
[0044] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, apparatus, device, method, or computer program product. Therefore, the present invention can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0045] It should be noted that the number of any elements in the accompanying drawings is for illustrative purposes only and not as a limitation, and any naming is for distinction only and has no limiting meaning.
[0046] The following is for reference. Figure 1 , Figure 1 This is a flowchart illustrating a multi-agent financial analysis collaborative method based on LLM provided in an embodiment of the present invention. Figure 1 As shown, a multi-agent financial analysis collaborative method based on LLM includes:
[0047] The basic large language model is evaluated, and the parameters are efficiently fine-tuned based on the evaluation results. Agents based on the large language model are registered and an agent management pool is built. Each agent is associated with a metadata configuration file containing capability descriptions, available tools, and professional domain keywords. The agents include a general agent, a financial analyst, a data assistant, a data analyst, and a summarizing agent.
[0048] Receive financial analysis requests submitted by users via natural language;
[0049] The chief intelligent agent calls the large language model to perform thought chain reasoning through the first preset prompt template, decomposes the financial analysis requirements into financial analysis sub-tasks with dependencies and generates a task dependency graph; based on the semantic similarity calculation between the description text of each financial analysis sub-task and the metadata configuration file of the financial analyst intelligent agent, a first-level team containing matching financial analysts is formed.
[0050] like Figure 3 As shown, a schematic diagram of a financial multi-agent team formation provided in an embodiment of the present invention includes:
[0051] The financial analysts in the first-level team use the second preset prompt template to call the large language model to decompose the subtasks a second time, and obtain the data processing and analysis execution steps; based on the semantic similarity calculation between the execution steps and the metadata configuration files of the data assistant and the data analyst, a second-level team containing matching intelligent agents is formed.
[0052] The agents of the second-level team invoke their own capabilities and external tools to execute tasks and output the results to the shared message pool;
[0053] In summary, the intelligent agent obtains all output results from the shared message pool, performs weighted fusion based on preset evaluation indicators, and generates financial strategies and suggestions.
[0054] The managing agent reports analysis results to users and obtains user feedback;
[0055] If the feedback indicates a deviation in the analysis, an observation-reflection-iteration loop is triggered: unsatisfactory task nodes are detected, the causes of the deviation are analyzed and a correction plan is generated, the task is replanned based on the correction plan, and the process returns to step 4.
[0056] It should be noted that this invention proposes a multi-agent collaborative financial analysis method based on LLM (Large Language Model), aiming to automate and intelligently handle complex financial analysis tasks through the collaborative work of multiple agents. In the financial field, analysis tasks typically involve multi-dimensional data and complex logical relationships, which a single LLM or agent cannot accomplish independently. Therefore, this invention improves the efficiency and accuracy of analysis by constructing a system composed of multiple agents, each responsible for processing a specific subset of tasks. Here, LLM, or Large Language Model, refers to a pre-trained model with powerful natural language processing capabilities, capable of understanding and generating natural language text. An agent is an entity with specific functions and capabilities built based on LLM, capable of performing specific tasks.
[0057] Specifically, the method of this invention includes the following key steps: system initialization, user requirement reception, task decomposition and primary team formation, secondary team formation and task execution, result integration and generation, and user feedback and iterative optimization. In the system initialization phase, the basic Large Language Model (LLM) is first evaluated. Evaluation metrics include accuracy, recall, and F1 score for text classification; BLEU, ROUGE, and METEOR for text generation; MRR and NDCG for interface calls; and fluency, relevance, informativeness, and diversity dimensions assessed manually. Based on the evaluation results, the LLM is fine-tuned using PEFT to improve its performance in the financial field. Subsequently, LLM-based agents are registered and an agent management pool is built. Each agent is associated with a metadata configuration file containing its capability description, available tools, and domain keywords. These agents include a manager agent, a financial analyst, a data assistant, a data analyst, and a summary agent. The manager agent is responsible for overall task planning and coordination; the financial analyst is responsible for specific financial analysis tasks; the data assistant is responsible for data collection and preparation; the data analyst is responsible for data processing and visualization; and the summary agent is responsible for integrating all analysis results and generating the final report.
[0058] Preferably, in the task decomposition and primary team formation stage, the managing agent invokes the LLM (Limited Least Metrics Model) through a first preset prompt template to perform thought chain reasoning, decomposing the user-submitted financial analysis requirements into multiple dependent financial analysis sub-tasks and generating a task dependency graph. The task dependency graph is represented in JSON format, containing task ID, task description, and dependency list fields. Subsequently, the system vectorizes the description text of each financial analysis sub-task and performs semantic similarity calculation with the metadata configuration files of each financial analyst agent in the agent management pool. The semantic similarity calculation uses a Transformer-based sentence vector model, converting the task description text and the capability description text in the agent's metadata configuration file into vector embeddings, and determining the matching degree by calculating the cosine similarity between the vectors. Financial analysts with similarity scores higher than a preset threshold are selected to form a primary financial analysis team. If the semantic similarity calculation results are all lower than the preset threshold, a new agent registration process is triggered, including efficient parameter fine-tuning of the basic LLM, creating a metadata configuration file containing missing capability descriptions, tools, and keywords, and registering the new agent to the agent management pool.
[0059] In some embodiments, the evaluation metrics in step 1 include:
[0060] Precision, recall, and F1 score for text classification;
[0061] The generated BLEU, ROUGE, and METEOR values for the text;
[0062] The MRR and NDCG values of the API call;
[0063] The dimensions of fluency, relevance, information content, and diversity in human assessment.
[0064] Furthermore, the accuracy, recall, and F1 score of text classification are mainly used to measure the semantic understanding ability of financial analyst agents when processing unstructured information such as market news, policy documents, or company announcements. For example, in the process of identifying event types (such as mergers and acquisitions, financial report releases, and regulatory changes) or sentiment (positive / negative) after subtask decomposition, these indicators ensure that key information is correctly classified and transmitted to subsequent analysis processes, directly affecting the accuracy of strategy judgment.
[0065] The BLEU, ROUGE, and METEOR values of the generated text are used to evaluate the quality of the language expression of the summarizing agent when integrating multi-source analysis results, especially in the generation of the final financial strategy recommendation report. Since this process needs to integrate information from different professional agents (such as data summaries from data assistants and trend interpretations from data analysts), the above-mentioned automatic evaluation indicators can effectively measure the n-gram overlap, semantic coherence, and information coverage between the generated content and the reference standard, avoid missing key conclusions or generating redundant expressions, thereby improving the professionalism and readability of the output results and ensuring that the content reported to users is both comprehensive and concise.
[0066] The MRR and NDCG values of API calls are used to evaluate the effectiveness and ranking quality of data assistant and data analyst agents when calling external APIs or databases to retrieve financial data. For example, when responding to a request such as "find the new energy listed companies with the highest net profit growth rate in the past five years," the system not only focuses on whether it successfully returns the correct answer (MRR reflects the ability to hit the first position), but also on the overall ranking rationality of the candidate results (NDCG measures the weighted relevance ranking). This ensures the high quality of the underlying data input and provides reliable support for upper-level analysis.
[0067] Fluency, relevance, information content, and diversity dimensions of human evaluation serve as supplementary subjective evaluation indicators, playing a crucial role in the system's iterative optimization phase. This is especially true when user feedback is unsatisfactory or when a reflection-iteration cycle is triggered. These dimensions can be used to retrospectively analyze the naturalness of the language in the summary report, its alignment with the original requirements, the depth of the insights provided, and the richness of the sources of viewpoints. By feeding the results of human evaluation back into the agent fine-tuning and metadata update process, the system can continuously improve the semantic consistency and strategic innovation of cross-agent collaboration, thereby enhancing the credibility of the overall service and the user experience.
[0068] It should be noted that this invention employs a series of comprehensive evaluation metrics when evaluating the basic Large Language Model (LLM) to ensure optimal performance in financial analysis tasks. These metrics include accuracy, recall, and F1 score for text classification; BLEU, ROUGE, and METEOR for text generation; MRR and NDCG for API calls; and fluency, relevance, informativeness, and diversity dimensions assessed by human evaluation. These metrics measure the performance of LLM in processing financial text data and performing tasks from different perspectives, ensuring that the model not only performs well in technical metrics but also meets user needs in practical applications. These evaluation metrics provide a comprehensive assessment of the applicability and accuracy of LLM in the financial field, offering a basis for subsequent parameter fine-tuning.
[0069] Specifically, precision, recall, and F1 score for text classification are used to evaluate the model's performance in classification tasks. Precision measures the proportion of correctly classified samples out of the total samples, recall measures the proportion of correctly classified positive samples out of all positive samples, and the F1 score is the harmonic mean of precision and recall, taking into account the balance between the two. BLEU, ROUGE, and METEOR for text generation are used to evaluate the quality of the generated text. BLEU primarily measures the similarity between the generated text and the reference text, ROUGE evaluates quality by calculating overlapping words and phrases in the generated and reference texts, and METEOR considers factors such as semantic similarity and word order. MRR, Mean Reciprocal Rank, and NDCG (Normalized Discounted Cumulative Gain) for API calls are used to evaluate the model's performance when calling external APIs. MRR measures the average of the inverse rankings of the model's returned correct results, and NDCG measures the relevance and ranking quality of the model's returned results. The fluency, relevance, informativeness, and diversity dimensions of the human evaluation are measured through human annotation and evaluation to assess the naturalness, task relevance, informativeness, and diversity of the model-generated text. These evaluation metrics ensure that the model achieves high performance standards across multiple aspects.
[0070] Preferably, the following specific steps can be taken when evaluating LLM: First, prepare a dataset containing text data from the financial field, such as news reports, financial reports, market analyses, etc. Then, use this data to test the LLM on tasks including text classification, text generation, and API calls. For text classification, the dataset can be divided into training and testing sets. The model is trained using the training set, and then its accuracy, recall, and F1 score are evaluated on the testing set. For text generation, metrics such as BLEU, ROUGE, and METEOR can be used to evaluate the similarity and quality of the model-generated text compared to the reference text. For API call tasks, a real-world financial data query scenario can be simulated to evaluate the accuracy and efficiency of the model's calls to external APIs, using metrics such as MRR and NDCG to measure the model's performance. Finally, financial experts are invited to manually evaluate the model-generated text, providing scores based on dimensions such as fluency, relevance, information content, and diversity. Through these specific evaluation steps, the performance of LLM in the financial field can be comprehensively and objectively evaluated, providing an accurate basis for subsequent parameter fine-tuning.
[0071] In some embodiments, the semantic similarity calculation in steps 3 and 4 specifically includes:
[0072] Using a Transformer-based sentence vector model, the task description text D and the capability description text M in the agent's metadata configuration file are respectively converted into vector embeddings. and Calculate using the following formula:
[0073] , Where S represents the semantic similarity score. Represents the vector dot product. Represents the magnitude of the vector. Vector embedding for the task description text D. Vector embedding of capability description text M in the agent's metadata configuration file.
[0074] It should be noted that this invention employs semantic similarity calculation to match tasks and agents in steps 3 and 4. This method achieves accurate task allocation by converting the task description text and the capability description text in the agent's metadata configuration file into vector embeddings and calculating their similarity. The core of semantic similarity calculation lies in transforming natural language text into quantifiable vector representations, enabling computers to understand and process the similarity between texts. This method not only improves the efficiency of task allocation but also ensures that tasks are assigned to the most suitable agent, thereby enhancing the overall system performance and analysis quality. A higher semantic similarity score indicates a greater semantic similarity between the task description text and the agent's capability description text.
[0075] Specifically, semantic similarity calculation employs a sentence vector model based on the Transformer architecture, such as Sentence-BERT. This model encodes text sequences into fixed-dimensional vector embeddings. After the task description text and the capability description text in the agent's metadata configuration file are converted into vector embeddings, cosine similarity is obtained by calculating the dot product of the two vectors and dividing by their modulus product. The cosine similarity value ranges from -1 to 1; the closer the value is to 1, the more semantically similar the two texts are. A preset threshold is used to determine whether the agent is sufficiently matched to the task, and is typically set based on the actual application scenario and experience; for example, it can be set to 0.8. If the semantic similarity calculation result is lower than the preset threshold, a new agent registration process is triggered, including efficient parameter fine-tuning of the basic large language model, creating a metadata configuration file containing missing capability descriptions, tools, and keywords, and registering the new agent to the agent management pool.
[0076] Preferably, in practical applications, the semantic similarity calculation process can be further optimized. First, to improve computational efficiency, a pre-trained Sentence-BERT model can be used and fine-tuned on financial domain data to better adapt to the characteristics of financial texts. During fine-tuning, labeled financial text data can be used, and the model parameters can be optimized through methods such as contrastive learning, enabling the model to more accurately capture the semantic information of financial texts. Second, when calculating vector embeddings, preprocessing can be performed on the task description text and agent capability description text, such as word segmentation, stop word removal, and stemming, to reduce noise and improve text quality. Furthermore, to handle multilingual or domain-specific texts, the model's vocabulary can be expanded or a multilingual version of the Transformer model can be used. In actual task allocation, agents can be ranked according to similarity scores, and the agent with the highest score can be selected to form a team, ensuring that tasks are assigned to the most suitable agents, thereby improving the overall performance and analysis quality of the system.
[0077] like Figure 2 As shown, in some embodiments, when forming the team in steps 3 and 4:
[0078] If the semantic similarity calculation results are all below a preset threshold, the new agent registration process is triggered, including:
[0079] Efficiently fine-tune the parameters of the basic large language model;
[0080] Create a metadata configuration file that includes descriptions of missing capabilities, tools, and keywords;
[0081] Register the new agent to the agent management pool.
[0082] It should be noted that when forming a team, if the semantic similarity calculation results are all below a preset threshold, this invention will trigger a new agent registration process. This process aims to address the problem of a lack of agents with specific capabilities in the existing agent management pool. Through this mechanism, the agent management pool can be dynamically expanded, ensuring that the system can handle a wider range of financial analysis tasks. The registration of new agents involves performing PEFT parameter fine-tuning on the basic large language model LLM, creating a metadata configuration file containing descriptions of missing capabilities, tools, and keywords, and registering the new agent to the agent management pool. This process not only improves the system's flexibility and adaptability but also ensures that the system can continuously optimize and expand its functionality.
[0083] Specifically, the new agent registration process involves several key steps. First, the basic large language model (LLM) undergoes efficient parameter fine-tuning using PEFT (Programmatical Experimental Theory), designed to better adapt the model to specific financial analysis tasks. PEFT techniques, such as LoRA (Low-Rank Adaptation), achieve efficient parameter tuning by adding trainable adapters to specific layers of the model, thereby improving its performance on specific tasks. Second, a metadata configuration file is created containing descriptions of missing capabilities, tools, and keywords. The capability description details the types of tasks the new agent can perform, the tool list lists the external tools the agent can access, and the keywords identify the agent's area of expertise. These metadata configuration files are stored in JSON format for easy system management and retrieval. Finally, the new agent is registered to the agent management pool, enabling it to be scheduled and used by the system. A preset threshold is a key parameter used to determine whether an agent matches the task; it is typically set based on the actual application scenario and experience, for example, 0.8.
[0084] Preferably, in practical applications, the registration process for new intelligent agents can be further refined. First, for efficient fine-tuning of PEFT parameters, LoRA technology can be used. Specific steps include: selecting key layers of the model, such as the attention layer and feedforward layer of a Transformer; adding low-rank adapters to these layers; and fine-tuning on financial domain data. During fine-tuning, labeled financial text data can be used to optimize the adapter parameters through supervised learning, enabling the model to handle financial tasks more accurately. Second, when creating metadata configuration files, capability descriptions can include specific task types, such as macroeconomic analysis and industry trend analysis; tool lists can include external data APIs, database interfaces, and data visualization tools; and keywords can include professional domain terms, such as macroeconomics and industry policies. These metadata configuration file fields can be expanded and customized according to actual needs. Finally, when registering a new intelligent agent to the agent management pool, a unique ID can be assigned to the new agent, and its metadata configuration file can be stored in the management pool's database, enabling the system to quickly query and schedule the new agent. Through these refined steps, it can be ensured that new intelligent agents can be effectively integrated into the system, improving the overall performance and adaptability of the system.
[0085] In some embodiments, in step (5):
[0086] The data assistant agent calls external data APIs or database interfaces to perform data collection and preparation;
[0087] The data analyst agent invokes data visualization tools or statistical analysis tools to perform data processing and chart generation.
[0088] It should be noted that this invention details how agents in a secondary team execute tasks and output results to a shared message pool. The data assistant agent and data analyst agent involved are responsible for data collection and preparation, and data processing and analysis, respectively. The data assistant agent obtains the required data by calling external data APIs or database interfaces, while the data analyst agent uses data visualization tools or statistical analysis tools to process the data and generate charts. This process ensures efficient data flow from collection to processing, providing a solid data foundation for subsequent financial analysis.
[0089] Specifically, the data assistant agent and the data analyst agent have different responsibilities within the secondary team. The data assistant agent is primarily responsible for data collection and preparation, acquiring data by calling external data APIs or database interfaces. These APIs or interfaces can be services provided by financial data providers, such as stock price data and macroeconomic indicators. The data analyst agent is responsible for data processing and analysis, utilizing data visualization tools such as Matplotlib and Seaborn, or statistical analysis tools such as Pandas and NumPy to process the collected data and generate charts. These tools help the agent quickly generate intuitive charts and statistical analysis results, providing financial analysts with deeper insights. In practical applications, the metadata configuration files of both the data assistant agent and the data analyst agent will list in detail the tools and interfaces they can call, allowing the system to accurately match them according to task requirements.
[0090] Preferably, in practice, the task execution processes of the data assistant agent and the data analyst agent can be further refined. For the data assistant agent, the task execution steps include: receiving task instructions, parsing the data types and parameters required by the task, calling the corresponding external data API or database interface to obtain data, and outputting the obtained data to the shared message pool after preliminary cleaning and formatting. For example, if the task is to obtain financial statement data of a company, the data assistant agent will call a financial data API, specifying parameters such as company code, report type, and time range, clean the obtained data to remove invalid or duplicate data, and then send the cleaned data to the shared message pool in JSON format. For the data analyst agent, the task execution steps include: receiving task instructions and relevant data, selecting appropriate data visualization or statistical analysis tools according to task requirements, processing and analyzing the data, generating charts or statistical reports, and outputting the results to the shared message pool. For example, if the task is to perform trend analysis on stock price data, the data analyst agent will call Pandas for data processing, use Matplotlib to generate price trend charts, and send the chart file link and brief statistical analysis results back to the message pool. These detailed steps ensure the efficient flow of data from collection to processing, providing high-quality data support for subsequent financial analysis.
[0091] like Figure 4 As shown, in some embodiments, the observation-reflection-iteration loop of step 8 includes:
[0092] Observation: Detect the deviation between the task results and the expected goals, and the corresponding task nodes;
[0093] Reflection: By using a pre-set reflection prompt template, the large language model is invoked to analyze the causes of deviations and generate correction plans;
[0094] Iteration: Create new subtasks or adjust task parameters according to the revised plan and reallocate them to step (4).
[0095] It should be noted that the present invention describes in detail the observation-reflection-iteration loop mechanism in step (8) to monitor the task status and dynamically replan failed or low-quality subtasks. The core of this mechanism lies in observing the deviation between the task results and the expected goals, analyzing the causes of the deviation, and generating correction schemes, thereby achieving dynamic adjustment and optimization of the task. This closed-loop feedback mechanism can ensure that the system can correct errors in a timely manner when facing complex and ever-changing financial analysis tasks, improving the accuracy and reliability of the analysis results. Through this mechanism, the system has the ability to adapt and self-optimize, and can dynamically adjust the task plan and re-execute it based on user feedback or internal monitoring results.
[0096] Specifically, the observation-reflection-iteration loop mechanism comprises three key steps: observation, reflection, and iteration. In the observation phase, the system detects deviations between task results and expected goals, identifying corresponding task nodes. This process can be achieved by setting thresholds or monitoring metrics. For example, if the accuracy of the task result falls below a preset threshold, or the task execution time exceeds expectations, the system marks that task node as unsatisfactory. In the reflection phase, the system invokes a Large Language Model (LLM) using a preset reflection prompt template to analyze the causes of deviations and generate corrective solutions. The reflection prompt template is a structured prompt used to guide the LLM in analyzing problems and proposing solutions. For example, the prompt template may include information such as task description, user feedback, and problem description. In the iteration phase, the system creates new subtasks or adjusts task parameters based on the corrective solutions and reassigns tasks for execution. This process ensures that tasks can be optimized and adjusted according to the new solutions, thereby improving task success rate and quality.
[0097] The structure of the reflection prompt template includes:
[0098] Background information: Define the large language model as a project manager AI responsible for analyzing deviations and proposing corrective measures.
[0099] Contextual information: Includes the original objective, a summary of completed tasks, and explicit negative user feedback or system biases.
[0100] Task Instructions: 'Analyze the root cause of the deviation and generate a corrective action plan. Output in JSON format, including the `root_cause_analysis` field and a list of `corrective_actions` containing the new subtasks.'
[0101] Preferably, in practical applications, the observation-reflection-iteration loop mechanism can be further refined. In the observation phase, multiple monitoring metrics can be set, such as the accuracy of task results, task execution time, and resource consumption. A comprehensive evaluation of these metrics determines whether the task meets expectations. For example, machine learning models can be used to assess the quality of task results, or log analysis can be used to monitor anomalies during task execution. In the reflection phase, the multi-turn dialogue capability of the LLM can be utilized to progressively analyze the root causes of problems. For example, the system can first ask the LLM about possible reasons for task failure, and then further inquire about details based on the LLM's answers until the root cause is found. In the iteration phase, task priorities can be adjusted, more resources allocated, or the task flow redesigned based on the specific content of the corrective action plan. For example, if the corrective action plan suggests increasing the diversity of data sources, the system can adjust the tasks of the data assistant agent to obtain data from more data sources. Through these refined steps, the observation-reflection-iteration loop mechanism can effectively monitor and optimize the task execution process, improving the overall system performance and user satisfaction.
[0102] like Figure 5 As shown, in some embodiments, the inter-agent communication uses a structured data format, and the messages include:
[0103] Message ID, sender ID, receiver ID, associated task ID, message type, and payload fields;
[0104] The message types include synchronous task allocation, asynchronous task allocation, and result feedback.
[0105] It should be noted that this invention employs a structured data format for inter-agent communication, with messages containing multiple fields to ensure the accuracy and efficiency of information transmission. This communication mechanism, through a clearly defined message format, enables agents to clearly exchange information such as task allocation and execution results. Message types include synchronous task allocation, asynchronous task allocation, and result feedback, corresponding to different communication scenarios and ensuring the system can flexibly handle various tasks and feedback. Through this structured communication mechanism, the system can efficiently coordinate the work of multiple agents, improving overall collaborative efficiency.
[0106] Specifically, the structured data format used for communication between agents is JSON, a lightweight data exchange format that is easy to read and parse. Messages contain the following fields: Message ID for uniquely identifying the message; Sender ID for identifying the agent sending the message; Receiver ID for identifying the agent receiving the message; Associated Task ID for identifying the task associated with the message; Message Type, indicating the message's purpose, such as synchronous task assignment, asynchronous task assignment, or result feedback; and a Payload field containing specific data or text content. These fields ensure message integrity and traceability. For example, the Message ID can be a unique string or number, the Sender ID and Receiver ID can be the agent's name or number, the Associated Task ID can be a unique identifier for the task, the Message Type can be an enumeration value, and the Payload field can be a detailed description of the task or the execution result. Through the definition of these fields, the system can clearly identify and process each message, ensuring the smooth execution of tasks and accurate feedback of results.
[0107] Preferably, in practical applications, the structured data format for inter-agent communication can be further refined. For example, in message types, synchronous task allocation is used to allocate tasks in real time, ensuring that tasks can be executed immediately; asynchronous task allocation allows tasks to be executed at appropriate times, suitable for tasks with less stringent time requirements; result feedback is used to return the task execution results to the requester, ensuring closed-loop management of tasks. During message generation and parsing, standard JSON libraries can be used to handle message serialization and deserialization. For example, in Python, the `json.dumps()` method can be used to serialize a message object into a JSON string, and the `json.loads()` method can be used to deserialize the JSON string into a message object. Furthermore, to improve communication reliability, a timestamp field can be added to the message to record the message generation time, allowing for tracking and retries in case of message delays or loss. Through these refined steps, the efficiency and reliability of inter-agent communication can be ensured, further improving the overall performance of the system.
[0108] In some embodiments, the task dependency graph in step (3) is represented in JSON format and includes:
[0109] Task ID field, Task Description field, and Dependency List field.
[0110] It should be noted that the task dependency graph mentioned in step (3) of this invention is a structured representation of decomposing complex financial analysis needs into multiple sub-tasks with dependencies. This representation helps to clearly show the sequence and dependencies between sub-tasks, thereby optimizing the task execution process. The task dependency graph is represented in JSON format, containing task ID, task description, and dependency list fields. This format not only facilitates internal system processing and storage but also facilitates data exchange and integration with other systems or modules. Through this structured representation, the system can efficiently manage and schedule each sub-task, ensuring the smooth execution of tasks.
[0111] Specifically, the generation process of the task dependency graph involves several key steps. First, after receiving the financial analysis request submitted by the user, the managing agent invokes the Large Language Model (LLM) through a first preset prompt template to perform thought chain reasoning, decomposing the complex financial analysis request into multiple subtasks with dependencies. Each subtask has a unique task ID to identify it; the task description field details the specific content of the subtask; and the dependency list field records the IDs of other subtasks that the subtask depends on. The task ID is a unique identifier for the subtask, used to distinguish different subtasks in the system; the task description field provides detailed information about the subtask, enabling the system and the agent to clearly understand the specific requirements of the task; and the dependency list field defines the order between subtasks, ensuring that tasks are executed in the correct sequence. Through this structured representation, the system can efficiently manage and schedule each subtask, ensuring the smooth execution of tasks.
[0112] The structure of the first preset prompt template includes:
[0113] Background information: Define the Big Language Model as a chief investment strategist responsible for top-level planning.
[0114] Original user request: A raw natural language request containing user input.
[0115] Task instructions: Please break down the user requirements into N macro-analysis subtasks with dependencies, and output them in JSON format. Each task should include the fields task_id, description, and dependencies.
[0116] The structure of the second preset prompt template includes:
[0117] Background information: Define the large language model as a senior financial analyst responsible for developing specific implementation plans.
[0118] Macroscopic subtask to be decomposed: Contains a description of a macroscopic analysis subtask generated from the first-level decomposition.
[0119] Task instructions: Please break down this macro-level subtask into a series of specific operation steps and output them in JSON format. Each step should include a step_id, description, and type field (with a value of "data_processing" or "analysis_execution").
[0120] Preferably, in practical applications, the generation and representation of task dependency graphs can be further refined. For example, when generating task dependency graphs, more complex logical relationships can be introduced, such as parallel tasks and conditional tasks. Parallel tasks are tasks that can be executed simultaneously, while conditional tasks are tasks that will only be executed when specific conditions are met. These logical relationships can be represented by expanding the dependency list fields. For example, a `parallel` field can be added to indicate whether tasks can be executed in parallel, and a `condition` field can be added to define the conditions for task execution. Furthermore, when representing task dependency graphs, graphical tools can be used to convert JSON-formatted data into intuitive flowcharts, making it easier for users and system administrators to understand and manage task flows. For example, graphical libraries such as D3.js can be used to display task dependency graphs graphically, allowing users to intuitively see the dependencies and execution order between tasks through a graphical interface. Through these refined steps, the generation and representation of task dependency graphs can be further optimized, improving system flexibility and user experience.
[0121] In some embodiments, the weighted fusion in step (6) is performed according to the following formula:
[0122]
[0123] in This indicates the final analysis result. Let be the weighting coefficient of the i-th result. Let i be the i-th result, and n be the total number of results. , This indicates that the summation operation is performed on the results from the first term to the nth term.
[0124] It should be noted that the weighted fusion mentioned in step (6) of this invention is a comprehensive processing method used to integrate the results of multiple sub-tasks into a final financial strategy and recommendation. This method generates the final analysis result by assigning different weights to the results of each sub-task and then performing a weighted sum based on these weights. This method ensures that the results of each sub-task play an appropriate role in the final decision-making process, while taking into account the importance, confidence level, and reliability of different sub-tasks. In this way, the system can generate more comprehensive and accurate financial strategies and recommendations, improving the quality and reliability of decision-making.
[0125] Specifically, the weighted fusion process aims to scientifically integrate the output results of each subtask to generate a comprehensive and reliable final analysis conclusion. The agent first collects the results of all completed subtasks from a shared message pool and assigns a weight coefficient to each result. This coefficient is not fixed in advance but is determined based on multi-dimensional dynamic evaluation, comprehensively considering the relevance (importance) of the subtask to the user's core problem, the logical consistency (confidence) of the reasoning process, and the quantity and authority (reliability) of the cited data sources. Through this mechanism, the system can objectively quantify the comprehensive value of each subtask result, avoiding reliance on subjective presets or single indicators. Finally, each result is multiplied by its corresponding weight coefficient and summed to generate a weighted overall analysis output, ensuring that the conclusion is both comprehensive and accurate, fully reflecting the actual contribution of each stage.
[0126] Preferably, in practical applications, the weighted fusion process can be further refined. For example, the weighted fusion process aims to scientifically integrate the output results of each subtask, generate comprehensive and reliable final analysis conclusions, summarize all results obtained by the agent from the shared message pool, and conduct multi-dimensional dynamic evaluation based on the relevance (importance) of the subtasks to the user's core problem, the logical consistency (confidence) of the reasoning process, and the quantity and quality (reliability) of the referenced data sources. A corresponding weight coefficient is assigned to each result, which is standardized to achieve comparability. Finally, the overall output is generated through weighted summation, ensuring that the conclusions accurately reflect the actual contributions of each stage and improving the accuracy of the analysis results and the credibility of the decisions.
[0127] In some embodiments, the metadata configuration file of step (1) is in JSON format and includes:
[0128] The fields include Agent ID, Role Type, Ability Description List, Tool List, and Professional Domain Keyword List.
[0129] It should be noted that the metadata configuration file mentioned in step 1 of this invention is used to describe and manage key information for each agent. The metadata configuration file is stored in JSON format and includes fields such as agent ID, role type, capability description list, tool list, and domain keyword list. These fields provide the system with detailed information about the agents, enabling the system to accurately select and schedule appropriate agents according to task requirements. Through this structured approach, the system can efficiently manage and utilize the capabilities of each agent, ensuring the smooth execution and high-quality completion of tasks.
[0130] Specifically, each field in the metadata configuration file has its own specific meaning and function. The Agent ID is a unique identifier for the agent, used to distinguish different agents within the system; the Role Type field defines the agent's role, such as a manager agent, financial analyst, data assistant, data analyst, and summary agent; the Capability Description List field details the specific tasks and functions the agent can perform; the Tool List field records the external tools the agent can call, such as data APIs, database interfaces, and data visualization tools; and the Professional Domain Keyword List field contains keywords related to the agent's expertise, such as macroeconomics, industry policies, and company financial reports. These fields allow the system to accurately match task requirements with the agent's capabilities, ensuring that tasks are assigned to the most suitable agent. For example, if a task involves macroeconomic analysis, the system will prioritize selecting a financial analyst agent that contains macroeconomic keywords.
[0131] Preferably, in practical applications, the construction and management of metadata configuration files can be further refined. When constructing the metadata configuration file, the content of each field can be defined using standard JSON format. For example, the agent ID can be a unique string or number, the role type can be an enumeration value, the list of capability descriptions and tools can be arrays of strings, and the list of domain keywords can also be arrays of strings. When managing metadata configuration files, a database can be used to store and query these files, enabling the system to quickly retrieve and schedule agents. Furthermore, to improve the system's flexibility and scalability, system administrators can be allowed to dynamically update and modify the content of the metadata configuration file according to actual needs. For example, if it is necessary to add new capabilities or tools to a certain agent, the system administrator can achieve this through a simple JSON file update. Through these refined steps, the construction and management of metadata configuration files can be further optimized, improving the overall performance and adaptability of the system.
[0132] The above embodiments of the present invention have the following beneficial effects:
[0133] The various embodiments of the present invention have the following beneficial effects: By constructing a multi-agent collaborative architecture with clearly defined roles, combined with thought chain reasoning and semantic matching mechanisms, the automatic decomposition and precise allocation of complex financial analysis tasks are achieved, significantly improving the depth and efficiency of analysis; Specifically, the layered and decoupled two-level team construction mechanism uses a first-level team (overall agent and financial analyst) for macro-level task planning and decomposition, and a second-level team (data assistant and data analyst) for specific data operations and analysis, effectively decoupling the strategy layer and the execution layer, supporting parallel processing and specialized division of labor, and greatly improving the flexibility and response speed of task scheduling; In the result integration stage, a weighted fusion method based on three-dimensional evaluation indicators is used by the summarizing agent to comprehensively consider the results of each sub-task in terms of importance (relevance to the user's core problem) and confidence (consistency of reasoning logic). The system dynamically generates weights and performs weighted fusion based on three dimensions: reliability (authority and quantity of data sources), ensuring that the final financial strategy is scientific, comprehensive, and of high decision-making value. Simultaneously, through a highly robust task dependency graph generation mechanism, the system uses thought chain reasoning to transform user needs into a structured JSON-formatted task graph, clearly defining task IDs, descriptions, and dependencies. Combined with semantic matching and dynamic registration capabilities for new intelligent agents, this ensures that complex or novel tasks can still construct complete and feasible execution paths, enhancing the integrity and fault tolerance of task planning. Coupled with a structured message communication mechanism and an observation-reflection-iteration closed-loop optimization process, the system achieves end-to-end automation from task understanding, decomposition, execution to feedback iteration, significantly reducing reliance on manual labor and subjective errors, providing efficient, intelligent, reliable, and evolvable technical support for financial decision-making.
[0134] This invention employs a two-tiered team structure and a closed-loop optimization process of observation-reflection-iteration, effectively improving the collaborative efficiency and result quality of financial analysis tasks. The system, by establishing primary and secondary teams, achieves effective decomposition and parallel processing of complex tasks. The primary team is responsible for macro-level task planning and coordination, while the secondary team focuses on the execution of specific sub-tasks. This hierarchical team architecture enables parallel task processing, significantly shortening the analysis cycle. Simultaneously, the observation-reflection-iteration mechanism dynamically adjusts and re-executes task plans based on user feedback or internal monitoring results, achieving intelligent self-correction and optimization. This improves the system's robustness and the satisfaction of the final results, solving the problem of the lack of effective collaboration and dynamic optimization mechanisms in existing technologies.
[0135] This invention achieves end-to-end automation of the financial analysis process, reducing reliance on human analysts and minimizing labor costs and subjective errors. From task understanding, planning, and execution to report generation, the entire process is automated without human intervention. The intelligent agent integrates the outputs of each node through a weighted fusion mechanism to generate the final analysis report, ensuring its comprehensiveness and consistency. This highly automated process not only improves analytical efficiency but also reduces subjectivity and errors caused by manual operation, enhancing the objectivity and reliability of financial decisions and solving the problems of high labor costs, low efficiency, and strong subjectivity in traditional financial analysis.
[0136] Furthermore, the storage medium in the embodiments of this application stores program instructions capable of implementing all the above methods. These program instructions can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor 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, or terminal devices such as computers, servers, mobile phones, and tablets.
[0137] The above description is merely an explanation of some preferred embodiments of the present invention and the technical principles employed. Those skilled in the art should understand that the scope of the invention as described in the embodiments of the present invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention.
Claims
1. A collaborative method for multi-agent financial analysis based on LLM, characterized in that, Includes the following steps: The basic large language model is evaluated, the parameters are fine-tuned based on the evaluation results, agents based on the large language model are registered, and an agent management pool is built. Receive financial analysis requests submitted by users via natural language; Under the two-level hierarchical collaboration mechanism, the chief intelligent agent calls the large language model through the first preset prompt template to perform thought chain reasoning and decompose the financial analysis requirements; The intelligent agent retrieves all output results from the shared message pool, performs weighted fusion based on preset evaluation indicators to generate financial strategies and suggestions, and reports the analysis results to the user and obtains user feedback.
2. The multi-agent financial analysis collaborative method based on LLM according to claim 1, characterized in that, The agents include a chief agent, a financial analyst, a data assistant, a data analyst, and a summarizing agent. Each agent is associated with a metadata configuration file containing capability descriptions, tools used, and keywords in the professional field. The evaluation indicators include: Precision, recall, and F1 score for text classification; The generated BLEU, ROUGE, and METEOR values for the text; The MRR and NDCG values of the API call; The dimensions of fluency, relevance, information content, and diversity in human assessment.
3. The multi-agent financial analysis collaborative method based on LLM according to claim 1, characterized in that, The decomposition of financial analysis requirements refers to dividing them into financial analysis sub-tasks with dependencies and generating a task dependency graph; and based on the semantic similarity calculation between the description text of each financial analysis sub-task and the metadata configuration file of the financial analyst agent, forming a first-level team that includes matching financial analysts. The financial analysts of the first-level team use the second preset prompt template to call the large language model to decompose the subtasks a second time, obtain data processing steps and analysis execution steps, and form a second-level team to execute specific tasks based on the similarity between the steps and the metadata of the data assistant and data analyst. The agents in the second-level team invoke their own capabilities and external tools to perform tasks and output the results to the shared message pool.
4. The multi-agent financial analysis collaborative method based on LLM according to claim 1, characterized in that, The task dependency graph is represented in JSON format and includes: a task ID field, a task description field, and a dependency list field. Semantic similarity calculation specifically includes: Using a Transformer-based sentence vector model, the task description text D and the capability description text M in the agent's metadata configuration file are respectively converted into vector embeddings. and .
5. The multi-agent financial analysis collaborative method based on LLM according to claim 1, characterized in that, When building a team, the following steps are included: If the semantic similarity calculation results are all below a preset threshold, the new agent registration process is triggered, including: Efficiently fine-tune the parameters of the basic large language model; Create a metadata configuration file that includes descriptions of missing capabilities, tools, and keywords; Register the new agent to the agent management pool.
6. The multi-agent financial analysis collaborative method based on LLM according to claim 1, characterized in that, The specific steps involved in an intelligent agent calling upon its own capabilities and external tools to perform tasks are as follows: The data assistant agent calls external data APIs or database interfaces to perform data collection and preparation; The data analyst agent invokes data visualization tools or statistical analysis tools to perform data processing and chart generation.
7. The multi-agent financial analysis collaborative method based on LLM according to claim 1, characterized in that, The observation-reflection-iteration cycle includes: Observation: Detect the deviation between the task results and the expected goals, and the corresponding task nodes; Reflection: By using a pre-set reflection prompt template, the large language model is invoked to analyze the causes of deviations and generate correction plans; Iteration: Create new subtasks or adjust task parameters based on the revised plan and reallocate them to steps.
8. The multi-agent financial analysis collaborative method based on LLM according to claim 1, characterized in that, Inter-agent communication uses a structured data format, and messages include: Message ID, sender ID, receiver ID, associated task ID, message type, and payload fields; The message types include synchronous task allocation, asynchronous task allocation, and result feedback.
9. The multi-agent financial analysis collaborative method based on LLM according to claim 1, characterized in that, The managerial agent includes the following steps for reporting analysis results to users and obtaining user feedback: If the feedback indicates a deviation in the analysis, an observation-reflection-iteration loop is triggered: unsatisfactory task nodes are detected, the causes of the deviation are analyzed and a correction plan is generated, the task is replanned based on the correction plan, and the steps are returned.
10. The multi-agent financial analysis collaborative method based on LLM according to claim 1, characterized in that, The metadata configuration file includes JSON format and contains: The fields include Agent ID, Role Type, Ability Description List, Tool List, and Professional Domain Keyword List.