# In-context learning

> In-context learning: Teaching a model a task through instructions and examples in the prompt, with no change to its weights. Each example is a shot…

Canonical: https://llmdojo.dev/glossary/in-context-learning

Also called few-shot prompting, few-shot learning, zero-shot prompting.

Teaching a model a task through instructions and examples in the prompt, with no change to its weights. Each example is a shot: zero-shot uses none, few-shot several.

Learn it in the lesson: [Learning from examples in the prompt](https://llmdojo.dev/learn/prompt-context-engineering/examples-and-structured-outputs/in-context-learning) (Prompt and Context Engineering · Few-Shot Examples and Structured Outputs).

## Interview questions about In-context learning

- [What is in-context learning, and what does each example in the prompt cost you?](https://llmdojo.dev/interview/q/what-is-in-context-learning-and-what-does-each-example-in-the)
- [Zero-shot or few-shot prompting: what's the difference, and when do you add examples?](https://llmdojo.dev/interview/q/zero-shot-or-few-shot-prompting-what-s-the-difference-and-when)

## Related
- [Structured output](https://llmdojo.dev/glossary/structured-output)
- [Glossary of every term](https://llmdojo.dev/glossary)
