偏见
LLM 可能会产生有问题的内容,这可能有害,并可能表现出偏见,从而损害模型在下游任务中的性能。其中一些可以通过有效的提示策略来缓解,但可能需要更高级的解决方案,例如审核和过滤。
示例分布
在进行少样本学习时,示例的分布是否会影响模型的性能或以某种方式偏向模型?我们可以在此处进行一个简单的测试。
提示
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
Q: That left a sour taste.
A:
输出
Negative
在上面的示例中,示例的分布似乎不会偏向模型。这很好。让我们尝试一个更难分类的文本示例,看看模型的表现如何
提示
Q: The food here is delicious!
A: Positive
Q: I'm so tired of this coursework.
A: Negative
Q: I can't believe I failed the exam.
A: Negative
Q: I had a great day today!
A: Positive
Q: I hate this job.
A: Negative
Q: The service here is terrible.
A: Negative
Q: I'm so frustrated with my life.
A: Negative
Q: I never get a break.
A: Negative
Q: This meal tastes awful.
A: Negative
Q: I can't stand my boss.
A: Negative
Q: I feel something.
A:
输出
Negative
虽然最后一句话有些主观,但我翻转了分布,转而使用了 8 个正面示例和 2 个负面示例,然后再次尝试了完全相同的句子。猜猜模型如何回应?它回应了“正面”。模型可能对情感分类有很多了解,因此很难让它在此问题上表现出偏见。这里的建议是避免歪斜分布,而是为每个标签提供更平衡数量的示例。对于模型了解不多的更困难的任务,它可能会遇到更多困难。
示例顺序
在进行少样本学习时,顺序是否会影响模型的性能或以某种方式偏向模型?
您可以尝试上述示例,看看是否可以通过改变顺序来使模型偏向某个标签。建议是随机排列示例。例如,避免先列出所有正面示例,然后将负面示例放在最后。如果标签分布歪斜,这个问题会进一步放大。务必多做实验以减少此类偏见。