Few-Shot Prompting
A prompt engineering technique where a small number of input-output examples are provided before the actual query, demonstrating the desired format and behavior to the model.
Why It Matters
Few-shot prompting is the most practical way to customize LLM behavior without fine-tuning. 3-5 good examples can dramatically improve output quality.
Example
Providing 3 examples of product descriptions in your brand's tone before asking the model to write a 4th — it matches the style consistently.
Think of it like...
Like showing a new employee examples of completed work before asking them to do a similar task — the examples communicate expectations better than abstract instructions.
Related Terms
Few-Shot Learning
A technique where a model learns to perform a task from only a few examples provided in the prompt. Instead of training on thousands of examples, the model generalizes from just 2-5 demonstrations.
Prompt Engineering
The practice of designing and optimizing input prompts to get the best possible output from AI models. It involves crafting instructions, providing examples, and structuring queries to guide the model toward desired responses.
In-Context Learning
An LLM's ability to learn new tasks from examples or instructions provided within the prompt, without any weight updates or fine-tuning. The model adapts its behavior based on the context given.
Zero-Shot Learning
A model's ability to perform a task it was never explicitly trained on or shown examples of. The model applies its general knowledge and reasoning to handle entirely new task types.
Prompt Template
A pre-defined structure for formatting prompts to AI models, with placeholders for dynamic content. Templates ensure consistent, optimized prompt formatting across applications.