A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.gitlab.com/user/gitlab_duo_chat/examples/ below:

Ask GitLab Duo Chat | GitLab Docs

GitLab Duo Chat helps you:

The following examples provide more information on Duo Chat capabilities.

For additional practical examples, see the GitLab Duo use cases.

The example questions on this page, including the slash commands, are deliberately generic. You might receive more useful responses from Chat by asking questions that are specific to your current goal. For example, “How does the clean_missing_data function in data_cleaning.py decide which rows to drop?”.

Ask about GitLab

History

You can ask questions about how GitLab works. Things like:

GitLab Duo Chat uses the GitLab documentation from the GitLab repository as source.

To keep Chat up to date with the documentation, its knowledge base is updated daily.

Ask about a specific issue

History

You can ask about a specific GitLab issue. For example:

If the issue contains a large amount of text (more than 40,000 words), GitLab Duo Chat might not be able to consider every word. The AI model has a limit to the amount of input it can process at one time.

For tips on how GitLab Duo Chat can improve your productivity with issues and epics, see Boost your productivity with GitLab Duo Chat.

Ask about a specific epic

History

You can ask about a specific GitLab epic. For example:

If the epic contains a large amount of text (more than 40,000 words), GitLab Duo Chat might not be able to consider every word. The AI model has a limit to the amount of input it can process at one time.

Ask about a specific merge request

History

You can ask GitLab about the merge request you’re viewing. You can ask about:

While in the merge request, open Chat and type your question. For example:

Ask about a specific commit

History

You can ask about a specific GitLab commit. For example:

Ask about a specific pipeline job

History

You can ask about a specific GitLab pipeline job. For example:

Ask about a specific work item

History

You can ask about a specific GitLab work item. For example:

If the work item contains a large amount of text (more than 40,000 words), GitLab Duo Chat might not be able to consider every word. The AI model has a limit to the amount of input it can process at one time.

Explain selected code

History

You can ask GitLab Duo Chat to explain selected code:

  1. Select some code in your IDE.

  2. In Duo Chat, type /explain.

You can also add additional instructions to be considered. For example:

For more information, see:

In the GitLab UI, you can also explain code in:

Ask about or generate code

History

You can ask GitLab Duo Chat questions about code by pasting that code into the Chat window. For example:

Provide a clear explanation of this Ruby code: def sum(a, b) a + b end.
Describe what this code does and how it works.

You can also ask Chat to generate code. For example:

Ask follow-up questions

History

You can ask follow-up questions to delve deeper into the topic or task at hand. This helps you get more detailed and precise responses tailored to your specific needs, whether it’s for further clarification, elaboration, or additional assistance.

A follow-up to the question Write a Ruby function that prints 'Hello, World!' when called could be:

A follow-up to the question How to start a C# project? could be:

Ask about errors

History

Programming languages that require compiling the source code may throw cryptic error messages. Similarly, a script or a web application could throw a stack trace. You can ask GitLab Duo Chat by prefixing the copied error message with, for example, Explain this error message:. Add the specific context, like the programming language.

Ask about specific files in the IDE

History

Add repository files to your Duo Chat conversations in VS Code or JetBrains IDEs by typing /include and choosing the files.

Prerequisites:

To do this:

  1. In your IDE, in GitLab Duo Chat, type /include.
  2. To add files, you can either:

For example, if you are developing an e-commerce app, you can add the cart_service.py and checkout_flow.js files to Chat’s context and ask:

You cannot use Quick Chat to add files or ask questions about files added for Chat’s context.

Refactor code in the IDE

History

You can ask GitLab Duo Chat to refactor selected code:

  1. Select some code in your IDE.
  2. In Duo Chat, type /refactor.

You can include additional instructions to be considered. For example:

/refactor uses Repository X-Ray to deliver more accurate, context-aware suggestions.

For more information, see:

Fix code in the IDE

History

You can ask GitLab Duo Chat to fix selected code:

  1. Select some code in your IDE.
  2. In Duo Chat, type /fix.

You can include additional instructions to be considered. For example:

/fix uses Repository X-Ray to deliver more accurate, context-aware suggestions.

Write tests in the IDE

History

You can ask GitLab Duo Chat to create tests for the selected code:

  1. Select some code in your IDE.
  2. In Duo Chat, type /tests.

You can include additional instructions to be considered. For example:

/tests uses Repository X-Ray to deliver more accurate, context-aware suggestions.

For more information, see Use GitLab Duo Chat in VS Code.

Watch an overview

Ask about CI/CD

History

You can ask GitLab Duo Chat to create a CI/CD configuration:

You can also ask to explain specific job errors by copy-pasting the error message, prefixed with Explain this CI/CD job error message, in the context of <language>::

Alternatively, you can use GitLab Duo Root Cause Analysis to troubleshoot failed CI/CD jobs.

Troubleshoot failed CI/CD jobs with Root Cause Analysis

History

You can use GitLab Duo Root Cause Analysis in GitLab Duo Chat to quickly identify and fix CI/CD job failures. It analyzes the last 100,000 characters of the job log to determine the cause of failure and provides an example fix.

You can access this feature either from the Pipelines tab in merge requests or directly from the job log.

Watch overview

Root Cause Analysis does not support:

Provide feedback on this feature in epic 13872.

Prerequisites:

From a merge request

To troubleshoot a failed CI/CD job from a merge request:

  1. On the left sidebar, select Search or go to and find your project.
  2. Go to your merge request.
  3. Select the Pipelines tab.
  4. From the Failed jobs widget, either:
From the job log

To troubleshoot a failed CI/CD job from the job log:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Build > Jobs.
  3. Select the failed CI/CD job.
  4. Below the job log, either:
Explain a vulnerability

History

You can ask GitLab Duo Chat to explain a vulnerability when you are viewing a SAST vulnerability report.

For more information, see Explaining a vulnerability.

Create a new conversation

History

In GitLab 17.10 and later, you can have multiple simultaneous conversations with Chat.

Delete or reset the conversation

For a single conversation with Chat:

In both cases, the conversation history will not be considered when you ask new questions. Deleting or resetting might help improve the answers when you switch contexts, because Duo Chat will not get confused by the unrelated conversations.

When having multiple conversations with Chat:

GitLab Duo Chat slash commands

Duo Chat has a list of universal, GitLab UI, and IDE commands, each of which is preceded by a slash (/).

Use the commands to quickly accomplish specific tasks.

Universal

History

On GitLab.com, in GitLab 17.10 and later, when having multiple conversations, the /clear and /reset slash commands are replaced by the /new slash command.

GitLab UI

History

These commands are dynamic and are available only in the GitLab UI when using Duo Chat:

IDE

History

These commands work only when using Duo Chat in supported IDEs:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4