Skip to main content
>_ supraj.dev
TOPIC AI
Zero-Shot Prompting asking to perform tasks without examples
IN 10 SECONDS

Prompting a model to complete a task directly without giving any reference examples (relying purely on the model's pre-trained patterns).

GOTCHA Zero-shot fails on complex formatting, custom logic, or structured coding patterns. Use few-shot or chain-of-thought instead.
HOW ZERO-SHOT PROCESSES
01 Task query user prompt asks: 'Translate this to French: Hello world'.
02 Direct lookup LLM maps token embeddings to language translation patterns.
03 Output returns output immediately: 'Bonjour le monde'.
POKE IT YOURSELF
ollama run llama3 \"Translate: hello to Spanish\" — run zero-shot query in shell