链载Ai

标题: AI也需要 [打印本页]

作者: 链载Ai    时间: 昨天 18:16
标题: AI也需要

ingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;color: rgb(31, 35, 41);margin: 0px 0px 4px;word-break: break-all;min-height: 20px;">前几天 Cluade 新的系统提示词泄露了,居然有 16,739 个单词,非常长。

Image

ingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;color: rgb(31, 35, 41);margin: 0px 0px 4px;word-break: break-all;min-height: 20px;">相比之下,OpenAI 在 ChatGPT 中的 o4-mini 的系统提示有 2,218 个单词,只是 Claude 的 13%。

?

ingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;color: rgb(31, 35, 41);margin: 0px 0px 4px;word-break: break-all;min-height: 20px;">什么是系统提示词

ingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;color: rgb(31, 35, 41);margin: 0px 0px 4px;word-break: break-all;min-height: 20px;">LLM 的系统提示就是在对话一开始递给 AI 的“一页说明书”,用来告诉它该扮演什么角色、遵守哪些规则、用什么方式回答用户。

ingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;color: rgb(31, 35, 41);margin: 0px 0px 4px;word-break: break-all;min-height: 20px;">大概来看一下这么长的提示词里面主要都是一些什么内容:

Image

ingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;color: rgb(31, 35, 41);margin: 0px 0px 4px;word-break: break-all;min-height: 20px;">而且整个提示词中充满了临时修改的的痕迹,这些修改往往没有使用 XML 或者 Markdown 格式的列表,就是一段话,看起来像是针对一些热点事件或者问题修复打的补丁。

Ifyouareusinganygmailtoolsandtheuserhasinstructedyoutofindmessagesforaparticularperson,doNOTassumethatperson'semail.Sincesomeemployeesandcolleaguessharefirstnames,DONOTassumethepersonwhotheuserisreferringtosharesthesameemailassomeonewhosharesthatcolleague'sfirstnamethatyoumayhaveseenincidentally(e.g.throughapreviousemailorcalendarsearch).Instead,youcansearchtheuser'semailwiththefirstnameandthenasktheusertoconfirmifanyofthereturnedemailsarethecorrectemailsfortheircolleagues.

ingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;color: rgb(31, 35, 41);margin: 0px 0px 4px;word-break: break-all;min-height: 20px;">Claude 整个系统提示词这么长维护和更新甚至版本控制应该都需要一个专门的流程,不然很容易直接上线之后出问题,不知道具体是怎么样的。

ingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;color: rgb(31, 35, 41);margin: 0px 0px 4px;word-break: break-all;min-height: 20px;">

ingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;color: rgb(31, 35, 41);margin: 0px 0px 4px;word-break: break-all;min-height: 20px;">分享这个除了学习 Cluade 写提示词之外主要是看到今天 Karpathy 发的一个观点。

他受到 Claude 这个提示词的启发说:当前大语言模型(LLM)的学习方式还缺少一种重要的范式,他称之为“系统提示(system prompt)学习。

Image

目前我们 LLM 主流的两个主流的学习方式预训练(pretraining)和微调(finetuning,包括监督学习SL和强化学习RL)——都依赖于模型参数的更新,但这与人类的某些学习方式并不完全一致。

?

现有 LLM 学习范式

但是人类在学习新知识或解决新问题时,往往不是直接“改写大脑参数”,而是通过“记笔记”或“自我提醒”的方式,将经验和策略以显式的形式保留下来。

例如,当你遇到某类问题时,会总结出“下次遇到类似情况可以这样做”的经验。这种方式更像是在不断编辑自己的“系统提示”,而不是每次都重新训练大脑。

所以“系统提示学习”是一种介于模型参数和外部记忆之间的机制。他认为,LLM 也应该有类似“记笔记”的能力,把解决问题的策略、经验和通用知识以显式文本的方式存储下来,而不是全部依赖参数更新。

例如上面 Claude 的系统提示,全部都是由人类编写,效率低且难以扩展。Karpathy 认为,理想情况下,模型应该能通过“系统提示学习”自动生成和优化这些提示,就像人类自己总结经验一样。

?

系统提示学习的优势

Karpathy 比喻说,当前的 LLM 就像电影《记忆碎片》(Memento)里的主角,没有自己的“备忘录”或“草稿本”,只能靠参数记忆一切,其实藏师傅的网页提示词就已经在充当这种作用了,而且相当一部分是跟 AI 共创的。

他也说“系统提示学习”如果能实现,将成为 LLM 领域一个全新的、强大的学习范式。

但是也会存在很多的问题需要解决,比如:


系统提示词就像私人助理的指令手册。越详细,结果越精准。

与AI交流时,明确指令胜过模糊表达。学会像Claude的提示词那样,具体说明需求和边界。

善用列表、格式和示例。AI更容易理解结构化的指令。

"提示工程"不是高深技术,而是日常沟通技巧的延伸。普通人也能掌握。

感兴趣的话可以详细的看一下 Claude 的提示词内容,学习一下。

而且 Karpathy 这个系统提示学习其实现在也可以半自动的实现一部分,从业者可以参考一下。






欢迎光临 链载Ai (https://www.lianzai.com/) Powered by Discuz! X3.5