What it is
Zero-Shot vs Few-Shot Prompting are two prompting strategies used in AI models. Zero-shot prompting asks an AI model to perform a task based solely on instructions, with no examples. Few-shot prompting includes 2-5 examples of the desired input/output pattern before the actual request. Few-shot typically produces more consistent, formatted results because the model can pattern-match against the examples.
Why it matters
Choosing the right prompting strategy directly affects agent quality. Few-shot prompting is especially valuable for tasks with specific output formats — like generating structured case summaries or qualifying leads against specific criteria.
Key components
- Zero-shot instructions
- Few-shot examples
- Chain-of-thought prompting
- Output formatting
How it connects
Prompt Builder supports both strategies. When creating Prompt Templates in Salesforce, you can include example outputs in the template instructions to guide the AI.
Good to know
Few-shot examples should represent the full range of expected inputs — include edge cases. Bad examples teach bad behavior.
Related terms
Prompt Engineering
The practice of crafting precise instructions to guide an AI model's behavior, capabilities, and limitations.
Prompt Builder
Salesforce's tool for creating reusable, templatized prompts that pull in live CRM data. Build once, use across flows, agents, and record pages.
Prompt Template
A reusable, data-aware prompt that pulls live CRM data into AI instructions — built in Prompt Builder and invoked by agents and flows.

