Z

Zero-Shot vs Few-Shot Prompting

Two prompting strategies: zero-shot gives the AI a task with no examples; few-shot provides examples of desired output to guide the response.

What it is

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.

Need Help Implementing This?

We specialize in putting AI and Agentforce to work for Salesforce customers. Let's talk about your use case.

Book Intro Call