Home » Databricks Assistant Edit Mode: The Fastest Way to Transform Your Notebooks

Databricks Assistant Edit Mode: The Fastest Way to Transform Your Notebooks

Today, we’re introducing Databricks Assistant Edit Mode, a new way to apply AI-generated suggestions across multiple cells in your notebook with a single prompt.

Editing a notebook often means jumping between cells, making the same change in multiple places, and checking for consistency. Databricks Assistant Edit Mode changes that. With a single prompt, you can apply AI-generated edits across multiple cells. Edit Mode understands your entire notebook, suggests inline changes, and keeps the Assistant chat open so you can refine requests as needed. It works for both large-scale refactoring and quick updates, such as renaming variables, cleaning up logic, or adjusting code style.

In early testing, Edit Mode cut refactoring time by more than half, making edits faster, more consistent, and easier to review.

How to Use It

So, how do you get started with Edit Mode? Open the Assistant side panel, select “Edit” from the dropdown, and type in your prompt. The Assistant will then suggest changes right there in the relevant cells.

Once you have those suggestions, you can check them out directly in your notebook or through the side panel. If you click any cell listed in the side panel, it’ll take you right to that spot in the notebook. You have the freedom to accept or reject each edit individually, either inline or from the side panel. Or, if you prefer, you can just apply all of them at once using the “Accept All” or “Reject All” buttons at the bottom.

Where Edit Mode Makes a Difference

Based on patterns we’ve observed and feedback from user surveys, the following examples highlight some of the most common and high-impact use cases.

Refactor Logic Across Cells

Edit Mode helps restructure notebooks by turning repeated logic into reusable functions, breaking down long cells, and organizing intermediate steps more clearly. 

Refactoring logic across cells using Edit Mode

Variable and Function Renaming

Edit Mode lets you apply variable and function renames across your whole notebook. It goes beyond basic find-and-replace by understanding context and applying changes only where they’re needed.

Variable and function renaming using Edit Mode

Code Migrations

Use Edit Mode to help streamline code migrations by suggesting changes that adapt your logic to new platforms, languages, or environments. It can handle tasks like updating SQL dialects, translating Pandas to PySpark, or modifying notebooks to work with Delta Lake and Unity Catalog.

Code migrations using Edit Mode

Standardizing Code

Edit Mode makes it easy to clean up and standardize code across your notebook without repetitive manual edits. It can handle tasks like fixing indentation, removing commented-out code, unifying quote styles, and replacing hardcoded values with parameters.

Standardizing code using Edit Mode

Writing Tests

Edit Mode makes it easier to write tests by generating test scaffolding based on your existing notebook logic. It can identify key functions or transformations and suggest unit tests with structure, inputs, and assertions.

Writing tests using Assistant Edit Mode

What’s Next?

We’re continuing to expand Edit Mode to support more surfaces and workflows across Databricks. Here’s what’s on the roadmap:

  • Toward More Agentic Workflows: Edit Mode is an early step toward more autonomous AI assistance. We’re exploring ways for the Assistant to act more like a collaborative agent that understands broader intent and can help drive high-level transformations, not just respond to isolated requests.
  • Edit Mode in AI/BI Dashboards: We’re expanding Edit Mode support to dashboards, allowing users to get AI-powered suggestions across multiple SQL queries at once.
  • Expanded Tools: We’re adding more tools to the Assistant to support advanced actions like requesting permissions, adjusting cluster settings, and scheduling jobs.

Edit Mode currently requires the use of partner-powered models. Check out our product page to see the Databricks Assistant in action, or read the documentation for more information on all the features.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *