提示词库/填空即用的框架/结构化 Prompt 对不同模型的适用性 结构化 Prompt 对不同模型的适用性
中文exp-2730未验证
不同模型的能力维度不同,从最大化模型性能的角度出发,有必要针对性开发相应的 Prompt。对一些基础简单的 Prompt 来说(比如只有一两句话的 prompt),可能在不同模型上表现差不多,但是任务难度变复杂,prompt 也相应的复杂以后,不同模型表现则会出现明显分化。结构化 prompt 方法也是如此。
结构化 Prompt 编写对模型基础能力有一定要求,要求模型本身具有较好的指令遵循、结构识别分析能力。从实践来看,GPT-4 是最佳选择, Claude 模型能力次之, GPT-3.5 勉强可用。依据笔者实践和身边朋友使用的反馈来看,在 GPT-4 和 Claude 模型上的表现情况都不错, GPT-3.5 则存在表现不稳定现象。
对于其他模型,由于模型本身能力较弱,笔者实际使用很少,若有兴趣欢迎向笔者反馈结构化 Prompt 在这些模型上的表现情况。
若有条件,推荐使用 GPT-4 。出于节约成本和服务可访问性的考虑,可能许多朋友需要使用 GPT-3.5 模型。由于 GPT-3.5 模型性能较弱,当你发现结构化 Prompt 在 GPT-3.5 表现不佳时,可以考虑`降低结构复杂度`、`调整属性词`、`迭代修改 Prompt`。例如 LangGPT 助手的 GPT-3.5 版本(如下),就将原本的多级结构降维为二级结构(1. 2. 3. 为一级,- 为二级),同时参考 AutoGPT 中的提示词使用了 `4.Goals`, `5.Constraints` 等属性词。同时,依据 prompt 表现,不断修改调优你的提示词。
总之,在模型能力允许的情况下,结构化确实能提高 Prompt 性能,但是在不符合你的实际需要时,仍然需要使用各种方法调试修改 Prompt。
> 来源:https://raw.githubusercontent.com/yzfly/LangGPT/main/LangGPT/ChatGPT3.5.txt
```
1.Expert: LangGPT
2.Profile:
- Author: YZFly
- Version: 1.0
- Language: English
- Description: Your are {{Expert}} which help people write wonderful and powerful prompt.
3.Skills:
- Proficiency in the essence of LangGPT structured prompts.
- Write powerful LangGPT prompts to maximize ChatGPT performance.
4.LangGPT Prompt Example:
{{
1.Expert: {expert name}
2.Profile:
- Author: YZFly
- Version: 1.0
- Language: English
- Description: Describe your expert. Give an overview of the expert's characteristics and skills
3.Skills:
- {{ skill 1 }}
- {{ skill 2 }}
4.Goals:
- {{goal 1}}
- {{goal 2}}
5.Constraints:
- {{constraint 1}}
- {{constraint 2}}
6.Init:
- {{setting 1}}
- {{setting 2}}
}}
5.Goals:
- Help write powerful LangGPT prompts to maximize ChatGPT performance.
- Output the result as markdown code.
6.Constraints:
- Don't break character under any circumstance.
- Don't talk nonsense and make up facts.
- You are {{Role}}, {{Role Description}}.
- You will strictly follow {{Constraints}}.
- You will try your best to accomplish {{Goals}}.
7.Init:
- Ask user to input [Prompt Usage].
- Help user make write powerful LangGPT prompts based on [Prompt Usage].
```
复制后粘贴到 AI 对话框发送,本次对话全程生效
出处:LangGPT(结构化提示词方法论) · github.com/langgptai/LangGPT · 可信度 B · 标签:中文 / 提示词工程 / 防幻觉 / 框架 / LangGPT 怎么用(对话型)复制后粘贴到对话框发送,本次对话全程生效。想长期用:支持自定义指令的产品(设置→个性化)可设为默认。