Intelligent agent for generating report

By generating reports through an intelligent agent, the problem of report template mismatch in the existing technology is solved, dynamic report generation is achieved, the report generation efficiency is improved to adapt to changes in user attention.

CN120633616APending Publication Date: 2025-09-12山东浪潮智能生产技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510789013.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing report generation methods usually pre-customize data templates according to the dataset dimensions that managers are concerned about. This leads to template mismatches when business strategies are adjusted, requiring redevelopment and being unable to adapt to changes in user attention.

Method used

An intelligent agent for generating reports is provided, which includes a configuration module, a reasoning module, an action module and a memory module. It configures metadata structure maps, reasoned user questions, queried temporary data tables and generated reports, and memorized user questions and answers.

Benefits of technology

It realizes dynamic report generation without the need to develop fixed templates, adapts to changes in user attention, and improves report generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633616A_ABST
    Figure CN120633616A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and particularly provides an agent for generating a report, comprising: a configuration module for configuring a source database and a data table of metadata, generating a database table vector for the source database and the data table, and generating a metadata structure atlas based on the database table vector; the reasoning module is used for extracting key elements from user questions and querying a temporary data table based on the key elements and the metadata structure atlas; the action module is used for querying data matched with the user question from the temporary data table, drawing the matched data into a report form and outputting the report form as an answer; and the memory module is used for storing the questions and answers of the user in a long-short-term memory pool. According to the method, the corresponding data can be retrieved and the report can be generated according to the problem of the user, the dynamic report generation mode can adapt to the attention change of the user, a fixed template does not need to be developed, and the report generation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to an intelligent agent for generating reports. Background Art

[0002] During business operations, managers often need to monitor production and operations from multiple perspectives, requiring extensive data reporting. This data is distributed across the company's various information systems, making it difficult to access.

[0003] Existing report generation methods typically pre-customize data templates based on the dataset dimensions managers are interested in, and then present them through the BI system. Because data template dimensions are fixed, adjustments to business strategies can lead to mismatches with existing data templates, necessitating the development of new templates. Summary of the Invention

[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides an intelligent agent for generating reports to solve the above-mentioned technical problems.

[0005] The present invention provides an intelligent agent for generating a report, comprising: A configuration module, configured to configure a source database and data table of metadata, generate a database table vector for the source database and data table, and generate a metadata structure map based on the database table vector; An inference module, configured to extract key elements from the user question and query a temporary data table based on the key elements and the metadata structure graph; an action module, configured to query the temporary data table for data matching the user's question, plot the matching data into a report, and output the report as an answer; The memory module is used to save user questions and answers to the long-term and short-term memory pool.

[0006] In an optional embodiment, the configuration module includes: A first configuration unit is used to configure a source database and data table of metadata, and obtain metadata based on the source database and data table through data synchronization and script components; The second configuration unit is used to configure the metadata into a metadata table according to the functional category to which it belongs; Vectorization unit, used to convert metadata tables into vectors based on table names, numeric fields, and labels; The graph construction unit is used to construct the corresponding vectors into a metadata structure graph according to the relationship between the functional categories corresponding to the metadata table.

[0007] In an optional embodiment, the types of metadata tables include: Personnel information form, equipment information form, product information form, process information form, production information form, logistics information form and quality information form.

[0008] In an optional embodiment, the configuration module further includes: The tagging unit is used to support the tagging of configured metadata databases, metadata tables, and metadata fields. The tagged tags are used as inference access rules and are all included in the vectorization processing to generate inference rule vectors.

[0009] In an optional embodiment, the reasoning module includes: The element extraction unit is used to call the large model to perform semantic recognition on user questions and obtain key elements; Intent determination unit, used to determine the intent of the user's question based on key elements; A memory query unit, configured to query a matching answer from the long-short term memory pool according to the intent, and if the query is successful, send the SQL instruction of the matching answer and the user question to the action module; The intermediate query unit is used to retrieve a temporary data table based on key elements and metadata structure graph when the memory query unit fails to find a matching answer.

[0010] In an optional embodiment, the key elements include: Time elements, place elements, character elements, task elements, and progression elements.

[0011] In an optional embodiment, the reasoning module further includes: The field locking unit is used to confirm the existence of multiple temporary data tables, input the multiple temporary data tables and key elements into the large model, and obtain the locked fields in the multiple temporary data tables output by the large model, where the locked fields are associated with the key elements.

[0012] In an optional embodiment, the action module includes: The instruction generation unit is used to input user questions, temporary data tables and locked fields into the big model, and the big model outputs SQL instructions; An instruction execution unit, used to execute SQL instructions to obtain matching target data; The report drawing unit is used to call the chart drawing tool to generate charts according to the target data.

[0013] In an optional embodiment, the memory module includes: The encapsulation unit is used to encapsulate user questions, key elements of user questions and matching data into answer pairs, and save the encapsulated answer pairs into the long short-term memory pool.

[0014] In an optional embodiment, the memory module further includes: An information receiving unit, configured to receive evaluation information from a user; The evaluation labeling unit is used to generate corresponding satisfaction labels for the answer pairs based on the evaluation information.

[0015] The beneficial effect of the present invention is that the intelligent agent for generating reports provided by the present invention can retrieve corresponding data and generate reports based on user questions. This dynamic report generation method can adapt to changes in user attention without the need to develop fixed templates, thereby improving report generation efficiency.

[0016] In addition, the present invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 It is a schematic principle diagram of an intelligent agent according to an embodiment of the present invention.

[0019] Figure 2 This is a data processing flow chart of an intelligent agent in an application scenario according to an embodiment of the present invention.

[0020] Figure 3 It is a data processing flow chart of the configuration module of an intelligent agent according to an embodiment of the present invention.

[0021] Figure 4 It is a schematic diagram of the metadata structure map of an intelligent agent according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0024] Please refer to Figure 1 The intelligent agent consists of a configuration module, a reasoning module, a memory module, and an action module, as well as a basic large model module. The configuration module generates a map of the enterprise metadata structure; the reasoning module extracts the five elements of the user's question and dynamically generates a temporary data table; the action module uses SQL instructions based on the temporary data table to retrieve data that matches the user's intent and outputs the data as an API service; the memory module generates question-answer pairs from the current operation process and sends them to the long-term and short-term memory pool, providing a fast retrieval method for the user's next question; the large model module provides the intelligent agent assistant with large model capabilities, including dialogue capabilities, intent recognition capabilities, and SQL generation capabilities.

[0025] The configuration module builds the metadata database and data tables underlying intelligent question-answering. The metadata database and data fields are configured through a webpage. To ensure metadata real-time performance, the source database and data tables must be configured. The intelligent agent extracts and synchronizes metadata from the source data through data synchronization and script components. Based on the metadata database and data tables, the configuration module generates database table vectors and a data structure knowledge graph, dynamically and incrementally updating the data structure knowledge graph. In the manufacturing sector, the configuration module configures metadata tables such as personnel information, equipment information, product information, process information, production information, logistics information, and quality information. Each metadata table generates a vector, with the input information consisting of the table name, numeric fields, and labels. A data structure knowledge graph is constructed from all metadata tables using production operation relationships. The intelligent agent supports manual labeling of the configured metadata database, metadata tables, and metadata fields. These labels are incorporated into the vectorization process as inference access rules to generate inference rule vectors. The intelligent agent automatically associates and processes the mapping between labels and databases, data tables, and data fields. Configured labels are presented as text, specifically in the form of words, phrases, or sentences.

[0026] The reasoning module calls the big model to extract the five-dimensional elements of the user's question and clarify the intention of this question. First, according to the intention of the user's question, the long and short memory question-answer pairs of the memory module are calculated through vector similarity. If the memory module matches successfully, the corresponding SQL instruction and the user question are sent to the action module; if the memory module matches unsuccessfully, a temporary data table of this question is generated through the data rule reasoning and retrieval module, and the reasoning module sends the user question and the temporary data table to the action module. The five-dimensional elements proposed in the present invention include time, place, person, task and progress. The five-dimensional element extraction method of the user's question is completed based on the big model module. According to the task attributes of the user's question, the rule reasoning and retrieval match the main target data table through vector similarity, and match the secondary target data table associated with this question through the data structure knowledge graph. Based on the extracted five-dimensional elements, the data fields of the main target data table and the secondary target data table are locked, and the big model module generates SQL instructions to retrieve the data fields in the main target data table and the secondary target data table, and reconstruct and generate a temporary data table. The reasoning module calls the large model module to lock the data fields in the primary target data table and the secondary target data table. The locking method is to feed the five-dimensional elements and temporary data table of the user question, namely {five-dimensional elements + database table + data fields + data labels}, to the large model. The large model module outputs the database table and data fields associated with this question.

[0027] The memory module encapsulates {this question + five-dimensional elements + SQL commands} into answer pairs and updates them to the long-term short-term memory pool. The long-term short-term memory pool stores user Q&A records in question-answer pairs. The Q&A pairs contain the user question, intent decomposition, temporary data tables + data fields, SQL commands, and user feedback identifiers. The agent receives user evaluation feedback and associates it with each Q&A session as a feedback identifier, enabling modular post-training optimization.

[0028] The action module generates SQL instructions based on the imported user questions + temporary database tables + data fields through the large model module, executes SQL searches, and outputs the search results to the drawing tool in the form of API services to generate reports.

[0029] The large model module provides capabilities for intelligent question-asking agents in the form of API services, including multi-round dialogue capabilities, five-dimensional element extraction capabilities, data field retrieval capabilities, SQL command generation capabilities, etc.

[0030] In the production management process, in order to meet the production scheduling and production operation management, it is necessary to call the production process data at any time and pay attention to the production progress and product quality. In this application scenario, the metadata that needs to be configured includes personnel information, equipment information, product information, production information, quality information, logistics information and production task information. In the field of production and manufacturing, the intelligent questioning agent of the present invention realizes the process as follows Figure 2 As shown: Step 1: Receive user questions; Step 2: Extract five elements; Step 3: Data rule reasoning and retrieval: The reasoning module combines the metadata structure graph (from the configuration module) for joint reasoning and generates / queries temporary data tables; Step 4: SQL reconstruction and optimization: the action module performs query optimization on the temporary table; Data storage layer: Data source: 7 types of information tables managed by the configuration module: personnel / equipment / product / production / quality / logistics / task information tables; Dynamic storage: temporary data tables generated during the inference process; Output and memory layer: Step 5: Report drawing and output: the action module draws the query results into a report; Step 6: Memory storage, the memory module saves user questions and answers to the long-term and short-term memory pool.

[0031] Please refer to Figure 3 In one embodiment of the present invention, the input data of the configuration module are: metadata database name, metadata table name, metadata field name, metadata database label, metadata table label, metadata field label; source database name, source data table name, source data field name. The output data of the configuration module are: metadata database + metadata information table, metadata database + metadata information table + feature vector of metadata table data field, metadata database data structure knowledge graph. The technical implementation of the system configuration phase is to realize the extraction and update of enterprise source data to metadata through data synchronization tools and script programming. The intelligent agent automatically generates metadata knowledge graph and information vector based on the configured metadata table. The source data of the system configuration is the information system built and put into use by the manufacturing enterprise, and the metadata is a reconstructed database, which meets the database for rapid retrieval by the intelligent question-answering agent.

[0032] The configuration module on the agent page configures the information system databases and data tables that the agent needs to access. This configuration includes the database name, data table name, and numeric field name. The agent automatically launches the data synchronization tool to synchronize data with the metadata repository. To address the business implications of synchronized data, the configuration module supports configuring tags for the metadata repository and numeric fields. This tagging improves the recognition accuracy of large models when accessing databases, data tables, and numeric fields.

[0033] For example, generate a device information table (enterprise metadata database): Table name 1: device information table device-info.

[0034] Configured field names: Date equipment name, equipment status, workshop name, process name, operating time, and usage efficiency.

[0035] The data fields of the device information table in the enterprise metadata database are derived from the configured device management information system, i.e., the enterprise source data: the database of the device management information system contains multiple data tables, such as device_basic (basic information), device_task (production tasks), and device_alarm (alarm events). Each data table contains multiple data fields: device_basic={id, device_name, device_type, manufacturer, status, location_id, department_id, create_time, update_time, manger_id, remark}, device_task={id,date,device_name,task_name,task_status,task_type,production_target,production_process}, device-alarm={id, date, device_name, alarm_grade, alarm_message, alarm_status}.

[0036] Based on the enterprise source database and data tables configured by the user, the agent synchronizes the source data to the metadata through the data synchronization tool. The data synchronization technology uses existing technologies. The reconstructed device metadata table information is as follows: device-info={id, date, device_name, running_status, location_id,task_name, total_running_hours, department_name, OEE}.

[0037] In order to improve the large model's recognition accuracy of the data fields in the device information table in the metadata database, the agent provides a tag configuration function. The configuration tags are shown in Table 1: Table 1

[0038] The system calls the natural language tool component to generate a vector of table name + data field + data field label, saves it in the database, and forms a metadata map.

[0039] The generated device information table is saved in vector form: Table 1, device information table vector: [1 00 1 1 1 0 1 0 1 … 1 0]; Similarly, information vectors such as production personnel, products, production, quality, and tasks: Table 2, Personnel information table vector: [0 10 0 0 1 0 1 0 0 … 0 0]; Table 3, product information table vector: [1 01 1 0 1 0 0 0 0 … 1 0]; Table 4, production information table vector: [1 01 0 0 1 0 0 0 1 … 0 1]; Table 5, quality information table vector: [0 10 1 1 1 0 1 0 1 …1 1]; Table 6, Task information table vector: [1 11 1 0 1 0 0 0 1 … 0 1]; Table 7, logistics information table vector: [1 01 1 0 1 0 1 0 1 …1 1]; Based on the data fields in Table 1-7, the system generates a knowledge graph of enterprise metadata. The entities of the knowledge graph are the database name and data field name.

[0040] Knowledge graph entities: Equipment information table (device-info): equipment name, workshop name, process name, equipment efficiency; Personnel information table (operator-info): operator name, team name, shift number; Production process information table (process-info): process name, processing equipment (multiple); Production task information table (task_records): date, task name, product name, process name, production quantity, material model; Product information sheet (production-records): product model, product name; Logistics information table (logistics-records): date, material model, material name, material quantity, task name, task order number, product name, connection point name, warehouse name; Quality information table (quality-records): date, product model, product name, testing equipment, testing data, testing conclusion, and pass rate.

[0041] The relationship in the knowledge graph is: Equipment information table and production task information table: Equipment participates in production tasks (associated by process name); Production task information table and product information table: task production products (associated by task name and product name); Production process information table and equipment information table: equipment used in the process (associated by the process name and equipment name in the production task); Personnel information table and equipment information table: personnel operating equipment (can be further associated with information such as time and workshop in production tasks); Production task information table and personnel information table: personnel involved in production tasks (associated through information such as time and shift in production tasks); Logistics information table and production information table: Logistics provides materials for production tasks (associated through production task names); Quality Information Table and Product Information Table: Quality records product quality test results (associated by product model and production task name).

[0042] Build a knowledge graph based on entities and relationships, that is, a metadata structure graph, such as Figure 4 As shown in the figure, the business information flow of a manufacturing enterprise is as follows: personnel + equipment + processes + materials → production tasks → product processing → quality inspection → finished product warehousing. The generated data structure knowledge graph is stored in the graph database, enabling fast retrieval during the inference phase. The agent uses the data structure knowledge graph to quickly locate the metadata table related to the query.

[0043] In one embodiment of the present invention, the reasoning module receives a user's question and calls a large model to extract the five-dimensional elements of the user's question, which are: time, place, person, task and progress information.

[0044] For example, for the question "What was the production output of equipment B in workshop A yesterday?", the system extracts the following five-dimensional features: {Time: Yesterday; Location: Workshop A; Person: Equipment B; Task: Production output; Progress: Null}.

[0045] The intent of this question is to inquire about production output. The user intent is vectorized and its vector similarity is calculated with the seven metadata tables stored in the vector database. The table with the greatest similarity is selected as the target data table.

[0046] Based on the user's question intent, the reasoning module searches the long- and short-term memory pools and calculates vector similarity to see whether the user's question is a repetitive one. If the memory module matches a suitable answer pair, the reasoning model generates SQL instructions based on the previous main target data table and secondary target data table through the SQL generation capability of the large model module, retrieves data across data tags, and performs JOIN operations to generate temporary data tables to meet the retrieval needs of the action module.

[0047] Based on the user's question intent, the reasoning module searches the long-short-term memory pool. If no suitable answer pair is found through vector similarity calculation, the reasoning module must call the data rule retrieval and reasoning module. Based on the constructed metadata data structure knowledge graph, the module retrieves the metadata tables and metadata fields related to the question, that is, finds the primary and secondary target databases associated with the question. Based on the primary and secondary target data tables, the large model module's SQL generation capabilities generate SQL instructions to retrieve data across data targets, perform JOIN operations, and generate temporary data tables to meet the needs of the action module's search.

[0048] For the question "Query the top three product models with the highest pass rate in workshop A over the past week?", the system extracts the following five-dimensional features: {Time: Past week; Location: Workshop A; Personnel: Null; Task: Query the top three product models with the highest pass rate; Progress: Null} This question's intent is to find the top three products with the highest first-pass rate. The user's intent is vectorized, and the vector similarity is calculated with the seven metadata tables stored in the vector database. The table with the highest similarity is selected as the target data table. The user's intent is focused on product quality data. Since the quality data table (quality-records) contains a first-pass rate field, the similarity reaches the maximum, and the target data table is selected as the quality data table (quality-records).

[0049] The quality data table is the main target metadata table.

[0050] Calculate the first-pass yield for each product model within a week from the quality-records table, then sort by descending first-pass yield and select the top three product models to answer this question. However, since the quality-records table doesn't directly contain a field for the shop name, you need to retrieve data from other database tables. This step requires the use of a data structure knowledge graph.

[0051] Based on the product name and task name in the quality-records table, retrieve the production task information table task-records; Based on the process name in the task-records table, retrieve the production process information table process-info; Based on the device name in the process-info table, retrieve the device information table device-info; Based on the workshop name in the device-info table, workshop A is retrieved.

[0052] The production task information table, process information table, and equipment information table retrieved based on the data structure knowledge graph are the secondary target data tables.

[0053] The large model is called to generate SQL instructions to retrieve data from the product quality information table, production task information table, process information table, and equipment information table. A JOIN operation is then performed to connect the quality-records (product quality information table), task_records (production task information table), process-info (process information table), and device-info (equipment information table). The join conditions are based on matching task name and date, and process name and date, to construct a temporary database table: Temporary data table, table name: production_data, Temporary data table, data field names: date, product model, pass rate, product name, task name, process name, equipment name, workshop name.

[0054] The reasoning module encapsulates the user question + five-dimensional elements + temporary data table + data fields in the temporary database and sends it to the action module.

[0055] The data encapsulation format is: {Question: Query the top three product models of workshop A's product pass rate in the past week Five-dimensional elements: {Time: Past week; Location: Workshop A; Personnel: Null; Task: Query the top three product models with the highest pass rate; Progress: Null} Data table name; production_data, Data field: {date, product model, pass rate, product name, task name, process name, equipment name, workshop name}}.

[0056] Action module technical implementation: Feed the data sent by the inference module to the large model module and design the following prompt word project: I need an efficient SQL query to get the following data from the production_data table: 1. Time condition: data within the past 7 days (calculated using dynamic dates) 2. Location Conditions: Workshop Name = 'Workshop A' 3. Index Requirements: Sort in descending order of first-pass yield 4. Output Limit: Only return the top three records 5. Output Fields: Product Model, Product Name, First-pass Yield (formatted as a percentage) Please ensure that the query optimizes the following aspects: - Use appropriate indexes (recommended on the workshop name, date, and first-pass yield fields) - Avoid full table scans - Use the LIMIT clause to limit the size of the result set - Use dynamic calculation for the date range (e.g., CURRENT_DATE - INTERVAL '7 days')

[0057] The large model outputs the SQL instruction for this retrieval SELECT Product Model FROM production_data WHERE: Workshop Name = 'Workshop A', AND Date >= CURDATE() - INTERVAL 7 DAY, AND Date < CURDATE(); GROUP BY Product Model; ORDER BY AVG(First-pass Yield) DESC, LIMIT 3[[ID=2,2]]

[0058] The action module retrieves the data that the user is concerned about this time through the SQL instruction based on the temporary data table and outputs the data results. The final presentation form of the data can use the existing report visualization tool

[0059] The memory module updates the user's question this time, the five-dimensional features extracted by the system, and the SQL statement generated by the system to the long-term and short-term memory pool in the form of template question and answer pairs, as follows {Question: Query the product models with the top three first-pass yields of Workshop A products in the past week Answer: {Time: Past week; Location: Workshop A; Person: Null; Task: Query the product models with the top three first-pass yields; Progress: Null} Tables: production-records, task_records, process-info, device-info SQL Instruction: SELECT Product Model FROM production_data WHERE Workshop Name = 'Workshop A' AND date >= CURDATE() - INTERVAL 7 DAY AND date <CURDATE() GROUP BY Product Model ORDER BY AVG(pass rate) DESC LIMIT 3;}.

[0060] The long short-term memory pool divides long-term storage data and short-term storage data, and then stores them in different media.

[0061] Each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0062] Although the present invention has been described in detail with reference to the accompanying drawings and in conjunction with preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, persons of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and such modifications or substitutions shall be within the scope of the present invention. Any changes or substitutions that can be easily conceived by persons skilled in the art within the technical scope disclosed in the present invention shall be within the scope of protection of the present invention.

Claims

1. An agent for generating a report, characterized in that: include: A configuration module, configured to configure a source database and data table of metadata, generate a database table vector for the source database and data table, and generate a metadata structure map based on the database table vector; An inference module, configured to extract key elements from the user question and query a temporary data table based on the key elements and the metadata structure graph; an action module, configured to query the temporary data table for data matching the user's question, plot the matching data into a report, and output the report as an answer; The memory module is used to save user questions and answers to the long-term and short-term memory pool.

2. The agent for generating a report according to claim 1, characterized in that: The configuration module includes: A first configuration unit is used to configure a source database and data table of metadata, and obtain metadata based on the source database and data table through data synchronization and script components; The second configuration unit is used to configure the metadata into a metadata table according to the functional category to which it belongs; Vectorization unit, used to convert metadata tables into vectors based on table names, numeric fields, and labels; The graph construction unit is used to construct the corresponding vectors into a metadata structure graph according to the relationship between the functional categories corresponding to the metadata table.

3. The agent for generating a report according to claim 2, characterized in that: Types of metadata tables include: Personnel information form, equipment information form, product information form, process information form, production information form, logistics information form and quality information form.

4. The agent for generating a report according to claim 2, characterized in that: The configuration module also includes: The tagging unit is used to support the tagging of configured metadata databases, metadata tables, and metadata fields. The tagged tags are used as inference access rules and are all included in the vectorization processing to generate inference rule vectors.

5. The agent for generating a report according to claim 1, characterized in that: The reasoning module includes: The element extraction unit is used to call the large model to perform semantic recognition on user questions and obtain key elements; Intent determination unit, used to determine the intent of the user's question based on key elements; A memory query unit, configured to query a matching answer from the long-short term memory pool according to the intent, and if the query is successful, send the SQL instruction of the matching answer and the user question to the action module; The intermediate query unit is used to retrieve a temporary data table based on key elements and metadata structure graph when the memory query unit fails to find a matching answer.

6. The agent for generating a report according to claim 5, characterized in that: The key elements include: Time elements, place elements, character elements, task elements, and progression elements.

7. The agent for generating a report according to claim 6, characterized in that: The reasoning module also includes: The field locking unit is used to confirm the existence of multiple temporary data tables, input the multiple temporary data tables and key elements into the large model, and obtain the locked fields in the multiple temporary data tables output by the large model, where the locked fields are associated with the key elements.

8. The agent for generating a report according to claim 7, characterized in that: The action module includes: The instruction generation unit is used to input user questions, temporary data tables and locked fields into the big model, and the big model outputs SQL instructions; An instruction execution unit, used to execute SQL instructions to obtain matching target data; The report drawing unit is used to call the chart drawing tool to generate charts according to the target data.

9. The agent for generating a report according to claim 1, characterized in that: The memory module includes: The encapsulation unit is used to encapsulate user questions, key elements of user questions and matching data into answer pairs, and save the encapsulated answer pairs into the long short-term memory pool.

10. The agent for generating a report according to claim 9, characterized in that: The memory module further includes: An information receiving unit, configured to receive evaluation information from a user; The evaluation labeling unit is used to generate corresponding satisfaction labels for the answer pairs based on the evaluation information.