# One-shot Prompting

- **Canonical URL:** https://getaimath.com/dictionary/one-shot-prompting/
- **Topics:** [LLM Fundamentals](https://getaimath.com/dictionary/category/llm-fundamentals/)
- **Last updated:** 2026-11-25

## What is One-shot Prompting?

**In one sentence:** One-shot prompting is asking an AI to do a task after showing it exactly one example.

The single example shows the model the format or style you want. It is like showing a friend one solved math problem before asking them to solve the next. This often helps the model match your expectations better than no example.

![How ChatGPT & Claude Talk: Super-Powered Autocomplete — Simple cartoon diagram showing a sentence chopped into Lego word blocks (tokens), an AI brain weighing the odds of the next word ("mat" 75%, "couch" 18%, "roof" 5%), and snapping "mat" onto the end of the sentence.](https://getaimath.com/diagrams/llm-fundamentals.png)
*Napkin Diagram (LLM Fundamentals): Language models don’t plan whole essays at once—they play a super-smart game of "guess the very next word" over and over.*

## What is an example of One-shot Prompting?

"Happy → Sad. Big → ?" gives one example of opposites before asking for the next.

## Why does One-shot Prompting matter?

A single good example can fix confusing formats or styles quickly.

## Related Concepts

- [Zero-shot Prompting](https://getaimath.com/dictionary/zero-shot-prompting/): Zero-shot prompting is asking an AI to do a task without giving it any examples first.
- [Few-shot Prompting](https://getaimath.com/dictionary/few-shot-prompting/): Few-shot prompting is giving an AI a handful of examples in the prompt before asking it to do the task.
- [Prompt Engineering](https://getaimath.com/dictionary/prompt-engineering/): Prompt engineering is the skill of writing and arranging instructions so an AI model gives the best possible answers.
- [Chain of Thought (CoT)](https://getaimath.com/dictionary/chain-of-thought-cot/): Chain of Thought is when an AI works through a problem step by step in writing before giving its final answer.
- [Assistant Message](https://getaimath.com/dictionary/assistant-message/): An assistant message is a reply written by the AI model in a conversation.
- [Temperature](https://getaimath.com/dictionary/temperature/): Temperature is a setting that controls how random or creative a model's answers are.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/one-shot-prompting/)
