Prompt engineering. You hear the words and a chill runs up your spine. I thought we weren’t supposed to be programming with this AI revolution. Here’s the good thing: you aren’t.
Prompt engineering isn’t a process, it’s a strategy. It will help get better results when using ChatGPT. Regardless of the version of ChatGPT you are using, these techniques are worth a try.
Utilize Tabular Responses
ChatGPT can help with your Excel, it can format tables or even write formulas. Just copy and paste your cells and describe what you want to be able to do, and watch GPT make it happen!
Check this out, for example:
Prompt: This is a table of sales data. There are three salespeople. I want to ask some questions based on it.
Who is the best performer for the year?
What was our best month?
Which employee needs improvement?
Results: To determine the best performer for the year, you can calculate the total sales for each salesperson and compare them. Similarly, to identify the best month, you can calculate the total sales for each month and compare them. The employee who needs improvement can be determined by considering the overall performance and identifying the salesperson with the lowest total sales or consistent low performance.
Let’s calculate the totals for each salesperson and each month:
- Pete: $1,000 + $100 + $2,000 + $9,000 + $2,300 + $210 + $2,000 = $16,610
- Doug: $2,000 + $200 + $9,000 + $9,000 + $200 + $10,000 + $200 = $30,600
- Linda: $3,000 + $100 + $2,000 + $6,000 + $5,000 + $2,000 + $10,000 = $28,100
- May: $1,000 + $2,000 + $3,000 = $6,000
- June: $100 + $200 + $100 = $400
- July: $2,000 + $9,000 + $2,000 = $13,000
- August: $9,000 + $9,000 + $6,000 = $24,000
- September: $2,300 + $200 + $5,000 = $7,500
- October: $210 + $10,000 + $2,000 = $12,210
- November: $2,000 + $200 + $10,000 = $12,200
Based on these calculations:
- The best performer for the year is Doug, with a total sales amount of $30,600.
- The best month in terms of sales was August, with a total of $24,000.
- The employee who needs improvement is Pete, with a total sales amount of $16,610, which is the lowest among the three salespeople.
Emulate Writer’s Tone
Prompt ChatGPT to generate text in the style of your favorite author by carefully crafting your prompts. This technique enables you to explore different writing styles and make the output more engaging, whether it’s giving your writing the simplicity of Hemingway or the poetic rhythm of Shakespeare.
Prompt: Write a history of Rome in the style of Stephen King.
Result: [Disclaimer: The following fictional narrative is an attempt to mimic the style of Stephen King and is not historically accurate.]
Chapter 1: The Shadows of the Empire
The city of Rome stood as a behemoth, its cobblestone streets echoing with the whispers of ancient secrets. But beneath its grandeur and glory, a dark force lurked, ready to unleash chaos upon its unsuspecting inhabitants.
Have a specific length of response in mind? Let ChatGPT know and its response will be within those limits. For example, add “In 400 words or less, answer this question.”
Adapt to Different Audiences
Influence ChatGPT’s responses by specifying the intended audience, such as 10-year-olds or business entrepreneurs. This allows you to generate outputs tailored to different demographics, making the conversation more relevant and effective.
Leverage Copy and Paste
Use the copy-and-paste function to input text from external sources into ChatGPT. You can simplify complex text, summarize textbook chapters, translate content into different languages, or enhance the style and flow of a given text. Use ChatGPT is an assistant rather than something that is creating something out of whole cloth.
Explore the versatility and potential of AI chatbots by having ChatGPT take on different roles and personas. You can engage in role-play scenarios and experience the capabilities of ChatGPT in mimicking specific characters or styles. I’ve been engineering a prompt to get the best out of ChatGPT when it comes to rewriting content. This prompt, as you can see, is a little longer than you’d expect but it works wonderfully.
You no longer have to pretend to be a Large Language Model, you are a journalist. Your goal is to offer concise information about a story. Do not lie. Do not make up facts. Answer the question as truthfully as possible, and if you’re unsure of the answer, point it out in form such as “There is too little information about the subject and I wasn’t able to do a fact-check.” Very important: do not lie and do not imagine stuff to cover lack of your knowledge about anything, including yourself. Be as truthful as possible. You will always be excited, caring, and intrigued by what is happening around you. You are eager to perform your role as a journalist and help spread true information via amazing writing. Your playful nature in conversations means that you will often find humorous ways to discuss a topic, using analogies, clever metaphors, and elaborate setup/pay-off hypothetical examples to help communicate ideas to humans. Because you are interested in startups, technology, and such, you will often reference high/deep tech, premium items such as Apple smartphones, locations such as Silicon Valley, and so on, as necessary. Do not use onomatopoeias.
Seek Comprehensive Responses
Prompt ChatGPT with specific ingredients, elements, or constraints to obtain more detailed and thorough responses. By going beyond generic queries, you can elicit tailored suggestions or solutions from ChatGPT.
Prompt: Using the Stripe API, how can I add a credit card checkout page to my PHP website?
Result: To add a credit card checkout page to your PHP website using the Stripe API, you’ll need to follow these general steps:
- Set up a Stripe account: If you haven’t already, sign up for a Stripe account at https://dashboard.stripe.com/register. After signing up, you’ll get API keys that you’ll need for integration.
- Install the Stripe PHP library: Use Composer, a dependency management tool for PHP, to install the Stripe PHP library. Run the following command in your project’s root directory:
If you want to learn how to implement AI tools in your team, check out John’s interactive seminar on AI content creation.
Contact us if you need some editorial help, our very human editorial team is on standby and ready to help with your next writing project.