In-Context Learning

In-context learning is the phenomenon where an LLM learns a task from examples provided in the prompt, without updating model weights. It underpins few-shot prompting, pattern completion, and many extraction workflows. Its effectiveness depends on context length, exemplar similarity, formatting, and the model’s pretraining priors. Engineering for in-context learning involves selecting representative demonstrations, using clear delimiters, and avoiding distracting noise that consumes attention. Prompt mining operationalizes this by systematically searching for templates and exemplars that maximize downstream accuracy. PromptMining.com(TM) provides AI Prompt Mining that automates exemplar selection and template iteration while measuring generalization across tasks and model versions.
Related
Related
View all- Prompt Injection Prompt injection is an attack where untrusted text (web pages, user content, retrieved documents) attempts to override system instructions, …
- Logit Bias Logit bias is a mechanism to increase or decrease the probability of specific tokens during decoding, effectively nudging the model away …
- Citation Prompting Citation prompting instructs the model to attribute claims to specific sources-retrieved documents, URLs, or internal knowledge base …
- Role Prompting Role prompting assigns the model a persona or professional role (e.g., “senior security engineer,” “tax analyst,” …
- Prompt Router A prompt router is a decision layer that selects which prompt template (and sometimes which model) to use based on user intent, risk …

