Artificial intelligence is becoming more prevalent in our daily lives, with OpenAI's ChatGPT being one of the standout examples. Since its launch, I have dedicated a significant amount of time to studying it.
As I am a Jira administrator, I decided to integrate ChatGPT with Jira Service to automate ticket triage with OpenAI's artificial intelligence.
In this article, even if you're not a developer, you will learn:
And if you still have questions by the end, you can reach out to me directly to continue the conversation.
Triaging tickets manually can be a time-consuming and error-prone task, and by delegating this function to an AI, companies can benefit in several ways:
In the image below, you can see ChatGPT filling in the Sentiment, Service, and Sentiment Reason fields automatically:
During the configuration of the ChatGPT integration, I specified that the AI must complete the following fields:
📊 Hey, can you imagine how many reports you can do with this here?* 😉
Now that we know what the requirements are for our automatic ticket triage, it's time to create a prompt in ChatGPT that answers all these questions. For this purpose, we will use the prompt below:
The prompt above is clear about its purpose, but I've highlighted three important sections of the image above. Are they:
When running a real case directly in the ChatGPT console, I get a response like the one below:
✅ You can see this prompt in the GitHub repository at this link: https://bit.ly/ticket-triage-prompt-in-jira
Integrating Jira Service with ChatGPT can seem complex at first glance, but with the right steps, the process is simplified. All you need is:
The first thing you need to connect with the OpenAI API is an authentication token, and you can do that by following the steps below:
4. This page will display all the keys associated with your account. In this step, click on “Create new secret key” to create a new API key.
ℹ️ Note: It is worth noting that using the ChatGPT API has associated costs. When creating an API key, you will likely be taken to a payment page to enter your credit card information. OpenAI offers a $5 bonus for new users to try out the API as an incentive.
Jira Misc Workflow Extensions is an essential app that enriches Jira's workflows. It features customizable conditions, validations and post-functions, as well as the ability to create your own scripts. This versatility allows administrators to tailor workflows to specific needs, making Jira more adaptable and efficient.
Jira's integration with OpenAI (ChatGPT) was done by JMWE through the architecture below:
Below you can see a step-by-step on how to perform the integration described above:
Step 1: Create an Entity Property to store the ChatGPT response
You can do this by following the steps below:
When this post-function is ready, and you place it in a transition in your project's Workflow, Jira will generate an Issue Property like the image below whenever the transition is executed:
This Entity Property is a JSON with all the information we need to fill in the Sentiment, Service (Category), and Sentiment Reason fields. 😉
Step 2: Create a post-function to update Jira fields
After completing the steps above, and these post-functions are correctly configured in your Jira Workflow transitions, the tickets will be automatically sorted as in the image below:
🚀 Good news for managers and executives! Automating ticket triage for Service Desk teams with ChatGPT will only cost you $0.0005515 per ticket! That's right, a fraction of a penny to have the precision and efficiency of artificial intelligence on your side. Imagine the potential savings and efficiency this can bring to your operation!
See the table below for how much the monthly amount would be to automatically sort Jira tickets through ChatGPT:
Incredible, isn't it? With a volume of 10,000 tickets/month in your Service Desk, the investment is a mere $5.56 USD to sort them all! An unmissable opportunity to optimize your operation!
But how did I arrive at this value? Let's dive into the details.
Tokens: The AI Currency
The ChatGPT API charges based on the number of tokens processed. Tokens can be words, characters and even symbols, varying by language. While we can estimate the number of tokens that text might consume, determining the exact number of tokens used by the ChatGPT API to process and respond to a specific prompt involves complex variables and cannot be predicted with absolute precision.
Understanding Token Calculation:
Calculating tokens in ChatGPT may seem complex at first glance, but we can simplify it for practical purposes. While there are a lot of technicalities behind this calculation, I'll present a simplified approach using just two variables:
The simplified formula for estimating the amount of tokens is:
Estimated Number of Tokens = [Number of Words] * [Language Factor]
The following table illustrates an estimate of tokens for a text of 100 words in three different languages: English, French and Portuguese. Using the formula above, we can get a rough idea of how many tokens are needed for each language:
ℹ️ Note: Keep in mind that this is a simplified approach and the actual number of tokens may vary based on many factors, including the complexity of the text and the response generated.
And how much does each Token cost?
As of the date of publication of this article, the prices charged by OpenAI for processing messages sent to its API are:
To illustrate: if you send a prompt of 200 tokens and receive a response of 800 tokens with the 4K model, the cost is 1000 tokens. This translates to: (200 tokens * $0.0015) + (800 tokens * $0.002).
Estimates Based on Actual Data
To determine how many tokens the ChatGPT API might need when processing messages, I analyzed several databases in Jira Service Management. The objective was to identify the average number of words per ticket, considering different types of projects. The following table shows the average number of words in both the original ticket (input) and the response generated by ChatGPT:
Based on the average number of words per project type, we can calculate the estimated amount of tokens that the ChatGPT API will need to process the messages. The formula for this estimate is:
Tokens (Input) = ([Number of Base Prompt Words] + [Number of Words by Project Type]) * [Language Factor].
ℹ️ Note: "Prompt Base" has a total of 153 words. You can check the full content of this prompt at this link.
Tokens (Response) = [Number of Words in ChatGPT response] * [Language Factor]
For example, for a Servide Desk IT project in English, it would be:
Now, with the total number of tokens for input and response, we can calculate the cost using OpenAI pricing for ChatGPT 3.5 Turbo:
Total cost
Entry = 285 tokens x $0.0015/1000 = $0.0004275
Answer = 62 tokens x $0.002/1000 = $0.000124
Total = $0.0004275 + $0.000124 = $0.0005515
Conclusion:
Based on this estimate, the cost to triage a ticket in an IT Service Desk environment using English is just $0.0005515 per ticket.
I'd like to emphasize that this is an estimate based on data I've collected from the instances I manage and conversations with other Jira admins. Each environment has its own specificities and characteristics. Additionally, OpenAI's pricing policies may change from time to time.
The purpose of this section of this article is to provide an overview on costs. I strongly recommend conducting specific studies in your Jira environment before any implementation to determine the monthly cost. Also, please visit the OpenAI official website for up-to-date pricing information.
Integrating tools like ChatGPT into Jira has already demonstrated the transformative power of artificial intelligence in ticket management. While AI currently assists in sentiment sorting and analysis, the potential for future optimizations is immense. The continuous evolution of technology suggests that soon we will have even more integrated solutions, making support processes more agile and accurate. In a world where efficiency is crucial, combining Jira and AI promises to be a milestone in the customer service revolution.
I look forward to hearing your experiences! If you've already implemented automation with ChatGPT in your company or have unique insights into your Jira environment, please share them with me in the comments. Your vision can open new horizons and inspire others to follow this innovative path. Tell me your story, and let's exchange ideas and experiences! 🚀👥
Also, I invite you to follow me on LinkedIn for more content like this. Let's dive into Atlassian and Artificial Intelligence solutions together!