Skip to content
Finic
AI and agents

What is in-context learning?

In-context learning is a language model's ability to pick up a task from instructions and examples placed in the prompt, without any change to the model's weights.

Also called: ICL, prompt-based learning

How it works

When a prompt includes a description of a task and perhaps a few solved examples, a large model can often continue the pattern on new inputs. Nothing is saved: the model learns only for the length of that request, and the lesson is gone when the request ends.

This is the basis of few-shot prompting and zero-shot learning. How well it works depends on the model's size, the clarity of the instructions and how well the examples match real inputs.

Why it matters for risk work

In-context learning makes it fast to try new tasks. A fraud analyst can paste three examples of a new scam message and ask the model to label a batch of fresh ones, all without a training pipeline. When the scam changes, the examples can be updated the same day.

The trade-off is consistency. Results can shift with small changes to wording or example order, so a prompt that works well in a demo needs testing on a real labeled set before it is trusted in production.

Security points

The same ability that lets a model learn from your examples lets it learn from an attacker's. Text placed in the context by a user, a web page or a document can steer the model. This is why prompt injection works, and why untrusted text should be kept apart from instructions.

Example

A hypothetical trust and safety team sees a new style of fake refund request. A reviewer adds four confirmed examples to the prompt of an existing classifier. The next morning's queue is sorted with the new pattern in mind, and the team later moves the examples into a proper training set.

← All glossary terms

Ship fraud, bot and KYB checks in minutes.

Start with $5 of free credit, or copy a prompt and let your coding agent set Finic up.

Sign up See pricing