Loading...
In-Context Learning(ICL)
Learning new tasks from examples in the input context without parameter updates (includes few-shot and zero-shot learning)
π― 30-Second Overview
Pattern: Provide task examples in prompt to enable model learning without parameter updates
Why: Enables rapid task adaptation, requires no training, leverages model's pattern recognition for immediate performance
Key Insight: Models can learn from demonstrations in context, performing implicit gradient descent during inference
β‘ Quick Implementation
π Do's & Don'ts
π¦ When to Use
Use When
- β’ Quick adaptation to new tasks needed
- β’ Limited or no training data available
- β’ Task requires demonstration over description
- β’ Rapid prototyping and experimentation
- β’ Model needs to understand complex patterns
Avoid When
- β’ Large amounts of training data available
- β’ Task requires extensive domain knowledge
- β’ Context window limitations are severe
- β’ High precision requirements exceed ICL capability
- β’ Consistent performance across variations needed
π Key Metrics
π‘ Top Use Cases
References & Further Reading
Deepen your understanding with these curated resources
Theoretical Understanding (2022-2024)
Why Can GPT Learn In-Context? Language Models Secretly Perform Gradient Descent (Dai et al., 2022)
Transformers Learn In-Context by Gradient Descent (von Oswald et al., 2022)
In-context Learning and Induction Heads (Olsson et al., 2022)
What learning algorithm is in-context learning? Investigations with linear models (AkyΓΌrek et al., 2022)
Example Selection & Optimization
Chain-of-Thought & Reasoning
Chain-of-Thought Prompting Elicits Reasoning in Large Language Models (Wei et al., 2022)
Least-to-Most Prompting Enables Complex Reasoning in Large Language Models (Zhou et al., 2022)
Self-Consistency Improves Chain of Thought Reasoning in Language Models (Wang et al., 2022)
Large Language Models are Zero-Shot Reasoners (Kojima et al., 2022)
Multimodal In-Context Learning
Analysis & Evaluation
Measuring and Narrowing the Compositionality Gap in Language Models (Press et al., 2022)
Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? (Min et al., 2022)
Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrations (Yoo et al., 2022)
Fantastically Ordered Prompts and Where to Find Them (Lu et al., 2021)
Contribute to this collection
Know a great resource? Submit a pull request to add it.
In-Context Learning(ICL)
Learning new tasks from examples in the input context without parameter updates (includes few-shot and zero-shot learning)
π― 30-Second Overview
Pattern: Provide task examples in prompt to enable model learning without parameter updates
Why: Enables rapid task adaptation, requires no training, leverages model's pattern recognition for immediate performance
Key Insight: Models can learn from demonstrations in context, performing implicit gradient descent during inference
β‘ Quick Implementation
π Do's & Don'ts
π¦ When to Use
Use When
- β’ Quick adaptation to new tasks needed
- β’ Limited or no training data available
- β’ Task requires demonstration over description
- β’ Rapid prototyping and experimentation
- β’ Model needs to understand complex patterns
Avoid When
- β’ Large amounts of training data available
- β’ Task requires extensive domain knowledge
- β’ Context window limitations are severe
- β’ High precision requirements exceed ICL capability
- β’ Consistent performance across variations needed
π Key Metrics
π‘ Top Use Cases
References & Further Reading
Deepen your understanding with these curated resources
Theoretical Understanding (2022-2024)
Why Can GPT Learn In-Context? Language Models Secretly Perform Gradient Descent (Dai et al., 2022)
Transformers Learn In-Context by Gradient Descent (von Oswald et al., 2022)
In-context Learning and Induction Heads (Olsson et al., 2022)
What learning algorithm is in-context learning? Investigations with linear models (AkyΓΌrek et al., 2022)
Example Selection & Optimization
Chain-of-Thought & Reasoning
Chain-of-Thought Prompting Elicits Reasoning in Large Language Models (Wei et al., 2022)
Least-to-Most Prompting Enables Complex Reasoning in Large Language Models (Zhou et al., 2022)
Self-Consistency Improves Chain of Thought Reasoning in Language Models (Wang et al., 2022)
Large Language Models are Zero-Shot Reasoners (Kojima et al., 2022)
Multimodal In-Context Learning
Analysis & Evaluation
Measuring and Narrowing the Compositionality Gap in Language Models (Press et al., 2022)
Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? (Min et al., 2022)
Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrations (Yoo et al., 2022)
Fantastically Ordered Prompts and Where to Find Them (Lu et al., 2021)
Contribute to this collection
Know a great resource? Submit a pull request to add it.