Create visualizations with Databricks Assistant

When drafting an AI/BI dashboard, users can prompt the Databricks Assistant to build charts from any previously defined dashboard dataset. To create a new chart, start by asking what you want to learn from the data. You can also use the Assistant to edit a chart. After generating a chart, you can interact with and edit the generated visualization using the configuration panel. Users should always review visualizations generated by the Assistant to verify correctness.

Example showing chart creation using Databricks Assistant.

How do I use a prompt to generate a visualization?

The following explains how to create visualizations using an existing dashboard where a dashboard dataset has already been defined. To learn how to create a new dashboard, see Create a dashboard.

  1. Click Dashboards Icon Dashboards to open the dashboards listing page.

  2. Click a dashboard title to start editing.

  3. Click the Data tab to see what dataset has been defined or used in the dashboard.

    The dataset used in this example is defined by a SQL query on the samples catalog

    • To generate charts, at least one dataset must be identified in this section.
    • If more than one dataset is specified, Databricks Assistant will attempt to find the best dataset to respond to the user’s input.
  4. Click the Canvas tab to go back to the dashboard canvas.

  5. Create a visualization widget.

    • Click Create Icon Create a visualization to create a visualization widget and use your mouse to place it in the canvas.
  6. Type a prompt into the visualization widget and press Enter.

    • The Assistant can take a moment to generate a response. After it generates a chart, you can choose to Accept or Reject it.
    • If the chart isn’t what you want, retry the input using the Regenerate chart icon Regenerate button.
    • You can also edit the input and then retry. The updated prompt modifies the previously generated chart.

    Note

    If you reject a modified chart, the chart and input are erased. You cannot revert back to the original suggestion.

  7. You can edit the chart using Databricks Assistant or the configuration panel. With your visualization widget selected:

    • Click the In-product help assistant icon - grey Assistant icon. An input prompt appears. Enter a new prompt to your chart.
    • Use the configuration panel on the right side of the screen to adjust the existing chart.

Supported capabilities

Databricks Assistant supports simple chart creation.

Number of fields and input

You can compare up to three fields and answer inputs like:

  • What were the average sales of my product?
  • What were the average sales of my product per week?
  • What were the average sales of my product per week by region?

Visualization types

Supported visualization types include bar, line, area, scatter, pie, and counter. For any chart type, the following settings are supported:

  • Choosing fields for the X, Y, and Color-by encodings.
  • Choosing an available transformation, like SUM or AVG.

Configuration settings like Sorting, Title, Description, Labels, and choosing specific colors are not supported.

Tips for getting better results

  • Be specific. Specify the chart type and necessary fields with as much detail as possible.
  • Databricks Assistant has access only to table and column metadata and does not have access to row-level data. Thus, it might not create visualizations correctly if a question relies on the specific values in the data.

What is Databricks Assistant?

Databricks Assistant is an AI companion that enables users to be more efficient on the Databricks Platform. Visualization creation with Databricks Assistant is intended to help quickly answer questions about dashboard datasets. Its answers are based on table and column metadata. It declines to answer if it cannot find metadata related to the user question. The AI is new, so mistakes are possible. Use the visualization editor to verify that the appropriate fields have been correctly selected.

Creating visualizations with the Databricks Assistant requires enabling Azure AI services-powered AI assistive features. For details on enabling Databricks Assistant, see What is Databricks Assistant?. For questions about privacy and security, see Privacy and security.