Sign inGet started

Generative analysis

Enhance your analytics with Deepnote AI's ability to generate and execute code effortlessly.

Deepnote AI is your own virtual AI collaborator helping you to solve hard problems. You can rely on it to kickstart a full analytical project, ask for assistance when you get stuck, and efficiently handle mundane coding tasks.

You can use Deepnote AI in two modes of operation:

  • Auto AI is a fully autonomous agent that will not only add blocks, but also execute them and self-correct its way to the desired outcome.
  • Generate mode will add code and text blocks to your notebook based on your instructions, but will wait for you to execute them.

One of the biggest challenges in coding can be getting started. Use Deepnote AI to create blocks from your natural language instructions. Simply use the AI prompt bar visible at the bottom of the notebook or click on Generate with Deepnote AI placeholder in an empty code block to enter you prompt in plain language. You can also use the Cmd+Shift+A shortcut to trigger AI in any block.

Let's explore the two modes of operation in more detail, starting with Auto AI.

Auto AI

Auto AI is a fully autonomous mode of using Deepnote AI in your notebook. You can give it a task and Auto AI will devise a plan for best achieving your goals within the context of your work. It will then proceed to write text, create and execute code & SQL blocks until it gets the job done. It is even capable of self-correction and will attempt to fix any potential errors it encounters along the way.

To take advantage of Auto AI in your workspace, you need to have Deepnote AI enabled at Settings & Members >> Project settings.

deepnote ai auto ai settings.png

Once the workspace setting is enabled, you can enable Auto AI mode by switching on the toggle in the AI prompt bar settings menu:

CleanShot 2024-10-24 at 10.36.24.png

After you type in a prompt, Auto AI will execute the blocks it creates and will continuously adapt based on the outputs until the given task is completed. If your machine is off, Auto AI will spin it up when it needs to execute a code block.

Running Auto AI is like inviting a virtual collaborator to your project: it can operate in your notebook independently of your presence. This means that once Auto AI is given a task, it will continue running and executing blocks even if you close Deepnote.

If you want to stop Auto AI before it finishes its task, you can always do so by clicking on the Stop AI Generation button at the status bar on the top of your notebook. This will immediately cancel all block generation and will cease any block executions in progress.

CleanShot 2024-03-11 at 16.21.19@2x.png

SQL usage by Auto AI

If you have one or more SQL integrations connected, Auto AI sees them and can use them to generate and run SELECT queries to fetch data it needs to complete its given task.

To minimize risk when using AI to write and run SQL, we added 2 guardrails against this:

  • AI is programmed to never execute any write queries
  • Deepnote has a detection mechanism for write queries and will stop them from getting executed, even if the AI generates one

Settings

You can control what types of blocks get generated by Auto AI in the settings menu. You can turn on and off SQL block generation and also the AI's commentary and conclusions by turning off the text blocks.

auto ai settings.png

Limitations

Deepnote AI cannot yet use SQL with OAuth integrations or create chart blocks. We're working on improving the experience. If you'd like to provide feedback or be directly involved in shaping the future of Deepnote AI, see the Feedback section.

Generate blocks without running them automatically

If you want to use Deepnote AI in generate mode to retain control over executing the blocks, make sure you have the Auto AI toggle set to Auto AI off.

CleanShot 2024-10-24 at 10.41.15.png

Once you are happy with your typed in instructions, submit them and let Deepnote AI tackle your task. Deepnote AI will start generating Python and/or text blocks, it can even generate multiple blocks at once!

The generation will stop automatically once Deepnote AI has finished with the given task, but you can always cancel the generation earlier from the status bar. The generated blocks are saved directly into your notebook and there is no need to explicitly accept them allowing you to immediately run them afterwards.

Remember that your collaborators in the notebook only see the AI-generated blocks and can't stop a generation which you've triggered.

If you're not fully satisfied with the output, you can:

  • re-try the code generation using the same prompt by clicking on the Try again button. Try again will place you back into the prompt bar so you can modify your instructions for an improved result by providing further context or being more specific with your request.
  • remove all generated blocks with the Discard button.
CleanShot 2024-10-24 at 10.49.32.png

Pro tip: you don't always need elaborate instructions as Deepnote AI has access to the contents of your notebook and is fully conversational. You can tell it to Continue or to Do task X and it will respond appropriately.