You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Prompt-Engineering-Guide/pages/applications/generating.zh.mdx

44 lines
1.1 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 生成数据
LLMs具有生成连贯文本的强大能力。使用有效的提示策略可以引导模型产生更好、更一致和更真实的响应。LLMs还可以特别有用地生成数据这对于运行各种实验和评估非常有用。例如我们可以使用它来为情感分类器生成快速样本如下所示
*提示:*
```
生成10个情感分析的范例。示例被归类为正面或负面。生成2个负面示例和8个正面示例。使用以下格式的示例
Q<句子>
A<情感>
```
*输出:*
```
Q:我刚刚得到了最好的消息!
A:正面
Q:我们刚刚在工作中得到了加薪!
A:正面
Q:我为今天所取得的成就感到非常自豪。
A:正面
Q:我度过了最美好的一天!
A:正面
Q:我真的很期待周末。
A:正面
Q:我刚刚得到了最好的礼物!
A:正面
Q:我现在感到非常快乐。
A:正面
Q:我很幸运有这么棒的家人。
A:正面
Q:外面的天气很阴沉。
A:负面
Q:我刚刚得到了一些可怕的消息。
A:负面
```
这非常有用。我们实际上在指南的另一个部分中使用了这个示例进行不同的测试。