Today I discovered that ChatGPT now supports the use of plugins. From ChatGPT itself:
A ChatGPT plugin is a specialized module that enhances the capabilities of the ChatGPT model. It allows the model to interact with external APIs, databases, or other resources to provide more accurate, up-to-date, or specialized responses.
For example, a plugin might enable ChatGPT to access real-time weather data, perform complex mathematical calculations, translate languages, fact-check information, or access a wide range of other specialized knowledge or capabilities.
These plugins are integrated into the conversation flow in a seamless manner, allowing ChatGPT to provide responses that go beyond its pre-trained knowledge. They are part of OpenAI’s efforts to make ChatGPT more useful across a wide range of professional use-cases.
As of the time of writing (May 19, 2023), this is only available to ChatGPT Plus subscribers; i.e. those who are paying for it.
In chat.openai.com, select the … next to your name and choose Settings. Then, under Beta features, turn on Plugins. (And, of course, Web browsing, if you want it!)
As of the time of writing, you can only have three plugins enabled at once. To select your plugins, make sure you’ve selected GPT-4 from the main screen, then click on the Plugins drop down. Then click on the Plugin store.
Because this demo is about drawing graphs, I’ve selected the Wolfram plugin.
Using ChatGPT with Wolfram
I started with something really simple. I asked it to plot a simple quadratic graph:
So far, so good.
Then I asked ChatGPT to integrate it:
Now the cool stuff happens. I asked it to explain why…
Demonstrate SRE Error Budget and Burn Rates
I work with Google Cloud a lot. And I like to share articles relating to use of Google Cloud.
Recently, I wrote a document explaining the concept of “Error Budget“, as part of Site Reliability Engineering (SRE). Error budget is the maximum allowed level of unreliability of a system over a specific period of time. For example, you might define a system that has an error budget of 30 errors over 30 days. An associated term is burn rate. This is the rate at which we consume this error budget, over time. If this example system saw an average burn rate of 1 error per day, then we would consume our budget at the end of the 30 days. This is called the “base burn rate”, since this burn rate is the maximum burn rate that is allowed by our budget. But if we were consuming our errors at, say, 3 errors per day, then we would consume all or our error budget by day 10. This burn rate would be 3 times the base burn rate. Based on our error budget, this would indicate that our system is not performing reliably enough. In the real world, we would want an alert to trigger in this scenario.
To produce my article and explain this concept, I created the above example in a spreadsheet (using Google Sheets), and then created a chart from the spreadsheet. The result looked like this:
But wouldn’t it be great if I could get ChatGPT to do this for me? Well, with Wolfram, it turns out now you can!!
Creating the Graph with ChatGPT
I started simple, and asked ChatGPT to plot a burn rate graph, allowing 30 errors over 30 days:
Amazing!! I fed ChatGPT very little information, but it plotted exactly what I was after.
Then I asked it to plot another line, to show what would happen with a burn rate that is three times the base burn rate:
Terraform to Implement This
Then I asked ChatGPT to tell me how I might go about writing some Terraform to create an SLO for this burn rate, and an alerting policy:
And I replied with:
Isn’t that amazing? Terraform template code, where all I would need to do is substitute my actual metrics.
Making the Graph Look Pretty
The graph from ChatGPT is great. But it doesn’t look as pretty as the one I created in Google Sheets. Let’s try to fix that…
Not bad! It’s starting to look a bit more like my original graph.
Now I want to add the other two lines, i.e. one line for “10 times base burn rate”, and another line if no errors are being consumed. I didn’t know if ChatGPT would understand this request.
But it understood perfectly!!
Wow! So, with just a two or three simple prompts, ChatGPT+Wolfram drew a graph to perfectly explain my scenario. And it took a lot less time than doing it in a spreadsheet. Maybe not quite as pretty though.
ChatGPT is getting smarter and smarter. The ability to enhance its capability with plugins is yet another game changer.