This feature is currently in Public Preview. Usage of the feature during the preview is free. Final pricing will be established and communicated prior to general availability (GA).
Databricks Assistant works as an AI-based companion pair-programmer to make you more efficient as you create notebooks, queries, 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 in the form of frequently asked questions. For questions about privacy and security, see Privacy and security.
Databricks Assistant is enabled by default.
To enable or disable all workspaces in an account for Databricks Assistant, follow these instructions:
As an account admin, log in to the account console.
Click Settings .
Click the Feature enablement tab.
In the Partner-powered AI assistive features section, select Enabled or Disabled and then click Save. You can prevent workspace setting overrides for this feature by setting the Enforce toggle to on.
If the account setting permits workspace setting overrides, workspace admins can enable or disable specific workspaces. To do this, use a Workspace Setting to override the default setting in the Account Console as follows:
Go to the workspace admin settings page.
Click the Advanced tab.
Use the Partner-powered AI assistive features drop-down menu to make your selection.
To access Databricks Assistant, click the Assistant icon in the left sidebar of the notebook, the file editor, or the SQL Editor.
The Assistant panel opens in the left side of the screen.
Some capabilities of Databricks Assistant are the following:
Generate: Use natural language to generate a SQL query.
Explain: Highlight a query or a block of code and have Databricks Assistant walk through the logic in clear, concise English.
Fix: Explain and fix syntax and runtime errors with a single click.
Transform and optimize: Convert Pandas code to PySpark for faster execution.
Any code generated by the Databricks Assistant is intended for execution within a Databricks compute environment. It is optimized to create code in Databricks supported programming languages, frameworks, and dialects. It is not intended as a general purpose programming Assistant. The Assistant will often use information from Databricks knowledge bases such as documentation in order 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.
Users should always review any code generated by the Assistant prior to execution as it can sometimes make mistakes.
Databricks Assistant may use third-party services to provide responses, including Azure OpenAI. These services are subject to their respective data management policies. Data sent to these services is not used for any model training. For Azure OpenAI, Databricks has opted out of Abuse Monitoring so no prompts or responses are stored with Azure OpenAI. For details, see Azure data management policy.
Be as specific as possible. Specify tables and examples of what the data looks like.
Databricks Assistant knows about your table and column schema and metadata. This allows you to use natural language and generate fairly accurate queries. For example, if your table has columns
State, you can ask Databricks Assistant to generate a list of users who live in Washington.
Databricks Assistant has access only to table and column metadata and does not have access to row level data. Thus, it may not write queries correctly if the actual data has unique shapes. For example, if you have a column
Price, and each value appends a country denomination (for example, $10.99 USD, $5.99 CAD) the returned query may have trouble summing that column since it’s not a DECIMAL. Try to provide specific instructions to Databricks Assistant for parsing that column. For example: “Sum the total revenue from crackers. Price is a string column that has a country denomination appended to each currency value like ‘$10.99 USD’”.
Databricks Assistant considers the history of the conversation so you can refine your questions as you go.
The best way to send feedback is to use the “Provide Feedback” links in the notebook and SQL editor. You can also send an email to
email@example.com or to your account team.
We’re primarily interested in hearing about product improvement suggestions and user experience issues rather than prompt accuracy. If you receive an unhelpful suggestion from the Assistant, click the “Not useful” thumbs down button to let us capture that feedback.
Databricks Assistant sends code and metadata to the models on each API request. This helps return more relevant results for your data. Examples include:
Code/queries in the current notebook cell or SQL Editor tab
Table and Column names and descriptions
Q: If I execute a query with results, and then ask a question, do the results of my query get sent to the model?
No, only the code contents in cells, metadata about tables, and the user-entered text is shared with the model. For the “fix error” feature, Databricks also shares the stack trace from the error output.
No. Databricks Assistant does not automatically execute code on your behalf. AI models can make mistakes, misunderstand intent, and hallucinate or give incorrect answers. Be sure to review AI generated code prior to executing it.
Q: Has Databricks done any assessment to evaluate the accuracy and appropriateness of the Assistant responses?
Yes. Databricks has mitigations to prevent the Assistant from generating harmful responses such as hate speech, insecure code, prompt jailbreaks, and third-party copyright content. Databricks has done extensive testing of all our AI assistive features with thousands of simulated user inputs to assess the robustness of mitigations. These assessments focused on the expected use cases for the Assistant such as code generation in the Python, Databricks SQL, R, and Scala languages.