Also known as: Few Shot Prompting
Few-shot prompting — техника проектирования промптов, при которой генеративной ИИ-модели дают небольшое число примеров перед выполнением связанной задачи. Примеры направляют формат, модель рассуждения или ожидаемое поведение модели без изменения ее весов.
In generative AI, "few-shot" refers to a type of prompt that includes a small number of examples to guide the model's response. These examples help the model understand the desired output format, phrasing, scope, or general patterning of the response. Few-shot prompts are often used to regulate the output of language models, ensuring that they generate responses that are accurate, high-quality, and consistent with the user's expectations. By providing the model with a few relevant examples, the user can influence the model's behavior and obtain more satisfactory results. For more information, see Include few-shot examples.
A prompt that contains more than one (a "few") example demonstrating how the large language model should respond. For example, the following lengthy prompt contains two examples showing a large language model how to answer a query. Notes | ---| The question you want the LLM to answer. | One example. | Another example. | The actual query. | Few-shot prompting generally produces more desirable results than zero-shot prompting and one-shot prompting. However, few-shot prompting requires a lengthier prompt. Few-shot prompting is a form of few-shot learning applied to prompt-based learning. See Prompt engineering in Machine Learning Crash Course for more information.