The information or questions that you provide to ChatGPT, or any other Generative AI, is formally known as a Prompt. A Prompt is typically in a Natural Language format and is the source of instructions to the AI Engine.
Creating a good prompt is a combination of art and science. It is a science because the user needs to understand the context and data model. The user will also often have to experiment to get the responses that he or she is looking for. It is an art because there is creativity, intuition and experience involved as well.
No matter what, a good prompt is essential to get quality responses from the AI Engine. Prompt Engineering is the process to create Prompts that would provide you the information you are looking for as efficiently as possible.
Fact of Life: Garbage In EQUALS Garbage Out.
Over the years, all of us have learned how to create our Google Search Query such that in most cases we get the answer on Page 1 itself. We have learned when to use quotes or when to use logical expressions (like AND or OR) and so on. For those of us who have been around the block a few times, think about how we used to Google Search in 1997 and how we do it now. I bet we are much better at creating the Search Queries now. Overtime, we learned which techniques work well and which do not. It’s the same with Prompts. There are lots of little things you can do to have your Prompts function efficiently and effectively immediately.
In this first article, we will focus on some high-level tips on how to create good Prompts. In subsequent articles, we will dive deeper into this topic and explore more tips.
At a High Level:
GOAL(S) + CONTEXT + ACTION = A GOOD PROMPT
Let’s jump into what each part means:
A good prompt should have a Goal. A good goal helps elicit the proper desired response from AI that the user is looking for.
An example of a GOAL is:
I would like to increase my Sales of FluFind Medical Instrument Test Kits in the month of February by 50%.
NOTE: Of course, the above Goal assumes that the AI engine is familiar with or trained with the customer data of this user.
Context provides much needed background information to the AI Engine so that it can create a useful response for the user.
Building on the previous example, an example of a CONTEXT is:
I am a Sales Representative of Acme Medical Inc. My Sales Territory includes the states of Texas, Louisiana, and New Mexico. Texas is the state where I have my biggest clients. I sell FluFind Medical Instrument Test Kits which is a diagnostic test to detect the Flu A virus.
This is the Task that you ultimately want the AI Engine to perform for you.
Continuing to build on the previous example, an example of an ACTION is:
Please identify which top client I should target to meet my Sales Goal.
Putting all that we have learned together, the complete Prompt would look like:
I am a Sales Representative of Acme Medical Inc. My Sales Territory includes the states of Texas, Louisiana, and New Mexico. Texas is the state where I have my biggest clients. I sell FluFind Medical Instrument Test Kits which are diagnostic test to detect the Flu A virus.
I would like to increase my Sales of FluFind Medical Instrument Test Kits in the month of February by 50%. Please identify which top client I should target to meet my Sales Goal.
Such a Prompt would give you the best probability of success in the response.
The above Prompt will provide a much better response than something like:
Tell me how to increase my Sales selling medical test kits.
As a best practice, the Goals, Action, and Context, should also be:
· Concise – In the example above, notice the specific information that has been provided. Example: FluFind Medical Instrument Test Kit, February, 50%, Texas, Louisiana, and New Mexico etc. Without this, the AI Engine will assume whatever it wants which would give a less accurate response or, at worst, hallucinate.
· Use Natural Language – When you chat, talk like you would with a colleague who would know the answer to your question. You do not have to be robotic or follow a strict structure. AI models are trained on realms of Natural Language data and the best outputs are returned when the inputs are Natural Language too.
I hope that this article has provided you with some quick and easy ways to improve your experience with AI tools out there.
Here at InterKnowlogy, we are in the business of solving complex business problems for our clients using cutting-edge technology such as Generative AI. Reach out to us at firstname.lastname@example.org to see how we can help your business.
Stay tuned for more tips on Prompt Engineering in the next article.