Multi-model-based ChatBI plug-in construction method and construction system
The ChatBI plugin approach, built using multiple models, addresses the issues of high barriers to entry, insufficient real-time performance, and difficulty in integrating with existing systems in traditional BI systems. It enables flexible configuration and efficient chart matching, reduces costs, and enhances the intelligence level of data analysis.
Patent Information
- Application Number
- CN202511029759.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-14
AI Technical Summary
Traditional BI systems have high barriers to entry, lack real-time performance and flexibility, and provide insufficient data analysis. Furthermore, ChatBI plug-in systems have complex methodologies, high costs, and are difficult to integrate with existing business systems.
A multi-model-based ChatBI plugin construction method is adopted, including data source configuration, natural language processing model registration, prompt word templates, and dialogue interaction strategy configuration, to generate a downloadable ChatBI plugin package that supports the management and analysis of various databases and tables.
It achieves a decoupled integration between the ChatBI plugin and the original system, improving configuration flexibility and reusability, reducing production costs, and making chart matching more accurate, thus solving the problem of insufficient intelligence in traditional BI systems.
Smart Images

Figure CN120950039A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically to a method and system for building ChatBI plugins based on multiple models. Background Technology
[0002] With the continuous development of large-scale model technology, traditional business areas are steadily moving towards a new stage of intelligent and efficient development by leveraging large-scale model-related technologies.
[0003] On the one hand, while traditional BI (Business Intelligence) systems play an important role in corporate decision-making, their architecture and interaction patterns have the following significant shortcomings:
[0004] First, the system has a high barrier to entry. It requires technical experts, and business personnel must master SQL (a structured query language) writing skills to use it proficiently. This undoubtedly sets a high technical barrier for business personnel.
[0005] Second, it lacks real-time performance and flexibility. Data analysis relies on pre-written SQL; if the content of the data query needs to be changed, the SQL needs to be rewritten.
[0006] Third, data analysis is insufficient. Analytical experience is often limited to individuals and lacks systematicity and comprehensiveness, making it difficult to deeply and extensively mine and analyze data, thus failing to fully realize the potential value of the data.
[0007] On the other hand, ChatBI (Chat + Business Intelligence) plugins are a technology that combines Natural Language Understanding (NLP) with BI tools, allowing users to interact with data through chat-like conversations. However, some existing ChatBI plugin systems suffer from complex methodologies, high usage costs, and difficulties in integrating with existing business systems, hindering seamless integration and efficient collaboration.
[0008] Therefore, how to solve the problems of lack of intelligence in traditional BI systems and inconvenience in integrating with existing systems, as well as how to improve configuration flexibility, reduce production costs, achieve application decoupling, and improve chart matching are problems that urgently need to be solved by those skilled in the art. Summary of the Invention
[0009] In view of the above problems, the present invention provides a method and system for building ChatBI plugins based on multiple models, so as to at least solve some of the technical problems mentioned in the background art.
[0010] To achieve the above objectives, the present invention adopts the following technical solution:
[0011] On the one hand, this invention provides a method for building a ChatBI plugin based on multiple models, including the following steps:
[0012] Establish data sources for multiple databases and configure connections to these data sources;
[0013] Select the successfully connected data source and its databases and tables to form a database schema;
[0014] Select the pre-integrated natural language processing model type and enter the API-key to complete the natural language processing model information registration; the pre-integrated natural language processing model includes multiple models;
[0015] Configure corresponding prompt word templates for different SQL dialogue scenarios;
[0016] Configure corresponding dialogue interaction strategies for different SQL dialogue scenarios;
[0017] Configure basic application information, and based on the basic application information, select the corresponding database mode, model, prompt word template and dialogue interaction strategy to form a query scenario application;
[0018] Based on the query scenario, a downloadable ChatBI plugin package is generated.
[0019] Furthermore, it also includes: saving successfully connected data sources, and automatically pulling and storing the table structure information of all databases under the connection address when saving the data source, storing them in categories by database name, and supporting viewing database name, table name and table field details.
[0020] Furthermore, it also includes: for the selected successfully connected data source and its databases and tables, it supports viewing the databases and tables, and supports annotating or describing the table names and table fields, and storing the modified content as an independent copy.
[0021] Furthermore, the pre-integrated natural language processing model types are uniformly encapsulated, and the input and output parameter structures of various models are agreed upon.
[0022] Furthermore, the models in the pre-integrated natural language processing model include an automatic speech recognition model, a text-to-speech model, and a large language model.
[0023] Furthermore, the prompt template includes an SQL generation prompt, an SQL execution result explanation prompt, an SQL analysis prompt, and a question recommendation prompt.
[0024] Furthermore, the SQL generation Prompt contains placeholders.
[0025] Furthermore, the core process of the query scenario application includes: SQL generation, SQL execution, SQL result interpretation, SQL structure analysis, and question recommendation.
[0026] Furthermore, it also includes: automatically matching pre-configured chart component templates based on the results of the SQL execution and the structured features obtained after the SQL structure analysis.
[0027] On the other hand, the present invention also provides a ChatBI plugin building system based on multiple models. Using the above-described method, the system includes:
[0028] The data source management module is used to configure connections to data sources from different databases;
[0029] The data modeling module is used to select the successfully connected data source and its databases and tables based on the data source management module, and to annotate and describe the table structure to form a database schema.
[0030] The model repository module is used to integrate multiple types of natural language processing models, and each type of natural language processing model contains multiple models.
[0031] The Prompt management module is used to configure prompt word templates for different SQL dialogue scenarios.
[0032] The dialogue configuration module is used to configure the dialogue interaction strategies used in different SQL dialogue scenarios.
[0033] The application configuration module is used to configure basic application information and, based on the basic application information, select the corresponding database mode, model, prompt word template and dialogue interaction strategy to form a query scenario application.
[0034] The application plugin building module is used to generate downloadable ChatBI plugin packages based on the query scenario.
[0035] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method and system for building ChatBI plugins based on multiple models, which has the following beneficial effects:
[0036] The ChatBI plugin application provided by this invention can be decoupled from the current system and introduced in a plug-and-play manner, solving the problem of inconvenience in integrating with the original system.
[0037] The ChatBI plugin building system provided by this invention is a ChatBI production platform that can configure multiple ChatBI applications simultaneously. When configuring applications, once one application scenario is configured, the remaining application scenarios can quickly reuse the existing configuration by simply changing variables. This solves the problem of traditional BI systems lacking intelligence.
[0038] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of the ChatBI plugin construction method based on multiple models provided in an embodiment of the present invention.
[0041] Figure 2 This is a schematic diagram of the ChatBI plugin building system framework based on multiple models provided in an embodiment of the present invention. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] Example 1:
[0044] Embodiment 1 of this invention discloses a method for constructing a ChatBI plugin based on multiple models, see [link to documentation]. Figure 1 As shown, it includes:
[0045] S1. Establish data sources for multiple databases and configure connections to the data sources;
[0046] S2. Select the successfully connected data source and its databases and tables to form a database schema;
[0047] S3. Select the pre-integrated natural language processing model type and enter the API-key to complete the natural language processing model information registration; the pre-integrated natural language processing model includes multiple models;
[0048] S4. Configure corresponding prompt word templates for different SQL dialogue scenarios;
[0049] S5. Configure corresponding dialogue interaction strategies for different SQL dialogue scenarios;
[0050] S6. Configure the basic information of the application, and select the corresponding database mode, model, prompt word template and dialogue interaction strategy according to the basic information of the application to form a query scenario application;
[0051] S7. Generate a downloadable ChatBI plugin package based on the query scenario application.
[0052] The labels S1-S7 above are for ease of explanation only and do not specify the execution order of the steps. The following will provide a detailed explanation of steps S1-S7.
[0053] In step S1 above, data sources are established for multiple databases and the data sources are configured to connect. Specifically, a new data source is created on the data source management page. After filling in the IP address, port, account password, and other information of the specified database, the connection is tested to ensure success and then saved to form a data source connection record.
[0054] When saving the data source, it automatically retrieves and stores the table structure information of all databases under the connection address, and stores them in categories by database name. It supports viewing database name, table name and table field details.
[0055] The database types managed above include MySQL, PostgreSQL, SQLite, etc.
[0056] In step S2 above, the successfully connected data source and its databases and tables are selected to form a database schema. The selected successfully connected data source and its databases and tables can be viewed. If it is necessary to supplement the table name comments, table field comments and enumeration information, they can be modified and the modified content is stored as an independent copy. It should be noted that saving it as an independent copy here means not directly operating the data source, but adding a layer of database schema.
[0057] Storing the modified content as an independent copy serves two purposes: firstly, it allows for the creation of a clearer database schema by modifying database table comments, without affecting the original source database's table structure information; secondly, it avoids multiple queries to the data source, reducing query overhead.
[0058] In step S3 above, select the pre-integrated natural language processing model type and enter the API-key to complete the registration of natural language processing model information; the pre-integrated natural language processing model contains multiple models;
[0059] The aforementioned types of natural language processing models include ASR (Automatic Speech Recognition), TTS (Text-to-Speech), and LLM (Large Language Model);
[0060] The above-mentioned pre-integrated natural language processing model types are uniformly encapsulated, and the input and output parameter structures of various models are agreed upon.
[0061] In step S4 above, corresponding prompt word templates are configured for different SQL dialogue scenarios. These prompt word templates include SQL generation Prompt, SQL execution result explanation Prompt, SQL analysis Prompt, and question recommendation Prompt. The SQL generation Prompt contains placeholders for easy reuse.
[0062] Next, examples will be given for SQL generation Prompt, SQL execution result interpretation Prompt, SQL analysis Prompt, and question recommendation Prompt:
[0063] (1) Generate Prompt from SQL:
[0064] "You are now an SQL expert. You will be given a table structure in a database, and you need to generate an SQL query statement based on the problem."
[0065] Here is a collection of question-and-answer pairs:
[0066]
sql_examples
[0067] A value of 0 for `answerType` indicates that the corresponding SQL was output; a value of 1 indicates that the corresponding SQL was not output; `confirm` provides a specific message.
[0068] The results are output in JSON format, no further explanation is required. Please note that only one SQL statement is returned at a time, and the returned JSON data is as follows:
[0069] {
[0070] "input":"Query the total number of teachers",
[0071] "answerType":0,
[0072] "sql":"SELECT COUNT(*)FROM teacherWHERE status=1;",
[0073] "confirm":""
[0074] }
[0075] The database table structure is as follows:
[0076]
db_schema
[0077] In this prompt template, `[sql_examples]` is a collection of question-and-answer pairs. To enable the large model to generate SQL more accurately, a reference question and answer can be provided for a class of complex questions. The large model itself has generalization capabilities, and after this processing, it can easily and efficiently handle the SQL generation for this type of question. `[db_schema]`, on the other hand, contains the specific table structure information, derived from the selected database schema.
[0078] The above is a successful example, and below is an example of a failed response:
[0079] {
[0080] "input":"Query the total number of workers",
[0081] "answerType":1,
[0082] "sql":"",
[0083] "confirm": "No worker-related table information was found."
[0084] }
[0085] Output JSON data as required to facilitate result parsing and provide specific prompts to the large model when the response fails.
[0086] (2) SQL Execution Result Explanation Prompt:
[0087] You are a data analyst. Please analyze the questions and answers, and keep your output to 100 words or less.
[0088] question:{askText}
[0089] answer:{res}
[0090] (3) SQL Analysis Prompt:
[0091] “
[0092] You are now an SQL analyst who needs to analyze the composition of SQL queries, extracting the fields after the SELECT statement, the table names used, the query conditions, and the fields after the GROUP BY clause, and output the results in JSON format.
[0093] The input SQL is: [sql], and the output should be in JSON format.
[0094] For example:
[0095]
[0096] "
[0097] In this prompt template, "[sql]" refers to the specific SQL statement, and the JSON data within it represents the requested SQL structure. Analyzing the structure of the SQL statement is to better match it with the chart.
[0098] (4) Recommended Prompt
[0099] “
[0100] As a query assistant, here is the content of my question bank:
[0101]
questions
[0102] "
[0103] In step S5 above, corresponding dialogue interaction strategies are configured for different SQL dialogue scenarios; for example, setting opening remarks, number of context dialogues, catch-all terms, whether to display popular searches and recent searches, and the time range of popular searches and recent searches.
[0104] In step S6 above, configure the basic application information (such as application name, application version, application description, etc.), and select the corresponding database mode, model, prompt word template (select SQL generation Prompt, SQL execution result explanation Prompt, SQL analysis Prompt, and question recommendation Prompt in sequence) and dialogue interaction strategy to form a query scenario application; based on this query scenario application, a trial run of dialogue questioning can be carried out;
[0105] The selected models may include ASR (Automatic Speech Recognition), TTS (Text-to-Speech), and LLM (Large Language Model). ASR is used to convert speech into text, TTS is used to broadcast the final generated result, and LLM is used to perform text business processing.
[0106] The core process of this query scenario application includes: SQL generation, SQL execution, SQL result interpretation, SQL structure analysis, and question recommendation; the following example illustrates this core process:
[0107] Assuming the application was previously created using a data source and model of a school's student and faculty information database; after opening the ChatBI plugin, you arrive at the dialog page; you can choose text input or voice input. Assuming you choose voice input and turn on your system microphone, the voice prompt would be: "Distribution of educational backgrounds of school teachers." Based on this, the core process for querying the application scenario includes:
[0108] (1) SQL generation:
[0109] The plugin first calls the ASR service to perform speech-to-text conversion and obtain the text. Then, the system retrieves the configuration information associated with the application during its creation. The configurations required in the SQL generation process are as follows: the application's data modeling information (i.e., the database table structure), the SQL generation prompt, the SQL question-answer pair set, and the LLM used.
[0110] The original Prompt is as follows:
[0111] "You are now an SQL expert. You will be given a table structure in a database, and you need to generate an SQL query statement based on the problem."
[0112] Here is a collection of question-and-answer pairs:
[0113] {
[0114] "input":"Query the total number of teachers",
[0115] "answerType":0,
[0116] "sql":"SELECT COUNT(*)FROM teacherWHERE status=1;",
[0117] "confirm":""
[0118] }
[0119] The database table structure is as follows:
[0120]
db_schema
[0121] After placeholder replacement, the prompt words
sql_examples
db_schema
[0122] The expected output of the large model is:
[0123] {
[0124] "input":"Distribution of educational backgrounds among school teachers",
[0125] "answerType":0,
[0126] "sql":"SELECT degree,COUNT(*)AS count FROM teachers WHERE status=1GROUP BY degree;",
[0127] "confirm":""
[0128] }
[0129] Parse the results to obtain the SQL statement, perform SQL security checks to ensure data integrity. Ensure the SQL is a query statement and does not contain UPDATE, INSERT, or DELETE statements. Execute the SQL; the result is:
[0130]
[0131]
[0132] (2) SQL execution:
[0133] (3) Interpretation of SQL results:
[0134] After the SQL execution yields the result, the application-configured SQL execution result explanation prompt is retrieved, and the large model outputs the corresponding result explanation.
[0135] (4) SQL structure analysis:
[0136] While interpreting the SQL results, the SQL structure can be analyzed in parallel; specifically:
[0137] Original prompt content
[0138] “
[0139] You are now an SQL analyst who needs to analyze the composition of SQL queries, extracting the fields after the SELECT statement, the table names used, the query conditions, and the fields after the GROUP BY clause, and output the results in JSON format.
[0140] The input SQL is: [sql], and the output should be in JSON format.
[0141] For example:
[0142]
[0143]
[0144] "
[0145] After placeholder replacement,
sql
SELECT degree, COUNT(*) AS count FROM teachers WHERE status=1GROUP BY degree;
[0146] Based on the expected output of the large model, the SQL structure analysis result is as follows:
[0147]
[0148]
[0149] After analysis, it can be found that the SQL uses the group_by keyword and the field is degree. The two fields retrieved by the SQL query are degree and count. If the execution result of this SQL needs to be visualized, the field in group_by can be marked as dimension and the other field can be marked as indicator. In this way, the front end can identify how to render the icon component.
[0150] Next, we'll look at some more complex scenarios. If there are more than two select fields, then all fields except those appearing in the group can be used as indicator fields. If this exceeds a certain limit, bar or pie charts may not be suitable for displaying the data; instead, lists or tables can be used.
[0151] If there is more than one group field, the group fields can be merged and marked as dimensions. When an asterisk (*) appears in a select field, the entire data result is marked as being displayed as a list or table.
[0152] For mapping English and Chinese characters in table field names, the corresponding tables and fields can be retrieved from the previously annotated database schema based on `table_name` (table name) and the field names appearing in the `SELECT` statement, thus matching Chinese comments. This provides both the SQL execution results and an analysis of the SQL structure, enabling efficient and accurate visualization of the results.
[0153] (5) Recommended Questions:
[0154] Question recommendations can also be processed in parallel with SQL result interpretation and SQL structure analysis to reduce the time consumption of the entire execution chain. When performing the question recommendation process, the question recommendation prompt corresponding to the plugin application is first obtained, and then a batch of questions that have been searched in the last N days are obtained from the search history as the recommendation scope.
[0155] The above outlines the core workflow of a single ChatBI plugin operation. After each step is completed, the plugin displays the progress of the current process in real time to enhance the user experience. Finally, after inputting a voice command, the corresponding result can be visualized.
[0156] In step S7 above, if there are no problems after trial operation, it can be saved and published; at this time, a downloadable ChatBI plugin package can be generated according to the query scenario application; the ChatBI plugin package is a compressed package. After decompression, import the plugin in the browser's extensions and management program page, and then you can use the browser to open the corresponding website page and activate the ChatBI plugin to start a conversation.
[0157] Example 2:
[0158] Based on the above embodiment 1, embodiment 2 further includes: configuring and saving a chart component template, which includes a chart type (e.g., a bar chart type) and a basic chart style;
[0159] For the query scenario application in Embodiment 1 above, a separate set can be created for the image components used in each query scenario application, and the styles do not affect each other;
[0160] For the query scenario application in Embodiment 1 above, based on the result of the SQL execution and the structured features obtained after the SQL structure analysis, the pre-configured chart component template is automatically matched, that is, it is analyzed which chart component to use to display this batch of data.
[0161] Example 3:
[0162] This embodiment 3 discloses a ChatBI plugin building system based on multiple models, applying the ChatBI plugin building method provided in embodiment 1 or embodiment 2 above; the system consists of two parts: one part is a backend configuration management system; the other part is application plugins;
[0163] Among them, see Figure 2 As shown, the backend configuration management system specifically includes:
[0164] (1) Data source management module, used to configure and connect to data sources of different databases, and realize the structure query and SQL execution of the corresponding database;
[0165] (2) Data modeling module, which is used to select the successfully connected data source and its databases and tables based on the data source management module, and to annotate and describe the table structure to form a database schema for subsequent assembly of Prompt;
[0166] (3) Model repository module, which is used to integrate multiple types of natural language processing models. Each type of natural language processing model contains multiple models. Among them, the types of natural language processing models include TTS (text-to-speech), ASR (automatic speech recognition) and LLM (large language model). Each type of model includes multiple models and provides a unified calling interface for them.
[0167] (4) The Prompt management module is used to configure the prompt word templates used in different SQL dialogue scenarios; the prompt word template contains placeholders and can dynamically replace variable values;
[0168] (5) SQL Set Management Module, used to create and manage SQL statements;
[0169] (6) Dialogue configuration module, used to configure the dialogue interaction strategy used in different SQL dialogue scenarios;
[0170] (7) Visualization configuration module, used to configure and store the templates of each chart component, which includes the chart type (e.g., bar chart type) and the basic style of the chart;
[0171] (8) Application configuration module, used to configure basic application information, and select the corresponding database mode, model, prompt word template and dialogue interaction strategy according to the basic application information to form a query scenario application; after configuration, you can test and experience it, and then you can choose to publish the application; after publication, the application can be queried in the application plugin construction module;
[0172] (9) Application plugin building module, used to generate downloadable ChatBI plugin packages based on query scenario applications; the ChatBI plugin package is a compressed package. After decompression, the plugin is imported into the browser's extensions and management program page. Then, the browser can be used to open the corresponding website page and activate the ChatBI plugin to conduct a dialogue.
[0173] In summary, the ChatBI plugin construction method and system based on multiple models provided by this invention have the following advantages:
[0174] (1) Flexible configuration and high reusability. The ChatBI plugin building system provided by this invention is a ChatBI production platform that can configure multiple ChatBI applications at the same time. When configuring an application, once an application scenario is configured, the other application scenarios can quickly reuse the existing configuration by changing the variables.
[0175] (2) Plug-in interaction with the original system. Compared with other methods that are mixed and embedded with the system, the ChatBI plug-in application provided by this invention can be decoupled from the current system and introduced in a plug-in manner.
[0176] (3) Accurate chart generation. This invention analyzes and selects charts by combining the results of SQL execution and the structure of the SQL itself, thus visualizing the results. This is more accurate than charts derived from large-scale model analysis of SQL execution results.
[0177] (4) Low cost. This invention proposes to combine a class of complex questions into a single SQL question-answer pair and provide it to a large model. This greatly improves the accuracy of the answers without fine-tuning and without introducing training costs.
[0178] (5) Safe and reliable. The SQL output by the large model will undergo security verification to ensure that the SQL is a query statement and does not contain UPDATE, INSERT, or DELETE types, and to ensure that the data is not tampered with before it is executed safely.
[0179] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0180] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for constructing a ChatBI plugin based on multiple models, characterized in that, Includes the following steps: Establish data sources for multiple databases and configure connections to these data sources; Select the successfully connected data source and its databases and tables to form a database schema; Select the pre-integrated natural language processing model type and enter the API-key to complete the natural language processing model information registration; the pre-integrated natural language processing model includes multiple models; Configure corresponding prompt word templates for different SQL dialogue scenarios; Configure corresponding dialogue interaction strategies for different SQL dialogue scenarios; Configure basic application information, and based on the basic application information, select the corresponding database mode, model, prompt word template and dialogue interaction strategy to form a query scenario application; Based on the query scenario, a downloadable ChatBI plugin package is generated.
2. The ChatBI plugin construction method based on multiple models according to claim 1, characterized in that, Also includes: Save the successfully connected data source, and automatically retrieve and store the table structure information of all databases under that connection address when saving the data source. Store the data by database name and support viewing database name, table name and table field details.
3. The ChatBI plugin construction method based on multiple models according to claim 1, characterized in that, Also includes: For the selected successfully connected data source and its databases and tables, it is supported to view the databases and tables, and to add comments or descriptions to the table names and table fields, and store the modified content as an independent copy.
4. The ChatBI plugin construction method based on multiple models according to claim 1, characterized in that, The pre-integrated natural language processing model types are uniformly encapsulated, and the input and output parameter structures of various models are agreed upon.
5. The ChatBI plugin construction method based on multiple models according to claim 1, characterized in that, The pre-integrated natural language processing model includes an automatic speech recognition model, a text-to-speech model, and a large language model.
6. The ChatBI plugin construction method based on multiple models according to claim 1, characterized in that, The prompt templates include SQL generation Prompt, SQL execution result explanation Prompt, SQL analysis Prompt, and question recommendation Prompt.
7. The ChatBI plugin construction method based on multiple models according to claim 6, characterized in that, The SQL-generated Prompt contains placeholders.
8. The ChatBI plugin construction method based on multiple models according to claim 1, characterized in that, The core process of the query scenario application includes: SQL generation, SQL execution, SQL result interpretation, SQL structure analysis, and question recommendation.
9. A method for constructing a ChatBI plugin based on multiple models according to claim 8, characterized in that, Also includes: Based on the results of the SQL execution and the structured features obtained after SQL structure analysis, pre-configured chart component templates are automatically matched.
10. A ChatBI plugin building system based on multiple models, characterized in that, The method described by any one of claims 1-9 comprises: The data source management module is used to configure connections to data sources from different databases; The data modeling module is used to select the successfully connected data source and its databases and tables based on the data source management module, and to annotate and describe the table structure to form a database schema. The model repository module is used to integrate multiple types of natural language processing models, and each type of natural language processing model contains multiple models. The Prompt management module is used to configure prompt word templates for different SQL dialogue scenarios. The dialogue configuration module is used to configure the dialogue interaction strategies used in different SQL dialogue scenarios. The application configuration module is used to configure basic application information and, based on the basic application information, select the corresponding database mode, model, prompt word template and dialogue interaction strategy to form a query scenario application. The application plugin building module is used to generate downloadable ChatBI plugin packages based on the query scenario.
Citation Information
Cited By
Data table visualization method based on user triggering and AI-driven visual recommendation
CN122153189A
