liveBook · Manning

In-context learning

As explained in Deep Learning with R, Third Edition

In-context learning is the adaptation of a model's output behavior from examples or instructions supplied within the current input context without parameter updates.

In-context learning is commonly described as adapting a model’s behavior from instructions or examples in the current prompt, without updating its parameters. A critical view is that large language models usually retrieve and reapply memorized vector functions rather than acquire genuinely new skills. section 19.1.1

Novelty exposes the limitation

A model trained on ImageNet may classify a leopard-print sofa as a leopard because sofas were outside its training distribution. Similarly, a language model can solve familiar prompt patterns yet fail on an easy puzzle with no direct training equivalent. section 19.1.1

The treatment emphasizes several practical implications:

  • Treat prompt wording as significant: small rephrasings can address different regions of latent space and produce different results. section 19.5
  • Do not equate apparent task success with algorithmic reasoning; memorized patterns can interpolate answers without executing the underlying procedure. section 19.5
  • Distinguish in-context prompting from test-time adaptation, which changes model parameters or searches candidate solutions during inference. section 19.5
  • Expect scaling alone to leave generalization gaps: LLM scale increased sharply while ARC-AGI performance improved only modestly. section 19.5

In-context learning therefore describes useful prompt-conditioned behavior, but it does not by itself demonstrate fluid intelligence. Truly novel problems remain a decisive test, because success depends more on familiarity than apparent problem complexity. section 19.1.1 section 19.5

How Deep Learning with R, Third Edition covers it

How deep it goes
Contrasts memorized vector-function retrieval with new-skill acquisition and stops short of explaining model internals.
Examples
Uses leopard-print sofas, novel puzzles, prompt rewording, and large-integer addition to expose familiarity-dependent behavior.
What it assumes
Assumes familiarity with model training, inference, prompts, and training distributions while treating the adaptation claim critically.
What you can do after
Evaluate/understand whether prompt-based success reflects memorization, interpolation, or adaptation to genuinely novel tasks.
How it connects
Connects in-context learning to training distributions, prompt sensitivity, test-time adaptation, program synthesis, and general intelligence.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with R, Third Edition. The section links point to the parts of the book it draws on.