FundamentalsUpdated 2026-10-24

In-Context Learning

A model learning a task temporarily from instructions and examples in the prompt without updating its weights.

#提示词#学习机制#大模型

In plain language

In-context learning is one of the most practical LLM abilities: the same model can classify, extract, rewrite and code through different prompts. It relies on attention mapping examples to the input rather than changing knowledge. It is sensitive to example order, format and wording, and can learn spurious correlations. Production tasks still need a fixed evaluation set; one good demo is not evidence.

Example

Give the model three complaint-to-response examples and it can respond in a similar style to a new complaint without any weight update.

Recommended tools

Related terms