Analysis report generation method based on big language model question number result

Through the method of generating a number of questions based on the large language model, the problem of the traditional data analysis report generation method is solved, and the problem of time-consuming and prone to human errors is achieved, efficient and reliable data analysis report generation is achieved, and the accuracy and readability of the report are improved.

CN119621938APending Publication Date: 2025-03-14BEIJING JOIN BRIGHT DIGITAL POWER TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411738697.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The generation method of traditional data analysis reports takes a long time and is prone to human errors, especially when the data volume is large or the report needs to be updated regularly.

Method used

The analysis report generation method of question number results based on the large language model is adopted, user problems are processed through vectorization, and prompt word templates are matched using the approximate nearest neighbor search algorithm, and quadratic calculations are performed in combination with the large language model to generate a complete analysis report.

Benefits of technology

It greatly improves the efficiency and reliability of data processing, reduces manual operations and human errors, shortens the time period from data collection to report output, and improves the accuracy and readability of reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621938A_ABST
    Figure CN119621938A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence questions, in particular to an analysis report generation method based on a question result of a large language model, which comprises a question system for obtaining the question result according to a question input by a user, and further comprises the step of constructing a report template database. The method comprises the following steps: S1, vectorizing a natural language; s2, in the Weaviate vector database, selecting a cue word with the maximum similarity value to match a cue word template; and S3, if the matching is successful, performing secondary calculation on the question number result according to the cue word template, combining the question number result and the secondary calculation result to form report data, filling the report data into a report template associated with the current cue word template, and generating a complete analysis report. According to the method, the data processing efficiency and reliability are greatly improved, meanwhile, the labor cost is reduced, and optimization and innovation of a data analysis process are promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent questioning technology, and in particular to a method for generating an analysis report based on questioning results of a large language model. Background Art

[0002] Traditional data analysis report generation usually involves manually collecting data, cleaning and organizing data sets, applying statistical methods to analyze data, drawing charts, and writing explanatory text, and then using spreadsheet software or professional statistical software to process and analyze data. However, this method is time-consuming and prone to human errors, especially when the amount of data is large or the report needs to be updated regularly. Summary of the invention

[0003] In order to solve the above problems, the present invention provides a method for generating an analysis report based on the results of large language model questions, which greatly improves the efficiency and reliability of data processing, while also reducing labor costs and promoting the optimization and innovation of data analysis processes.

[0004] The technical solution adopted by the present invention is to provide a method for generating an analysis report based on the results of large language model question counting, including a question counting system for obtaining question counting results according to questions input by users, building a report template database, including obtaining report templates, generating different prompt word templates according to each report template, wherein each prompt word template is set with a data algorithm, on this basis, the analysis report generation method includes the following steps,

[0005] S1. After the system receives the question raised by the user in natural language, it vectorizes the natural language;

[0006] S2. In the Weaviate vector database, an approximate nearest neighbor search algorithm is used to obtain multiple prompt words similar to the user's question vector, and a prompt word with the largest similarity value is selected to match the prompt word template;

[0007] S3. If the match is successful, the question count result is recalculated according to the prompt word template and the semantic understanding and deduction of the large language model to obtain the secondary calculation result, and the question count result and the secondary calculation result are combined to form report data, and the report data is filled into the report template associated with the current prompt word template to generate a complete analysis report;

[0008] If the match fails, the user prompt word is generated as an abnormal template prompt word, and a report is directly generated through a large-scale pre-trained language model.

[0009] The specific process of the question system obtaining the question result according to the question input by the user is:

[0010] A1. After receiving a query request from a user in natural language;

[0011] A2. Obtain metadata information, including table information, field information and relationship information in the database;

[0012] A3. Assemble prompt words based on the above two aspects of information, combine metadata information with the natural language of the user's question to form a complete context environment;

[0013] A4. Derive and generate SQL statements, retrieve the required data from the database, and form a structured data set to obtain the query results.

[0014] The beneficial effect of the present invention is that it provides a method for generating an analysis report based on the results of questioning with a large language model, converts the questions input by the user into structured questioning results based on the large language model, performs secondary calculation on the questioning results according to the matched prompt word template to obtain secondary calculation results, combines the questioning results with the secondary calculation results to form report data, and finally fills the report data into the report template to generate a complete report. The present invention can process a large amount of data, complete data cleaning, conversion and analysis, and greatly shorten the time period from data collection to report output. At the same time, it reduces manual operations, reduces data deviations caused by human errors, and ensures the accuracy of the analysis results. In addition, the application of automated data analysis reports enables complex data analysis results to be presented to non-professional users in an intuitive form, enhancing the readability and influence of the report. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0016] like Figure 1 As shown, the present invention provides a method for generating an analysis report based on the results of large language model question counting, including a question counting system for obtaining question counting results according to questions input by users, building a report template database, including obtaining report templates, generating different prompt word templates according to each report template, wherein each prompt word template is set with a data algorithm, on this basis, the analysis report generation method includes the following steps,

[0017] S1. After the system receives the question raised by the user in natural language, it vectorizes the natural language;

[0018] S2. In the Weaviate vector database, an approximate nearest neighbor search algorithm is used to obtain multiple prompt words similar to the user's question vector, and a prompt word with the largest similarity value is selected to match the prompt word template;

[0019] S3. If the match is successful, the question count result is recalculated according to the prompt word template and the semantic understanding and deduction of the large language model to obtain the secondary calculation result, and the question count result and the secondary calculation result are combined to form report data, and the report data is filled into the report template associated with the current prompt word template to generate a complete analysis report;

[0020] If the match fails, the user prompt word is generated as an abnormal template prompt word, and a report is directly generated through a large-scale pre-trained language model.

[0021] like Figure 1 As shown, the specific process of the question system obtaining the question result according to the question input by the user is:

[0022] A1. After receiving a query request from a user in natural language;

[0023] A2. Obtain metadata information, including table information, field information and relationship information in the database;

[0024] A3. Assemble prompt words based on the above two aspects of information, combine metadata information with the natural language of the user's question to form a complete context environment;

[0025] A4. Derive and generate SQL statements, retrieve the required data from the database, and form a structured data set to obtain the query results.

[0026] The specific process of the present invention when used is:

[0027] 1. Receive query requests from users in natural language. The system parses the user's language input to extract key requirements and query conditions.

[0028] 2. Derivation and generation of SQL statements: The system automatically assembles prompt words based on the user's natural language questions, as well as the configured table names, table comments, field names, field comments, and inter-table relationship information. Through the semantic understanding ability of the large language model, it generates accurate SQL statements that meet user needs, ensuring efficient data extraction and satisfying query intent.

[0029] 3. Execute the generated SQL statement, retrieve the required data from the database, and get the query result.

[0030] 4. Matching prompt word template: The prompt word template is a pre-designed text framework used to generate analytical content that meets different report requirements. The system uses a vector semantic matching algorithm to accurately query the prompt word with the highest similarity to the user's question from the vector library, and matches the prompt word template with this prompt word. Each prompt word template has pre-defined associative calculation rules, providing structured guidance and dynamic calculation support for generating report content.

[0031] 5. Generate secondary calculation results: The system processes and calculates the question results based on the prompt word template and combines the semantic understanding and inference capabilities of the large language model to generate secondary calculation results.

[0032] 6. Generate task report: The system associates the corresponding report template according to the matched prompt word template, combines the query result with the secondary calculation result to form report data, fills the report data into the report template, and generates a complete analysis report.

[0033] The present invention aims to gradually integrate user questions, metadata, tasks, additional instructions, generation process and constraints into prompt words through a step-by-step assembly prompt word method, and dynamically improve the accuracy of generating database query SQL statements by combining the thinking chain model, and finally achieve efficient retrieval and generation of the required business data set, that is, the question result.

[0034] Prompt is the core technology of intelligent data analysis. It provides context, instructions or clues for the model by analyzing factors such as user tasks, generation process, restrictions, additional instructions and metadata to generate expected results.

[0035] The thought chain mode is a way to enhance the reasoning ability of large language models. It enhances the ability of large language models to handle complex reasoning tasks through step-by-step reasoning, decomposition of complex problems, and display of the reasoning process, enabling the model to better handle multi-step problems. In practice, the thought chain mode guides the model to generate reasoning steps through specific prompt words.

[0036] The present invention uses a prompt word template, combined with a thought chain mode, and a pre-trained large-scale language model to perform secondary processing on the question result, generate a secondary calculation result, and combine the question data and the secondary calculation result to generate the report data required by the current report template. Then fill in the data according to the associated report template, and finally generate a customized report that meets the user's needs.

[0037] The matching of prompt word templates is done by natural language vectorization of user questions, and querying Weaviate's prompt word with the highest similarity to match the corresponding prompt word template. The prompt word with the highest similarity refers to the prompt word with the maximum similarity value. Weaviate uses an approximate nearest neighbor search algorithm, which aims to quickly find samples similar to the query point without calculating the distance between all samples and the query point one by one.

Claims

1. A method for generating an analysis report based on a large language model question result, comprising a question system for obtaining a question result according to a question input by a user, characterized in that: Constructing a report template database includes obtaining a report template, generating different prompt word templates according to each report template, wherein each prompt word template is set with a data algorithm. On this basis, the analysis report generation method includes the following steps: S1. After the system receives the question raised by the user in natural language, it vectorizes the natural language; S2. In the Weaviate vector database, an approximate nearest neighbor search algorithm is used to obtain multiple prompt words similar to the user's question vector, and a prompt word with the largest similarity value is selected to match the prompt word template; S3. If the match is successful, the question count result is recalculated according to the prompt word template and the semantic understanding and deduction of the large language model to obtain the secondary calculation result, and the question count result and the secondary calculation result are combined to form report data, and the report data is filled into the report template associated with the current prompt word template to generate a complete analysis report; If the match fails, the user prompt word is generated as an abnormal template prompt word, and a report is directly generated through a large-scale pre-trained language model.

2. The method for generating an analysis report based on the results of large language model questions according to claim 1, characterized in that: The specific process of the question system obtaining the question result according to the question input by the user is: A1. After receiving a query request from a user in natural language; A2. Obtain metadata information, including table information, field information and relationship information in the database; A3. Assemble prompt words based on the above two aspects of information, combine metadata information with the natural language of the user's question to form a complete context environment; A4. Derive and generate SQL statements, retrieve the required data from the database, and form a structured data set to obtain the query results.

Citation Information

Cited By

  • Natural language query-oriented intelligent number asking and automatic report generation method

    CN121390000A