# Przykłady w poleceniu (few-shot)

EN: **Few-shot prompting and in-context learning** · id `fewshotprompting` · aliases: few-shot prompting, in-context learning, ICL, one-shot prompting, zero-shot prompting, uczenie w kontekście, przykłady w prompcie

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › [Prompty i kontekst](https://aiatlasgraph.com/t/prompting.md) › Przykłady w poleceniu (few-shot)

## Description

- PL: Kilka par wejście–wyjście umieszczonych w prompcie pokazuje modelowi zadanie i format odpowiedzi bez zmiany wag.
- EN: A few input–output pairs placed in the prompt show the model the task and answer format without changing its weights.

## In one sentence

- PL: Zamiast długo tłumaczyć, czego chcesz, pokazujesz modelowi kilka gotowych przykładów, a on robi kolejny w tym samym stylu.
- EN: Instead of explaining at length what you want, you show the model a few finished examples and it makes another in the same style.

## Problem it solves

- PL: Trudno słowami opisać dokładny format, ton albo sposób klasyfikowania, więc odpowiedzi za każdym razem wyglądają inaczej.
- EN: It is hard to describe an exact format, tone or way of sorting in words, so answers come out different every time.

## What it does

- PL: Działa jak wzór wypełnionego formularza pokazany nowemu pracownikowi: od razu widać, co wpisać w które pole.
- EN: It works like a filled-in sample form shown to a new employee: it is instantly clear what goes in each field.

## Everyday example

- PL: Wklejasz trzy opisy produktów napisane przez sklep i prosisz o czwarty, a model trzyma ich długość, ton i układ.
- EN: You paste three product descriptions the shop wrote and ask for a fourth; the model keeps their length, tone and layout.

## This concerns you if you…

- PL: chcesz, żeby odpowiedzi miały zawsze ten sam format
- PL: sortujesz wiadomości lub opinie do kategorii
- EN: want answers to always follow the same format
- EN: sort messages or reviews into categories

## Keywords

in-context learning · zero-shot · one-shot · demonstration selection · example ordering · many-shot ICL · k-shot

## How it works

- PL: W badanych zadaniach klasyfikacji i wielokrotnego wyboru dużą część efektu dawały format, przestrzeń etykiet i typowy rozkład wejść, a poprawność etykiet miała mniejsze znaczenie; nie należy przenosić tego wyniku na wszystkie zadania.
- EN: In the studied classification and multiple-choice tasks, much of the effect came from the format, label space, and typical input distribution, while label correctness mattered less; this result should not be generalized to every task.

## Limits

- PL: Przykłady zużywają kontekst i zwiększają koszt każdego wywołania. Model może kopiować przypadkowe cechy przykładów, a wyniki bywają wrażliwe na ich kolejność; przy wielu podobnych zadaniach dostrajanie bywa tańsze.
- EN: Examples consume context and raise the cost of every call. The model may copy incidental features of the examples, results can be sensitive to order, and for many similar tasks fine-tuning can be cheaper.

## Key terms

- PL: **demonstracja**: Przykład wejścia z oczekiwaną odpowiedzią umieszczony w prompcie.
- PL: **zero-shot**: Polecenie bez żadnego przykładu, tylko z opisem zadania.
- PL: **in-context learning**: Przejmowanie wzorca zadania z kontekstu bez zmiany wag modelu.
- EN: **demonstration**: An example input with its expected answer placed in the prompt.
- EN: **zero-shot**: An instruction with no examples, only a task description.
- EN: **in-context learning**: Picking up a task pattern from context without changing weights.

## Know first

- [Przewidywanie następnego tokenu (modele autoregresyjne) (Next-token prediction objective)](https://aiatlasgraph.com/t/nexttoken.md)
- [Klasyfikacja tekstu i analiza sentymentu (Text classification and sentiment analysis)](https://aiatlasgraph.com/t/textclassification.md)

## Related topics

Untyped, symmetric "see also" links.

- [Łańcuch myśli z przykładami (Few-shot chain-of-thought)](https://aiatlasgraph.com/t/fewshotcot.md)

## Sources

- [Language Models are Few-Shot Learners](<https://arxiv.org/abs/2005.14165>) `gpt3-fewshot-2020` · by Tom B. Brown i in. (OpenAI) · sponsored
- [Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?](<https://arxiv.org/abs/2202.12837>) `min-demonstrations-2022` · by Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis, Hannaneh Hajishirzi, Luke Zettlemoyer
- [Prompting best practices (Claude Docs)](<https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices>) `claude-prompting-best-practices` · by Anthropic · sponsored

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/fewshotprompting · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
