Last updated on August 7, 2024
In the previous module, we discussed AI and how humans can instruct AIs to perform tasks. Using a prompt to instruct an AI to do a task is called prompting. We will explore prompting with ChatGPT, a very popular Large Language Model , that can understand and write text. It was developed by OpenAI, and is currently the easiest Gen AI to work with. It is also completely free to use.
To get started with ChatGPT, follow these steps:
Here is a video that shows you how to get setup with ChatGPT.
Now that we have ChatGPT set up, let's test out some prompts.
We will start with something very simple: can ChatGPT tell us the color of grass?
Indeed it can, now let's try a more useful example.
Say you are reading an article about snowfall in Florida. You want to quickly get the main ideas of the article, so you show the AI what you are reading, and ask for a summary:
It is very rare for snow to fall in the U.S. state of Florida, especially in the central and southern portions of the state. With the exception of the far northern areas of the state, most of the major cities in Florida have never recorded measurable snowfall, though trace amounts have been recorded, or flurries in the air observed few times each century. According to the National Weather Service, in the Florida Keys and Key West there is no known occurrence of snow flurries since the European colonization of the region more than 300 years ago. In Miami, Fort Lauderdale, and Palm Beach there has been only one known report of snow flurries observed in the air in more than 200 years; this occurred in January 1977. In any event, Miami, Fort Lauderdale, and Palm Beach have not seen snow flurries before or since this 1977 event.
Summarize this paragraph in a single sentence:
Here is ChatGPT's response. It is a much shorter read!
You will likely see a slightly different output. This will be the case for most prompts in this course. We will learn why later in this module.
ChatGPT can also solve math problems! Let's give it a prompt with a simple problem.
If you have 20 apples and you eat three of them, you will have 20 - 3 = 17 apples left.
After eating three apples (17 left), if you sell three more, you will have 17 - 3 = 14 apples left.
You should now be comfortable with what a prompt is, and how to do some basic prompting with ChatGPT. Keep in mind that prompt can be a verb or a noun. You can prompt a model or you can give a model a prompt. These two phrases mean the same thing. The action of giving a model a prompt is called prompting. We will learn more about prompting in the next lesson.
Shin, T., Razeghi, Y., Logan IV, R. L., Wallace, E., & Singh, S. (2020). Autoprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv Preprint arXiv:2010.15980. β©
GPT-4 is another model developed by OpenAI that is more advanced, but costs money. β©
This paragraph is from https://en.wikipedia.org/wiki/Snow_in_Florida β©