In-Context Learning › In-Context Learning

Michael BrenndoerferUpdated July 27, 20252 min read
Language AI HandbookAll chapters
Part 28 of 67GPT Architecture
Chapter 200In-Context Learning › In-Context Learning
Reading section 1 of 11 · In-Context Learning · 2 minSection 1 of 11 · 2 min

Book contents

Section 1 of 11 · 2 min read

In-Context Learning › In-Context LearningOne section · Sections in this chapter1 / 11 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

When GPT-3 was released in 2020, researchers observed something unexpected: the model could perform new tasks simply by being shown a few examples in the prompt, without any gradient updates or fine-tuning. This capability, called in-context learning (ICL), was a major change in how we think about adapting language models to new tasks. Rather than collecting labeled datasets and training specialized models, you could now demonstrate a task through examples and let the model infer what to do.

This chapter explores in-context learning in depth. We'll examine why it works, how it compares to traditional fine-tuning, what makes some examples more effective than others, how ICL capabilities scale with model size, and the theoretical frameworks researchers have developed to explain this surprising phenomenon.