跳到正文
掘金· 威哥爱编程·· 17 天前AI 评分60

Python 智能体开发实战:用 LangChain 把 system prompt 拆成可测试的人格与任务模块

Python 智能体开发实战 02:你的 AI 助教说话像换了个模型?九成的 system prompt 都写错了

AI 导读

这篇教程用一个英语批改助手为例,说明输出风格飘忽多半是 system prompt 只写了身份没写规格,并把提示词拆成人格、任务、少样本示例、思维链四层,用 LangChain 的 ChatPromptTemplate 组装。

来源:掘金 · juejin.cn