What is Databricks Assistant?
Databricks Assistant is an AI-based pair-programmer and support agent that makes you more efficient as you create notebooks, queries, dashboards, and files. It can help you rapidly answer questions by generating, optimizing, completing, explaining, and fixing code and queries.
This page provides general information about the Assistant. For questions about Assistant privacy, trust, and security, see Databricks AI features trust and safety.
How can Databricks Assistant help?
Databricks Assistant can help with the following tasks and more:
- Generate and explain code. See Get coding help from Databricks Assistant.
- Automatically find and fix errors
- Create data visualizations in AI/BI dashboards. See Create visualizations with Databricks Assistant.
- Diagnose Job errors (Public Preview feature). See Diagnose errors in jobs.
- Filter and analyze data using natural language. See What is Databricks Genie? and Filter data with natural language prompts.
- Find relevant help in Databricks documentation.
Assistant uses Unity Catalog metadata to understand your tables, columns, descriptions, and popular data assets across your company to provide personalized responses.
Get coding help from Databricks Assistant
To access Databricks Assistant, click the Assistant icon on the top right of any Databricks screen.
Users should always review any code generated by the Assistant before running it because it can sometimes make mistakes.
For more information on how the Assistant can help with code, see Get coding help from Databricks Assistant.
Code optimized for the Databricks environment
Code generated by the Databricks Assistant is intended to run in a Databricks compute environment. It is optimized to create code in Databricks-supported programming languages, frameworks, and dialects. It is not intended to be a general-purpose programming assistant.
The Assistant often uses information from Databricks resources, such as the Databricks documentation website or Knowledge Base, to better answer user queries. It performs best when the user question is related to questions that can be answered with knowledge from Databricks documentation, Unity Catalog, and user code in the Workspace.
Tips for improving the accuracy of results
-
Use the prompt “Find Tables” for better responses. Before you ask questions about data in a table, ask the Assistant to find related tables by subject matter or other characteristics. Example:
Find tables related to NFL games
. -
Use
@<table-name>
to reference a specific table in a prompt. -
Specify the structure of the response you want. The structure and detail that Databricks Assistant provides varies, even for the same prompt. Databricks Assistant knows about your table and column schema and metadata, so you can use natural language to ask your question. Example:
List active and retired NFL quarterbacks' passing completion rate, for those who had over 500 attempts in a season.
Assistant answers using data from columns such ass.player_id
ands.attempts
. -
Provide examples of your row-level data values. Databricks Assistant doesn’t have access to row-level data, thus for more accurate answers provide examples of the data. Example:
List the average height for each position in inches
. This returns an error because the data set shows height in feet and inches, as in6-2
. -
Test code snippets by running them in the Assistant pane. Use the Assistant pane as a scratchpad that saves iterations of your queries and assistant answers. You can run code and edit it in the pane until you are ready to add it to a notebook.
-
Use cell actions in a notebook. Cell actions include shortcuts to common tasks, such as documenting (commenting), fixing, and explaining code.
-
Document tables and columns in Unity Catalog. See Add AI-generated comments to Unity Catalog objects.
Databricks Assistant considers the history of the conversation so you can refine your questions as you go.
For more tips, see:
- Databricks Assistant Tips and Tricks for Data Analysts
- Databricks Assistant Tips and Tricks for Data Engineers
What is the pricing for Databricks Assistant?
All current Databricks Assistant capabilities are available at no additional cost for all customers.
Users pay only for the compute that they use to run their notebooks, queries, jobs, and so on. There are fair usage limits in place to prevent abuse. Most users are not impacted by these limits.
Give feedback on Assistant answers
Let us know whether Assistant answers are useful or not:
#. Mouse just below the Assistant answer.
#. Click Useful or Not useful
button.
Geo availability of Assistant features
Databricks Assistant is a Designated Service that uses Geos to manage data residency when processing customer content. To learn more about the availability of Assistant features in different geographic areas, see Databricks Designated Services.
If you can’t enable Databricks Assistant, you might need to disable Enforce data processing within workspace Geography for AI features. See Enable cross-Geo processing.