Guide to enhance ChatGPT Plugin Prompt
This article will help you understand how the ai-plugin.json
file and OpenAPI spec work together to create the "Prompt for ChatGPT" you see in the "plugin devtools" area. After reading this article, you will know how to make your plugin prompts better.
What is the ChatGPT Plugin Prompt?
The ChatGPT Plugin Prompt is more than just a simple tool. Think of it as a special code that helps ChatGPT talk to the plugin you're using. This special code is made using details from the ai-plugin.json
file and the OpenAPI spec. So, both of these parts are very important. Now, we can not write all the instructions we want, because there is a limit of 8,000 characters. So, we need to use the space we have wisely.
Important Things to Know About How It Changes
Using the description_for_model Property Well
Inside the ai-plugin.json
file, there's a spot called the description_for_model property. This spot lets you write a lot (up to 8,000 characters) for the plugin prompt. This is a big space, but to make the best use of it, you also need to use other details from the OpenAPI spec.
Getting the Most from API Endpoint Descriptions
In the OpenAPI spec, every API endpoint has two spots for descriptions. These spots help make the plugin prompt. Since each spot lets you write between 200-300 characters, using them well can give you more space for your prompt.
### Paying Attention to Request Properties
When changing things, only certain descriptions related to request properties are used in the plugin prompt. This is good because it means more space for each part, especially when you think about the 200-300 character limit for each description.
Why OpenAPI Path Description Matters
If there's a description here, it shows up right before a certain type of declaration in the special code of the plugin prompt. If there's no description, the OpenAPI Summary takes its place.
Wrapping It Up
Understanding how ChatGPT plugin creation works can be a bit tricky. But with the tips above, developers can get better at it. This means they can make plugins that work really well and are easy for users.
If you want to learn even more about this with lots of examples, check out my blog post. It's packed with helpful info for anyone who loves ChatGPT plugins.