Datalore 2023.3 Help

Ask AI

The Ask AI feature helps you code faster and better with the support of code generation and modification via natural language commands.

With Ask AI, you can do the following:

  • Save time by delegating the feature to do routine coding tasks you would do manually.

  • Modify your work by following suggestions based on the code you already have

  • Do follow-up tasks including data analysis, visualization, and machine learning

  • Learn programming languages by using and analyzing automatically generated code

Before you start

Check feature accessibility>

Visit this page to make sure the AI service for JetBrains is permitted in your country.

Accept terms and conditions

The step is required to ensure transparency and data protection.

Limitations

At the moment, the feature is available to all users. However, in future versions, it will only be available to paid plan users.

Use Ask AI

  1. Add a code cell to your notebook.

  2. On the cell toolbar, click the Ask AI icon. A Generate command line will appear in the cell.

  3. (Optional) Enable review mode by clicking the settings icon and selecting the With review checkbox.

    With review option
  4. Provide a command using natural language and click Generate.

  5. Once the code is generated, you have the following options:

    1. If With review is disabled:

      • Click Accept to add the code to the cell.

      • Click Regenerate to get a different code suggestion.

      • Click Reject to cancel the provided command and resulting code generation.

    2. If With review is enabled:

      1. Review the code and deselect pieces of data you don't want to have sent.

      2. Click Submit to add the code to the cell.

      3. (Optional) Click Cancel to close the review window and reject the code.

    Viewing generated code without preview option
  6. You can now run the code cell or continue your work in it.

In the picture below, you can see a cell with code generated to create a table form an uploaded .csv file. The command provided using Ask AI was 'generate table from player_stats.csv '.

Table generated from csv file with Ask AI

Modify code using Ask AI

  1. In a code cell with some code, click Ask AI. A Modify command line will appear.

  2. Provide a command with a request to modify the code.

  3. View the generated code and click Accept (Submit in preview mode) to apply the changes to the code.

  4. Run the code to view the results.

In the example below:

  • The first command provided to Ask AI was 'Show correlation diagram between Pos and AST'. The resulting code produced a scatter plot diagram.

    Scatter plot diagram produced by Ask AI
  • The next step was modifying the code by prompting Ask AI to change the graph to a bar chart using hues of the red color.

    Bar chart after code modification with Ask AI

Last modified: 25 August 2023