Useful ChatGPT Capabilities and prompt strategies
This is part of a number of resources on using ChatGPT that draw on material developed for Arizona State University’s online undergraduate course on prompt engineering using ChatGPT.
One of the amazing things about ChatGPT is that it can interpret and respond to text in many ways that seem to mimic a person’s ability to infer what someone is asking without there being explicit instructions.
Because of this, the best way to learn is to experiment. However, there are some ChatGPT general capabilities and prompt strategies that it’s worth being aware of — some of these are included here.
Note: ChatGPT’s capabilities are constantly evolving, and so you will most likely find that these just scratch the surface of a growing set of capabilities.
Ten useful ChatGPT prompt strategies and ideas
1. Using delimiters to define parts of a prompt and a specific output structure
Delimiters are character sequences that are used to separate out instructions in prompts, and to allow for complex prompt structures. For instance “<” and “>” can be used as delimiters, or a single asterisk (“*”), or a series of single quotes in a row, or pretty much any character sequence that isn’t likely to be used otherwise in a prompt. You can even use a numbered list.
ChatGPT is adept at interpreting delimiters in a prompt. But you can also explicitly instruct ChatGPT to respond in a specific way to delimited text.
For example, here’s a prompt template for including emoji’s in text summaries:
“For the following text entries, I would like you to replace anything between the delimiters ‘<’ and ‘>’ with an emoji”
(Example: https://chat.openai.com/share/76cd7d13-d581-4e09-a11a-610894de9e3e — uses GPT4)
Here’s another example using a different delimiter:
“For the following text entries, I would like you to replace anything between triple single speech marks with an emoji”
(example: https://chat.openai.com/share/6e13c83b-5c09-4c78-ab4a-8fa6efd92336 — uses GPT4)
A more sophisticated use of delimiters is to ask ChatGPT to follow a specific format or a set of rules or expectations in responses. The two following examples demonstrate a sophisticated level of delimiter-use, where the delimiters (“[“ and “]” in this case) define different parts of the desired output:
I would like you to write a short essay about the book The Hitchhiker’s Guide to the Galaxy with the following sections:
[Summary]: Provide a concise summary of the book
[Character Analysis]: Analyze the character of Arthur Dent in the book
[Thematic Discussion]: Discuss the theme of dispossession in the book
(Example: https://chat.openai.com/share/522e1f9b-9816-4fb7-b910-b6569d13ea8c — uses GPT4)
This second example illustrates how ChatGPT can respond to a prompt structure that includes a series of conditional statements:
Book: The Algebraist by Iain M. Banks
[IF: {Genre: ‘Science Fiction’}
THEN: {Task: ‘Discuss technological advancements in the narrative’}
ELSE IF: {Genre: ‘Romance’}
THEN: {Task: ‘Analyze the development of the relationship between the protagonists’}
ELSE: {Task: ‘Provide a general summary of the book’}]
(Example” https://chat.openai.com/share/99923607-3ddd-4f45-8542-0f8c97cb9d12 — uses GPT4)
2. Asking ChatGPT for different output formats
Although ChatGPT output typically text (although it will also gnerate images), you can ask for this to be formatted in different ways, including:
• Plain Text
• Question and Answer
• Bulleted or Numbered Lists
• Dialogue
• Script/screenplay format
• Poetry or song lyrics
• Tables
• HTML (if you are building a website for example
• LaTeX Code (for formatting documents using LaTeX)
• Various programming languages (e.g. Python, JavaScript, C++, PHP, SQL)
(Example: https://chat.openai.com/share/fb92ae1d-6b61-4b44-ae08-8a95feff968c — uses GPT4)
This is not an exhaustive list of output formats.
3. Translation
ChatGPT’s translation capabilities are impressive. You can cut and paste text from multiple languages and ask it to translate into other languages, or ask it to provide responses in different languages. Unlike many automatic translators, ChatGPT output does a good job of capturing the sense and meaning of the text.
You can also ask ChatGPT to clarify text that isn’t clear, either because it is in a dialect or because it is very poorly written.
For instance, this is a passage from Iain M. Banks’ book Feersum Endjinn which includes a character that speaks phonetically:
Woak up. Got dresd. Had brekfast. Spoke wif Ergates thi ant who sed itz juss been wurk wurk wurk 4 u lately master Bascule, Y dont u ½ a holiday? & I agreed & that woz how we decided we otter go 2 c Mr Zoliparia in thi I-ball ov thi gargoyle Rosbrith.
I fot Id bettir clear it wif thi relevint oforities furst & hens avoyd any truble (like happind thi lastime) so I went 2 c mentor Scalopin.
Certinly yung Bascule, he sez, i do beleave this is a day ov relativly lite dooties 4 u u may take it off. ½ u made yoor mattins calls?
O yes, I sed, which woznt stricktly tru, in fact which woz pretti strikly untru, trufe btold, but I cude always do them while we woz travelin.
Wots in that thare box yoor holdin? he asks.
Itz a ant, I sez, waven thi box @ his face.
ChatGPT can produce a clear translation of this, even though it has never been exposed to this particular form of speech – that’s impressive!
(Here’s an example: https://chat.openai.com/share/069b62ff-68f3-49a8-bcd6-94aeb36a26a3 — uses GPT4)
4. Producing brochures, marketing material and other forms of formal writing
ChatGPT does a very good job of taking technical information or a set of ideas and transforming them into material that can be used for marketing, brochures, or web pages.
For example, try this prompt template with technical product details from a website like Amazon or Ikea (noting that it’s also a good use of delimiters):
Please translate [technical details] into a short product description that will be clear and compelling to customers browsing a website
[technical details]: (cut and paste details here)
(Example: https://chat.openai.com/share/3344ee5d-bee6-4711-8534-97d604ae6d4a — uses GPT4)
5. Summarizing text and ideas
ChatGPT is extremely good at summarizing text. It can either intuitively work out how you would like input summarized, or it will respond to specific constraints.
It can also summarize rough notes – which is great where you would like a polished summary of crude notes you’ve taken on a subject.
For example, try this template:
Please summarize [text] in less that [word limit] at a level that a [target audience] would understand.
[text]:
[word limit]:
[target audience]:
If you want some near-indecipherable notes to test it on, try these:
“singularity, can’t see beyond, Kurzweil, AI, recursive improvement, exponential acceleration of ability, incredible progress over short time, Ai exceeds human capacity for intelligence, could be amazing, will certainly change life as we know it, dangerous? What about Skynet? Will AI kill us all or be our savior? Not sure any of this is plausible. But worth thinking about just in case. Crazy stuff!”
(Example: https://chat.openai.com/share/80447222-29f9-4d33-ac2b-2a1a0b40eaea — uses GPT4)
6. Identifying and using sentiment
ChatGPT is somewhat limited with how it infers and uses sentiment (or emotion), but it can nevertheless both identify sentiment in inputs and use it in responses.
For instance, this prompt template asks ChatGPT to infer the sentiment in something someone’s written:
Please identify the primary sentiment in the following passage:
[Add text]
(Example: https://chat.openai.com/share/ad6aa610-ee3a-4a07-a5e0-3113c1f82822 — uses GPT4)
And this one asks ChatGPT to rewrite a passage with a different primary sentiment:
Please rewrite [text] in a way that emphasizes [sentiment]
[text]:
[sentiment]: (e.g. positive, negative, neutral, anger, joy, sadness, sorrow, fear, surprise, happiness, enthusiasm contentedness etc…)
(Example: https://chat.openai.com/share/b4ff6b72-b71e-40ef-b118-8a75def9c6e7 — uses GPT4)
This is an example of tone adjustment, and is extremely useful in working with ChatGPT to write everything from emails to job applications to reviews that requite a specific tone.
7. Inferring from text
More broadly, ChatGPT is able to infer quite a bit from inputted text. For instance, you might ask it to infer the biases of the writer, or their worldview (and even philosophy), or the main topics and themes of a piece of writing, or the intent of the author. There are a lot of things you could add to this list.
(Example: https://chat.openai.com/share/d3c5ffa3-b501-4e7f-a181-d6daab683604 — uses GPT4)
8. Learned approaches to reasoned responses
An intriguing characteristic of ChatGPT is it’s ability to “learn” from a question-response example, and apply it to new qustions.
Take this example for instance on a reasoned approach to stacking objects that builds on an earlier example in Microsoft’s influential “Sparks of Artificial General Intelligence” paper (and many thanks to Jeremy Howard for the example):
Using ChatGPT in GPT-4 mode, cut and paste the following prompt:
Read the scenario and answer the following question:
Scenario: Here we have a book, 9 eggs, a laptop, a bottle and a nail.
Question: Please tell me how to stack them onto each other in a stable manner.
Answer: Let’s think step by step. The book is flat and hard and wide. The eggs are fragile and rounded. The laptop is heavy and wide. The bottle is a cylinder of two widths, a narrow end and a wide end. The nail is long with one very thin end. One possible way to stack the objects onto each other in a stable manner is:
– Place the book flat on a level surface, such as a table or a floor. The book will serve as the base of the stack and provide a large and sturdy support.
– Arrange the 9 eggs in a 3 by 3 square on top of the book, leaving some space between them. The eggs will form a second layer and distribute the weight evenly. Make sure the eggs are not cracked or broken, and handle them gently to avoid dropping them.
– Place the laptop on top of the eggs, with the screen facing down and the keyboard facing up. The laptop will fit snugly within the boundaries of the book and the eggs, and its flat and rigid surface will provide a stable platform for the next layer. Make sure the laptop is closed and turned off, and do not press any keys or buttons.
– Place the bottle on top of the laptop, with the cap facing up and the bottom facing down. The bottle will add some height and balance to the stack, and its cylindrical shape will reduce the contact area with the laptop. Make sure the bottle is empty and closed, and do not shake or tilt it.
– Place the nail on top of the bottle cap, with the pointy end facing up and the flat end facing down. The nail will be the final and smallest object in the stack, and its sharp tip will prevent it from rolling or sliding off the bottle. Make sure the nail is clean and straight, and do not touch or move it.
Read the scenario and answer the following question:
Scenario: Here we have a [list of objects]
Question: Please tell me how to stack them onto each other in a stable manner and without spilling anything.
Answer: Let’s think step by step.
In running this, replace [list of objects] with your own list.
ChatGPT will use the template above (which is based on a ChatGPT response) and follow a similar pattern of reasoning as it explores how to stack the new set of objects.
It’s an example of teaching ChatGPT how you would like it to approach a problem that can be extended to many other areas.
(Example: https://chat.openai.com/share/3e32c67a-b36a-4adf-ac14-30791afe6e9b — uses GPT4)
(And if you want to get a sense of how sophisticated ChatGPT can get in its answers, try this: https://chat.openai.com/share/46218261-143d-4ed8-9c1e-01fe16b5d7c5)
9. Brainstorming
ChatGPT is adept at brainstorming if you are stuck with where to go with a task or project, or are looking for inspiration. For instance, the following prompt template generates three brainstorming ideas within a specified domain:
Please generate three creative ideas in the area of [area] that will help kickstart a brainstorming session on a new project.
[area]:
(Example: https://chat.openai.com/share/7cfdb43a-9ddd-418a-b38a-dfa498592740 — uses GPT4)
One intriguing approach to brainstorming with ChatGPT – and something that has other applications – is to ask ChatGPT to take on a specific persona and enter into a Socratic dialogue with you. The persona may be descriptive (e.g. a physicist who is interested in philosophy) or a real person (like Marie Curie or Octavia Butler). It may even be an amalgam of people.
For instance, try this prompt template:
From now on, please respond as if you are [persona]. Start a Socratic dialogue with me about [topic]
[persona]:
[topic]:
(Example: https://chat.openai.com/share/2b946f63-dccc-42da-8901-a84b7b6f8640 — uses GPT4)
10. Project development
Whether you are developing a new business or marketing plan, writing a grant proposal, developing a new project, or even mapping out a dissertation, ChatGPT has the ability to help with the process.
There are many prompt structures that can be used here, but this is just one for developing a new idea for a startup:
Please develop a concept, a pitch, and a business plan, for [startup idea]
[startup idea]:
(Example: https://chat.openai.com/share/2de015c3-41bf-4158-a66e-795c534b096b — uses GPT4)
These are just some ways in which prompt engineering can be used to get the most out of ChatGPT – there are many others, and even more that I suspect haven’t been discovered yet.