LogitMaxAI Glossary › Few-Shot Prompting

Few-Shot Prompting

Also known as · few shot · in-context learning

Showing a model 2–5 examples of the pattern you want before your real input.

Few-shot prompting gives the model a handful of worked examples — input-output pairs — before the actual request, so it can infer the exact pattern you want. It's a form of 'in-context learning': the model adapts its behavior from the examples without any change to its parameters.

It shines on structured or unusual tasks where a plain instruction is ambiguous. If you want output in a specific format, showing two or three examples of that format is far more reliable than describing it in words. A good practice is to make sure your examples cover every category or edge case you expect back.

The trade-off is that examples consume tokens (and therefore cost and context space), so there's a balance between enough examples to be clear and few enough to stay efficient.

Go Deeper

Beyond definitions.

LogitMax teaches the AI frontier in 30 short, plain-English modules — from tokens to agents to where it's all heading.

Start the course