Generate practices with AI (Beta)

In June 2023, we released a new module introducing AI in Promyze. Here is how to benefit from it in our Cloud version.

The use case: Automatic Workshop generation

Practices review workshops support software engineers in discussing and making decisions regarding their best coding practices. The workshops are usually fed with contributions before the workshop. In some situations, as a user, you might be interested in getting suggestions of coding practices you never heard about or did not consider to raise new discussions with your team.
That's where our AI engine comes up.
With Promyze AI, we now bring new support to automatically suggest coding practices and discussion topics. Send some source code to Promyze, and it will provide material for your next workshop in a few minutes; but it will let you have the final word about the practices to validate. Consider the AI engine as an external eye capable of making suggestions and asking questions about your coding standards.

Get started with Promyze AI

Using your IDE

Note that the AI feature is available only for Promyze VSCode and JetBrains extensions.
The workflow is straightforward:
  1. 1.
    You select one or several files you'd like to send to Promyze from the IDE extensions.
  2. 2.
    The AI engine will analyze the code to generate up to 3 coding practice suggestions (and a correction) and up to 3 discussion topics.
Right-Click on the code editor and select the Generate Practices entry. Select only the current opened file or all the opened tabs, choose your destination space in Promyze, and you're done!
A notification will prompt to indicate the process has started.

Using the CLI with Git integration

Coming soon.

Processing the results

Once you've requested a generation, you'll get immediate feedback saying that your request has been queued in Promyze. If you check on the Promyze UI, you'll see this notification for a few minutes at the bottom-left of the page saying Practices being generated:
When it disappears, it means your request is over and you can get the results in the workshop. Please note you won't get notifications within your IDE about the request completion.


Here is the entire workflow in this video:
Note that each practice generated by AI will have an AI category.
As with any other new practice suggested in Promyze, you'll have to decide with your team whether to validate, edit or discard the suggestion.

Considerations and limitations

Limits on request size

As shown above, you can submit a generation of all your opened files in your IDE. However, we limit to 10 the number of files sent in the request payload. Also, note that only the 300 first lines of each file are sent to the AI engine.

Concurrent Requests

As AI is still in beta in Promyze, please know that within your Promyze organization, only one ongoing generation request is allowed. If you (or another user from your organization) try to push a request while there's still one pending, you'll be prompted with a message inviting you to try later.

Security and AI engine

As we favor transparency, be aware that our AI engine relies on OpenAI services to generate coding practices and discussion topics. The source code pushed from your IDE or CLI will be sent within payloads of requests to OpenAI APIs.
Please ensure you don't share sensitive data and act according to your company policies.
FYU, regarding one announcement from OpenAI from March 2023:
Starting on March 1, 2023, we are making two changes to our data usage and retention policies:
  1. 1.
    OpenAI will not use data submitted by customers via our API to train or improve our models, unless you explicitly decide to share your data with us for this purpose. You can opt-in to share data.
  2. 2.
    Any data sent through the API will be retained for abuse and misuse monitoring purposes for a maximum of 30 days, after which it will be deleted (unless otherwise required by law).
About item #1, please be aware we didn't opt-in to share data.
If you choose to use the Promyze AI features, you may not use them in a manner that violates any OpenAI Policy, including their Content Policy; Sharing and Publication Policy; and Community Guidelines.

Next Steps for Promyze AI

AI on Self-Hosted version

If you use Promyze on the On-Premise version, note that the AI engine is, so far, only available on our Cloud version. Please subscribe to this item in our roadmap to get notified of our progress on that topic.

Narrow the focus on specific domains

We let the AI engine free to suggest coding practices on any topic (Clean Code, Architecture, Readability, ...). It's currently not possible to indicate specific domains on which you'd like to get suggestions. This is under consideration in our roadmap if you'd like to submit your ideas and be kept updated on the progress.