Home/Glossary/Few-Shot Prompting
Glossary

Few-Shot Prompting

Few-shot prompting is a technique where you include several examples of the desired input-output pattern in your prompt before asking the AI to perform the actual task. For instance, showing three examples of how a customer email should be categorized before asking the model to categorize a new one. Research shows that 3-5 diverse examples significantly improve output quality and consistency. Few-shot prompting is often more effective than lengthy written instructions because models learn patterns from examples more reliably than from descriptions.

Related Terms

Related Articles