From the course: Getting Hands-On with GPT Models: Tips and Tricks
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Using completion sequences and few shot
From the course: Getting Hands-On with GPT Models: Tips and Tricks
Using completion sequences and few shot
- [Instructor] We usually understand a concept better when someone gives us an example. LLMs work in a very similar way. Providing examples is a technique called few-shot learning. Let me show you how this can be helpful using ChatGPT. Let's go ahead and go into the Exercise Files. I'm here in 02_03, with prompts.txt open. Let's copy the first prompt, and we'll paste it in, and hit Enter. So, our task is to classify these reviews. Let's see what ChatGPT outputted. We have Positive, Negative, Positive, Negative, Neutral, Negative, Strongly Negative, Strongly Negative, and Unclassifiable. Now, this is good, but not exactly what I wanted. I want a more specific format, so let's go back and copy the second prompt. Let's paste it in. Now, in this prompt, I provide some categories that we want to classify the reviews into. I have Promoter, Neutral, Churn risk, Churned, Detractor, and Random. Let's hit Enter, and this is better. I get the responses that I want, but I still have this preamble…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
An overview of OpenAI GPT and Reasoning Models3m 11s
-
(Locked)
Improving prompting with examples and quotes2m 23s
-
(Locked)
Using completion sequences and few shot2m 16s
-
(Locked)
Using chain-of-thought reasoning3m 29s
-
(Locked)
Challenge: Give GPT a tricky problem25s
-
(Locked)
Solution: Give GPT a tricky problem1m 35s
-
(Locked)
-
-