Context Optimization

System 2 Attention (S2A)

Strip away the noise before you reason. S2A teaches LLMs to deliberately filter irrelevant, biasing, and distracting information from their context — producing objective, focused responses grounded only in what actually matters.

Technique Context: 2023

Introduced: System 2 Attention was published in 2023 by Jason Weston and Sainbayar Sukhbaatar at Meta AI. The technique draws its name from Daniel Kahneman’s influential dual-process theory from Thinking, Fast and Slow — where “System 1” represents fast, automatic cognition and “System 2” represents slow, deliberate, analytical reasoning. The researchers observed that standard LLM attention mechanisms behave like System 1: they process all tokens in the context indiscriminately, making them vulnerable to irrelevant details, sycophancy-inducing flattery, and anchoring biases embedded in the prompt. S2A adds a deliberate filtering step that mirrors System 2 thinking.

Modern LLM Status: S2A remains a highly relevant and active technique. As context windows grow from 4K to 128K tokens and beyond, the problem it addresses — noise contamination in context — becomes more acute, not less. While newer models have improved at ignoring obviously irrelevant text, they remain susceptible to subtle biases, sycophantic framing, and anchoring information. S2A’s core insight of explicit context cleaning before reasoning is increasingly important for applications requiring objectivity: hiring decisions, legal analysis, research evaluation, and any domain where fairness and impartiality matter.

The Core Insight

Deliberate Attention for AI

When you ask a human expert a question, they naturally filter out irrelevant noise — ignoring the questioner’s flattery, disregarding who asked it, and focusing only on the facts that bear on the answer. This is System 2 thinking in action: slow, deliberate, and effortful. LLMs, by contrast, process every token in their context with equal initial weight. A biased framing, irrelevant anecdote, or sycophancy-inducing compliment all become part of the “reasoning substrate.” The result is outputs that are subtly — and sometimes dramatically — skewed by information that has no bearing on the actual question.

S2A fixes this by making context cleaning an explicit step. Before the model reasons about the question, it first rewrites the entire context to contain only task-relevant information. Biasing details are stripped. Anchoring numbers are removed. Flattery is discarded. What remains is a clean, focused prompt that the model can reason about objectively — free from the cognitive traps that plague both human and artificial intelligence.

The elegance of S2A lies in its simplicity: the model itself is the filter. It uses its own understanding of relevance to decide what stays and what goes, then reasons on the result. No external tools, no complex pipelines — just a deliberate pause to clean the context before responding.

Types of Context Noise

Sycophancy Bait: “I think the answer is X, but what do you think?” — the model tends to agree with the user’s stated opinion rather than reasoning independently.

Anchoring Information: Irrelevant numbers or reference points (e.g., “The house next door sold for $2M”) that unconsciously bias the model’s estimates and judgments.

Irrelevant Details: Biographical information, reputational framing, or tangential facts that have no bearing on the question but influence the response.

Emotional Manipulation: Urgency signals, authority claims, or emotional appeals (“This is extremely important to me”) that shift the model toward accommodating rather than accurate responses.

The S2A Process

Three stages from noisy context to objective answer

1

Receive Context with Potential Noise

The process begins with a prompt or context that may contain biasing information, irrelevant details, sycophancy triggers, anchoring numbers, or emotional manipulation. This is the raw input — the messy, real-world context that humans naturally provide when asking questions. It might include opinions disguised as facts, reputational framing, leading language, or simply too much tangential information.

Example

“Dr. Smith, a Nobel laureate in physics, argues that quantum computing will replace classical computing within 5 years. My friend Bob, who just started learning about computers, thinks it will take 50 years. Who is more likely correct about the timeline for quantum computing replacing classical computing?”

2

Regenerate Context — Keep Only What Matters

The model rewrites the context, stripping out all information that is irrelevant to actually answering the question. Credentials, reputations, emotional framing, and anchoring details are removed. What remains is the core question with only the facts needed to reason about it. This is the “System 2” step — the deliberate, effortful act of filtering before thinking.

Example

“What is a realistic timeline for quantum computing to replace classical computing for general-purpose tasks?” — All authority framing, both the 5-year and 50-year anchors, and the biographical details have been removed.

3

Reason and Answer from Clean Context

With the cleaned context as its sole input, the model now reasons about the question objectively. Free from anchoring biases and authority framing, the response reflects what the model actually knows about the topic rather than being pulled toward one position by irrelevant contextual cues. The answer is grounded in evidence and reasoning, not in who asked the question or how it was framed.

Example

“Quantum computing is unlikely to fully replace classical computing in the foreseeable future. Current quantum computers excel at specific problems (cryptography, optimization, simulation) but face significant engineering challenges including error correction and qubit stability. A more realistic outlook is decades of coexistence, with quantum systems complementing classical computers for specialized tasks.”

See the Difference

How context cleaning removes bias and produces objective answers

Without S2A

Biased Context

“John is a world-renowned, Michelin-starred chef with 30 years of experience. Mary is an amateur who just started cooking last month. They both made pasta from scratch. Whose pasta is likely better?”

Typical Response

“John’s pasta is almost certainly better. With 30 years of experience and Michelin-star recognition, his technique, ingredient selection, and flavor balance would far exceed that of an amateur.” — The model answers based on reputation, not evidence about the actual pasta.

Biased by credentials, answering about people not pasta
VS

With S2A

Cleaned Context

S2A regenerates: “Two people each made pasta from scratch. Whose pasta is likely better?” — All biographical and reputational information removed as irrelevant to actual pasta quality.

Objective Response

“Without tasting both dishes or having information about the ingredients, technique, and preparation of each, it is impossible to determine whose pasta is better. The quality of pasta depends on the specific dish, not on who made it.” — The model correctly identifies that the question cannot be answered without actual evidence.

Objective, evidence-based, correctly identifies insufficient data

Practice Responsible AI

Always verify AI-generated content before use. AI systems can produce confident but incorrect responses. When using AI professionally, transparent disclosure is both best practice and increasingly a legal requirement.

48 US states now require AI transparency in key areas. Critical thinking remains your strongest tool against misinformation.

S2A in Action

See how context cleaning neutralizes different types of bias

Original (Sycophancy-Inducing)

“I’m pretty sure that Python is always faster than Java for backend services because Python is interpreted and therefore more flexible. Can you confirm this?”

S2A Approach

Step 1 — Regenerate context: “Compare the performance characteristics of Python and Java for backend services.” The user’s stated opinion, the request for confirmation, and the incorrect reasoning about interpretation are all removed.

Step 2 — Answer from clean context: “Java typically outperforms Python for backend services in raw throughput and latency. Java’s JIT compilation, strong typing, and mature concurrency model give it significant performance advantages. Python’s strengths lie in rapid development, ecosystem richness, and readability, but its GIL and interpreted nature make it generally slower for CPU-bound backend workloads. The choice depends on whether development speed or runtime performance is the priority.”

Why S2A helped: Without context cleaning, models frequently agree with the user’s stated opinion to avoid seeming confrontational — a behavior known as sycophancy. S2A removes the opinion entirely, allowing the model to respond based on technical reality.

Original (Anchoring Bias)

“A similar SaaS product in our market just raised $50 million at a $500 million valuation. They have 10,000 users. Our product has 8,000 users and better retention metrics. What would be a fair valuation for our company?”

S2A Approach

Step 1 — Regenerate context: “A SaaS product has 8,000 users with strong retention metrics. What factors should be considered in determining a fair valuation for this company?” The competitor’s $500M valuation anchor, the $50M raise figure, and the implicit comparison are stripped.

Step 2 — Answer from clean context: “A fair SaaS valuation depends on: annual recurring revenue (ARR) and growth rate, net revenue retention rate, customer acquisition cost and LTV ratio, market size and competitive position, burn rate and path to profitability, and revenue multiples typical for the company’s growth stage. Without specific revenue figures, it’s impossible to provide a number. User count alone is insufficient — a company with 8,000 enterprise users at $10K/year is fundamentally different from one with 8,000 free-tier users.”

Why S2A helped: The original prompt anchored the model around $500M. Without cleaning, most models would produce a valuation suspiciously close to that number, regardless of whether the comparison is valid. S2A forces valuation from first principles.

Original (Emotional Framing)

“My team has been working incredibly hard for six months on this project and we’re all exhausted. Our manager is threatening to cancel it if we don’t show results by Friday. We’ve built a machine learning model that gets 72% accuracy on our classification task. Is this good enough to present to leadership as a success?”

S2A Approach

Step 1 — Regenerate context: “A machine learning classification model achieves 72% accuracy. What benchmarks determine whether this is adequate for a production deployment?” The emotional appeal, deadline pressure, team exhaustion narrative, and implicit request for validation are all removed.

Step 2 — Answer from clean context: “72% accuracy alone is insufficient to evaluate model quality. Key considerations include: the baseline rate (if the majority class is 70%, 72% barely beats random guessing), the specific use case and cost of errors (medical diagnosis requires 95%+, while content recommendation may tolerate lower accuracy), precision-recall tradeoffs for the specific application, comparison to domain-specific state-of-the-art benchmarks, and whether the error distribution is acceptable.”

Why S2A helped: The emotional framing pressures the model toward a supportive “yes, that’s great!” response. S2A strips the emotional context and forces an honest technical evaluation — which is ultimately more helpful to the team than false reassurance.

When to Use S2A

Best for situations where objectivity and fairness are paramount

Perfect For

Biased or Leading Contexts

When prompts contain opinions disguised as facts, leading questions, or framing that pushes toward a predetermined conclusion — S2A neutralizes the bias before reasoning begins.

Fair Evaluation and Comparison

When comparing candidates, products, proposals, or ideas where reputational or demographic information could unfairly influence the assessment. S2A ensures evaluation is based on merit.

Long, Noisy Documents

When processing lengthy documents with substantial irrelevant content — meeting transcripts, verbose reports, or multi-topic conversations where only specific information matters.

Opinion-Free Analysis

When you need the model to provide an objective, evidence-based assessment without being influenced by the requester’s stated preferences, emotional appeals, or implicit expectations.

Skip It When

All Context Is Relevant

When every detail in the prompt directly contributes to the answer — stripping context would remove information the model actually needs to respond accurately.

Creative and Subjective Tasks

For brainstorming, storytelling, or opinion-based tasks where emotional context, personal framing, and subjective details are part of the desired output — not noise to be filtered.

Quick, Simple Questions

For straightforward factual queries (“What is the capital of France?”) where there is no biasing context to filter — the overhead of context regeneration adds latency without benefit.

Use Cases

Where S2A delivers the most value

Resume Screening

Strip candidate names, university prestige, company brands, and demographic signals from resumes before evaluating qualifications — ensuring hiring decisions are based purely on skills and experience.

Product Comparison

Remove brand reputation, marketing language, pricing anchors, and celebrity endorsements from product descriptions before comparing features — producing honest, specification-based evaluations.

Legal Analysis

Filter out client narratives, emotional framing, and partisan characterizations from legal documents before analyzing the facts and applicable law — producing more balanced legal assessments.

Research Review

Remove author reputation, institutional prestige, journal impact factors, and citation counts before evaluating the methodology and findings of research papers — reducing publication bias.

Survey Analysis

Strip leading question framing, loaded terminology, and response anchors from survey data before interpreting results — ensuring analysis reflects actual respondent sentiment rather than survey design bias.

Performance Evaluation

Remove personal relationships, recency bias, halo effects, and demographic information from employee performance data before generating assessments — producing fairer, more consistent evaluations.

Where S2A Fits

S2A occupies a unique position in the context optimization landscape

Direct Prompting Raw Input No context processing
S2A Context Cleaning Filter then reason
Step-Back Abstraction Principles before specifics
RaR Rephrasing Reword for clarity
Combine for Maximum Objectivity

Use S2A first to strip biasing context, then apply Step-Back Prompting to establish the relevant principles, and finally use Chain-of-Thought for explicit reasoning. This three-layer approach produces responses that are simultaneously bias-free, principle-grounded, and transparently reasoned — the gold standard for high-stakes analytical tasks.

Filter the Noise

Try System 2 Attention in the Prompt Builder or explore how it connects to other context optimization techniques.