From afdae4696441d4b2bd96412ad24a06e1ca37f51a Mon Sep 17 00:00:00 2001 From: leochou73 <57980998+leochou73@users.noreply.github.com> Date: Sun, 9 Apr 2023 11:30:48 +0800 Subject: [PATCH] Update workplace_casestudy.zh.mdx --- pages/applications/workplace_casestudy.zh.mdx | 56 ++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/pages/applications/workplace_casestudy.zh.mdx b/pages/applications/workplace_casestudy.zh.mdx index 92e08b7..f8a7666 100644 --- a/pages/applications/workplace_casestudy.zh.mdx +++ b/pages/applications/workplace_casestudy.zh.mdx @@ -1,3 +1,55 @@ -# Graduate Job Classification Case Study +# 毕业生职位分类案例研究 -Needs translation! Feel free to contribute a translating by clicking the `Edit this page` button on the right side. \ No newline at end of file +Clavié等人(2023)提供了一项关于提示工程应用于生产系统中中等规模文本分类用例的案例研究。通过使用将工作分类为真正的“初级职位”(是否适合应届毕业生的任务),他们评估了一系列提示工程技术,并使用GPT-3.5 (gpt-3.5-turbo)报告了他们的结果。 + +该研究表明,LLMs在所有经过测试的模型中表现最佳,包括DeBERTa-V3中的一个极强的基准模型。gpt-3.5-turbo在所有关键指标上也明显优于早期的GPT3变体,但需要进行额外的输出解析,因为其遵循模板的能力似乎不如其他变体。 + +他们的提示工程方法的关键发现是: + +- 对于像这样不需要专业知识的任务,Few-shot CoT提示在所有实验中的表现都不如Zero-shot提示。 +- 提示对于引导正确推理的影响非常巨大。简单地要求模型对给定的工作进行分类会得到65.6的F1分数,而后提示工程模型的F1分数为91.7。 +- 试图强制模型遵循模板会降低所有情况下的性能(这种行为在GPT-4的早期测试中消失,这项测试在该论文之后进行)。 +- 许多小的修改对性能产生了巨大的影响。 + - 下面的表格显示了所有经过测试的修改。 + - 正确地给出指令并重复关键点似乎是最有效的提升性能的方法。 + - 简单地给模型一个(人类的)名字并这样称呼它,可以将F1分数提高0.6个百分点。 + +### 经本文测试的 Prompt策略 + +| Short name | Description | +|------------|----------------------------------------------------------------------------| +| Baseline | 提供一个职位招聘信息并询问它是否适合毕业生。 | +| CoT | 在查询之前给出几个准确分类的示例。 | +| Zero-CoT | 要求模型一步步推理后再给出答案。 | +| rawinst | 通过添加到用户消息中, 来给出有关其角色和任务的说明。 | +| sysinst | 作为系统消息给出有关其角色和任务的说明。 | +| bothinst | 将角色作为系统消息和任务作为用户消息拆分说明。 | +| mock | 通过模拟讨论来给出任务说明,其中模型确认了它们。 | +| reit | 通过重复强调关键要素来加强说明。 | +| strict | 要求模型严格按照给定模板回答。 | +| loose | 要求仅根据给定模板给出最终答案。 | +| right | 要求模型得出正确的结论。 | +| info |提供额外的信息以解决常见的推理失败。 | +| name | 为模型取一个我们在对话中称呼它的名称。 | +| pos | 在查询之前向模型提供正面反馈。 | + +### 所有Prompt性能策略对性能的影响 + +| | Precision | Recall | F1 | Template Stickiness | +|----------------------------------------|---------------|---------------|---------------|------------------------| +| _Baseline_ | _61.2_ | _70.6_ | _65.6_ | _79%_ | +| _CoT_ | _72.6_ | _85.1_ | _78.4_ | _87%_ | +| _Zero-CoT_ | _75.5_ | _88.3_ | _81.4_ | _65%_ | +| _+rawinst_ | _80_ | _92.4_ | _85.8_ | _68%_ | +| _+sysinst_ | _77.7_ | _90.9_ | _83.8_ | _69%_ | +| _+bothinst_ | _81.9_ | _93.9_ | _87.5_ | _71%_ | +| +bothinst+mock | 83.3 | 95.1 | 88.8 | 74% | +| +bothinst+mock+reit | 83.8 | 95.5 | 89.3 | 75% | +| _+bothinst+mock+reit+strict_ | _79.9_ | _93.7_ | _86.3_ | _**98%**_ | +| _+bothinst+mock+reit+loose_ | _80.5_ | _94.8_ | _87.1_ | _95%_ | +| +bothinst+mock+reit+right | 84 | 95.9 | 89.6 | 77% | +| +bothinst+mock+reit+right+info | 84.9 | 96.5 | 90.3 | 77% | +| +bothinst+mock+reit+right+info+name | 85.7 | 96.8 | 90.9 | 79% | +| +bothinst+mock+reit+right+info+name+pos| **86.9** | **97** | **91.7** | 81% | + +“Template stickiness” 指的是模型多频繁地按照所期望的格式作答。