跳到主要内容Skip to main content

上下文学习In-context Learning

In-context Learning

  • 核心概念Core concepts
  • 第四站 · 看懂Station 4 · Under the Hood
解决什么问题What problem it solves

在对话里现学现用:给几个例子,模型就会做新任务,不用重新训练。Learning on the spot inside a conversation: give a few examples and the model does a new task, no retraining.

这是什么What it is

GPT-3 论文的核心论点:模型不更新权重。

它只靠提示里的任务说明和少量示例完成任务。

示例给 0 个、1 个还是几个,效果差别很大。

论文标题就是「Few-Shot Learners」。

The core claim of the GPT-3 paper: the model updates no weights, relying only on task instructions and a few examples in the prompt.

Whether you give 0, 1, or several examples changes results a lot — the paper's title is literally "Few-Shot Learners."

为什么需要知道Why it matters

你调提示词、给示例、贴一段参考——用的全是它。知道它的边界,才知道什么时候该考虑微调。Tweaking prompts, giving examples, pasting reference text — all of it uses this. Knowing its limits tells you when fine-tuning is the better route.

出处Sources
  • GPT-3 论文(Language Models are Few-Shot Learners)GPT-3 paper (few-shot learners) ↗