Enterprise analysis report generation method and system based on large language model
By using a method based on large language models to generate enterprise analysis reports, it solves the problem that the complex logic of existing BI tools requires the cooperation of technical personnel, achieves high efficiency and low threshold for report generation, and improves the efficiency of enterprise analysis report generation.
Patent Information
- Application Number
- CN202410670294.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-06
AI Technical Summary
When existing business intelligence (BI) tools generate enterprise reports, business personnel need to be familiar with the underlying tables. Novices need to spend a lot of time training, which has high learning costs. Complex logic requires the cooperation of technical personnel, resulting in low report generation efficiency.
Adopt a method based on a large language model to receive enterprise report requirement information input by users, extract the requirement field information through the knowledge base, generate structured SQL statements, and use Agent processing to generate enterprise analysis reports, using dialogue capabilities and dialog box interaction to reduce the cost Threshold to improve generation efficiency.
It significantly lowers the threshold for data users, improves the efficiency of enterprise analysis report generation, can quickly generate reports without the need for in-depth understanding of the underlying tables, and ensures that reports meet user needs through the optimization process.
Smart Images

Figure CN118607480A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of report generation, and in particular to a method and system for generating enterprise analysis reports based on a large language model. Background Art
[0002] As supporting departments, the finance, human resources, and marketing departments often receive various temporary statistical reports that require a quick response. The original business intelligence (BI) tools can generate enterprise reports, but they require business personnel to be familiar with the underlying tables. At the same time, they need to be familiar with the calculation methods of BI tools when facing new indicator logic, and complex logic requires the cooperation of technical personnel to implement. Newcomers need to spend a certain amount of time training on the use of tools, and the learning cost is high.
[0003] Therefore, it is urgent to provide a technical solution to solve the above problems. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a method and system for generating enterprise analysis reports based on a large language model.
[0005] In a first aspect, the present invention provides a method for generating an enterprise analysis report based on a large language model, and the technical solution of the method is as follows:
[0006] Receive enterprise report requirement information input by a target user, and extract the enterprise report requirement information using a knowledge base to obtain requirement field information;
[0007] Based on the large language model, a structured SQL statement corresponding to the required field information is generated, and the structured SQL statement is processed using the constructed Agent to generate an enterprise analysis report.
[0008] The beneficial effects of the enterprise analysis report generation method based on a large language model of the present invention are as follows:
[0009] The method of the present invention utilizes the conversational capabilities of a large language model to mine and release the value of data, which can greatly lower the threshold for data users and improve the efficiency of generating enterprise analysis reports.
[0010] On the basis of the above scheme, the enterprise analysis report generation method based on a large language model of the present invention can also be improved as follows.
[0011] In an optional manner, the enterprise report demand information includes: report content information, report style information and report data analysis information; the step of receiving the enterprise report demand information includes:
[0012] The report content information, report style information and report data analysis information input by the target user are received by utilizing the interactive dialog box between the target user and the backend.
[0013] In an optional manner, the knowledge base includes: database documents, web page documents and enterprise private domain documents.
[0014] Among the above optional methods, by using a large language model and based on private knowledge bases, public data, industry policies, etc., we can gain insights into business conditions, put forward rational suggestions, and improve and optimize the quality of corporate analysis reports.
[0015] In an optional manner, the requirement field information is requirement field information in a vector form.
[0016] In an optional manner, the large language model includes: chatgpt, tongyi_proxyllm and baichuan.
[0017] In an optional manner, the method further includes:
[0018] The enterprise analysis report is output and displayed.
[0019] In an optional manner, the method further includes:
[0020] When the enterprise analysis report does not meet the needs of the target user, the enterprise report requirement information, execution steps and SQL statements corresponding to the enterprise analysis report are optimized to optimize the enterprise analysis report until the enterprise analysis report meets the needs of the target user.
[0021] In the above optional methods, when the user cannot obtain accurate analysis reports, the problem can be quickly located by optimizing the enterprise report requirement information, execution steps and SQL statements, thereby providing a solution.
[0022] In a second aspect, the present invention provides a system for generating enterprise analysis reports based on a large language model, and the technical solution of the system is as follows:
[0023] Includes: processing module and generation module;
[0024] The processing module is used to: receive enterprise report requirement information input by the target user, and extract the enterprise report requirement information using the knowledge base to obtain requirement field information;
[0025] The generation module is used to generate a structured SQL statement corresponding to the required field information based on a large language model, and use the constructed Agent to process the structured SQL statement to generate an enterprise analysis report.
[0026] The beneficial effects of the enterprise analysis report generation system based on a large language model of the present invention are as follows:
[0027] The system of the present invention utilizes the conversational capabilities of a large language model to mine and release the value of data, which can greatly lower the threshold for data users and improve the efficiency of generating enterprise analysis reports.
[0028] Based on the above solution, the enterprise analysis report generation system based on a large language model of the present invention can also be improved as follows.
[0029] In an optional manner, the enterprise report requirement information includes: report content information, report style information and report data analysis information; the processing module is specifically used to:
[0030] The report content information, report style information and report data analysis information input by the target user are received by utilizing the interactive dialog box between the target user and the backend.
[0031] In an optional manner, the knowledge base includes: database documents, web page documents and enterprise private domain documents.
[0032] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0034] Figure 1 A flowchart of an embodiment of a method for generating enterprise analysis reports based on a large language model according to the present invention;
[0035] Figure 2 The figure is a schematic diagram of the overall process;
[0036] Figure 3 It is a structural schematic diagram of an embodiment of an enterprise analysis report generation system based on a large language model of the present invention. DETAILED DESCRIPTION
[0037] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0038] Figure 1 FIG. 1 is a flow chart showing an embodiment of a method for generating enterprise analysis reports based on a large language model provided by the present invention. Figure 1 As shown, the following steps are included:
[0039] S1. Receive enterprise report requirement information input by a target user, and use a knowledge base to extract the enterprise report requirement information to obtain requirement field information.
[0040] The target user is a user who needs to generate an enterprise analysis report. The target user logs in to the BI tool with an account and password, and enters the enterprise report requirement information in the dialog box of the BI tool. The enterprise report requirement information includes but is not limited to: report content information, report style information and report data analysis information. The knowledge base includes but is not limited to: database documents, web page documents and enterprise private domain documents. The requirement field information is the requirement field information in vector form.
[0041] It should be noted that if Figure 2 As shown, when the target user uses the dialog box to input the enterprise report requirement information, the corresponding prompt words can be called from the preset standardized prompt words according to different scenarios to help the target user quickly and accurately generate the requirement report.
[0042] S2. Generate structured SQL statements corresponding to the required field information based on the large language model, and use the constructed Agent to process the structured SQL statements to generate enterprise analysis reports. The knowledge base includes but is not limited to: database documents, web page documents and enterprise private domain documents.
[0043] The large language models include but are not limited to chatgpt, tongyi_proxyllm and baichuan. The built agents include SQL agent and report agent, etc., which are not limited here.
[0044] In an optional manner, the step of receiving enterprise report requirement information includes:
[0045] The report content information, report style information and report data analysis information input by the target user are received by utilizing the interactive dialog box between the target user and the backend.
[0046] The target user enters report content information, report style information and report data analysis information in the dialog box, and returns execution steps, SQL statements and other information in the enterprise analysis report.
[0047] It should be noted that in the process of extracting the enterprise report demand information using the knowledge base to obtain the demand field information, the present embodiment adopts the retrieval-augmented generation (RAG) method, based on the knowledge base covering database documents (connected local database clusters), web page documents, enterprise private domain documents (descriptions of the company's regular business, etc.), etc., and uses the efficient storage and retrieval capabilities of the vector database to recall the target knowledge. The large language model generates high-quality target answers (structured SQL statements) based on these relevant vectors and its own generalized knowledge. . Using the inductive reasoning ability of LLM, by assigning roles and task information to different Agents and equipping them with corresponding tool plug-ins, complex enterprise analysis report generation tasks can be completed. Specifically, through prompts (prompts), LLM is required to gradually sort out the execution steps, so that LLM has the ability to gradually decompose difficult tasks into smaller and simpler steps, giving LLM task planning capabilities; by encapsulating available tools as API calls, Agents can have access to and use various databases, generate visual reports, etc.
[0048] In an optional manner, the method further includes:
[0049] The enterprise analysis report is output and displayed.
[0050] Among them, the generated enterprise analysis report is displayed through the front-end display interface.
[0051] In an optional manner, the method further includes:
[0052] When the enterprise analysis report does not meet the needs of the target user, the enterprise report requirement information, execution steps and SQL statements corresponding to the enterprise analysis report are optimized to optimize the enterprise analysis report until the enterprise analysis report meets the needs of the target user.
[0053] Among them, the target user can use the preset "consultation" button to send the enterprise report requirement information, execution steps and SQL statements corresponding to the enterprise analysis report to the target terminal, so as to contact the developer through the target terminal, check and solve the problem in time, optimize the enterprise analysis report and re-generate the enterprise analysis report until the enterprise analysis report meets the needs of the target user.
[0054] The technical solution of this embodiment can greatly lower the threshold for data users and improve the efficiency of generating enterprise analysis reports by utilizing the conversational capabilities of a large language model to mine and release the value of data.
[0055] Figure 3FIG. 2 is a schematic diagram showing a structure of an embodiment of a system 200 for generating enterprise analysis reports based on a large language model provided by the present invention. Figure 3 As shown, the system 200 includes: a processing module 210 and a generating module 220;
[0056] The processing module 210 is used to: receive enterprise report requirement information input by a target user, and extract the enterprise report requirement information using a knowledge base to obtain requirement field information;
[0057] The generating module 220 is used to generate a structured SQL statement corresponding to the required field information based on a large language model, and use the constructed Agent to process the structured SQL statement to generate an enterprise analysis report.
[0058] In an optional manner, the enterprise report requirement information includes: report content information, report style information and report data analysis information; the processing module is specifically used to:
[0059] The report content information, report style information and report data analysis information input by the target user are received by utilizing the interactive dialog box between the target user and the backend.
[0060] In an optional manner, the knowledge base includes: database documents, web page documents and enterprise private domain documents.
[0061] In an optional manner, the requirement field information is requirement field information in a vector form.
[0062] In an optional manner, the large language model includes: chatgpt, tongyi_proxyllm and baichuan.
[0063] In an optional manner, the device further includes: a display module; the display module is used to:
[0064] The enterprise analysis report is output and displayed.
[0065] In an optional manner, the method further includes: an optimization module; the optimization module is used to:
[0066] When the enterprise analysis report does not meet the needs of the target user, the enterprise report requirement information, execution steps and SQL statements corresponding to the enterprise analysis report are optimized to optimize the enterprise analysis report until the enterprise analysis report meets the needs of the target user.
[0067] The technical solution of this embodiment can greatly lower the threshold for data users and improve the efficiency of generating enterprise analysis reports by utilizing the conversational capabilities of a large language model to mine and release the value of data.
[0068] The above-mentioned parameters and steps for each module to implement corresponding functions in the enterprise analysis report generation system 200 based on the large language model of this embodiment can refer to the parameters and steps in the embodiment of the enterprise analysis report generation method based on the large language model above, and will not be repeated here.
[0069] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.
[0070] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A method for generating enterprise analysis reports based on a large language model, characterized in that: include: Receive enterprise report requirement information input by a target user, and extract the enterprise report requirement information using a knowledge base to obtain requirement field information; Based on the large language model, a structured SQL statement corresponding to the required field information is generated, and the structured SQL statement is processed using the constructed Agent to generate an enterprise analysis report.
2. The method for generating enterprise analysis reports based on a large language model according to claim 1, characterized in that: The enterprise report demand information includes: report content information, report style information and report data analysis information; the step of receiving the enterprise report demand information includes: The report content information, report style information and report data analysis information input by the target user are received by utilizing the interactive dialog box between the target user and the backend.
3. The method for generating enterprise analysis reports based on a large language model according to claim 1, characterized in that: The knowledge base includes: database documents, web page documents and enterprise private domain documents.
4. The method for generating enterprise analysis reports based on a large language model according to claim 1, characterized in that: The requirement field information is requirement field information in vector form.
5. The method for generating enterprise analysis reports based on a large language model according to claim 1, characterized in that: The large language model includes: chatgpt, tongyi_proxyllm and baichuan.
6. The method for generating enterprise analysis reports based on a large language model according to any one of claims 1 to 5, characterized in that: Also includes: The enterprise analysis report is output and displayed.
7. The method for generating enterprise analysis reports based on a large language model according to any one of claims 1 to 5, characterized in that: Also includes: When the enterprise analysis report does not meet the needs of the target user, the enterprise report requirement information, execution steps and SQL statements corresponding to the enterprise analysis report are optimized to optimize the enterprise analysis report until the enterprise analysis report meets the needs of the target user.
8. A system for generating enterprise analysis reports based on a large language model, characterized in that: include: Processing module and generation module; The processing module is used to: receive enterprise report requirement information input by the target user, and extract the enterprise report requirement information using the knowledge base to obtain requirement field information; The generation module is used to generate a structured SQL statement corresponding to the required field information based on a large language model, and use the constructed Agent to process the structured SQL statement to generate an enterprise analysis report.
9. The enterprise analysis report generation system based on a large language model according to claim 8, characterized in that: The enterprise report requirement information includes: report content information, report style information and report data analysis information; the processing module is specifically used for: The report content information, report style information and report data analysis information input by the target user are received by utilizing the interactive dialog box between the target user and the backend.
10. The enterprise analysis report generation system based on a large language model according to claim 8, characterized in that: The knowledge base includes: database documents, web page documents and enterprise private domain documents.
Citation Information
Cited By
Intelligent data report generation system and method based on large language model
CN120146016A
Enterprise data processing method and device, electronic equipment and storage medium
CN120763194A
Organization value improvement support apparatus
JP2026091224A
Organizational Value Improvement Support Device
JP7773753B1
