IntelliJ IDEA 2024.3 Help

Generate documentation with AI

With AI Assistant, you can generate documentation for declaration using the LLM (Large Language Model).

  1. Place the caret at the desired code fragment and right-click to open the context menu.

  2. Press Alt+Enter. Select AI actions and then Write documentation.

    AI Assistant will generate documentation for you.

    Generated documentation

Alternatively, instead of using the context menu, type /**, press Enter and click Generate with AI Assistant.

Alternatively, go to any function or class, start a new line and type """. Press Enter and click Generate with AI Assistant.

Generate with AI Assistant

You can customize the prompt for the Write Documentation action in Settings | Tools | AI Assistant | Prompt Library | Write Documentation.

Last modified: 23 October 2024