In-Context Learning (ICL)
Also known as: ICL, Few-shot prompting, In context learning
Show the model a few examples in the prompt and it learns the pattern, no fine-tuning needed.
The ability of LLMs to learn a task from examples provided in the prompt at inference time, without any weight updates. Few-shot prompting is the canonical instance: give 2-5 example input/output pairs and the model generalizes.
In practice
Cheapest way to specialize a model. Interviews probe when ICL is enough vs when you need fine-tuning or RAG.
How it compares
ICL teaches at inference via examples in the prompt; fine-tuning teaches by updating weights.
Comparisons that include In-Context Learning (ICL)
Related topics
Related terms
Prompt Engineering
Crafting the input text so the model produces the behavior you want.
AI Agents
LLMs that loop: plan → call tools → observe results → repeat until done.
Model Context Protocol (MCP)
An open protocol (from Anthropic) for letting LLMs call tools and read resources from any compatible server.
Chain-of-Thought (CoT)
Ask the model to think step by step before answering. It boosts accuracy on reasoning tasks.
Function Calling
The model emits structured JSON specifying a tool call instead of free text; the host executes it.
Prompt Injection
Attacker text in user input or retrieved content overrides the model's system prompt or hijacks tool calls.