k-Shot Prompting
Definition
k-shot prompting gives a model k examples of a task directly in the prompt before it processes the new case.
The examples show format, mapping, or desired behavior in context. The model weights are not permanently changed; k only describes the number of demonstrations.
Simply explained
Like showing k model solutions before a task without retraining the model.
Why it matters in practice
Relevant for quick adaptation of LLM outputs, especially for formatting or classification tasks.
Example from business
A support assistant receives five verified example answers with the desired structure and then processes a new case.
Limits and pitfalls
- Misunderstanding examples as training; putting too many examples into the context window; using sensitive examples; multiplying faulty patterns.
Origin & history
Brown et al. demonstrated widely noted few-shot performance with GPT-3 in 2020, where examples were provided exclusively in context.
Use in mid-sized companies
- Possible applications: classification, structured response formats, tone, and demonstration of edge cases.
Frequently asked questions
Does k-shot prompting change model weights?
No. Is more k always better? No, quality, diversity, and context budget are decisive.
Sources
- Language Models are Few-Shot Learners · Brown et al. (2020), Language Models are Few-Shot Learners
Sources checked on 10.10.2026.
Editorially reviewed on: