🟢 Prompting With ChatGPT
- Set up ChatGPT
- Use ChatGPT to summarize text and solve a math problem
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 prompting1. We will explore prompting with ChatGPTa, a very popular Large Language Model (LLM), 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.
Set up ChatGPT
To get started with ChatGPT, follow these steps:
- Navigate to http://chat.openai.com
- It should ask you to make an account. Go ahead and do so.
- Log in with this account
Here is a video that shows you how to get setup with ChatGPT.
Test Some Prompts on ChatGPT
Now that we have ChatGPT set up, let's test out some prompts.
1) Color of Grass
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.
2) Summarizing an Article
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 summaryb:
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.
3) Math Problem Solving
ChatGPT can also solve math problems! Let's give it a prompt with a simple problem.
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. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP). https://doi.org/10.18653/v1/2020.emnlp-main.346 ↩
- 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↩