AI Assistant in practice: Use ChatBI for data analysis
When you use ChatBI through the DataWorks AI assistant, you can query metrics, analyze trends, drill down, and attribute changes in natural language based on configured datasets, and generate charts and data reports on demand. If you already have SQL statements or query results, you can also use the Data Analysis Expert Suite to complete the analysis and deliver reports. This topic describes the configuration methods, operation steps, and typical practices of the two analysis paths.
Features
ChatBI provides dataset-driven natural language data analysis capabilities, covering question understanding, data queries, chart generation, and conclusion extraction. The AI assistant uses the ChatBI skill to handle these analysis tasks. If you already have SQL statements or completed query results, you can choose the Data Analysis Expert Suite as an alternative analysis path.
With the two paths described in this topic, you can:
-
Query metrics in business language, ask multi-round follow-up questions in the same conversation, and drill down by dimension.
-
Obtain trend, comparison, ranking, proportion, and attribution analysis conclusions, along with supporting visualizations.
-
Generate single-file HTML data reports (optionally in the consulting report or operations dashboard style) and DataWorks notebooks on demand.
-
Download query results as CSV or XLSX files, or export them as a new spreadsheet.
The two paths correspond to different data sources. Select the path that fits your situation on the following tabs, and specify the data source for each task to avoid duplicate queries or duplicate report generation.
Path A: Built-in ChatBI skill (dataset-driven queries)
This path is suitable for users who have configured datasets in ChatBI and want to query metrics and perform in-depth analysis in business language.
-
Confirm or select a ChatBI dataset.
-
Submit the original question to ChatBI to obtain data, analysis, and insights.
-
Ask follow-up questions in the same conversation. If you need a report, explicitly request one to obtain the report artifact returned by ChatBI.
The skill for this path is named dataworks-chatbi-skill. It is not the same skill as dataworks-chatbi-analysis in the expert suite. For the operation steps, see Step 2: Query and analyze data based on a ChatBI dataset.
Path B: Data Analysis Expert Suite (query result-driven analysis)
This path is suitable for users who already have SQL statements, saved queries, exact query results, or need to perform sampling analysis on a specified table.
-
Obtain and verify actual query results and their source information.
-
The main analysis skill calculates metrics, trends, comparisons, and attributions, and generates charts.
-
Generate HTML reports or notebooks, or export query results on demand.
When you use the suite to analyze SQL statements or query results, a ChatBI dataset is not required. However, the corresponding workspace, data source, conversation, and permission conditions must still be met. For the operation steps, see Step 3: Use the expert suite to analyze SQL statements and query results. For the capabilities of each skill in the suite, see Appendix: Data Analysis Expert Suite skill reference.
How to choose: If you have a ChatBI dataset, choose Path A. If you have complete SQL statements, historical query results, or saved queries, choose Path B. If your question, such as "Analyze my sales", does not specify a data source, provide the source first instead of letting the assistant guess a dataset or scan historical files.
Prerequisites
-
The analysis entry point is ready. ChatBI is activated and accessible. When you use it through the AI assistant, the assistant instance must be in the Running state, and you must have the required operation permissions.
-
The corresponding analysis capabilities are enabled. Path A requires the built-in ChatBI skill to be available. Path B requires the Data Analysis Expert Suite to be installed and effective, with all required skills and the supporting runtime complete. Whether the expert suite is available depends on the actual installation status, not the image version of the instance.
-
The data source is clear and accessible. For Path A, a ChatBI dataset is created and verified for question answering. For Path B, the workspace and data source are specified, or verifiable existing results are available. Network connectivity between the resource group and the target data source is required.
-
Permissions follow the current authorization context. You have data source usage authorization, data query permissions on the corresponding engine, and the required file, report, or export permissions. Access to the analysis interface does not grant access to all data.
-
The suite runtime has a trusted conversation context. Query result analysis, export, and reports depend on the result and conversation identity provided by the host. After you install the suite, if the current assistant runtime lacks the required context or artifact capabilities, complete the platform integration configuration first.
For configuration entry points and steps, see Overview, Datasets, and Use the AI assistant service.
Data and report security: We recommend that you use low-sensitivity, read-only tasks for the first verification. Before you share a report or export results, confirm the data classification and access scope. Do not publish sensitive details, credentials, or reports without access control.
Step 1: Enable and verify the analysis capabilities
-
Log on to the DataWorks console. In the left-side navigation pane, choose AI assistant service, and then click the name of the target instance to go to the instance details page.
-
In the Skill management section or the corresponding capability configuration area of the instance, confirm that the built-in
dataworks-chatbi-skillis enabled. If you need the suite capabilities, select and enable the expert suite DataWorks Data Analysis, whose resource name isdataworks-data-analysis-extension. -
Confirm that the suite is installed or synchronized successfully and that the skills required for the task are actually available, including
dataworks-chatbi-analysis, query execution and result reading, charts, and reports. If a package is missing or synchronization fails, reinstall or resynchronize the suite and confirm that the required skills are available before you run tasks. -
Verify the path that you plan to use. For the built-in ChatBI path, first run a simple metric query in ChatBI. For the suite path, first view the saved query list or run a read-only query with a clear target to confirm that the workspace, data source, result reading, and permissions work properly.
-
Go to the conversation page of the target assistant and send a test task that explicitly specifies the source and capabilities. If a dataset, workspace, or data source needs to be selected, provide the missing item. If a permission or runtime error occurs, keep the error message, resolve the issue, and then retry.
When you use the expert suite, we recommend that you explicitly name the suite in your question. Sample questions:
Use the Data Analysis Expert Suite to analyze the query result that I provide.
Use the Data Analysis Expert Suite to execute the following SQL statement and analyze the results returned successfully.
Naming the suite helps clarify the task path, but does not replace suite installation, source confirmation, and authorization.
Step 2: Query and analyze data based on a ChatBI dataset
This step completes natural language queries, trend analysis, drill-down, and report generation based on a configured ChatBI dataset.
-
Confirm the dataset and enter the conversation. When you raise a question on the AI assistant conversation page, specify the dataset name or identifier. If you use ChatBI directly, go to the conversation of the selected dataset.
If no dataset is specified, the assistant lists the visible candidates for you to choose from. If multiple datasets share the specified name, the assistant confirms the target with you first. Specify the dataset source explicitly to prevent the assistant from guessing fields and sources based on names, historical conversations, or dataset descriptions.
-
Submit the analysis question. Specify the analysis goal, time range, statistical granularity, filter conditions, comparison periods, and output requirements. Sample question:
Use the built-in ChatBI skill to analyze the daily sales trend in the East China region from November 1 to November 26, 2026, based on the "Business Analysis" dataset. Calculate sales based on the actual paid amount of paid orders, and compare with the same date range in October 2026. Return only conclusions and key data for this round. -
View the progress and results. After the background analysis is submitted successfully, you can view the analysis process through the ChatBI online conversation entry provided by the assistant. After the analysis is complete, the assistant delivers the key conclusions and data returned by ChatBI.
-
Ask follow-up questions in the same conversation. Follow-up questions reuse the ChatBI context within the current conversation. Sample question:
Using the same dataset, time range, and sales definition, drill down by city, list the five cities that contribute the most to the change, and explain the comparison baseline. -
Explicitly request a report when needed. This path uses the report file or sharing entry returned by ChatBI itself. Sample question:
Based on the analysis that was just completed, generate an HTML data report that includes the daily trend, city comparison, statistical definitions, and key conclusions.If ChatBI does not return a report artifact, only the existing conclusions and data are delivered for this round. To generate a report with the expert suite instead, see Step 3: Use the expert suite to analyze SQL statements and query results and Step 4: View charts and deliver results.
To make the results better match your expectations, we recommend that you provide the following elements in your question:
|
Question element |
Information to provide |
|
Source and scope |
The ChatBI dataset name or identifier. For the suite, the workspace, data source, query file, or |
|
Business metrics |
Sales, order counts, distinct customer counts, and so on. For ratios, specify the numerator and denominator. |
|
Time and granularity |
Explicit start and end dates, time zone, and daily, weekly, or monthly statistics. The comparison periods for year-over-year or month-over-month analysis. |
|
Dimensions and filters |
Dimensions such as region, channel, and city, and which statuses or scopes to analyze. |
|
Execution and delivery |
Analyze existing results only, execute read-only SQL statements, or perform preliminary sampling analysis. Specify conclusions, charts, HTML reports, notebooks, downloads, or saves separately. |
Step 3: Use the expert suite to analyze SQL statements and query results
This step analyzes SQL queries and their results directly, without creating a ChatBI dataset. The following names, IDs, and SQL statements are sample question formats. Replace them with your actual resources.
-
Provide the analysis source. Provide complete SQL statements, a saved query, an exact result reference (
jobCode + sqlIndex), or a specified fully qualified table name, and specify the workspace and data source. -
Confirm the execution target and risks. If multiple data source candidates exist, select the execution target for this task first. For statements that involve writes or side effects, check the SQL statement, execution target, and operation risks and confirm explicitly before execution. If you cancel the confirmation, no job is submitted.
-
View the analysis and follow up. After the query succeeds, the suite calculates metrics, trends, comparisons, and attributions based on the results returned for this task, and generates charts on demand. While a query is still running, continue to follow up on the same job. After the wait limit is reached, you decide whether to keep waiting or stop. If the results are truncated, the analysis covers only the returned subset. For full-data statistics, provide an aggregation SQL statement or narrow the scope.
The following tabs provide sample questions and processing notes for five typical scenarios by source type, for reference when you organize your questions:
Scenario A: Execute complete SQL statements and analyze the returned results
This scenario suits users who already have complete read-only SQL statements and want to execute them first and then analyze the results. Sample question:
Use the Data Analysis Expert Suite. In workspace <workspace name or ID>, use <MaxCompute data source name or ID> to execute the following read-only SQL statement. After it succeeds, analyze the sales ranking and proportion by region, and explain the source, time range, and metric definitions. Do not generate an HTML report for this round.
SELECT
region,
SUM(paid_amount) AS sales_amount
FROM <actual_project>.<actual_order_table>
WHERE ds BETWEEN '20261101' AND '20261126'
AND order_status = 'PAID'
GROUP BY region;
The fields, enumeration values, and partition format in the example must match the actual table.
Scenario B: Reuse exact historical results without re-querying
This scenario suits users who already have successful query results and want to analyze them directly without executing SQL statements again. Sample question:
Use the Data Analysis Expert Suite to read the completed query result with jobCode=<actual job identifier> and sqlIndex=<actual result index>, calculate proportions by channel, and analyze abnormal changes. Do not re-execute the SQL statement.
If multiple result sets exist, specify the result index. If you only say "the result from last time" and the current context is insufficient, provide an exact reference. If result reading fails, is canceled, or is not complete, provide an available result reference again before analysis.
Scenario C: Run a saved query for periodic manual analysis
This scenario suits users who save frequently used queries and run them on demand for periodic manual analysis. View the list first, and then select a query to run:
Use the Data Analysis Expert Suite to list my saved queries. Only view the list for this round, and do not run anything.
Run the query that I selected, <query name or file identifier>. After it succeeds, analyze the key metrics in its results and provide conclusions and evidence.
The suite reads the query file you selected and its execution target, and analyzes the results returned successfully. A saved query does not mean automatic execution is configured. Scheduled tasks must be configured separately.
Scenario D: Sampling and preliminary insights on a specified table
This scenario suits users who need to understand the table content, field distributions, and null values before analysis. Sample question:
Use the Data Analysis Expert Suite to sample 100 rows from the MaxCompute table <actual_project>.<actual_table> in workspace <actual workspace>, check the null values and distributions of <field list>, and provide a preliminary analysis. State clearly that the results are based on a sample, not full-table statistics.
The suite first obtains the sample and field profile, and performs in-depth analysis only when you explicitly request insights. If you only ask to "view the first 100 rows", only the sample is delivered. Sampling conclusions represent the sample only.
Scenario E: Create reports or notebooks from obtained results
This scenario suits users whose analysis is complete and who need to deliver a report or a reproducible notebook. Sample questions:
Based on the query results that were just verified, use the Data Analysis Expert Suite to generate an HTML report in the operations dashboard style, showing regional rankings, proportions, anomaly alerts, and definition notes. Do not re-query data.
Organize the analysis into a DataWorks notebook that includes data source notes, SQL cells, analysis Python cells, and reproduction steps. After generation, tell me the artifact status first, and do not run the code in it directly.
Reports and notebooks both reuse the confirmed data scope. Style skills determine the presentation only, and do not recalculate or fabricate conclusions. Successful notebook generation does not mean successful code execution. For report saving and result delivery, see Step 4: View charts and deliver results.
Step 4: View charts and deliver results
ChatBI analysis delivers conclusions, key data, statistical definitions, and data sources, and returns charts based on the task. The expert suite can also generate trend, ranking, and proportion charts from verified results.
Chart interpretation applies to both paths. The following report saving, result download, and spreadsheet operations apply to the expert suite path. Report artifacts on the ChatBI path are returned by ChatBI directly. For more information, see Step 2: Query and analyze data based on a ChatBI dataset. Report generation, saving to the personal directory, and downloading to your device are three independent actions: generating a report does not automatically save or download it, and you must explicitly request saving and downloading.
HTML reports and saving
A report is generated only when you explicitly request "generate a report", "HTML data report", "consulting report", or "operations dashboard report". The expert suite first completes the actual calculation and verification, and then generates a single-file HTML report.
After the suite generates a report, it asks whether to save it to Data Analysis > My Files. Only after you choose to save is the file written. If you do not choose or cancel, the file is not saved automatically. After saving succeeds, the file path and access entry are returned.
Same-name file handling: If a file with the same name exists in the personal directory, it is not overwritten automatically. To overwrite, confirm explicitly. To save as a new file, provide a new path.
Query result download
When you need to deliver the results of a successful query as a local file, explicitly request an export. Sample question:
Export the results of the query that just succeeded as a CSV file in UTF-8 encoding. If download approval is required, tell me the approval status and the actual entry.
Before the export, the result identifier is verified, and download permissions, row limits, and approval policies are checked. On success, a download URL accessible from your browser is delivered. You can use this URL to download the file.
Export as a new spreadsheet
When you need to deliver the results as an online spreadsheet, explicitly request spreadsheet creation. Sample question:
Export the completed query results as a new spreadsheet named "Regional Sales Analysis", and return the access URL after creation.
Creating a new spreadsheet is also subject to export permissions. After creation succeeds, the access URL is returned.
Read and edit an existing workbook
When you read an existing workbook or modify formulas, formats, and ranges, specify the file, sheet, and range explicitly. Sample question:
Read the "Sales Summary" sheet of workbook <file name or fileCode>, range A1:F20. Only check the formulas and data for this round, and do not save changes.
Limits and FAQ
|
Question |
Suggestion |
|
After I install the data analysis suite, do I still need a ChatBI dataset? |
Path A requires one. When Path B analyzes complete SQL statements, saved queries, or exact results, a ChatBI dataset is not required, but the required workspace, data source, and result permissions must be in place. |
|
Can I just say "find a table and generate SQL statements for me"? |
The SQL execution skill of the suite does not generate or rewrite SQL statements, and the main analysis workflow does not discover unknown tables. Provide a known table, complete SQL statements, or existing results, or configure the corresponding discovery and SQL generation capabilities separately. |
|
Why does a regular question not return an HTML report? |
Regular analysis returns conclusions and suitable charts by default. Request a report explicitly when needed. Report generation, saving, and export are independent actions. |
|
How do I handle a query timeout or results that are still being prepared? |
Continue to follow up on the current job and avoid resubmitting SQL statements. After the wait limit is reached, the assistant reports that the query is still running, and you decide whether to keep waiting or stop. |
|
How do I handle a permission error, an unavailable data source, or an authentication failure? |
Keep the error category and request identifier, check the current workspace, data source, authorization, and connection, and then decide whether re-authorization is required. The assistant does not automatically change the identity or expand the access scope. |
|
Why do year-over-year, month-over-month, or proportion results differ from my expectations? |
Check the comparison periods, filter conditions, deduplication definitions, and numerators and denominators. A ratio should be the aggregated numerator divided by the aggregated denominator. |
|
After a report is generated, can others access it directly? |
Report generation does not mean public sharing. Before sharing, confirm the actual entry, access control, and data scope. |
Appendix: Data Analysis Expert Suite skill reference
The Data Analysis Expert Suite uses dataworks-chatbi-analysis as the main analysis workflow, and the other skills collaborate by task. You usually do not need to call the internal tools one by one. You can explicitly request "use the Data Analysis Expert Suite" in your question. The following table lists the capabilities and usage notes of the 13 skills.
|
Capability |
Skill |
Description |
Usage notes |
|
SQL execution and stop |
|
Executes the SQL statements that you provide, waits for query results, and stops the current job on explicit instructions. Supports configured data sources and direct connections to MaxCompute and Hologres on the public cloud. |
Provide complete SQL statements and a clear execution target. This skill does not generate or rewrite SQL statements. Statements that involve writes or side effects require your confirmation first. You must explicitly choose a direct connection, which does not bypass existing permissions. |
|
Table sampling and field profiling |
|
Views the first N rows of a specified table and checks field distributions, null values, and cardinality to prepare samples for preliminary analysis. |
Provide a known fully qualified table name and the workspace context. Currently, MaxCompute is supported. Sampling conclusions represent the sample only. For full-table statistics, use aggregation queries. |
|
Ad hoc and saved queries |
|
Views the query list and reads or runs the query file that you select. |
The execution target is based on the details of the file selected for this task. Viewing the list alone does not trigger execution. |
|
Personal directory files |
|
Views directories, creates folders, and reads or saves SQL, Markdown, notebook, and HTML files. |
Specify the target path. Supports |
|
Notebook content |
|
Creates, parses, modifies, and validates Jupyter notebooks that can be opened in DataWorks, and organizes SQL, Python, and Markdown cells. |
Generated based on actual tables, fields, and analysis goals. A generated notebook does not mean that the code in it has been executed. Saving to the personal directory is handled by the file management skill. |
|
Query result export |
|
Delivers completed query results as CSV or XLSX download URLs, or exports them as a new spreadsheet. |
Requires the source information and exact result identity of a successful result. Subject to download permissions, row limits, and approval policies. Query result download is available only in public cloud DataWorks regions. |
|
Historical query results |
|
Reads, verifies, or materializes existing results precisely by |
Does not re-execute SQL statements or pick the "latest result" from other jobs or directories. If the query failed, was canceled, is still running, or has no results, provide an available result reference first. |
|
Data visualization |
|
Organizes verified analysis results into trend, comparison, ranking, distribution, proportion, correlation, or anomaly charts. |
Actual analysis must be completed first. Charts are rendered and displayed in the analysis interface. |
|
Main analysis and insights |
|
Performs total, average, proportion, year-over-year and month-over-month, top N, trend, anomaly, correlation, and contribution analysis on actual results, and provides evidence-based explanations and suggested follow-up questions. |
Verifies the results, source information, result identity, and truncation status before analysis. If matching results are already obtained, analyzes them directly without resubmitting SQL statements. Correlation or contribution does not imply causation. |
|
HTML data reports |
|
Generates deliverable single-file HTML data reports from verified analysis results. |
Triggered only when you explicitly request a report, and reuses the same data and analysis evidence. |
|
Consulting report style |
|
Selects productized report themes and design specifications for consulting reports, business research reports, or strategy presentations. |
Handles the presentation style only, not data retrieval or conclusion generation. Must be used together with the main analysis and report skills. |
|
Operations dashboard style |
|
Selects report themes and design specifications for metric monitoring, business dashboards, or multidimensional operations summaries. |
This is a report presentation style. It does not mean real-time dashboard refresh or automatic continuous monitoring. |
|
Spreadsheet |
|
Reads, checks, previews, and edits explicitly specified DataWorks spreadsheet workbooks, and handles formulas, rows, columns, and formats. |
Requires an explicit workbook, sheet, and range. Writing supports the new |
Capabilities not included in the suite: These 13 skills do not provide table discovery, lineage, metadata search for unknown fields, or generation of complex query SQL statements from scratch. If you need these capabilities, configure the corresponding skills separately, or first provide a known fully qualified table name, complete SQL statements, a saved query, or an exact result reference.
References
-
For the features and configuration methods of the AI assistant service, see Use the AI assistant service.
-
For more practice scenarios of the AI assistant service, see AI Assistant best practices.
-
For the features and usage process of ChatBI, see Overview.
-
For how to create and manage ChatBI datasets, see Datasets.
-
For the conversation modes and analysis capabilities of ChatBI, see ChatBI sessions.
-
For how to configure the ChatBI knowledge base, see Knowledge base.