Generating Language Examples
(Lead: Richard Medina)
(Lead: Richard Medina)
Auto-generating text samples
Using the OpenAI Playground
Tuning ChatGPT
Exploring, brainstorming, and discussing
https://platform.openai.com/playground
The OpenAI Playground is a web-based tool provided by OpenAI that allows users to experiment with and test various ways to interact with language in the AI model (e.g., ChatGPT). The Playground provides an interface where users can input text prompts and receive generated text responses from the AI models. It is a way for people to explore the capabilities of these models and see how they could be used for tasks like natural language understanding and language generation. On the Playground webpage (right-hand side), there are prompt parameters for adjusting the response from the AI. On the left, there is the “System”. The system can be given instructions, like a role. This helps it narrow down what language it will pull out of the model, like giving context. It is an assistant.
Using the Playground requires an account on OpenAI. When first getting an account, you will be granted a trial period. After the trial period ends, your account will be charged by the number of tokens (similar to words but slightly shorter) you use for prompts (input) and responses (output). Currently, the rate for GPT-3.5 Turbo is:
ChatGPT, the website (https://chat.openai.com/), is different from the OpenAI Playground (https://platform.openai.com/playground) in that it is a more user-friendly way to engage with the AI model. ChatGPT and Playground utilize the same language model but provide different ways for users to engage with it. The Playground is ideal for experimenting with different prompts and parameters more directly. Most users utilize the ChatGPT website for interacting with the language model. More information about these differences can be found here: https://www.lifewire.com/openai-playground-vs-chatgpt-7371455
Input in System field: “You are a magazine editor for Chinese cuisine.”
Input in User field: “Write a review for the restaurant called “The Golden Dragon” in Los Angeles.”
This extra information will output an auto generated review containing specific information a fictitious “Golden Dragon” restaurant.
After clicking submit, it will generate the review.
Question: This is fictitious, right?
-> Yes, it is.
Question: Let’s say you’re a poor student, since you are going to college.
Now input, “You are a poor student” in the System field, with the same user field.
-> It is more personable.
What point of view does this write it as?
-> This comes from a large language model.
What if you say: “you are a bad student with bad grammar?”
-It appears to be the same.
Some saved prompts were shared. Over the summer, Richard helped two students with creating prompts, by creating ways for a model that is aligned to language learning.
Input in System field: “You are a textbook editor.”
Input in User field: “Generate a short paragraph on the topic of Japanese cuisine at the beginner level. Beginner level means the language has short sentences, simple grammar patterns, and uses vocabulary words of high frequency. Most importantly, it must be very easy to read and understand. The length of the passage should be equivalent to 100 English words. Do not include anything other than the resulting passage.
Output: “Japanese cuisine is delicious and healthy. It includes rice, fish, and vegetables. Sushi is a popular Japanese dish. It is made with rice and raw fish. Ramen is another famous dish.
Another prompt at the Intermediate and Advanced level was shared.
Question: You are a student learning French
-> Write a short essay on breakfast cuisine in French that will get me a 92% grade.
The output would receive a 100%.
The reason why the playground is being shown is to let you know how the parameters work. Over on the right, the first thing on the top is which mode can be chosen. Chat is designed as a model like you are talking to someone. Model refers to which model it will use, which is 3.5. 3.5 is the fastest, which is made available for ChatGPT in general. The temperature refers to implied randomness, which allows GPT to make sure the next word is random. Top P will constrain how many of the most likely words will be used in the response; 0 will take from the very top of the least likely words. The second parameter is the frequency penalty, which can move from 0 to 1. This will prevent words that will be (possibly) repeated. Presence penalty… the higher it is, the less likely it will repeat words. The more you increase the penalty, the less likely the tokens will be reused. The parameters will affect the final response.
What we did over the summer was get the content in English and then ask it to translate into Chinese, Korean, and Portuguese. The results were not entirely perfect.
Input to System field: You are a student learning Samoan
Input to User field: Please explain Samoan tattoos
Input to User field: Translate the above to Samoan
The translated results were nearly perfect with some variable use of vocabulary. One comment was that the near-perfect translation could be used as learning material for students (e.g., recognizing misused vocabulary and providing a correction.
Question: How can we make sure that students are writing their own work?
-> Well, let’s look at the learning objectives. What do you want students to do?
→ I want students to use their own brains
Well, we can start teaching students how to use AI tools, since they are going to use it anyway. We can’t stop them.
To avert this, ask students to turn in their work, and then ask them to submit it to ChatGPT, and then turn that in too, so that you can learn from using ChatGPT. We need to ask what it does well, for students to benefit… if they don’t understand the basic language and grammar.
The group discussed how using ChatGPT is dependent on the learning objective and context of the class. There are some tasks that are well suited for AI and may have learning value while others less so.