OpenAI’s GPT-3  to Triage Azure DevOps Bugs

Posted by

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.



How do you track and manage defects in your code? How do you make sure software problems and customer feedback get addressed quickly to support high-quality software deployments? And, how do you make good progress on new features and address your technical debt?


At a minimum, you need a way to capture your software issues, prioritize them, assign them to a team member, and track progress. And, you want to manage your code defects in ways that align with your Agile practices.


To support these scenarios, Azure Boards provides a specific work item type to track code defects named Bug.


When attempting to resolve bugs, we sometimes don’t always have all the information we need, especially when dealing with urgent production issues. In these cases, we often create bug in Azure DevOps system with some initial steps (e.g. about issue, replication steps).


For this kind of urgent issue our development team members need some primary analysis or troubleshooting steps. Developer has to browse the internet and look the solution around the problem in a normal part of the software development cycle (e.g. some kind triage notes).


OpenAI’s GPT-3 is a game-changer in the bug hunting industry. Its ability to generate natural language content with high accuracy and coherence makes it an invaluable tool for identifying potential security vulnerabilities in software applications.


In this article, I will explain how you can implement an automation solution to triage a bug and best practices in Azure DevOps. We can implement this solution using Power Automate, Logic Apps and integration with OpenAI GPT-3 & Azure DevOps. Below are standard steps.


Step 1: Go to link - Microsoft Flow(Power Automate) to setup new  workflow.


Step 2: Go to create option to setup new workflow using automate cloud flow option.




Step 3: First step in the workflow is to add action called “Create a work item” to trigger the workflow (as shown in below screenshot). You can specific your Azure DevOps organization, teams details and specify the type of work item. In my example it’s work item type is “Bug”. So whenever a bug will introduce in system my workflow will trigger.





Step 4: In next step, we can store the repro steps of bugs in a separate variable. We are storing it separate variable so we can remove the formatting applied to test in Azure DevOps.




Note: Sample Work item Bug in Azure DevOps – You can see there are different kind of formatting styles are applied at text and we want to pass the “repro steps” as plain text to Open AI.




Step 5: In the next step we are using HTML action to remove the formatting applied to “Repro Steps” and convert it into variable as plain text (look below two steps).




Step 6: Next step is very important in this workflow. In this step we are calling OpenAI API. We can interact with the API through HTTP requests from any language or actions. The OpenAI API uses API keys for authentication. Visit your API Keys page to retrieve the API key you'll use in your requests. You can refer the documentation how to setup OpenAI free account and setup API keys - API Reference - OpenAI API


In my case I am using “HTTP” action to call the API by passing URL, Headers and Body. You can see in body, I passed variable value as plaintext (which contains bug repro steps).


HTTP actions enable you to interact with APIs and send web requests that perform various operations, such as uploading and downloading data and files.


To send an API request, like POST, GET, PUT, or DELETE, use the Invoke web service action.

In the action's properties, you must populate the service's URL and the appropriate HTTP method. Additionally, you must choose the request and response content type, such as XML and JSON. You can read more about “HTTP” action at this link - HTTP actions reference - Power Automate | Microsoft Learn.


I am using GPT-3 > text-davinci-003 model in request body which can understand and generate natural language. If you want to know more about GPT-3 models you can refer the link for more details - Models - OpenAI API




Step 7: In next step we have to store the “choices” and “text” retrieve as response from “HTTP” action and update the “History” filed of work item “bug”.




In below example you can see I passed the work item “Repro steps” as plaintext (e.g. some terraform help) and response update in the discussion section. These triage notes can be very helpful for a team member for initial analysis about the bug.




At the end the workflow will be look like this. You can integrate more steps as per business requirement needs and extend the functionality.






OpenAI’s GPT-3 is a game-changer in the bug hunting industry. Its ability to generate natural language content with high accuracy and coherence makes it an invaluable tool for identifying potential security vulnerabilities in software applications.


Feel free to leave your comment and share feedback. 


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.