Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications

Categories

🎓 Certifications
🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
CheatGrid
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications
LVLEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

Few-Shot and Zero-Shot Learning Cheat Sheet

Few-Shot and Zero-Shot Learning Cheat Sheet

Back to Generative AI
Updated 2026-05-25
Next Topic: Foundation Models in AI Cheat Sheet

Few-shot and zero-shot learning are machine learning paradigms that enable models to generalize to new tasks or classes with minimal labeled examples—ranging from none (zero-shot) to a small handful (few-shot). These approaches are foundational to in-context learning in large language models and meta-learning in computer vision, where models learn to adapt quickly by transferring knowledge from prior experience rather than requiring extensive task-specific training. The key challenge is to design representations, prompting strategies, and meta-learning algorithms that maximize generalization from extremely limited supervision, making these techniques essential for real-world applications where labeled data is scarce, expensive, or rapidly changing. Understanding the nuances between demonstration selection, calibration methods, and architectural choices directly impacts whether a model performs near state-of-the-art or random-guess accuracy on new tasks.

What This Cheat Sheet Covers

This topic spans 15 focused tables and 117 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Core Learning ParadigmsTable 2: Prompting Strategies for LLMsTable 3: Meta-Learning ArchitecturesTable 4: Demonstration Selection StrategiesTable 5: Task Formulation & TrainingTable 6: Inference ApproachesTable 7: Calibration & Mitigation MethodsTable 8: Prompt Design ComponentsTable 9: Advanced Prompt TechniquesTable 10: Cross-Domain & Specialized FSLTable 11: Common Challenges & Failure ModesTable 12: Vision BenchmarksTable 13: NLP BenchmarksTable 14: Practical Considerations for DeploymentTable 15: Real-World Applications

Table 1: Core Learning Paradigms

The foundational vocabulary of few-shot and zero-shot learning defines the problem structure, data splits, and the main training philosophies. Knowing how these paradigms relate helps you choose the right approach — prompting a large LLM vs. training a metric-based model vs. full meta-learning — for your data and compute constraints.

ParadigmExampleDescription
Zero-shot learning
Classify sentiment: "I loved it!" → Positive
• Model performs a task with no examples, relying entirely on pre-trained knowledge and task instructions
• works best for generalized tasks that match training distribution.
One-shot learning
Example: "Great movie" → Positive
Classify: "Terrible film"
• Model receives exactly one example per class before inference
• bridges zero-shot and few-shot by providing minimal demonstration of desired behavior.
Few-shot learning
3 examples:
"Loved it" → Pos
"Hated it" → Neg
"Okay" → Neu
• Model learns from 2–10 labeled examples per class
• significantly improves performance over zero-shot for specialized or nuanced tasks.
K-shot learning
k=5: 5 examples per class
• Formalization of few-shot where k specifies the exact number of examples per class
• typically k ∈ {1, 2, 5, 10} in research benchmarks.
N-way K-shot
5-way 1-shot: 5 classes, 1 example each
• Standard task formulation where model discriminates between N classes given K examples per class
• defines the few-shot classification problem structure.

More in Generative AI

  • Embeddings Cheat Sheet
  • Foundation Models in AI Cheat Sheet
  • Advanced RAG Patterns and Optimization Cheat Sheet
  • ColBERT and Late Interaction Retrieval Cheat Sheet
  • LlamaIndex Cheat Sheet
  • pgvector for Postgres Vector Search Cheat Sheet
View all 95 topics in Generative AI