TL;DR
SA-ICL is a prompting technique that brings the human way of learning by analogy into working with LLMs. Instead of just showing examples (as in One-Shot), the method first builds an abstract schema of the task (broad category → refinement → specific scope → goal), then finds a similar schema from past tasks, and finally activates the schema — merging past experience with the current problem. It's like solving a physics problem and suddenly thinking: "Wait, this is conservation of energy! I've solved something like this in chemistry."
Main finding: LLMs make poor use of high-quality examples unless the schema is explicitly activated. Even when a model gets an almost identical worked example, it often gets things wrong — it misses the structural similarity and latches onto surface differences. The researchers found that handing GPT-4o a perfect example delivers only 60-70% of the potential benefit. The other 30-40% is lost because the model doesn't see the pattern — it needs an explicit schema as a bridge between the example and the task. Think of a student who knows the formula but has no idea when to use it.
How it works: SA-ICL runs five steps instead of one. (1) It builds a schema of the current task through structured questions (category → details → focus → goal). (2) It searches for a similar schema in a library of past tasks. (3) It retrieves relevant examples for that schema. (4) It activates the schema — merging the retrieved pattern with the current task (like assimilation/accommodation in cognitive psychology). (5) It solves the task through the activated schema.
Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.
Method Blueprint
STAGE 1: Problem Representation
"Create a schema for task X" → JSON {broad_category, refinement, specific_scope, goal}
STAGE 2: Prior Schema Retrieval
Search the library for the most similar schema → Ŝ (best match)
STAGE 3: Episodic Examples Retrieval
Retrieve examples tied to the matched schema → Êτ (relevant examples)
STAGE 4: Schema Activation
"Adapt the retrieved schema to the current task" → Snew (activated schema)
[Happens inside a single prompt through integration]
STAGE 5: Schema-Guided Solving
Solve task X using Snew → final answerImportant: Stages 1-5 take several requests — first building the schema, then searching the library, then activation, then solving. This is a workflow, not a one-shot prompt.
Example in Action
⚠️ Method limitations: Works best on structured tasks with clear patterns (science, math, analytics). Not a fit for creative/subjective tasks, or when your example library is empty or low quality.
Task: You're a business analyst at a mid-size online marketplace. You need to decide whether to launch a new "Smart Home" product category. You have data on the "Pet Supplies" launch a year ago (a hit) and "Auto Parts" (a flop). You sense a connection but can't put your finger on the pattern.
Prompt (Stage 1 - building the schema):
Using schema theory from cognitive psychology, create an abstract schema of this business problem.
Schema template:
Broad Category: The general category of the problem
Refinement: Clarifying details
Specific Scope: The exact focus of the task
Goal: The desired outcome
Problem:
Should we launch a "Smart Home" category on our marketplace?
Data:
- "Pet Supplies" (2023) - success, +40% GMV for the quarter
- "Auto Parts" (2022) - failure, -15% margin
- The smart home market is growing 25% a year
- Competitors (Amazon, Walmart) already have this category
Produce a JSON with the schema.Prompt (Stage 4 - activating the schema):
You've seen the schema of the "Smart Home" task and found a similar schema from the "Pet Supplies" case.
Current schema: {schema from stage 1}
Retrieved schema: {schema of the successful "Pet Supplies" case}
Examples: {details of the "Pet Supplies" case}
Adapt the retrieved schema to the current task. Which success patterns carry over?
Where do the differences call for a different approach?
Create an activated schema for the solution.Result:
The model will produce a multi-step analysis: (1) a side-by-side of the two cases' schemas, (2) the structural pattern it uncovers ("growing market + we don't have it yet = window of opportunity"), (3) adaptation to the specifics of smart home products, (4) concrete recommendations grounded in the analogies it found. The final answer arrives as a reasoned decision that cites the activated schema — not just "yes/no", but "yes, because pattern X worked in Y, and the conditions match on Z".
Why It Works
LLM weakness: Models are bad at transferring knowledge between tasks that look different on the surface but share the same structure. Give GPT-4 an example about a conservative investor, and it won't notice that the reasoning pattern is identical to a task about a cautious marketer. The model gets hung up on details (investing vs marketing) and misses the hidden structure (risk-averse decision-making under uncertainty). This is called surface similarity bias — the model sees "stocks" and "ads" as different worlds, even though the decision logic is the same.
LLM strength: Models are great at following structured instructions and handle explicit metadata well. Give one the schema {category: "risk-averse choice", goal: "minimize downside"} and it instantly sees the link between the investor and the marketer. The schema strips out the noise of details, leaving a clean abstraction of the pattern. It's like giving the model not two different examples but one universal template labeled "apply wherever you see X".
How the method leverages that strength: SA-ICL forces schema extraction instead of hoping the model spots them on its own. By building an explicit structure {broad → refined → specific → goal}, the method sidesteps the weakness in knowledge transfer and puts the strength to work — instruction following. The model no longer guesses how tasks are connected; it works with a ready-made pattern. It's the difference between "find something similar" and "here's the blueprint, fill it in for the new task".
Control knobs:
- Schema granularity (
broad_categoryvsspecific_scope) → a coarse schema for transfer across domains (physics→chemistry), a detailed one within a domain - Relevance threshold
τ(threshold for examples) → higher = only very similar examples, lower = more variety - Activation mode (assimilation vs accommodation) → the first for exact transfer, the second for adapting to a new context
- Number of stages → you can drop retrieval and work only with the schema from a single example (saves tokens, but lower quality)
Prompt Template
Base template (full workflow)
Stage 1: Build the task schema
Using schema theory from cognitive psychology, create an abstract schema for solving the task.
Fill in the schema template:
Broad Category: The general field and category of the task
Refinement: Details and narrowing aspects
Specific Scope: The exact focus within the category
Goal: What the result should be
Task: {your_task}
Return JSON:
{
"schema": {
"broad_category": "...",
"refinement": "...",
"specific_scope": "...",
"goal": "..."
},
"summary": "a short summary of the schema"
}Stages 2-3: Search and retrieval
[Done via embedding similarity or a reranker - requires an API/code]
Stage 4: Activate the schema
You have:
1. The schema of the current task: {schema_from_stage_1}
2. A similar schema from the past: {retrieved_schema}
3. Example solutions: {relevant_examples}
Adapt the past schema to the current task:
- Which patterns carry over directly?
- Where does it need adjusting for the new context?
- What should be added to or removed from the past schema?
Create an activated schema for the current task.Stage 5: Solve
Solve the task using the activated schema:
Task: {your_task}
Schema: {activated_schema_from_stage_4}
Structure your answer:
1. Reasoning: reasoning through the schema
2. Final_answer: the final answerPlaceholders:
{your_task}— the specific task to solve{schema_from_stage_1}— the JSON schema from the first request{retrieved_schema}— the schema of a similar task from your library{relevant_examples}— 1-3 example solutions with that schema{activated_schema_from_stage_4}— the integrated schema
🚀 Quick start — paste into the chat:
Here is the SA-ICL method for solving problems by analogy. Walk me through its stages for my task: {describe the task}.
Ask me questions at each stage:
1. What is the schema of my task?
2. Do you know of any similar schemas?
3. How should the retrieved schema be adapted?
4. Solve it through the activated schema
[paste the template above]The LLM will ask for the details of your task to fill in the schema, then find analogies from its own knowledge (or you supply examples), then adapt the pattern to your context. It takes the structure from the template and walks you through the workflow on its own.
Limitations
⚠️ Needs an example library: Without ready-made schemas and examples, the method behaves like plain CoT — you only get the benefit of structuring, not of activation.
⚠️ Overkill for simple tasks: If a task takes one step and no analogy (like "capital of France"), the method adds overhead with no payoff.
⚠️ Best in structured domains: In chemistry/physics/math the patterns are crisp → schemas work great. In creative tasks (writing a poem, coming up with a slogan) schemas wash out what makes the output unique.
⚠️ Quality drop at "medium similarity": When examples are only moderately similar (neither "essentially same" nor "different"), accuracy can fall below One-Shot — the model applies a partially fitting schema and makes bigger mistakes than it would without one.
⚠️ Multiple requests: The full workflow takes 4-5 separate calls to the model (build schema → search → activate → solve), which is pricier and slower than One-Shot.
How They Tested It
The team used GPQA — a PhD-level benchmark of chemistry and physics problems that demand deep understanding, not just fact lookup. To test how the density of the knowledge base affects schemas, the researchers generated synthetic variants of each problem with GPT-4o at three similarity levels: Essentially Same (nearly identical), Similar (same pattern, different details), Different (requires extra knowledge). That gave them a controlled gradient of example quality.
Key finding: even with perfect examples (Essentially Same), One-Shot prompting doesn't hit the ceiling. GPT-4o mini scored 68.8% accuracy on chemistry with an excellent example, and 94.6% with SA-ICL. An improvement of +39.67% is huge for problems where a near-complete answer is already on the table! Why? The model saw the solution but didn't activate the pattern — it behaved like a copy-paste machine, not an analyst.
The surprise: In physics, knowledge density collapses faster than in chemistry. The retrieval score drops 68% by the 10th example (vs 40% in chemistry). The explanation: physics is fragmented — quantum mechanics and general relativity live in isolated clusters of latent space and share no common schemas. A quantum entanglement problem yields ρ ≈ 0 (zero similarity) when matched against a black-hole example. Chemistry is denser — conservation laws, reactions and energetics are intertwined, so schemas transfer more easily.
Practical takeaway: SA-ICL pays off the most in dense knowledge domains — where there are lots of reusable patterns (marketing, law, business analysis). In sparse domains (narrow expert fields with no analogies), the gain is more modest.
Original from the Paper
Context: The researchers used this prompt to build schemas for GPQA problems. It contains the exact structure, not simplified — this is the original few-shot example for schema extraction.
Drawing on schema theory from cognitive psychology, think about a high-level
abstraction (schema) of the problem to guide your reasoning. Your ultimate goal
is to select the most appropriate answer:
Below is the template for the schema you need to fill out:
Broad Category:
Identify the overarching subject and general category to which the problem belongs.
Refinement:
Describe further details or specific aspects that narrow down the broad category.
Specific Scope:
Define the precise focus or context of the problem within the refined category.
Goal:
Clearly state the objective or intended outcome of solving the problem.
Finally, summarize the schema in a few sentences to help students grasp the key
points. The problem you need to abstract is as follows:Important: The original is in English, and it also works translated into other languages. Keep the structure (4 fields + summary) — it's critical to the method.
Adaptations and Extrapolations
💡 Adaptation for client work
SA-ICL works great for recurring client types — for example, in B2B sales or consulting.
Scenario: You have a meeting with a new client (a tech startup that wants to scale). You remember working with a similar startup a year ago, but the details are fuzzy.
Prompt:
Build a client schema using this template:
Industry & Stage: industry + business stage
Key Challenges: the client's main pain points
Decision Criteria: what drives their decisions
Success Pattern: what worked for similar clients
Client:
- HR SaaS, 50 employees, Series A
- Problem: they want to grow, but their processes are falling apart
- Limited budget, ROI matters
Find a similar schema in my history and adapt the approach.The model will pull out the pattern "early-stage SaaS scaling" from your past cases and activate the schema for the new client — not copying the old solution, but adapting its structure.
🔧 Technique: Drop the summary → See the raw schemas
The original includes a summary — a short recap of the schema. It filters out details.
Change:
- Finally, summarize the schema in a few sentences to help students grasp the key points.
+ Return only the raw schema JSON without summary.
```
**Effect:** The model **doesn't generate** a human-readable description → you see the **clean structure** → it's **easier to debug** where the schema is off and where activation broke.
**When to use:** While debugging the workflow — if schemas **aren't matching correctly**, drop the summary and **check the raw JSON**.
---
### 🔧 Technique: Multi-schema activation → Combining patterns
The original activates **one** similar schema. But many tasks call for a **hybrid of patterns**.
**Change:**
```
You found TWO relevant schemas:
1. Schema A: {schema_physics}
2. Schema B: {schema_chemistry}
The current task requires a COMBINATION of both.
Build a hybrid schema:
- Take from A: {what}
- Take from B: {what}
- Resolve conflicts: {how}Example: The task "Assess how green a manufacturing process is" needs a schema from chemistry (reactions, emissions) + economics (cost-benefit). The hybrid will give a better result than either schema alone.
Resources
Schema-Activated In-Context Learning (2025)
- Authors: Tianyu Pang, Sean M. Polyn, Alán Aspuru-Guzik (University of Toronto, Acceleration Consortium)
- [Full text available via arXiv or COLM 2025]
Related work:
- Rumelhart & Ortony (1977) — Schema Theory
- Gick & Holyoak (1983) — Analogical Transfer
- MetaICL (Min et al., 2022) — Task-agnostic ICL
- Chain-of-Thought (Wei et al., 2022) — CoT reasoning