FundamentalsUpdated 2026-10-24

Few-Shot

Providing a small number of input-output examples in the prompt so the model can imitate the pattern.

#提示词#示例#分类

In plain language

Few-shot performance depends on example quality, not count. Examples should cover edge cases, formatting details and confusable categories, and match the real input distribution. Common failures include all-positive easy examples that break on negatives, or inconsistent formats that teach contradictory patterns. Too many examples consume context and cost; two to five high-quality examples are usually enough.

Example

For support intent classification, include edge cases such as “change address after shipping,” not just refund and logistics, or the model will force them into existing categories.

Recommended tools

Related terms