Menu

Day 43: In-Context Learning Explained
📰

Day 43: In-Context Learning Explained

DEV Community: nlp·Priyesh Dave·15 days ago
#zqVJnwdn
#devtonlp#devto#dev#model#learning
Reading 0:00
15s threshold

What Is In-Context Learning?

In-context learning is a way to teach a language model a new task by providing examples directly in the input prompt. You do not change anything inside the model. You just show it the pattern you want to see.

Traditional machine learning works differently. If you want a model to perform a new task, you usually retrain it or fine-tune it with new data. This changes the model’s parameters. Parameters are the internal settings the model learned from previous data.

In in-context learning, the model’s parameters stay frozen. The model instead looks at the examples in your prompt and figures out the desired behavior for that specific input. This is like demonstrating a task to someone right at the moment you want them to perform it—no retraining, just showing.

This is possible because large language models (LLMs), such as GPT-3 or Llama 2, are trained on huge amounts of varied text. During training, they see countless patterns, tasks, and instructions.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.