AI Dictionary of Terms

In-Context Learning

The ability of large language models to learn tasks from examples provided within the input prompt itself, without any gradient updates or parameter changes to the model weights.

The Simple Version

Imagine you’re a new employee on your first day. Your manager doesn’t send you to a week-long training course. Instead, they sit you down and say: “Here are three examples of how we handle customer emails. Now, here’s a new email — handle it the same way.”

You watch the examples, understand the pattern, and immediately apply it to the new situation. You didn’t go through formal training — you learned “in context,” right there in the moment, from the examples you were shown.

That’s exactly what in-context learning is for AI. The model sees examples in the prompt, figures out the pattern, and applies it to new inputs — all without any actual “training” in the traditional sense.

Detailed Explanation

In-context learning (ICL) is a surprising emergent capability of large transformer-based language models. Unlike traditional machine learning, where models learn by updating weights through gradient descent, ICL happens entirely at inference time.

How it works:

  1. Examples in Prompt: The user provides input-output pairs in the prompt
  2. Pattern Recognition: The model’s attention mechanism identifies patterns across examples
  3. Implicit Task Inference: The model infers the task from the examples
  4. Application: The model applies the learned pattern to new inputs

Theoretical Understanding: Recent research suggests ICL works through:

Relationship to Other Concepts:

Key Factors for Success:

Key Characteristics

Business Context

In-context learning is the foundation of practical LLM deployment in enterprises:

Why it matters:

Enterprise Applications:

Strategic Considerations:

Real-World Analogy

Learning to dance by watching. Instead of taking formal lessons (traditional training), you watch three experienced dancers perform a routine, then immediately join in and mimic their moves. You learned “in context” from the examples you observed, without formal instruction.

Example Prompt

Scenario: Teaching the model to extract structured data.

The Prompt:

Extract the company name, funding amount, and lead investor from startup announcements.

Example 1: Announcement: “TechStartup Inc. announced a $50M Series B round led by Sequoia Capital.” Extraction: {“company”: “TechStartup Inc.”, “funding”: “$50M”, “lead_investor”: “Sequoia Capital”}

Example 2: Announcement: “BioHealth raised $25M in Series A funding. The round was led by Andreessen Horowitz.” Extraction: {“company”: “BioHealth”, “funding”: “$25M”, “lead_investor”: “Andreessen Horowitz”}

Now extract from this announcement: Announcement: “CloudAI has secured $100M in Series C funding. The round was led by Accel, with participation from existing investors.” Extraction:

The AI’s Response:

{“company”: “CloudAI”, “funding”: “$100M”, “lead_investor”: “Accel”}

Why this works:

Common Misconceptions

Sources & Further Reading