In-Context Learning: Teaching a Model Inside the Prompt

In-Context Learning

A method in which the model learns to perform a task from the context supplied in the request. The approach lets the model adapt to new tasks without any special training, using only the information provided in the prompt.

AdvantagesDrawbacks
High flexibility and adaptability across different tasksTask quality depends on the context you provide
Requires no additional model trainingCan be less effective for very complex tasks
Lets you solve new tasks "on the fly"Limited by how much context fits into the prompt

In-Context Learning example:

Consider the following examples of emotion classification in text:
1. 'I'm so glad I passed the exam!' - Joy
2. 'I'm really sad that my friend is leaving.' - Sadness
3. 'I'm furious about this injustice!' - Anger

Now classify the emotion in the following sentence: 'I'm so nervous before an important presentation.'

Try it in GPTunneL