From the course: Nano Tips for Using ChatGPT for Business with Rachel Woods

Few-shot learning for better generations

From the course: Nano Tips for Using ChatGPT for Business with Rachel Woods

Few-shot learning for better generations

One of the most powerful things about ChatGPT is just how good it is at completing your task just from the prompt that you give it. But, if you find yourself wanting to teach ChatGPT a more complex task or having more control over the formatting of the output, then try giving ChatGPT examples. This is an approach called fuchsia learning where you give ChatGPT a few shots or examples and it learns how to do that task. To do this, add structure to your prompts that show example inputs and outputs for your task. When you give examples, you have more control over how ChatGPT responds. Let's look at a quick example. Here, I've asked ChatGPT to generate a dog name. Now, if I want more control over the formatting of the output, I can give it an example. As you see here, now the format of the output matches what I gave it in my example. Keep in mind that you'll need to share these examples each time you start a new thread, because ChatGPT only remembers the examples within the context of your prompt. But this can be a very powerful tool for getting more specific results from ChatGPT.

Contents