跳到主要内容Skip to main content

零样本与少样本Zero-shot and Few-shot

Zero-shot and Few-shot

  • 模型能力Model capabilities
  • 第三站 · 用深Station 3 · Going Deeper
  • 引用核验 2026-11-17refs checked 2026-11-17
解决什么问题What problem it solves

不训练或只给几个例子,让模型直接完成新任务。Get a model to perform a new task without training, or with only a few examples.

这是什么What it is

零样本是只用任务说明提问;少样本是在提示里放几组输入输出示例。

GPT-3 论文用「不做梯度更新、只靠文本交互」的方式验证了这条路线。

Zero-shot prompts with a task description only; few-shot puts a few input-output examples into the prompt.

The GPT-3 paper tested this route with no gradient updates and text-only interaction.

Zero-shot gives only an instruction; few-shot adds a handful of examples in the prompt. The examples do not change the weights.
零样本只给任务说明;少样本在提示里加几组示例。示例不是训练数据,不会改动权重。Zero-shot gives only an instruction; few-shot adds a handful of examples in the prompt. The examples do not change the weights.
为什么需要知道Why it matters

这是判断一个模型能不能快速试用的基本方法;示例的选择与顺序会明显影响结果,少样本不等于稳定。It is the basic way to judge whether a model can be tried quickly. Example choice and order matter a lot, and few-shot is not the same as stable.

别名Chinese aliases

zero-shot · few-shot · 零样本 · 少样本

出处Sources
  • Brown 等 · Language Models are Few-Shot Learners(arXiv 2005.14165)Brown et al., Language Models are Few-Shot Learners ↗
  • Ouyang 等 · InstructGPT(arXiv 2203.02155)Ouyang et al., Training language models to follow instructions with human feedback ↗