System 2 attention (S2A) is a two-step prompting technique in which a large language model first regenerates its input context, keeping only the material relevant to the question and removing distracting or opinion-laden text, and then answers using that cleaned context. In prompting, it addresses a known weakness of transformer models: soft attention assigns weight to everything in the prompt, including irrelevant sentences and leading opinions.
The name borrows the System 1 and System 2 distinction from cognitive psychology, where System 2 is slow, deliberate reasoning. S2A was introduced in 2023 by researchers at Meta as a way to make artificial intelligence models less sycophantic and less easily distracted without retraining them.
How System 2 attention rewrites the context
System 2 attention works by separating context selection from answering. Instead of asking the model to ignore irrelevant text implicitly, S2A makes the filtering an explicit generation step whose output replaces the original prompt.
- Context regeneration: the model receives the full input and an instruction to extract the unbiased, relevant parts, often split into a context section and a question section.
- Answer generation: a second call receives only the regenerated text and produces the final response.
- Optional merge: some variants append the original context as well, which recovers detail but reintroduces some bias.
The key insight is that a model is often better at recognizing irrelevant content than at ignoring it while answering. By writing out a filtered version, the model removes the tokens that would otherwise pull its attention, so the second pass cannot be influenced by them.
The table below summarizes what each step receives and produces.
| Step | Input | Output | Main purpose |
|---|---|---|---|
| Regeneration | Original prompt plus S2A instruction | Filtered context and question | Remove distractors and opinions |
| Answering | Filtered context and question only | Final response | Reason without biasing text |
| Merge variant | Filtered and original context | Final response | Keep detail lost in filtering |
Problems that System 2 attention targets
S2A targets failures in which surface features of the prompt change the answer even though they should not. The original evaluation focused on three categories of task.
| Failure type | Typical prompt feature | Effect without S2A |
|---|---|---|
| Sycophancy | User states an opinion about the answer | Model agrees with the user |
| Distractor sensitivity | Irrelevant sentence with numbers | Wrong arithmetic in math problems |
| Opinion bias in writing | Prompt reveals the author’s stance | Less objective argument text |
| Spurious repetition | Entity repeated in the context | Model overweights that entity |
In reported experiments, S2A raised factual accuracy on opinion-laden trivia questions and improved math word problems with irrelevant sentences, bringing results closer to those obtained with clean prompts. Gains vary by model and task, so the technique should be measured on the target workload rather than assumed.
How it compares with related prompting techniques
System 2 attention is a preprocessing technique for the input, whereas most reasoning methods change how the model processes or checks its output. It can therefore be combined with other methods, for example running chain-of-thought on the regenerated context.
| Technique | What it changes | Relation to S2A |
|---|---|---|
| Chain-of-thought | Adds explicit reasoning steps | Complementary; S2A cleans the input first |
| Rephrase and respond | Model restates the question | Similar rewrite idea, no filtering goal |
| Step-back prompting | Asks a more general question first | Abstracts rather than removes content |
| Chain-of-verification | Checks the draft answer | Acts after answering, not before |
| Thread of thought | Walks through long context in parts | Organizes context instead of pruning it |
Unlike an instruction such as “ignore irrelevant information”, which leaves all tokens in the prompt, S2A physically removes them from the second call. Simple instructions help somewhat, but they usually perform worse than full regeneration on strongly biased inputs.
Applying System 2 attention in practice
Practitioners apply S2A as a pipeline of two model calls, often with a smaller or cheaper model handling the regeneration step. A good regeneration prompt asks the model to extract only text that helps answer the question, to drop opinions about the answer, and to output the result under clear labels such as context and question.
- Use it when inputs come from users or documents that may contain leading opinions, noise or injected claims.
- Skip it for short, clean prompts, where the extra call adds latency without benefit.
- Log the regenerated context so reviewers can see what was removed.
- Evaluate both variants, with and without the original context appended.
The main trade-off is cost and latency: S2A roughly doubles the number of calls and adds the tokens of the regenerated context. For high-volume systems, teams often trigger S2A only when a classifier flags opinionated or noisy input.
Limitations and risks
System 2 attention depends on the model judging relevance correctly, and that judgment can fail. If the regeneration step removes a needed fact, the second call has no way to recover it, and the answer degrades even on easy questions.
- Over-filtering: legitimate constraints or user preferences may be removed as if they were bias.
- Paraphrase drift: rewritten context can subtly alter numbers, names or conditions.
- Not a security control: S2A reduces the influence of distracting text but does not reliably block prompt injection.
- Model dependence: weaker models produce poorer filtered context and smaller gains.
A non-technical view
Picture a student given a math problem with a few unrelated sentences mixed in. A careful student first copies out only the facts that matter. Then the student solves that clean version.
System 2 attention asks an AI model to do the same. First it rewrites the question without the clutter. Then it answers the clean version. The model is less likely to be swayed by hints, opinions or noise that should not matter.
A concrete example
A customer support team uses a language model to answer billing questions. Customers often write messages such as “I am sure the late fee is illegal, so please confirm it will be removed”, and the model tended to agree with the customer’s claim even when the policy said otherwise.
The team adds an S2A step. A small model first rewrites each message into a neutral question plus relevant account facts, for example “Does the contract allow a late fee after 15 days?” The main model then answers from that text and the policy documents. In a review of 500 sampled tickets, agents found fewer answers that simply echoed the customer, at the cost of about 40 percent higher latency per reply. The team keeps S2A only for messages that a classifier marks as opinionated.