Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

πŸ€– Artificial Intelligence
☁️ Cloud and Infrastructure
πŸ’Ύ Data and Databases
πŸ’Ό Professional Skills
🎯 Programming and Development
πŸ”’ Security and Networking
πŸ“š Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 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-03-17
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 14 focused tables and 97 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 ChallengesTable 12: Vision BenchmarksTable 13: NLP BenchmarksTable 14: Practical Considerations

Table 1: Core Learning Paradigms

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.

More in Generative AI

  • Embeddings Cheat Sheet
  • Foundation Models in AI Cheat Sheet
  • Advanced RAG Patterns and Optimization Cheat Sheet
  • Chain-of-Thought Reasoning Cheat Sheet
  • LangSmith Cheat Sheet
  • Multimodal AI Cheat Sheet
View all 77 topics in Generative AI