liveBook · Manning

One-shot prompting

As explained in AI for Everyday IT

Single-shot prompting is a prompting technique that provides an AI model with one task-specific example before requesting an output.

One-shot prompting gives an AI model one clear, task-specific example to guide its next response. The example communicates the desired pattern, style, setting, or characteristics without requiring several demonstrations. section 4.2.2

Match an artistic style

Ask an image generator: “Draw a cat sitting on a windowsill in the style of Vincent van Gogh.” The example establishes the subject, setting, and artistic direction, producing more specific results than an unrestricted cat image. You can also upload the result and request a dog in the same style. section 4.2.2 section 4.2.2

Use one-shot prompting when a single example can clarify the intended result. Modern models may need less guidance for basic tasks, while examples remain useful for expressing specific preferences and requirements. section 4.2.5 section 4.10

How AI for Everyday IT covers it

How deep it goes
Defines the technique and demonstrates text-to-image and image-based applications, but does not explain model internals.
Examples
Uses a Van Gogh-style cat image, an uploaded cat image, and a request for a matching dog image.
What you can do after
Apply one-shot prompting to guide image generation toward a specified subject, setting, style, or design pattern.
How it connects
Connects one-shot prompting with zero-shot prompting, few-shot prompting, many-shot prompting, and prompt engineering.

Also explained in

Compare how 3 books explain one-shot prompting →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI for Everyday IT. The section links point to the parts of the book it draws on.