Sintra AI
Home
Live Feed
Automation Hub
Prompt Library256
AI News554
Weekly Digest
Topic Hubs
AI History
AI Labs
Research
Learning Paths
Guides
Resources
Concepts
Videos
AI Tools74
Models
Claude
Google AI
Cost Calc
Skip to content
Sintra AIConcepts
Home/Concepts/Few-Shot Prompting
🎯
FundamentalsBeginner

Few-Shot Prompting

Giving an AI 2–5 examples of the task before asking it to do yours.

Few-shot prompting means including a small number of example input/output pairs in your prompt before the actual request. The model uses these examples as a pattern to follow — without any weight updates or fine-tuning.

Example structure:

Classify the sentiment of each review.

Review: "Absolutely loved the product!" → Positive
Review: "Terrible quality, broke in a week." → Negative
Review: "It's okay, nothing special." → [model fills this in]

Why it works: LLMs are trained to continue patterns. Showing the pattern explicitly at inference time steers the output far more reliably than a vague instruction.

When few-shot beats zero-shot:

  • Unusual output formats (JSON with specific keys, numbered lists, tables)
  • Domain-specific terminology or style
  • Edge cases you want handled consistently
  • Tasks where "good" is hard to define but easy to show

Rule of thumb: 3–5 examples usually suffice. More than 10 rarely helps and adds tokens. Ensure examples are diverse and representative of the range you'll encounter.

In plain terms

Teaching a child to sort laundry by showing three examples — 'this sock goes here, this shirt goes there' — rather than explaining the sorting algorithm.

Related concepts

✨

Prompt Engineering

The art of asking AI the right question in the right way.

🔗

Chain of Thought

Prompting a model to reason step-by-step before giving its final answer.

⬡

Large Language Model

AI trained on vast text to understand and generate language.

⚡

Zero-Shot Prompting

Asking an AI to do a task with no examples — just instructions.

Stay current

New prompts & AI news, weekly

No noise. Curated highlights from the library.

Newsletter signup is currently disabled.

Sintra Tesseract

A curated library of AI use cases, mapped across every way to think with a machine.

Open source · Free forever

Discover

Use CasesCollectionsAI Tools DirectoryAI NewsLearning PathsResources & Links

Reference

Claude & AnthropicAI ConceptsAI HistoryAI LabsGoogle AI Tools

Elsewhere

AI Keynote ↗GitHub ↗RSS Feed ↗
© 2026 Sintra · Curated in the open.Built on the void.