生成数据
LLMs 具有生成连贯文本的强大能力。使用有效的提示策略可以引导模型产生更好、更一致且更符合事实的回应。LLMs 在生成数据方面也特别有用,这对于进行各种实验和评估非常有用。例如,我们可以用它来为情感分类器生成快速样本,如下所示:
提示:
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
这非常有用。我们实际上在指南的另一部分中使用了这个例子来进行不同的测试。