Databricks Assistant FAQ


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).

What is Databricks Assistant?

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.

Q: How do I enable Databricks Assistant?

An account administrator must enable Databricks Assistant as follows:

  1. As an account admin, log in to the Account Console.

  2. Click Settings Settings icon.

  3. Click the Feature enablement tab.

  4. Toggle Enable third party services for AI assistive features to Enable for all.

Q: How do I use Databricks Assistant?

To access Databricks Assistant, click the Assistant icon Databricks assistant icon in the left sidebar of the notebook, the file editor, or the SQL Editor.

Databricks assistant icon location

The Assistant panel opens in the left side of the screen.

Databricks assistant panel

Some capabilities of Databricks Assistant are the following:

  • Complete: Keyboard shortcuts are available in a notebook cell or in the query editor to have Databricks Assistant autocomplete your code.

  • 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.

For some example tasks you can try, see Databricks Assistant: sample tasks.

Q: What services does the Databricks Assistant use?

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.

Q: Are there tips for improving the accuracy of returned results?

  • 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 userID and 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.

Q: How do I give feedback?

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 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.

Privacy and security

Q: What data is being sent to the models?

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

  • Previous questions

  • Favorite tables

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.

Q: Will Databricks Assistant execute dangerous code?

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.