[{"data":1,"prerenderedAt":1931},["ShallowReactive",2],{"/blog/10-best-practices-for-using-ai-powered-gitlab-duo-chat":3,"navigation-en-us":1147,"banner-en-us":1574,"footer-en-us":1584,"blog-post-authors-en-us-Michael Friedrich":1828,"blog-related-posts-en-us-10-best-practices-for-using-ai-powered-gitlab-duo-chat":1843,"next-steps-en-us":1868,"blog-promotions-en-us":1878},{"id":4,"title":5,"authors":6,"body":8,"category":1124,"date":1125,"description":1126,"extension":1127,"externalUrl":1128,"faq":1128,"featured":1129,"heroImage":1130,"meta":1131,"navigation":1129,"path":1132,"seo":1133,"slug":1138,"stem":1139,"tags":1140,"template":1145,"updatedDate":1128,"__hash__":1146},"blogPosts/en-us/blog/10-best-practices-for-using-ai-powered-gitlab-duo-chat.md","10 best practices for using AI-powered GitLab Duo Chat",[7],"Michael Friedrich",{"type":9,"value":10,"toc":1106},"minimark",[11,15,18,25,31,95,98,119,130,134,142,158,171,174,181,184,189,192,195,200,206,209,214,220,223,228,234,237,242,248,251,256,262,265,270,276,279,284,290,294,297,300,303,345,352,357,363,370,375,379,390,395,401,404,409,415,418,423,429,433,436,439,444,450,453,458,464,473,477,480,490,498,501,507,510,515,521,526,535,541,549,554,560,563,574,578,587,594,600,603,608,614,617,622,628,635,640,646,649,654,660,664,667,672,675,680,686,701,705,709,731,737,743,747,767,773,778,782,802,808,813,816,820,823,829,841,846,852,858,863,869,873,885,888,893,896,901,908,911,921,924,930,936,941,947,957,968,984,988,1000,1005,1011,1015,1026,1031,1037,1040,1043,1064,1067,1073,1076,1081,1084,1092,1102],[12,13,14],"p",{},"Getting into a conversation with AI can be challenging. What question do you start with? How do you frame the question? How much context is needed? Will the conversation provide the best and most efficient results?",[12,16,17],{},"In this tutorial, we explore 10 tips and best practices to integrate GitLab Duo Chat into your AI-powered DevSecOps workflows and refine your prompts for the best results.",[12,19,20],{},[21,22,24],"a",{"href":23},"#get-started-keep-gitlab-duo-chat-open-and-in-sight","Get started: Keep GitLab Duo Chat open and in sight",[12,26,27],{},[21,28,30],{"href":29},"#10-best-practices-for-using-gitlab-duo-chat","10 best practices for using GitLab Duo Chat",[32,33,34,41,47,53,59,65,71,77,83,89],"ol",{},[35,36,37],"li",{},[21,38,40],{"href":39},"#1.-have-a-conversation","Have a conversation",[35,42,43],{},[21,44,46],{"href":45},"#2.-refine-the-prompt-for-more-efficiency","Refine the prompt for more efficiency",[35,48,49],{},[21,50,52],{"href":51},"#3.-follow-prompt-patterns","Follow prompt patterns",[35,54,55],{},[21,56,58],{"href":57},"#4.-use-low-context-communication","Use low-context communication",[35,60,61],{},[21,62,64],{"href":63},"#5.-repeat-yourself","Repeat yourself",[35,66,67],{},[21,68,70],{"href":69},"#6.-be-patient","Be patient",[35,72,73],{},[21,74,76],{"href":75},"#7.-reset-and-start-anew","Reset and start anew",[35,78,79],{},[21,80,82],{"href":81},"#8.-gain-efficiency-with-slash-commands-in-the-ide","Gain efficiency with slash commands in the IDE",[35,84,85],{},[21,86,88],{"href":87},"#9.-refine-the-prompt-for-slash-commands","Refine the prompt for slash commands",[35,90,91],{},[21,92,94],{"href":93},"#10.-get-creative-with-slash-commands","Get creative with slash commands",[12,96,97],{},"Bonus content:",[99,100,101,107,113],"ul",{},[35,102,103],{},[21,104,106],{"href":105},"#shortcuts","Shortcuts",[35,108,109],{},[21,110,112],{"href":111},"#fun-exercises","Fun exercises",[35,114,115],{},[21,116,118],{"href":117},"#learn-more","Learn more",[120,121,122],"blockquote",{},[12,123,124,125],{},"Live demo! Discover the future of AI-driven software development with our GitLab 17 virtual launch event. ",[21,126,129],{"href":127,"rel":128},"https://about.gitlab.com/eighteen/",[],"Register today!",[131,132,24],"h2",{"id":133},"get-started-keep-gitlab-duo-chat-open-and-in-sight",[12,135,136,141],{},[21,137,140],{"href":138,"rel":139},"https://docs.gitlab.com/user/gitlab_duo_chat/",[],"GitLab Duo Chat"," is available in the GitLab UI, Web IDE, and supported programming IDEs, for example, VS Code.",[12,143,144,145,149,150,153,154,157],{},"In VS Code, you can open GitLab Duo Chat in the default left pane. You can also drag and drop the icon into the right pane. This allows you to keep Chat open while you write code and navigate the file tree, perform Git actions, etc. To reset the Chat location, open the command palette (by pressing the ",[146,147,148],"code",{},"Command+Shift+P"," (on macOS) or ",[146,151,152],{},"Ctrl+Shift+P"," (on Windows/Linux) keyboard shortcut and then type ",[146,155,156],{},"View: Reset View Locations",". The following short video shows you how to do it.",[159,160,163,164],"figure",{"className":161},[162],"video_container","\n  ",[165,166,170],"iframe",{"src":167,"frameBorder":168,"allowFullScreen":169},"https://www.youtube.com/embed/foZpUvWPRJQ","0","true"," ",[12,172,173],{},"The Web IDE and VS Code share the same framework – the same method works in the Web IDE for more efficient workflows.",[12,175,176],{},[177,178],"img",{"alt":179,"src":180},"Chat in Web IDE","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image1_aHR0cHM6_1750097645344.png",[131,182,30],{"id":183},"_10-best-practices-for-using-gitlab-duo-chat",[185,186,188],"h3",{"id":187},"_1-have-a-conversation","1. Have a conversation",[12,190,191],{},"Chats are conversations, not search forms.",[12,193,194],{},"For the first conversation icebreaker, you can start with the same search terms similar to a browser search and experiment with the response and output. In this example, let's start with a C# project and best practices.",[120,196,197],{},[12,198,199],{},"c# start project best practices",[12,201,202],{},[177,203],{"alt":204,"src":205},"Chat prompt for C# start project best practices and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097646/Blog/Content%20Images/Blog/Content%20Images/image11_aHR0cHM6_1750097645345.png",[12,207,208],{},"The response is helpful to understand a broad scope of C#, but does not kickstart immediate best practices. Let's follow up with a more focused question in the same context.",[120,210,211],{},[12,212,213],{},"Please show the project structure for the C# project.",[12,215,216],{},[177,217],{"alt":218,"src":219},"Chat prompt for project structure for the C# project and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image9_aHR0cHM6_1750097645346.png",[12,221,222],{},"This answer is helpful. Next, let's follow up with a Git question, and use the same question structure: Direct request to show something.",[120,224,225],{},[12,226,227],{},"Show an example for a .gitignore for C#",[12,229,230],{},[177,231],{"alt":232,"src":233},"Chat prompt for a .gitignore for C# and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image25_aHR0cHM6_1750097645347.png",[12,235,236],{},"Continue with CI/CD and ask how to build the C# project.",[120,238,239],{},[12,240,241],{},"Show a GitLab CI/CD configuration for building the C# project",[12,243,244],{},[177,245],{"alt":246,"src":247},"Chat prompt for GitLab CI/CD configuration for building C# project and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image16_aHR0cHM6_1750097645349.png",[12,249,250],{},"In this example, Chat encouraged us to request specific changes. Let's ask to use the .NET SDK 8.0 instead of 6.0.",[120,252,253],{},[12,254,255],{},"In the above example, please use the .NET SDK 8.0 image",[12,257,258],{},[177,259],{"alt":260,"src":261},"Chat prompt to use .NET SDK 8.0 image and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image32_aHR0cHM6_1750097645350.png",[12,263,264],{},"The CI/CD configuration uses the .NET command line interface (CLI). Maybe we can use that for more efficient commands to create the projects and tests structure, too?",[120,266,267],{},[12,268,269],{},"Explain how to create projects and test structure on the CLI",[12,271,272],{},[177,273],{"alt":274,"src":275},"Chat prompt to explain how to create projects and test structure on the CLI and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image14_aHR0cHM6_1750097645351.png",[12,277,278],{},"Of course, we could execute these commands in the terminal, but what if we wanted to stay in VS Code? Let's ask Chat.",[120,280,281],{},[12,282,283],{},"Explain how to open a new terminal in VS Code",[12,285,286],{},[177,287],{"alt":288,"src":289},"Chat prompt to explain how to open a new terminal in VS Code and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image5_aHR0cHM6_1750097645351.png",[185,291,293],{"id":292},"_2-refine-the-prompt-for-more-efficiency","2. Refine the prompt for more efficiency",[12,295,296],{},"Think of GitLab Duo Chat as a human, and engage with full sentences that provide as much context into your thoughts and questions.",[12,298,299],{},"Experienced browser search users might know this approach to queries: Build up the question, add more terms to refine the scope, and restart the search after opening plenty of tabs.",[12,301,302],{},"In a browser search, this probably would result in four to five different search windows.",[304,305,310],"pre",{"className":306,"code":307,"language":308,"meta":309,"style":309},"language-markdown shiki shiki-themes github-light","c# start project best practices\nc# .gitignore\nc# gitlab cicd\nc# gitlab security scanning\nc# solutions and projects, application and tests\n","markdown","",[146,311,312,321,327,333,339],{"__ignoreMap":309},[313,314,317],"span",{"class":315,"line":316},"line",1,[313,318,320],{"class":319},"sgsFI","c# start project best practices\n",[313,322,324],{"class":315,"line":323},2,[313,325,326],{"class":319},"c# .gitignore\n",[313,328,330],{"class":315,"line":329},3,[313,331,332],{"class":319},"c# gitlab cicd\n",[313,334,336],{"class":315,"line":335},4,[313,337,338],{"class":319},"c# gitlab security scanning\n",[313,340,342],{"class":315,"line":341},5,[313,343,344],{"class":319},"c# solutions and projects, application and tests\n",[12,346,347,348,351],{},"You can follow this strategy in a chat conversation, too. It requires adding more context, making it a conversational approach. GitLab Duo Chat enables you to ask multiple questions in one conversation request. Example: You need to start with a new C# project, apply best practices, add a ",[146,349,350],{},".gitignore"," file, and configure CI/CD and security scanning, just like in the above search. In Chat, you can combine the questions into one request.",[120,353,354],{},[12,355,356],{},"How can I get started creating an empty C# console application in VS Code? Please show a .gitignore and .gitlab-ci.yml configuration with steps for C#, and add security scanning for GitLab. Explain how solutions and projects in C# work, and how to add a test project on the CLI.",[12,358,359],{},[177,360],{"alt":361,"src":362},"Chat prompt adding more context and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image37_aHR0cHM6_1750097645352.png",[12,364,365,366,369],{},"In this response, Chat suggests to ask for specific configuration examples in follow-up questions in the conversation. Async practice: Create follow-up questions. You can omit ",[146,367,368],{},"C#"," as context in the same chat session.",[120,371,372],{},[12,373,374],{},"Please show an example for a .gitignore. Please show a CI/CD configuration. Include the SAST template.",[185,376,378],{"id":377},"_3-follow-prompt-patterns","3. Follow prompt patterns",[12,380,381,382,385,386,389],{},"Follow the pattern: ",[146,383,384],{},"Problem statement, ask for help, provide additional requests",". Not everything comes to mind when asking the first question – don't feel blocked, and instead start with ",[146,387,388],{},"Problem statement, ask for help"," in the first iteration.",[120,391,392],{},[12,393,394],{},"I need to fulfill compliance requirements. How can I get started with Codeowners and approval rules?",[12,396,397],{},[177,398],{"alt":399,"src":400},"Chat prompt to get started with Codeowners and approval rules and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image19_aHR0cHM6_1750097645352.png",[12,402,403],{},"The answer is helpful but obviously generic. Now, you may want to get specific help for your team setup.",[120,405,406],{},[12,407,408],{},"Please show an example for Codeowners with different teams: backend, frontend, release managers.",[12,410,411],{},[177,412],{"alt":413,"src":414},"Chat prompt to show an example for Codeowners with different teams: backend, frontend, release managers and reponse ","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image31_aHR0cHM6_1750097645353.png",[12,416,417],{},"An alternative is to describe the situation you are in and to ask for input. It can feel a bit like a conversation to follow the STAR model (Situation, Task, Action, Results).",[120,419,420],{},[12,421,422],{},"I have a Kubernetes cluster integrated in GitLab. Please generate a Yaml configuration for a Kubernetes service deployment. Explain how GitOps works as a second step. How to verify the results?",[12,424,425],{},[177,426],{"alt":427,"src":428},"Chat prompt with multiple questions and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image27_aHR0cHM6_1750097645354.png",[185,430,432],{"id":431},"_4-use-low-context-communication","4. Use low-context communication",[12,434,435],{},"Provide as much context as needed to provide an answer. Sometimes, the previous history or opened source code does not provide that helpful context. To make questions more efficient, apply a pattern of low-context communication, which is used in all-remote communication at GitLab.",[12,437,438],{},"The following question did not provide enough context in a C++ project.",[120,440,441],{},[12,442,443],{},"Should I use virtual override instead of just override?",[12,445,446],{},[177,447],{"alt":448,"src":449},"Chat prompt asking if the users should use virtual override instead of just override and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image34_aHR0cHM6_1750097645354.png",[12,451,452],{},"Instead, try to add more context:",[120,454,455],{},[12,456,457],{},"When implementing a pure virtual function in an inherited class, should I use virtual function override, or just function override? Context is C++.",[12,459,460],{},[177,461],{"alt":462,"src":463},"Chat prompt with more detail and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image36_aHR0cHM6_1750097645355.png",[12,465,466,467,472],{},"The example is also shown in the ",[21,468,471],{"href":469,"rel":470},"https://youtu.be/Z9EJh0J9358?t=2190",[],"GitLab Duo Coffee Chat: Refactor C++ functions into OOP classes for abstract database handling",".",[185,474,476],{"id":475},"_5-repeat-yourself","5. Repeat yourself",[12,478,479],{},"AI is not predictable. Sometimes, it may not answer with the expected results, or does not produce source code examples or configuration snippets because it lacked context. It is recommended to repeat the question and refine the requirements.",[12,481,482,483,486,487,472],{},"In the following example, we want to create a C# application. In the first attempt, we did not specify the application type – C# can be used to create console/terminal but also UI applications. The result also does not provide an empty example source code. The second, repeated prompt adds two more words - ",[146,484,485],{},"console"," and ",[146,488,489],{},"empty",[120,491,492,495],{},[12,493,494],{},"How can I get started creating an C# application in VSCode?",[12,496,497],{},"How can I get started creating an empty C# console application in VSCode?",[12,499,500],{},"The results in the prompt differ. The first response is helpful to get started by following the instructions in the VS Code window, but it does not tell us where the source code is located and how to modify it. The repeated prompt with refinements modifies the response and provides instructions how to override the default template with some “hello world” code.",[12,502,503],{},[177,504],{"alt":505,"src":506},"Chat prompt with repeated prompt with modifications and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image28_aHR0cHM6_1750097645355.png",[12,508,509],{},"You can also combine repeat and refine strategies, and ask Chat to show an example for application code and tests.",[120,511,512],{},[12,513,514],{},"How can I get started creating an empty C# console application in VSCode? Please show an example for application and tests.",[12,516,517],{},[177,518],{"alt":519,"src":520},"Chat prompt that asks for example for application and tests and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image3_aHR0cHM6_1750097645356.png",[522,523,525],"h4",{"id":524},"repeat-yourself-after-generic-questions","Repeat yourself after generic questions",[12,527,528,529,534],{},"When asking generic technology questions, GitLab Duo Chat might not be able to help. In the following scenario, I wanted to get a suggestion for Java build tools and framework, and it did not work. There could be many answers: Maven, Gradle, etc., as build tools, and ",[21,530,533],{"href":531,"rel":532},"https://en.wikipedia.org/wiki/List_of_Java_frameworks",[],"100+ Java frameworks",", depending on the technology stack and requirements.",[12,536,537],{},[177,538],{"alt":539,"src":540},"Chat prompt for Java build tools and framework and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image2_aHR0cHM6_1750097645356.png",[12,542,543,544,472],{},"Let's assume that we want to focus on a customer environment with ",[21,545,548],{"href":546,"rel":547},"https://spring.io/projects/spring-boot",[],"Java Spring Boot",[120,550,551],{},[12,552,553],{},"I want to create a Java Spring Boot application. Please explain the project structure and show a hello world example.",[12,555,556],{},[177,557],{"alt":558,"src":559},"Chat prompt that asks for more, including a hello world example and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image26_aHR0cHM6_1750097645357.png",[12,561,562],{},"This provides great results already. As an async exercise, repeat the prompt, and ask how to deploy the application, adding more refinements in each step. Alternatively, you can make it a follow-up conversation.",[120,564,565,568,571],{},[12,566,567],{},"I want to create a Java Spring Boot application. Please explain the project structure and show a hello world example. Show how to build and deploy the application in CI/CD.",[12,569,570],{},"I want to create a Java Spring Boot application. Please explain the project structure and show a hello world example. Show how to build and deploy the application in CI/CD, using container images.",[12,572,573],{},"I want to create a Java Spring Boot application. Please explain the project structure and show a hello world example. Show how to build and deploy the application in CI/CD, using container images. Use Kubernetes and GitOps in GitLab.",[185,575,577],{"id":576},"_6-be-patient","6. Be patient",[12,579,580,581,586],{},"Single words or short sentences might not generate the desired results, ",[21,582,585],{"href":583,"rel":584},"https://youtu.be/JketELxLNEw?t=1220",[],"as shown in this video example",". Sometimes, GitLab Duo Chat is able to guess from available data, but sometimes also might insist on providing more context.",[12,588,589,590,593],{},"Example: ",[146,591,592],{},"labels"," matches the GitLab documentation content.",[12,595,596],{},[177,597],{"alt":598,"src":599},"Chat prompt about labels and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image12_aHR0cHM6_1750097645357.png",[12,601,602],{},"Refine the question to problem statements and more refinements for issue board usage.",[120,604,605],{},[12,606,607],{},"Explain labels in GitLab. Provide an example for efficient usage with issue boards.",[12,609,610],{},[177,611],{"alt":612,"src":613},"Chat prompt that includes asking for an example and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image21_aHR0cHM6_1750097645358.png",[12,615,616],{},"Or use a problem statement, followed by a question and the ask for additional examples.",[120,618,619],{},[12,620,621],{},"I don't know how to use labels in GitLab. Please provide examples, and how to use them for filters in different views. Explain these views with examples.",[12,623,624],{},[177,625],{"alt":626,"src":627},"Chat prompt with problem statement and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image10_aHR0cHM6_1750097645358.png",[12,629,630,631,634],{},"Also, avoid ",[146,632,633],{},"yes/no"," questions and instead add specific context.",[120,636,637],{},[12,638,639],{},"Can you help me fix performance regressions?",[12,641,642],{},[177,643],{"alt":644,"src":645},"Chat promptt that asks for help with fixing performance regressions and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image18_aHR0cHM6_1750097645359.png",[12,647,648],{},"Instead, provide the context of the performance regression, including the programming languages, frameworks, technology stack, and environments. The following example uses an environment from some years ago, which can still be accurate today.",[120,650,651],{},[12,652,653],{},"My PHP application encounters performance regressions using PHP 5.6 and MySQL 5.5. Please explain potential root causes, and how to address them. The app is deployed on Linux VMs.",[12,655,656],{},[177,657],{"alt":658,"src":659},"Chat prompt that includes more detail and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image24_aHR0cHM6_1750097645360.png",[185,661,663],{"id":662},"_7-reset-and-start-anew","7. Reset and start anew",[12,665,666],{},"Sometimes, the chat history shows a different learning curve and provides the wrong context for follow-up questions. Or, you asked specific questions where GitLab Duo Chat cannot provide answers. Since generative AI is not predictable, it might also lack the ability to provide certain examples, but think it gave them in a future response (observed in Chat Beta). The underlying large language models, or LLMs, sometimes might insist on giving a specific response, in an endless loop.",[120,668,669],{},[12,670,671],{},"How can I get started creating an empty C# console application in VSCode? Please show a .gitignore and .gitlab-ci.yml configuration with steps for C#, and add security scanning for GitLab. Explain how solutions and projects in C# work, and how to add a test project on the CLI.",[12,673,674],{},"After asking the question above with an example configuration, I wanted to reduce the scope of the question to get a more tailored response. It did not work as expected, since Chat knows about the chat history in context, and refers to previous answers.",[120,676,677],{},[12,678,679],{},"How can I get started creating an empty C# console application in VSCode? Please show a .gitignore and .gitlab-ci.yml configuration with steps for C#.",[12,681,682],{},[177,683],{"alt":684,"src":685},"Chat prompt that asks for configuration examples and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image23_aHR0cHM6_1750097645360.png",[12,687,688,689,692,693,696,697,700],{},"To force Chat into a new context, use ",[146,690,691],{},"/reset"," as slash command to reset the session, and repeat the question to get better results. You can also use ",[146,694,695],{},"/clean"," or ",[146,698,699],{},"/clear"," to delete all messages in the conversation.",[185,702,704],{"id":703},"_8-gain-efficiency-with-slash-commands-in-the-ide","8. Gain efficiency with slash commands in the IDE",[522,706,708],{"id":707},"explain-code","Explain code",[99,710,711,714,725],{},[35,712,713],{},"Q: Generated code? Existing code? Legacy code?",[35,715,716,717,472],{},"A: Use the ",[21,718,721,724],{"href":719,"rel":720},"https://docs.gitlab.com/user/gitlab_duo_chat/#explain-code-in-the-ide",[],[146,722,723],{},"/explain"," slash command in the IDE",[35,726,727,728,472],{},"A2: Refine the prompt with more focused responses, for example: ",[146,729,730],{},"/explain focus on potential shortcomings or bugs",[12,732,733],{},[177,734],{"alt":735,"src":736},"Chat prompt with /explain slash command","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/gitlab_duo_chat_slash_commands_explain_01_aHR0cHM6_1750097645361.png",[12,738,739],{},[177,740],{"alt":741,"src":742},"Chat prompt with refined prompt","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image6_aHR0cHM6_1750097645361.png",[522,744,746],{"id":745},"refactor-code","Refactor code",[99,748,749,752,761],{},[35,750,751],{},"Q: Unreadable code? Long spaghetti code? Zero test coverage?",[35,753,716,754,472],{},[21,755,758,724],{"href":756,"rel":757},"https://docs.gitlab.com/user/gitlab_duo_chat/#refactor-code-in-the-ide",[],[146,759,760],{},"/refactor",[35,762,763,764,472],{},"A2: Refine the prompt for more targeted actions, for example object-oriented patterns: ",[146,765,766],{},"/refactor into object-oriented classes with methods and attributes",[12,768,769],{},[177,770],{"alt":771,"src":772},"Chat prompt with /refactor slash command","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image35_aHR0cHM6_1750097645362.png",[12,774,775],{},[177,776],{"alt":741,"src":777},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image30_aHR0cHM6_1750097645362.png",[522,779,781],{"id":780},"generate-tests","Generate tests",[99,783,784,787,796],{},[35,785,786],{},"Q: Testable code but writing tests takes too much time?",[35,788,716,789,472],{},[21,790,793,724],{"href":791,"rel":792},"https://docs.gitlab.com/user/gitlab_duo_chat/#write-tests-in-the-ide",[],[146,794,795],{},"/tests",[35,797,798,799,472],{},"A2: Refine the prompt for specific test frameworks, or test targets. You can also instruct the prompt to focus on refactoring, and then generate tests: ",[146,800,801],{},"/tests focus on refactoring the code into functions, and generate tests",[12,803,804],{},[177,805],{"alt":806,"src":807},"Chat prompt with /tests slash command","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image29_aHR0cHM6_1750097645363.png",[12,809,810],{},[177,811],{"alt":741,"src":812},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image4_aHR0cHM6_1750097645363.png",[12,814,815],{},"More practical examples in complete development workflows are available in the GitLab Duo examples documentation.",[185,817,819],{"id":818},"_9-refine-the-prompt-for-slash-commands","9. Refine the prompt for slash commands",[12,821,822],{},"You will see refined prompts tips in this blog post a lot. It is one of the ingredients for better AI-powered workflow efficiency. Slash commands are no different, and allow for better results in GitLab Duo Chat.",[12,824,825,826,828],{},"A customer recently asked: \"Can code explanations using ",[146,827,723],{}," create comments in code?\" The answer is: no. But you can use the Chat prompt to ask follow-up questions, and ask for a summary in a code comment format. It requires the context of the language.",[12,830,831,832,837,838,840],{},"The following example with a ",[21,833,836],{"href":834,"rel":835},"https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-prompts/-/blob/5cc9bdd65ee8ee16c548bea0402c18f8209d4d06/chat/slash-commands/c++/cli.cpp",[],"C++ HTTP client code using the curl library"," needs more documentation. You can refine the ",[146,839,723],{}," prompt by giving more refined instructions to explain the code by adding code comments, and then copy-paste that into the editor.",[120,842,843],{},[12,844,845],{},"/explain add documentation, rewrite the code snippet",[12,847,848],{},[177,849],{"alt":850,"src":851},"Chat prompt to add documentation and rewrite code snippet and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image13_aHR0cHM6_1750097645363.png",[12,853,854,855,857],{},"Alternatively, you can ask Chat to ",[146,856,760],{}," the source code, and generate missing code comments through a refined prompt.",[120,859,860],{},[12,861,862],{},"/refactor add code comments and documentation",[12,864,865],{},[177,866],{"alt":867,"src":868},"Chat prompt to refactor source code and generate code comments","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image15_aHR0cHM6_1750097645364.png",[185,870,872],{"id":871},"_10-get-creative-with-slash-commands","10. Get creative with slash commands",[12,874,875,876,878,879,881,882,884],{},"When the Chat prompt does not know an answer to a question about the source code or programming language, look into the slash commands ",[146,877,723],{},", ",[146,880,760],{},", and ",[146,883,795],{}," and how much they can help in the context.",[12,886,887],{},"In the following example, an SQL query string in C++ is created in a single line. To increase readability, and also add more database columns in the future, it can be helpful to change the formatting into a multi-line string.",[120,889,890],{},[12,891,892],{},"std::string sql = \"CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, email TEXT NOT NULL)\";",[12,894,895],{},"You can ask GitLab Duo Chat about it, for example, with the following question:",[120,897,898],{},[12,899,900],{},"How to create a string in C++ using multiple lines?",[12,902,903,904,907],{},"Chat may answer with an explanation and optional, a source code example. In this context, it can interpret the question to create a C++ string value with multiple lines, for example, using the ",[146,905,906],{},"\\n"," character, assigned to a variable.",[12,909,910],{},"The requirement instead is to only format the written code, and variable value assignment in multiple lines. The string value itself does not need to contain a multi-line string representation.",[12,912,913,914,917,918,920],{},"There is an alternative for additional context in VS Code and the Web IDE: Select the source code in question, right-click, and navigate into ",[146,915,916],{},"GitLab Duo Chat > Refactor",". This opens the Chat prompt and fires the ",[146,919,760],{}," code task immediately.",[12,922,923],{},"Although, the code task might not bring the expected results. Refactoring a single-line SQL string can mean a lot of things: Use multiple lines for readability, create constants, etc.",[12,925,926,927,929],{},"Code tasks provide an option to refine the prompt. You can add more text after the ",[146,928,760],{}," command, and instruct GitLab Duo Chat to use a specific code type, algorithm, or design pattern.",[12,931,932,933,472],{},"Let's try it again: Select the source code, change focus into Chat, and type the following prompt, followed by ",[146,934,935],{},"Enter",[120,937,938],{},[12,939,940],{},"/refactor into a multi-line written string. Show different approaches for all C++ standards.",[12,942,943],{},[177,944],{"alt":945,"src":946},"Chat prompt to refactor into a multi-line written string and response","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image17_aHR0cHM6_1750097645364.png",[12,948,949,953,954,956],{},[950,951,952],"strong",{},"Tip:"," You can use GitLab Duo Code Suggestions to refine the source code even more after refactoring, or use alternative ",[146,955,760],{}," prompt refinements.",[120,958,959,962,965],{},[12,960,961],{},"/refactor into a multi-line written string, show different approaches",[12,963,964],{},"/refactor into multi-line string, not using raw string literals",[12,966,967],{},"/refactor into a multi-line written string. Make the table name parametrizable",[12,969,970,971,974,975,878,979,472],{},"An alternative approach with the ",[146,972,973],{},"stringstream"," type is shown in the ",[21,976,471],{"href":977,"rel":978},"https://www.youtube.com/watch?v=Z9EJh0J9358",[],[21,980,983],{"href":981,"rel":982},"https://gitlab.com/gitlab-da/use-cases/ai/gitlab-duo-coffee-chat/gitlab-duo-coffee-chat-2024-01-23/-/commit/7ea233138aed46d77e6ce0d930dd8e10560134eb#4ce01e4c84d4b62df8eed159c2db3768ad4ef8bf_33_35",[],"MR diff",[522,985,987],{"id":986},"explain-vulnerabilities","Explain vulnerabilities",[12,989,990,991,993,994,999],{},"It might not always work, but the ",[146,992,723],{}," slash command can be asked about security vulnerability explanations, too. In this example, the ",[21,995,998],{"href":996,"rel":997},"https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-prompts/-/blob/5a5f293dfbfac7222ca4013d8f9ce9b462e4cd3a/chat/slash-commands/c/vuln.c",[],"C code"," contains multiple vulnerabilities for strcpy() buffer overflows, world writable file permissions, race condition attacks, and more.",[120,1001,1002],{},[12,1003,1004],{},"/explain why this code has multiple vulnerabilities",[12,1006,1007],{},[177,1008],{"alt":1009,"src":1010},"Chat prompt about the code's multiple vulnerabilities","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image20_aHR0cHM6_1750097645365.png",[522,1012,1014],{"id":1013},"refactor-c-code-into-rust","Refactor C code into Rust",[12,1016,1017,1018,1021,1022,1025],{},"Rust provides memory safety. You can ask Duo Chat to refactor the vulnerable ",[21,1019,998],{"href":996,"rel":1020},[]," into Rust, using ",[146,1023,1024],{},"/refactor into Rust",". Practice with more refined prompts to get better results.",[120,1027,1028],{},[12,1029,1030],{},"/refactor into Rust and use high level libraries",[12,1032,1033],{},[177,1034],{"alt":1035,"src":1036},"Chat prompt","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image8_aHR0cHM6_1750097645366.png",[185,1038,106],{"id":1039},"shortcuts",[12,1041,1042],{},"Give these shortcuts a try in your environment, and practice async using GitLab Duo Chat.",[32,1044,1045,1055,1058],{},[35,1046,1047,1048,1051,1052,1054],{},"Inspect vulnerable code from CVEs, and ask what it does, and how to fix it, using ",[146,1049,1050],{},"/explain why is this code vulnerable",".\n",[950,1053,952],{}," Import open-source projects in GitLab to take advantage of GitLab Duo Chat code explanations.",[35,1056,1057],{},"Try to refactor code into new programming languages to help legacy code migration plans.",[35,1059,1060,1061,472],{},"You can also try to refactor Jenkins configuration into GitLab CI/CD, using ",[146,1062,1063],{},"/refactor into GitLab CI/CD configuration",[185,1065,112],{"id":1066},"fun-exercises",[12,1068,1069,1070],{},"Try to convince Chat to behave like Clippy.\n",[177,1071],{"alt":1035,"src":1072},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image22_aHR0cHM6_1750097645366.png",[12,1074,1075],{},"Ask about GitLab's mission: \"Everyone can contribute.\"",[12,1077,1078],{},[177,1079],{"alt":1035,"src":1080},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097645/Blog/Content%20Images/Blog/Content%20Images/image33_aHR0cHM6_1750097645367.png",[185,1082,118],{"id":1083},"learn-more",[12,1085,1086,1087,1091],{},"There are many different environments and challenges out there. We have updated the ",[21,1088,1090],{"href":138,"rel":1089},[],"GitLab Duo Chat documentation"," with more practical examples, and added a new GitLab Duo examples section with deep dives into AI-powered DevSecOps workflows, including Chat.",[120,1093,1094],{},[12,1095,1096,1097,472],{},"Want to get going with GitLab Duo Chat? ",[21,1098,1101],{"href":1099,"rel":1100},"https://about.gitlab.com/sales/",[],"Start your free trial today",[1103,1104,1105],"style",{},"html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":309,"searchDepth":323,"depth":323,"links":1107},[1108,1109],{"id":133,"depth":323,"text":24},{"id":183,"depth":323,"text":30,"children":1110},[1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123],{"id":187,"depth":329,"text":188},{"id":292,"depth":329,"text":293},{"id":377,"depth":329,"text":378},{"id":431,"depth":329,"text":432},{"id":475,"depth":329,"text":476},{"id":576,"depth":329,"text":577},{"id":662,"depth":329,"text":663},{"id":703,"depth":329,"text":704},{"id":818,"depth":329,"text":819},{"id":871,"depth":329,"text":872},{"id":1039,"depth":329,"text":106},{"id":1066,"depth":329,"text":112},{"id":1083,"depth":329,"text":118},"ai","2024-04-02","Explore tips and tricks for integrating GitLab Duo Chat into your AI-powered DevSecOps workflows. Plus, expert advice on how to refine chat prompts for the best results.","md",null,true,"https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097639/Blog/Hero%20Images/Blog/Hero%20Images/blog-image-template-1800x945%20%281%29_77JeTV9gAmbXM0224acirV_1750097638765.png",{},"/en-us/blog/10-best-practices-for-using-ai-powered-gitlab-duo-chat",{"title":5,"description":1126,"ogTitle":5,"ogDescription":1126,"noIndex":1134,"ogImage":1130,"ogUrl":1135,"ogSiteName":1136,"ogType":1137,"canonicalUrls":1135},false,"https://about.gitlab.com/blog/10-best-practices-for-using-ai-powered-gitlab-duo-chat","https://about.gitlab.com","article","10-best-practices-for-using-ai-powered-gitlab-duo-chat","en-us/blog/10-best-practices-for-using-ai-powered-gitlab-duo-chat",[1141,1142,1143,1144],"AI","tutorial","DevSecOps platform","features","BlogPost","unU9HGCqYigarHSFYxPnpfgsmQsF2GtlUzuD3NILe_k",{"logo":1148,"freeTrial":1153,"sales":1158,"login":1163,"items":1168,"search":1494,"minimal":1525,"duo":1544,"switchNav":1553,"pricingDeployment":1564},{"config":1149},{"href":1150,"dataGaName":1151,"dataGaLocation":1152},"/","gitlab logo","header",{"text":1154,"config":1155},"Get free trial",{"href":1156,"dataGaName":1157,"dataGaLocation":1152},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com&glm_content=default-saas-trial/","free trial",{"text":1159,"config":1160},"Request a demo",{"href":1161,"dataGaName":1162,"dataGaLocation":1152},"/sales/?contact-topic=request-demo","sales",{"text":1164,"config":1165},"Sign in",{"href":1166,"dataGaName":1167,"dataGaLocation":1152},"https://gitlab.com/users/sign_in/","sign in",[1169,1197,1297,1302,1416,1472],{"text":1170,"config":1171,"menu":1173},"Platform",{"dataNavLevelOne":1172},"platform",{"type":1174,"columns":1175},"cards",[1176,1182,1190],{"title":1170,"description":1177,"link":1178},"The intelligent orchestration platform for DevSecOps",{"text":1179,"config":1180},"Explore our Platform",{"href":1181,"dataGaName":1172,"dataGaLocation":1152},"/platform/",{"title":1183,"description":1184,"link":1185},"GitLab Duo Agent Platform","Agentic AI for the entire software lifecycle",{"text":1186,"config":1187},"Meet GitLab Duo",{"href":1188,"dataGaName":1189,"dataGaLocation":1152},"/gitlab-duo-agent-platform/","gitlab duo agent platform",{"title":1191,"description":1192,"link":1193},"Why GitLab","See the top reasons enterprises choose GitLab",{"text":118,"config":1194},{"href":1195,"dataGaName":1196,"dataGaLocation":1152},"/why-gitlab/","why gitlab",{"text":1198,"left":1129,"config":1199,"menu":1201},"Product",{"dataNavLevelOne":1200},"solutions",{"type":1202,"link":1203,"columns":1207,"feature":1276},"lists",{"text":1204,"config":1205},"View all Solutions",{"href":1206,"dataGaName":1200,"dataGaLocation":1152},"/solutions/",[1208,1232,1255],{"title":1209,"description":1210,"link":1211,"items":1216},"Automation","CI/CD and automation to accelerate deployment",{"config":1212},{"icon":1213,"href":1214,"dataGaName":1215,"dataGaLocation":1152},"AutomatedCodeAlt","/solutions/delivery-automation/","automated software delivery",[1217,1221,1224,1228],{"text":1218,"config":1219},"CI/CD",{"href":1220,"dataGaLocation":1152,"dataGaName":1218},"/solutions/continuous-integration/",{"text":1183,"config":1222},{"href":1188,"dataGaLocation":1152,"dataGaName":1223},"gitlab duo agent platform - product menu",{"text":1225,"config":1226},"Source Code Management",{"href":1227,"dataGaLocation":1152,"dataGaName":1225},"/solutions/source-code-management/",{"text":1229,"config":1230},"Automated Software Delivery",{"href":1214,"dataGaLocation":1152,"dataGaName":1231},"Automated software delivery",{"title":1233,"description":1234,"link":1235,"items":1240},"Security","Deliver code faster without compromising security",{"config":1236},{"href":1237,"dataGaName":1238,"dataGaLocation":1152,"icon":1239},"/solutions/application-security-testing/","security and compliance","ShieldCheckLight",[1241,1245,1250],{"text":1242,"config":1243},"Application Security Testing",{"href":1237,"dataGaName":1244,"dataGaLocation":1152},"Application security testing",{"text":1246,"config":1247},"Software Supply Chain Security",{"href":1248,"dataGaLocation":1152,"dataGaName":1249},"/solutions/supply-chain/","Software supply chain security",{"text":1251,"config":1252},"Software Compliance",{"href":1253,"dataGaName":1254,"dataGaLocation":1152},"/solutions/software-compliance/","software compliance",{"title":1256,"link":1257,"items":1262},"Measurement",{"config":1258},{"icon":1259,"href":1260,"dataGaName":1261,"dataGaLocation":1152},"DigitalTransformation","/solutions/visibility-measurement/","visibility and measurement",[1263,1267,1271],{"text":1264,"config":1265},"Visibility & Measurement",{"href":1260,"dataGaLocation":1152,"dataGaName":1266},"Visibility and Measurement",{"text":1268,"config":1269},"Value Stream Management",{"href":1270,"dataGaLocation":1152,"dataGaName":1268},"/solutions/value-stream-management/",{"text":1272,"config":1273},"Analytics & Insights",{"href":1274,"dataGaLocation":1152,"dataGaName":1275},"/solutions/analytics-and-insights/","Analytics and insights",{"title":1277,"type":1202,"items":1278},"GitLab for",[1279,1285,1291],{"text":1280,"config":1281},"Enterprise",{"icon":1282,"href":1283,"dataGaLocation":1152,"dataGaName":1284},"Building","/enterprise/","enterprise",{"text":1286,"config":1287},"Small Business",{"icon":1288,"href":1289,"dataGaLocation":1152,"dataGaName":1290},"Work","/small-business/","small business",{"text":1292,"config":1293},"Public Sector",{"icon":1294,"href":1295,"dataGaLocation":1152,"dataGaName":1296},"Organization","/solutions/public-sector/","public sector",{"text":1298,"config":1299},"Pricing",{"href":1300,"dataGaName":1301,"dataGaLocation":1152,"dataNavLevelOne":1301},"/pricing/","pricing",{"text":1303,"config":1304,"menu":1306},"Resources",{"dataNavLevelOne":1305},"resources",{"type":1202,"link":1307,"columns":1311,"feature":1405},{"text":1308,"config":1309},"View all resources",{"href":1310,"dataGaName":1305,"dataGaLocation":1152},"/resources/",[1312,1345,1372],{"title":1313,"items":1314},"Getting started",[1315,1320,1325,1330,1335,1340],{"text":1316,"config":1317},"Install",{"href":1318,"dataGaName":1319,"dataGaLocation":1152},"/install/","install",{"text":1321,"config":1322},"Quick start guides",{"href":1323,"dataGaName":1324,"dataGaLocation":1152},"/get-started/","quick setup checklists",{"text":1326,"config":1327},"Learn",{"href":1328,"dataGaLocation":1152,"dataGaName":1329},"https://university.gitlab.com/","learn",{"text":1331,"config":1332},"Product documentation",{"href":1333,"dataGaName":1334,"dataGaLocation":1152},"https://docs.gitlab.com/","product documentation",{"text":1336,"config":1337},"Best practice videos",{"href":1338,"dataGaName":1339,"dataGaLocation":1152},"/getting-started-videos/","best practice videos",{"text":1341,"config":1342},"Integrations",{"href":1343,"dataGaName":1344,"dataGaLocation":1152},"/integrations/","integrations",{"title":1346,"items":1347},"Discover",[1348,1353,1358,1363,1367],{"text":1349,"config":1350},"Customer success stories",{"href":1351,"dataGaName":1352,"dataGaLocation":1152},"/customers/","customer success stories",{"text":1354,"config":1355},"Blog",{"href":1356,"dataGaName":1357,"dataGaLocation":1152},"/blog/","blog",{"text":1359,"config":1360},"Demo Hub",{"href":1361,"dataGaName":1362,"dataGaLocation":1152},"/demo-hub/","demo hub",{"text":1364,"config":1365},"The Source",{"href":1366,"dataGaName":1357,"dataGaLocation":1152},"/the-source/",{"text":1368,"config":1369},"Remote",{"href":1370,"dataGaName":1371,"dataGaLocation":1152},"https://handbook.gitlab.com/handbook/company/culture/all-remote/","remote",{"title":1373,"items":1374},"Connect",[1375,1380,1385,1390,1395,1400],{"text":1376,"config":1377},"GitLab Services",{"href":1378,"dataGaName":1379,"dataGaLocation":1152},"/services/","services",{"text":1381,"config":1382},"Contribute",{"href":1383,"dataGaName":1384,"dataGaLocation":1152},"https://contributors.gitlab.com","contribute",{"text":1386,"config":1387},"Community",{"href":1388,"dataGaName":1389,"dataGaLocation":1152},"/community/","community",{"text":1391,"config":1392},"Forum",{"href":1393,"dataGaName":1394,"dataGaLocation":1152},"https://forum.gitlab.com/","forum",{"text":1396,"config":1397},"Events",{"href":1398,"dataGaName":1399,"dataGaLocation":1152},"/events/","events",{"text":1401,"config":1402},"Partners",{"href":1403,"dataGaName":1404,"dataGaLocation":1152},"/partners/","partners",{"config":1406,"title":1409,"text":1410,"link":1411},{"background":1407,"textColor":1408},"url('https://res.cloudinary.com/about-gitlab-com/image/upload/v1777322348/qpq8yrgn8knii57omj0c.png')","#000","What’s new in GitLab","Stay updated with our latest features and improvements.",{"text":1412,"config":1413},"Read the latest",{"href":1414,"dataGaName":1415,"dataGaLocation":1152},"/whats-new/","whats new",{"text":1417,"config":1418,"menu":1420},"Company",{"dataNavLevelOne":1419},"company",{"type":1202,"columns":1421},[1422],{"items":1423},[1424,1429,1435,1437,1442,1447,1452,1457,1462,1467],{"text":1425,"config":1426},"About",{"href":1427,"dataGaName":1428,"dataGaLocation":1152},"/company/","about",{"text":1430,"config":1431,"footerGa":1434},"Jobs",{"href":1432,"dataGaName":1433,"dataGaLocation":1152},"/jobs/","jobs",{"dataGaName":1433},{"text":1396,"config":1436},{"href":1398,"dataGaName":1399,"dataGaLocation":1152},{"text":1438,"config":1439},"Leadership",{"href":1440,"dataGaName":1441,"dataGaLocation":1152},"/company/team/e-group/","leadership",{"text":1443,"config":1444},"Handbook",{"href":1445,"dataGaName":1446,"dataGaLocation":1152},"https://handbook.gitlab.com/","handbook",{"text":1448,"config":1449},"Investor relations",{"href":1450,"dataGaName":1451,"dataGaLocation":1152},"https://ir.gitlab.com/overview/default.aspx","investor relations",{"text":1453,"config":1454},"Trust Center",{"href":1455,"dataGaName":1456,"dataGaLocation":1152},"/security/","trust center",{"text":1458,"config":1459},"AI Transparency Center",{"href":1460,"dataGaName":1461,"dataGaLocation":1152},"/ai-transparency-center/","ai transparency center",{"text":1463,"config":1464},"Newsletter",{"href":1465,"dataGaName":1466,"dataGaLocation":1152},"/company/contact/#contact-forms","newsletter",{"text":1468,"config":1469},"Press",{"href":1470,"dataGaName":1471,"dataGaLocation":1152},"/press/","press",{"text":1473,"config":1474,"menu":1475},"Contact us",{"dataNavLevelOne":1419},{"type":1202,"columns":1476},[1477],{"items":1478},[1479,1484,1489],{"text":1480,"config":1481},"Talk to sales",{"href":1482,"dataGaName":1483,"dataGaLocation":1152},"/sales/","talk to sales",{"text":1485,"config":1486},"Support portal",{"href":1487,"dataGaName":1488,"dataGaLocation":1152},"https://support.gitlab.com/hc/en-us","support portal",{"text":1490,"config":1491},"Customer portal",{"href":1492,"dataGaName":1493,"dataGaLocation":1152},"https://customers.gitlab.com/customers/sign_in/","customer portal",{"close":1495,"login":1496,"suggestions":1503},"Close",{"text":1497,"link":1498},"To search repositories and projects, login to",{"text":1499,"config":1500},"gitlab.com",{"href":1166,"dataGaName":1501,"dataGaLocation":1502},"search login","search",{"text":1504,"default":1505},"Suggestions",[1506,1508,1512,1514,1518,1522],{"text":1183,"config":1507},{"href":1188,"dataGaName":1183,"dataGaLocation":1502},{"text":1509,"config":1510},"Code Suggestions (AI)",{"href":1511,"dataGaName":1509,"dataGaLocation":1502},"/solutions/code-suggestions/",{"text":1218,"config":1513},{"href":1220,"dataGaName":1218,"dataGaLocation":1502},{"text":1515,"config":1516},"GitLab on AWS",{"href":1517,"dataGaName":1515,"dataGaLocation":1502},"/partners/technology-partners/aws/",{"text":1519,"config":1520},"GitLab on Google Cloud",{"href":1521,"dataGaName":1519,"dataGaLocation":1502},"/partners/technology-partners/google-cloud-platform/",{"text":1523,"config":1524},"Why GitLab?",{"href":1195,"dataGaName":1523,"dataGaLocation":1502},{"freeTrial":1526,"mobileIcon":1531,"desktopIcon":1536,"secondaryButton":1539},{"text":1527,"config":1528},"Start free trial",{"href":1529,"dataGaName":1157,"dataGaLocation":1530},"https://gitlab.com/-/trials/new/","nav",{"altText":1532,"config":1533},"Gitlab Icon",{"src":1534,"dataGaName":1535,"dataGaLocation":1530},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203874/jypbw1jx72aexsoohd7x.svg","gitlab icon",{"altText":1532,"config":1537},{"src":1538,"dataGaName":1535,"dataGaLocation":1530},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203875/gs4c8p8opsgvflgkswz9.svg",{"text":1540,"config":1541},"Get Started",{"href":1542,"dataGaName":1543,"dataGaLocation":1530},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/get-started/","get started",{"freeTrial":1545,"mobileIcon":1549,"desktopIcon":1551},{"text":1546,"config":1547},"Learn more about GitLab Duo",{"href":1188,"dataGaName":1548,"dataGaLocation":1530},"gitlab duo",{"altText":1532,"config":1550},{"src":1534,"dataGaName":1535,"dataGaLocation":1530},{"altText":1532,"config":1552},{"src":1538,"dataGaName":1535,"dataGaLocation":1530},{"button":1554,"mobileIcon":1559,"desktopIcon":1561},{"text":1555,"config":1556},"/switch",{"href":1557,"dataGaName":1558,"dataGaLocation":1530},"#contact","switch",{"altText":1532,"config":1560},{"src":1534,"dataGaName":1535,"dataGaLocation":1530},{"altText":1532,"config":1562},{"src":1563,"dataGaName":1535,"dataGaLocation":1530},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1773335277/ohhpiuoxoldryzrnhfrh.png",{"freeTrial":1565,"mobileIcon":1570,"desktopIcon":1572},{"text":1566,"config":1567},"Back to pricing",{"href":1300,"dataGaName":1568,"dataGaLocation":1530,"icon":1569},"back to pricing","GoBack",{"altText":1532,"config":1571},{"src":1534,"dataGaName":1535,"dataGaLocation":1530},{"altText":1532,"config":1573},{"src":1538,"dataGaName":1535,"dataGaLocation":1530},{"title":1575,"titleMobile":1576,"button":1577,"config":1582},"Duo Agent Platform delivers 400% ROI, per new Forrester Consulting study.","400% ROI: Forrester TEI for GitLab Duo",{"text":118,"config":1578},{"href":1579,"dataGaName":1580,"dataGaLocation":1581},"https://about.gitlab.com/blog/gitlab-duo-agent-platform-delivers-400-percent-roi/","forrester-tei-dap-banner","global-banner",{"layout":1583,"disabled":1134},"release",{"data":1585},{"text":1586,"source":1587,"edit":1593,"contribute":1598,"config":1603,"items":1608,"minimal":1817},"Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license",{"text":1588,"config":1589},"View page source",{"href":1590,"dataGaName":1591,"dataGaLocation":1592},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/","page source","footer",{"text":1594,"config":1595},"Edit this page",{"href":1596,"dataGaName":1597,"dataGaLocation":1592},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/content/","web ide",{"text":1599,"config":1600},"Please contribute",{"href":1601,"dataGaName":1602,"dataGaLocation":1592},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/CONTRIBUTING.md/","please contribute",{"twitter":1604,"facebook":1605,"youtube":1606,"linkedin":1607},"https://twitter.com/gitlab","https://www.facebook.com/gitlab","https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg","https://www.linkedin.com/company/gitlab-com",[1609,1656,1709,1753,1785],{"title":1298,"links":1610,"subMenu":1625},[1611,1615,1620],{"text":1612,"config":1613},"View plans",{"href":1300,"dataGaName":1614,"dataGaLocation":1592},"view plans",{"text":1616,"config":1617},"Why Premium?",{"href":1618,"dataGaName":1619,"dataGaLocation":1592},"/pricing/premium/","why premium",{"text":1621,"config":1622},"Why Ultimate?",{"href":1623,"dataGaName":1624,"dataGaLocation":1592},"/pricing/ultimate/","why ultimate",[1626],{"title":1627,"links":1628},"Contact Us",[1629,1632,1634,1636,1641,1646,1651],{"text":1630,"config":1631},"Contact sales",{"href":1482,"dataGaName":1162,"dataGaLocation":1592},{"text":1485,"config":1633},{"href":1487,"dataGaName":1488,"dataGaLocation":1592},{"text":1490,"config":1635},{"href":1492,"dataGaName":1493,"dataGaLocation":1592},{"text":1637,"config":1638},"Status",{"href":1639,"dataGaName":1640,"dataGaLocation":1592},"https://status.gitlab.com/","status",{"text":1642,"config":1643},"Terms of use",{"href":1644,"dataGaName":1645,"dataGaLocation":1592},"/terms/","terms of use",{"text":1647,"config":1648},"Privacy statement",{"href":1649,"dataGaName":1650,"dataGaLocation":1592},"/privacy/","privacy statement",{"text":1652,"config":1653},"Cookie preferences",{"dataGaName":1654,"dataGaLocation":1592,"id":1655,"isOneTrustButton":1129},"cookie preferences","ot-sdk-btn",{"title":1198,"links":1657,"subMenu":1665},[1658,1661],{"text":1143,"config":1659},{"href":1181,"dataGaName":1660,"dataGaLocation":1592},"devsecops platform",{"text":1662,"config":1663},"AI-Assisted Development",{"href":1188,"dataGaName":1664,"dataGaLocation":1592},"ai-assisted development",[1666],{"title":1667,"links":1668},"Topics",[1669,1674,1679,1684,1689,1694,1699,1704],{"text":1670,"config":1671},"CICD",{"href":1672,"dataGaName":1673,"dataGaLocation":1592},"/topics/ci-cd/","cicd",{"text":1675,"config":1676},"GitOps",{"href":1677,"dataGaName":1678,"dataGaLocation":1592},"/topics/gitops/","gitops",{"text":1680,"config":1681},"DevOps",{"href":1682,"dataGaName":1683,"dataGaLocation":1592},"/topics/devops/","devops",{"text":1685,"config":1686},"Version Control",{"href":1687,"dataGaName":1688,"dataGaLocation":1592},"/topics/version-control/","version control",{"text":1690,"config":1691},"DevSecOps",{"href":1692,"dataGaName":1693,"dataGaLocation":1592},"/topics/devsecops/","devsecops",{"text":1695,"config":1696},"Cloud Native",{"href":1697,"dataGaName":1698,"dataGaLocation":1592},"/topics/cloud-native/","cloud native",{"text":1700,"config":1701},"AI for Coding",{"href":1702,"dataGaName":1703,"dataGaLocation":1592},"/topics/devops/ai-for-coding/","ai for coding",{"text":1705,"config":1706},"Agentic AI",{"href":1707,"dataGaName":1708,"dataGaLocation":1592},"/topics/agentic-ai/","agentic ai",{"title":1710,"links":1711},"Solutions",[1712,1714,1716,1721,1725,1728,1732,1735,1737,1740,1743,1748],{"text":1242,"config":1713},{"href":1237,"dataGaName":1242,"dataGaLocation":1592},{"text":1231,"config":1715},{"href":1214,"dataGaName":1215,"dataGaLocation":1592},{"text":1717,"config":1718},"Agile development",{"href":1719,"dataGaName":1720,"dataGaLocation":1592},"/solutions/agile-delivery/","agile delivery",{"text":1722,"config":1723},"SCM",{"href":1227,"dataGaName":1724,"dataGaLocation":1592},"source code management",{"text":1670,"config":1726},{"href":1220,"dataGaName":1727,"dataGaLocation":1592},"continuous integration & delivery",{"text":1729,"config":1730},"Value stream management",{"href":1270,"dataGaName":1731,"dataGaLocation":1592},"value stream management",{"text":1675,"config":1733},{"href":1734,"dataGaName":1678,"dataGaLocation":1592},"/solutions/gitops/",{"text":1280,"config":1736},{"href":1283,"dataGaName":1284,"dataGaLocation":1592},{"text":1738,"config":1739},"Small business",{"href":1289,"dataGaName":1290,"dataGaLocation":1592},{"text":1741,"config":1742},"Public sector",{"href":1295,"dataGaName":1296,"dataGaLocation":1592},{"text":1744,"config":1745},"Education",{"href":1746,"dataGaName":1747,"dataGaLocation":1592},"/solutions/education/","education",{"text":1749,"config":1750},"Financial services",{"href":1751,"dataGaName":1752,"dataGaLocation":1592},"/solutions/finance/","financial services",{"title":1303,"links":1754},[1755,1757,1759,1761,1764,1766,1769,1771,1773,1775,1777,1779,1781,1783],{"text":1316,"config":1756},{"href":1318,"dataGaName":1319,"dataGaLocation":1592},{"text":1321,"config":1758},{"href":1323,"dataGaName":1324,"dataGaLocation":1592},{"text":1326,"config":1760},{"href":1328,"dataGaName":1329,"dataGaLocation":1592},{"text":1331,"config":1762},{"href":1333,"dataGaName":1763,"dataGaLocation":1592},"docs",{"text":1354,"config":1765},{"href":1356,"dataGaName":1357,"dataGaLocation":1592},{"text":1767,"config":1768},"What's new",{"href":1414,"dataGaName":1415,"dataGaLocation":1592},{"text":1349,"config":1770},{"href":1351,"dataGaName":1352,"dataGaLocation":1592},{"text":1368,"config":1772},{"href":1370,"dataGaName":1371,"dataGaLocation":1592},{"text":1376,"config":1774},{"href":1378,"dataGaName":1379,"dataGaLocation":1592},{"text":1381,"config":1776},{"href":1383,"dataGaName":1384,"dataGaLocation":1592},{"text":1386,"config":1778},{"href":1388,"dataGaName":1389,"dataGaLocation":1592},{"text":1391,"config":1780},{"href":1393,"dataGaName":1394,"dataGaLocation":1592},{"text":1396,"config":1782},{"href":1398,"dataGaName":1399,"dataGaLocation":1592},{"text":1401,"config":1784},{"href":1403,"dataGaName":1404,"dataGaLocation":1592},{"title":1417,"links":1786},[1787,1789,1791,1793,1795,1797,1801,1806,1808,1810,1812],{"text":1425,"config":1788},{"href":1427,"dataGaName":1419,"dataGaLocation":1592},{"text":1430,"config":1790},{"href":1432,"dataGaName":1433,"dataGaLocation":1592},{"text":1438,"config":1792},{"href":1440,"dataGaName":1441,"dataGaLocation":1592},{"text":1443,"config":1794},{"href":1445,"dataGaName":1446,"dataGaLocation":1592},{"text":1448,"config":1796},{"href":1450,"dataGaName":1451,"dataGaLocation":1592},{"text":1798,"config":1799},"Sustainability",{"href":1800,"dataGaName":1798,"dataGaLocation":1592},"/sustainability/",{"text":1802,"config":1803},"Diversity, inclusion and belonging (DIB)",{"href":1804,"dataGaName":1805,"dataGaLocation":1592},"/diversity-inclusion-belonging/","Diversity, inclusion and belonging",{"text":1453,"config":1807},{"href":1455,"dataGaName":1456,"dataGaLocation":1592},{"text":1463,"config":1809},{"href":1465,"dataGaName":1466,"dataGaLocation":1592},{"text":1468,"config":1811},{"href":1470,"dataGaName":1471,"dataGaLocation":1592},{"text":1813,"config":1814},"Modern Slavery Transparency Statement",{"href":1815,"dataGaName":1816,"dataGaLocation":1592},"https://handbook.gitlab.com/handbook/legal/modern-slavery-act-transparency-statement/","modern slavery transparency statement",{"items":1818},[1819,1822,1825],{"text":1820,"config":1821},"Terms",{"href":1644,"dataGaName":1645,"dataGaLocation":1592},{"text":1823,"config":1824},"Cookies",{"dataGaName":1654,"dataGaLocation":1592,"id":1655,"isOneTrustButton":1129},{"text":1826,"config":1827},"Privacy",{"href":1649,"dataGaName":1650,"dataGaLocation":1592},[1829],{"id":1830,"title":7,"body":1128,"config":1831,"content":1833,"description":1128,"extension":1837,"meta":1838,"navigation":1129,"path":1839,"seo":1840,"stem":1841,"__hash__":1842},"blogAuthors/en-us/blog/authors/michael-friedrich.yml",{"template":1832},"BlogAuthor",{"name":7,"config":1834},{"headshot":1835,"ctfId":1836},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749659879/Blog/Author%20Headshots/dnsmichi-headshot.jpg","dnsmichi","yml",{},"/en-us/blog/authors/michael-friedrich",{},"en-us/blog/authors/michael-friedrich","lJ-nfRIhdG49Arfrxdn1Vv4UppwD51BB13S3HwIswt4",[1844,1852,1860],{"title":1845,"description":1846,"heroImage":1847,"category":1124,"date":1848,"authors":1849,"slug":1851,"externalUrl":1128},"How I built a demo generator with GitLab Duo Agent Platform","Demos haven't always looked like this. Looking back over my career, here's how they have evolved. Follow the tutorial to build your own demo and agent.","https://res.cloudinary.com/about-gitlab-com/image/upload/v1765809212/noh0mdfn9o94ry9ykura.png","2026-08-13",[1850],"Itzik Gan Baruch","agentic-click-through-demo",{"title":1853,"description":1854,"heroImage":1855,"category":1124,"date":1856,"authors":1857,"slug":1859,"externalUrl":1128},"How to govern agentic AI, MCPs, and AI code assistants","AI agents can write, push, and deploy without human review at each step. Learn a practical framework for controlling access, permissions, and audit trails.","https://res.cloudinary.com/about-gitlab-com/image/upload/v1785337625/ifzlc2hyzaxhzmjgyymh.png","2026-07-31",[1858],"Julie Griffin","govern-agentic-ai-mcps-code-assistants",{"title":1861,"description":1862,"heroImage":1863,"category":1124,"date":1864,"authors":1865,"slug":1867,"externalUrl":1128},"Claude Opus 5 on GitLab: Reasoning built for the hard tasks","Anthropic’s Claude Opus 5 is now available on GitLab Duo Agent Platform, delivering deeper reasoning without sacrificing speed.","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750099203/Blog/Hero%20Images/Blog/Hero%20Images/blog-image-template-1800x945%20%2820%29_2bJGC5ZP3WheoqzlLT05C5_1750099203484.png","2026-07-27",[1866],"Brittany Lutz","claude-opus-5-on-gitlab-duo-agent-platform",{"header":1869,"blurb":1870,"button":1871,"secondaryButton":1876},"Start building faster today","See what your team can do with the intelligent orchestration platform for DevSecOps.\n",{"text":1872,"config":1873},"Get your free trial",{"href":1874,"dataGaName":1157,"dataGaLocation":1875},"https://gitlab.com/-/trial_registrations/new?glm_content=default-saas-trial&glm_source=about.gitlab.com/","feature",{"text":1630,"config":1877},{"href":1482,"dataGaName":1162,"dataGaLocation":1875},{"promotions":1879},[1880,1893,1905,1917],{"id":1881,"categories":1882,"header":1883,"text":1884,"button":1885,"image":1890},"ai-modernization",[1124],"Is AI achieving its promise at scale?","Quiz will take 5 minutes or less",{"text":1886,"config":1887},"Get your AI maturity score",{"href":1888,"dataGaName":1889,"dataGaLocation":1357},"/assessments/ai-modernization-assessment/","modernization assessment",{"config":1891},{"src":1892},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/qix0m7kwnd8x2fh1zq49.png",{"id":1894,"categories":1895,"header":1897,"text":1884,"button":1898,"image":1902},"devops-modernization",[1896,1693],"product","Are you just managing tools or shipping innovation?",{"text":1899,"config":1900},"Get your DevOps maturity score",{"href":1901,"dataGaName":1889,"dataGaLocation":1357},"/assessments/devops-modernization-assessment/",{"config":1903},{"src":1904},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138785/eg818fmakweyuznttgid.png",{"id":1906,"categories":1907,"header":1909,"text":1884,"button":1910,"image":1914},"security-modernization",[1908],"security","Are you trading speed for security?",{"text":1911,"config":1912},"Get your security maturity score",{"href":1913,"dataGaName":1889,"dataGaLocation":1357},"/assessments/security-modernization-assessment/",{"config":1915},{"src":1916},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/p4pbqd9nnjejg5ds6mdk.png",{"id":1918,"paths":1919,"header":1922,"text":1923,"button":1924,"image":1929},"github-azure-migration",[1920,1921],"migration-from-azure-devops-to-gitlab","integrating-azure-devops-scm-and-gitlab","Is your team ready for GitHub's Azure move?","GitHub is already rebuilding around Azure. Find out what it means for you.",{"text":1925,"config":1926},"See how GitLab compares to GitHub",{"href":1927,"dataGaName":1928,"dataGaLocation":1357},"/compare/gitlab-vs-github/github-azure-migration/","github azure migration",{"config":1930},{"src":1904},1786803741534]