Skip to main content

选择器示例

¥Example selectors

概述

¥Overview

一种常见的实现更佳性能的提示技巧是将示例包含在提示中。这被称为 少量样本提示

¥One common prompting technique for achieving better performance is to include examples as part of the prompt. This is known as few-shot prompting.

这为 语言模型 提供了其应如何运行的具体示例。有时这些示例被硬编码到提示符中,但在更高级的情况下,动态选择它们可能会更好。

¥This gives the language model concrete examples of how it should behave. Sometimes these examples are hardcoded into the prompt, but for more advanced situations it may be nice to dynamically select them.

示例选择器是负责选择示例并将其格式化为提示的类。

¥Example Selectors are classes responsible for selecting and then formatting examples into prompts.

请参阅 更多信息,请参阅 API 参考。

¥See the API reference for more information.

¥Related resources