# Łańcuch myśli (chain-of-thought)

EN: **Chain-of-thought prompting** · id `cot`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Sieci i modele generatywne](https://aiatlasgraph.com/t/neural.md) › [Rozumowanie w modelach językowych](https://aiatlasgraph.com/t/reasoningmodels.md) › Łańcuch myśli (chain-of-thought)

## Description

- PL: Nakłonienie modelu, by zapisał pośrednie kroki rozumowania, zanim poda odpowiedź. Najprostszy sposób na lepsze wyniki w zadaniach wieloetapowych — bez żadnego treningu.
- EN: Getting the model to write out intermediate reasoning steps before the answer. The simplest way to improve multi-step tasks — no training required.

## In one sentence

- PL: To skłanianie modelu do zapisania pośrednich kroków rozwiązania przed podaniem odpowiedzi.
- EN: This prompts a model to write intermediate solution steps before giving an answer.

## Problem it solves

- PL: Model przeskakuje od pytania do wyniku, pomijając działania potrzebne w zadaniu wieloetapowym.
- EN: A model jumps from the question to the answer, skipping operations needed for a multi-step task.

## What it does

- PL: Wygenerowane kroki stają się kontekstem dla dalszej odpowiedzi; mogą pomagać, ale nie są gwarantowanym zapisem rzeczywistego procesu modelu.
- EN: Generated steps become context for the next response; they may help but do not guarantee a faithful record of the model's internal process.

## Everyday example

- PL: Przy obliczaniu kosztu wspólnego obiadu prosisz model o rozpisanie składników, sumy i podziału między uczestników.
- EN: When calculating a shared meal's cost, you ask a model to set out ingredients, the total and each person's share.

## This concerns you if you…

- PL: rozwiązujesz zadania z kilkoma działaniami
- PL: chcesz sprawdzić zapisane etapy odpowiedzi
- EN: solve tasks requiring several operations
- EN: want to inspect the written solution steps

## Keywords

least-to-most prompting · self-consistency · scratchpad prompting · few-shot exemplars · intermediate reasoning · answer extraction

## How it works

- PL: Polecenie lub przykłady skłaniają dekoder do generowania kroków pośrednich przed odpowiedzią. Każdy zapisany krok wchodzi do kontekstu kolejnych tokenów, zmieniając warunki generowania i dając miejsce na rozbicie zadania.
- EN: Instructions or examples guide a decoder to generate intermediate steps before answering. Each written step enters subsequent-token context, changing generation conditions and providing space for task decomposition.

## Limits

- PL: Płynne kroki mogą uzasadniać błędny wynik lub racjonalizować odpowiedź. Dłuższy tekst zwiększa koszt; przy prostych zadaniach dodatkowy ślad bywa zbędny, a jego wierność nie jest zapewniona.
- EN: Fluent steps can justify wrong results or rationalise answers. Longer text increases cost; extra traces can be unnecessary for simple tasks, and their faithfulness is not assured.

## Key terms

- PL: **krok pośredni**: Fragment rozwiązania używany jako kontekst dla dalszej odpowiedzi.
- PL: **warunkowanie autoregresyjne**: Uzależnianie kolejnego tokenu od dotychczas wygenerowanej sekwencji.
- EN: **intermediate step**: A solution fragment used as context for subsequent answering.
- EN: **autoregressive conditioning**: Conditioning each next token on the sequence generated so far.

## Know first

- [Prompty i kontekst (Prompting and context engineering)](https://aiatlasgraph.com/t/prompting.md)
- [Strategie dekodowania (Decoding strategies)](https://aiatlasgraph.com/t/decoding.md)

## Examples

- PL: rozpisane rozwiązanie zadania · kroki pośrednie przed odpowiedzią
- EN: worked solution · intermediate steps before the answer

## Subtopics (3 direct, 3 in total)

- [Drzewo myśli (Tree of Thoughts) (Tree of Thoughts)](https://aiatlasgraph.com/t/treeofthoughts.md): The model expands several alternative reasoning paths, evaluates which look promising and can backtrack — tree search instead of one line of thought.
- [Łańcuch myśli z przykładami (Few-shot chain-of-thought)](https://aiatlasgraph.com/t/fewshotcot.md): The prompt includes a few example problems with step-by-step worked solutions; the model imitates that style on a new problem.
- [„Pomyśl krok po kroku” bez przykładów (Zero-shot chain-of-thought)](https://aiatlasgraph.com/t/zeroshotcot.md): Instead of examples, a short instruction such as “Let's think step by step” makes the model write out its reasoning.

## Related topics

Untyped, symmetric "see also" links.

- [Ciągłe myśli (Continuous chain of thought)](https://aiatlasgraph.com/t/coconut.md)
- [Prompty i kontekst (Prompting and context engineering)](https://aiatlasgraph.com/t/prompting.md)

## Sources

- [Chain-of-Thought Prompting Elicits Reasoning in Large Language Models](<https://arxiv.org/abs/2201.11903>) `wei-cot-2022` · by Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou

---

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