Prompt Engineering Guide
๐Ÿ˜ƒ Basics
๐Ÿ’ผ Applications
๐Ÿง™โ€โ™‚๏ธ Intermediate
๐Ÿง  Advanced
Special Topics
๐ŸŒฑ New Techniques
๐Ÿค– Agents
โš–๏ธ Reliability
๐Ÿ–ผ๏ธ Image Prompting
๐Ÿ”“ Prompt Hacking
๐Ÿ”จ Tooling
๐Ÿ’ช Prompt Tuning
๐Ÿ—‚๏ธ RAG
๐ŸŽฒ Miscellaneous
Models
๐Ÿ“ Language Models
Resources
๐Ÿ“™ Vocabulary Resource
๐Ÿ“š Bibliography
๐Ÿ“ฆ Prompted Products
๐Ÿ›ธ Additional Resources
๐Ÿ”ฅ Hot Topics
โœจ Credits
๐Ÿง  AdvancedFew-Shot๐ŸŸข Introduction

๐ŸŸข Introduction to Few-Shot Prompting Techniques

Reading Time: 1 minute

Last updated on September 27, 2024

Welcome to the Few-Shot section of the advanced Prompt Engineering Guide.

While Zero-Shot prompting is the most basic form of interactionโ€”where the Large Language Model (LLM) Few-Shot prompting techniques it a step further. Few-Shot prompting provides the model with example pairs of problems and their correct solutions. These examples help the model better understand the context and improve its response generation.

Here are a couple of techniques we've already explored, with more on the way!

  • K-Nearest Neighbor (KNN) Prompting selects relevant examples by finding the most similar cases to the input query, improving the accuracy of Few-Shot prompts.
  • Self-Ask Prompting breaks down complex questions into sub-questions, and helps LLMs reason more effectively and provide better answers.
  • Prompt Mining selects the optimal prompt template for a given task from a corpus of text based on the template that comes up most often in the corpus.
  • Vote-K Prompting selects diverse and representative exemplars from unlabeled datasets for Few-Shot prompts.

Stay tuned for more advanced techniques, including:

  • SG-ICL

Valeriia Kuka

Valeriia Kuka, Head of Content at Learn Prompting, is passionate about making AI and ML accessible. Valeriia previously grew a 60K+ follower AI-focused social media account, earning reposts from Stanford NLP, Amazon Research, Hugging Face, and AI researchers. She has also worked with AI/ML newsletters and global communities with 100K+ members and authored clear and concise explainers and historical articles.

โ—† K-Nearest Neighbor (KNN)

โ—†โ—† Prompt Mining

๐ŸŸข Self-Ask

๐ŸŸข Self Generated In-Context Learning (SG-ICL)

โ—†โ—† Vote-K

Copyright ยฉ 2024 Learn Prompting.