Back to Developer Roadmap

Few-Shot Prompting

src/data/roadmaps/ai-engineer/content/[email protected]

4.0748 B
Original Source

Few-Shot Prompting

Few-shot prompting is a technique used with large language models (LLMs) where you provide a small number of example input-output pairs in the prompt itself. These examples demonstrate the desired behavior of the LLM for a specific task. By seeing these "few shots" of correct answers, the LLM can better understand the pattern and generate accurate and relevant responses for new, unseen inputs.

Visit the following resources to learn more: