Share via


Use Databricks Assistant

Databricks Assistant is a context-aware AI assistant that helps you with Databricks notebooks, SQL editor, jobs, AI/BI dashboards, file editor, and more. Use chat to ask for help, and Databricks Assistant assists you with data and code using a conversational interface.

Note

Databricks Assistant defaults to using Databricks-hosted AI models if you disable Partner-powered AI features.

To learn how Assistant helps with code, see Get coding help from Databricks Assistant.

Tour of the Assistant pane

This section describes the default experience of the Assistant pane.

To open the Assistant pane, click DB Assistant icon. on the upper-right corner of the page.

The Assistant pane with a slash prompt.

Type questions or slash commands in the text box at the bottom of the Assistant pane and press Enter or click Send icon. at the right of the text box. Assistant displays its answer.

If you prompt Assistant to help with code, it leads you through running, accepting, or rejecting the code changes it proposes.

Assistant pane controls and settings

The Assistant pane header has controls and settings.

Icons and thread title at the top of the Assistant pane.

  • Click Plus icon. start a new thread.

  • Click Gear icon. to open Assistant settings. From here, you can add custom user and workspace instructions.

  • Click Kebab menu icon. to open settings for the Assistant pane.

    Assistant Chat pane menu with options.

    • Control the location of Databricks Assistant: Choose Docked to dock the Assistant pane anywhere along the bottom. You can drag and drop the pane to move it. Choose Side to keep the Assistant pane on the right side.
    • View chat threads in History: Click History to view past chat threads. Click a chat thread to reopen it. To delete a chat thread, hover over it and click the trash icon Trash icon..
    • Change Assistant settings. When you select Settings, the Chat pane runs the /settings assistant prompt.
  • Click Close icon. to Close the Assistant pane.

Assistant modes

Interact with the Assistant in three different modes: Chat, Edit, and Agent.

To switch between modes, use the mode selector at the bottom of the Assistant pane:

Select Assistant mode.

The table below summarizes the three Assistant modes:

Mode Capabilities When to use Example prompts
Chat Answer questions to help you understand code and concepts.
  • Explaining code or errors
  • Learning about Databricks concepts
  • "What does this function do?"
  • "What is Unity Catalog?"
Edit Make multiple in-line code suggestions in one go.
  • Notebook-wide refactors
  • Consistent formatting
  • Migrations
  • Auto-generating tests
  • "Convert all display() to df.show()"
  • "Rename customer_id to user_id"
  • "Convert all pandas code to PySpark"
  • "Add unit tests for all functions"
Agent (Beta) Automate multi-step workflows, plan a solution, retrieve relevant assets, run code, use cell outputs to improve results, fix errors automatically, and more.
  • Data discovery
  • Exploratory data analysis
  • Notebook organization
  • "Which table contains bakehouse transaction data?"
  • "Perform EDA on @example\_table and summarize the insights."
  • "Give each notebook cell a relevant name."

Get follow-up suggestions and citations from documentation

Databricks Assistant gives you follow-up suggestions and citations from documentation to answer questions. Type your question or prompt in the prompt box.

  • Follow-up suggestions include variations on the query.
  • Citations are numbered footnote links following an Assistant answer.

Documentation citations and follow-up suggestions from Databricks Assistant.

Get help with code

Get help with code from Databricks Assistant directly in your notebooks. The Assistant offers:

See Get coding help from Databricks Assistant.

Additional information