AI/ML powered features

GitLab is creating AI-assisted features across our DevSecOps platform. These features aim to help increase velocity and solve key pain points across the software development lifecycle.

Enable AI/ML features

Introduced in GitLab 16.0 and is actively being rolled out.

Prerequisites:

  • You must have the Owner role for the group.

To enable AI/ML features:

These settings give you control over which features are enabled. These settings work together so you can have a mix of both experimental and third-party AI features.

Generally Available AI features

When a feature is Generally Available, it does not require the group-level Experiment features setting to be enabled. Some of these features might require the group-level third-party AI features setting.

The following feature is Generally Available:

Beta AI features

Beta features do not require the group-level Experiment features setting to be enabled.

The following feature is in Beta:

Experiment AI features

Experiment features will soon require the group-level Experiment features setting to be enabled.

Third-party AI features

Third-party AI features require the group-level third-party AI features setting to be enabled. Experiment third-party AI features also require the Experiment features setting to be enabled.

Explain Selected Code in the Web UI

Introduced in GitLab 15.11 as an Experiment on GitLab.com.

This feature is an Experiment on GitLab.com that is powered by OpenAI’s GPT-3.

GitLab can help you get up to speed faster if you:

  • Spend a lot of time trying to understand pieces of code that others have created, or
  • Struggle to understand code written in a language that you are not familiar with.

By using a large language model, GitLab can explain the code in natural language.

Prerequisites:

  • The project must be a public project on GitLab.com.
  • You must have the GitLab Ultimate subscription tier.
  • You must be a member of the project.

To explain your code:

  1. On the top bar, select Main menu > Projects and find your project.
  2. On the left sidebar, select Merge requests, then select your merge request.
  3. On the secondary menu, select Changes.
  4. Go to the file, and select the lines that you want to have explained.
  5. On the left side, select the question mark (). You might have to scroll to the first line of your selection to view it. This sends the selected code, together with a prompt, to provide an explanation to the large language model.
  6. A drawer is displayed on the right side of the page. Wait a moment for the explanation to be generated.
  7. Provide feedback about how satisfied you are with the explanation, so we can improve the results.

How to use the Explain Code Experiment

We cannot guarantee that the large language model produces results that are correct. Use the explanation with caution.

Explain this Vulnerability in the Web UI

Introduced in GitLab 16.0 as an Experiment on GitLab.com.

This feature is an Experiment on GitLab.com that is powered by Google AI.

GitLab can help you with your vulnerability by using a large language model to:

  • Summarize the vulnerability.
  • Help developers and security analysts get started understanding the vulnerability, how it could be exploited, and how to fix it.
  • Provide a suggested mitigation.

Prerequisites:

  • You must have the GitLab Ultimate subscription tier.
  • You must be a member of the project.
  • The vulnerability must be a SAST finding.

To explain your vulnerability:

  1. On the top bar, select Main menu > Projects and find your project.
  2. On the left sidebar, select Security and Compliance > Vulnerability report.
  3. Find a SAST vulnerability.
  4. Open the vulnerability.
  5. Select Try it out.

Review the drawer on the right-hand side of your screen.

How to use Explain this Vulnerability Experiment

We cannot guarantee that the large language model produces results that are correct. Use the explanation with caution.

GitLab Chat

Introduced in GitLab 16.0 as an Experiment.

This feature is an Experiment on GitLab.com that is powered by OpenAI’s GPT-3. It requires the group-level third-party AI features setting to be enabled.

Getting help has never been easier. If you have a question about how the GitLab product works, you can ask product how-to questions and get AI generated support from GitLab Chat.

  1. In the lower-left corner, select the Help icon.
  2. Select Ask in GitLab Chat. A drawer opens on the right side of your screen.
  3. Enter your question in the chat input box and press Enter or select Send. It may take a few seconds for the interactive AI chat to search the product documentation and produce an answer.

To give feedback, select the Give Feedback link.

Summarize merge request changes

Introduced in GitLab 16.0 as an Experiment.

This feature is an Experiment on GitLab.com that is powered by OpenAI’s GPT-3. It requires the group-level third-party AI features setting to be enabled.

You can generate a merge request summary by using the /summarize_diff quick action in a merge request comment. This action posts a comment from a GitLab bot. The comment provides a summary of the changes and the related SHA for when that summary was generated.

Provide feedback on this experimental feature in issue 408726.

Data usage: When you use this quick action, the diff of changes between the head of the source branch and the target branch is sent to the large language model referenced above.

Summarize my merge request review

Introduced in GitLab 16.0 as an Experiment.

This feature is an Experiment on GitLab.com that is powered by OpenAI’s GPT-3. It requires the group-level third-party AI features setting to be enabled.

When you’ve completed your review of a merge request and are ready to submit your review you can choose to have summary generated for you. To generate the summary:

  1. Select the AI Actions dropdown list.
  2. Select Summarize my code review.

The summary is generated and entered in to the comment box where you can edit and refine prior to submitting with your review.

Provide feedback on this experimental feature in issue 408991.

Data usage: When you use this feature, the following data is sent to the large language model referenced above:

  • Draft comment’s text
  • File path of the commented files

Generate suggested tests in merge requests

Introduced in GitLab 16.0 as an Experiment.

This feature is an Experiment on GitLab.com that is powered by OpenAI’s GPT-3. It requires the group-level third-party AI features setting to be enabled.

When in a merge request you can choose to have GitLab suggest tests for the file you are reviewing. This can help to determine if appropriate test coverage has been provided or help with writing tests to provide more coverage for your project. To generate a test suggestion:

  1. Select the menu icon on the header of a file.
  2. Select Generate test with AI.

A sidebar opens where the test suggestion is generated. From there you can choose to copy that suggestion in to your editor as the start of your tests.

Feedback on this experimental feature can be provided in issue 408995.

Data usage: When you use this feature, the following data is sent to the large language model referenced above:

  • Contents of the file
  • The file name

Data Usage

GitLab AI features leverage generative AI to help increase velocity and aim to help make you more productive. Each feature operates independently of other features and is not required for other features to function.

Progressive enhancement

These features are designed as a progressive enhancement to existing GitLab features across our DevSecOps platform. They are designed to fail gracefully and should not prevent the core functionality of the underlying feature. Please note each feature is subject to its expected functionality as defined by the relevant feature support policy.

Stability and performance

These features are in a variety of feature support levels. Due to the nature of these features, there may be high demand for usage which may cause degraded performance or unexpected downtime of the feature. We have built these features to gracefully degrade and have controls in place to allow us to mitigate abuse or misuse. GitLab may disable beta and experimental features for any or all customers at any time at our discretion.

Third party services

Data privacy

Some AI features require the use of third-party AI services models and APIs from: Google AI and OpenAI. The processing of any personal data is in accordance with our Privacy Statement. You may also visit the Sub-Processors page to see the list of our Sub-Processors that we use in order to provide these features.

Group owners can control which top-level groups have access to third-party AI features by using the group level third-party AI features setting.

Model accuracy and quality

Generative AI may produce unexpected results that may be:

  • Low-quality
  • Incoherent
  • Incomplete
  • Produce failed pipelines
  • Insecure code
  • Offensive or insensitive

GitLab is actively iterating on all our AI-assisted capabilities to improve the quality of the generated content. We will continue improving the quality through prompt engineering, evaluating new AI/ML models to power these features, and through novel heuristics built into these features directly.