生成数据
LLM 具有生成连贯文本的强大能力。使用有效的提示策略可以引导模型生成更好、更一致、更准确的响应。LLM 在生成数据方面也非常有用,这对于运行各种实验和评估非常有用。例如,我们可以用它来快速生成用于情感分类器的样本,如下所示:
提示
Produce 10 exemplars for sentiment analysis. Examples are categorized as either positive or negative. Produce 2 negative examples and 8 positive examples. Use this format for the examples:
Q: <sentence>
A: <sentiment>
输出
Q: I just got the best news ever!
A: Positive
Q: We just got a raise at work!
A: Positive
Q: I'm so proud of what I accomplished today.
A: Positive
Q: I'm having the best day ever!
A: Positive
Q: I'm really looking forward to the weekend.
A: Positive
Q: I just got the best present ever!
A: Positive
Q: I'm so happy right now.
A: Positive
Q: I'm so blessed to have such an amazing family.
A: Positive
Q: The weather outside is so gloomy.
A: Negative
Q: I just got some terrible news.
A: Negative
这非常有用。我们实际上在指南的另一部分中将此示例用于不同的测试。
🎓
在我们的新AI课程中了解更多高级提示方法。立即加入!使用代码 PROMPTING20 可额外享受八折优惠。立即加入! (在新标签页中打开) 使用代码 PROMPTING20 可额外享受八折优惠。