GitLab Duo Tips

Learn how to use AI-powered GitLab Duo Chat, Code Suggestions and more to make your DevSecOps workflows faster.

Access

GitLab team members can access GitLab Duo on GitLab.com by default. If you do not have access, please create a HelpLab ticket to work with IT to get access to GitLab Duo on GitLab.com.

GitLab contributors and co-creators can also take advantage of AI-powered GitLab Duo. Start with the onboarding process in contributors.gitlab.com/.

If team members need access in customer demo group on GitLab.com, create an Access Request using the GitlabCom_Licensed_Demo_Group_Request template.

Follow the Getting Started documentation to onboard.

GitLab Duo in IDEs

For IDE integration through GitLab Duo extensions, follow the editor extensions documentation.

Resources

Tips

GitLab Duo Chat can answer many questions about GitLab, programming languages, technology and more. Use it for your advantage, and practice how to ask questions and create follow-up conversations, instead of opening multiple browser search tabs. Explore, experiment, and iterate on chat prompts and responses. Learn more in the blog post 10 best practices for AI-powered GitLab Duo Chat.

If you are using GitLab Duo to write code, dive into the blog post Top tips for efficient AI-powered Code Suggestions with GitLab Duo.

Explore the use cases in this handbook page for GitLab team members and co-creators. More use cases and workflows are documented in the GitLab Duo documentation.

Open feature requests:

  1. Ask GitLab handbook questions in GitLab Duo Chat

Handbook use cases

Preparation steps for handbook edits

Ensure that GitLab Duo Chat works in your IDE or GitLab UI.

  1. GitLab UI
  2. Web IDE
  3. VS Code
  4. JetBrains IDEs (IntelliJ IDEA, PyCharm, and others)

Keyboard shortcuts to access Duo Chat in VS Code/Web IDE:

  1. Use cmd shift p (macOS) to open the command palette.
  2. Search for GitLab Duo Chat and press Enter.
  3. Optional: Move Duo Chat to the right panel by dragging it there [explained in this video].

If you want to use Code Suggestions to write and complete Markdown content, you need to configure markdown as additional language in the IDE extension settings. Tip: Multiple open tabs and more file content can help increase the context and quality of suggestions. Schedule a coffee chat with @dnsmichi, handbook backend maintainer, and ask for live screenshare learning sessions.

Create Markdown tables

Problem to solve: Is there a way to add a table on a handbook page via web IDE?

Use the following prompt to create a table with preseed data columns:

Create a Markdown table with the following data set
Header: Cloud, GPU type, Costs, Spec, Notes
Fill the entries with sample data for 3 rows.

GitLab Duo Chat may visualize the Markdown table. Use that to your advantage to verify that the result matches your expectations, and follow up with a prompt to define the output format as raw Markdown.

Show the raw Markdown in a code block

Note: The same workflow is available in GitLab Duo Chat in local IDEs with the Duo extension.

Update or refactor Markdown tables

Sometimes, Markdown tables need to be split into multiple tables, or merged into a single one. Or an additional column needs to be added.

  1. Open the IDE and select the table that should be updated or refactored.

  2. Ask GitLab Duo Chat the following prompt:

    /refactor the table for better readability. Split it by the first column into separate tables.
    
  3. When Duo Chat visualizes the table in the response, use that to verify that the table is correctly divided. You can follow up with a prompt to ask for a raw output:

    Only show the refactored table as raw Markdown code blocks
    

Development use cases

Read the blog post Developing GitLab Duo: How we are dogfooding our AI features to learn how to

  1. Streamline the code review process
  2. Condense comment threads
  3. Create new documentation
  4. Craft release notes
  5. Optimize docs site navigation
  6. and more

Troubleshoot failed CI/CD pipelines

  1. Navigate into the failed pipeline’s job view, and inspect the log. Follow the steps in the documentation to start the Root Cause Analysis.
  2. Use the chat prompt to ask follow-up questions, for example how to prevent the error long term.

You can explore the use cases in:

  1. Duo Enterprise product tours and Root Cause Analysis challenges maintained by the Developer Advocacy team
  2. GitLab University: GitLab Duo Enterprise course

Onboarding and contributions

Team members and community contributors can take advantage of AI-powered workflows for fast onboarding, learning more about the code base and GitLab, and contributing with faster review cycles.

  1. Learn about the source code base, and explore how to implement a specific feature proposal or bugfix.
  2. Speed up Merge Request summary and code reviews.
  3. Troubleshoot failing CI/CD pipelines.

Learn more in the GitLab Duo use cases documentation.