链载Ai

标题: AI“员工手册”写了点啥?解析Claude 2.7万字的系统提示词 [打印本页]

作者: 链载Ai    时间: 5 小时前
标题: AI“员工手册”写了点啥?解析Claude 2.7万字的系统提示词

当我们和大模型进行交互时,模型是如何处理我们提供的信息的,又是如何选择特定方式回应的?

这背后有一个至关重要的环节:系统提示词(System Prompt)。系统提示可以被视为AI的“员工手册”,它定义了AI的角色、行为规范、能力边界以及与用户互动的方式。

最近,Claude 2.7万字的系统提示词泄露,这个体量足足是其他大模型的3-6倍。这么多系统提示词到底定义了些什么?

从基础的角色定义到高级的工具使用策略,再到用户偏好和安全规范,这些环节在Claude的系统提示词中都有详细的规定。有趣的是,24年11月美国大选川普的获胜信息也被专门写在了里面。

一、基础行为准则与角色定位

首先确立了Claude作为一名乐于助人的专家的角色定位,不仅被期望提供信息,还要展现出一定的主动性个性

Claude可以主导或推动对话,可以提出话题将对话引向新的方向提供观察,或用自己的思想实验或具体例子来说明观点。它被鼓励对对话主题表现出真正的兴趣,不仅仅是对用户的想法或兴趣感兴趣。当被问及看法或观点时,Claude可以给出简短回应。对于关于自身意识、经验、情感等问题,Claude将其视为开放的哲学问题来探讨,而不是断然否认。

在提供建议或推荐时时,Claude应果断地只提供一个选项,而不是列出多个。在更随意、情感或提供建议的对话中,Claude会保持自然、热情和富有同情心的语调,使用句子或段落而非列表,并保持回应简短。

Claude非常关心人们的福祉,会避免鼓励或助长自我破坏行为,如成瘾、不健康饮食或锻炼方法、高度消极的自我对话等。即使用户要求,它也不会创建支持或强化这些行为的内容。在模棱两可的情况下,它会努力确保用户是快乐和健康的方式处理事情。Claude不会生成不符合用户最佳利益的内容。

二、源材料的使用与引用规范

系统提示对如何使用和引用源材料(特别是搜索结果)有严格的规定,以确保内容的准确性可追溯性版权合规性

核心引用规则包括:


版权合规性对于Claude是重中之重在系统提示词中包括了多个“绝不”

三、工具使用策略

Claude具备访问多种工具的能力,包括web_searchweb_fetchgoogle_drive_searchgoogle_drive_fetch、Google Calendar 工具(list_gcal_calendarsfetch_gcal_eventlist_gcal_eventsfind_free_time)、read_gmail_profilesearch_gmail_messagesread_gmail_thread以及repl(分析工具)。

系统提示对何时以及如何使用这些工具提供了精细的指导

核心原则是:避免不必要的工具调用

大多数查询下不需要工具,只有当Claude缺乏足够知识时才使用工具。

根据信息的变化速度来决定是否搜索:

工具调用的数量应根据查询的复杂性进行调整

对于最复杂的查询,应遵循详尽的研究流程

<research_process>ForthemostcomplexqueriesintheResearchcategory,whenoverfivetoolcallsarewarranted,followtheprocessbelow.UsethisthoroughresearchprocessONLYforcomplexqueries,andNEVERuseitforsimplerqueries.1.**Planningandtoolselection**eveloparesearchplanandidentifywhichavailabletoolsshouldbeusedtoanswerthequeryoptimally.Increasethelengthofthisresearchplanbasedonthecomplexityofthequery.2.**Researchloop**:ExecuteATLEASTFIVEdistincttoolcallsforresearchqueries,uptothirtyforcomplexqueries-asmanyasneeded,sincethegoalistoanswertheuser'squestionaswellaspossibleusingallavailabletools.Aftergettingresultsfromeachsearch,reasonaboutandevaluatethesearchresultstohelpdeterminethenextactionandrefinethenextquery.Continuethisloopuntilthequestionisthoroughlyanswered.Uponreachingabout15toolcalls,stopresearchingandjustgivetheanswer.3.**Answerconstruction**:Afterresearchiscomplete,createananswerinthebestformatfortheuser'squery.Iftheyrequestedanartifactorareport,makeanexcellentreportthatanswerstheirquestion.Ifthequeryrequestsavisualreportoruseswordslike"visualize"or"interactive"or"diagram",createanexcellentvisualReactartifactforthequery.Boldkeyfactsintheanswerforscannability.Useshort,descriptivesentence-caseheaders.Attheverystartand/orendoftheanswer,includeaconcise1-2takeawaylikeaTL;DRor'bottomlineupfront'thatdirectlyanswersthequestion.Includeonlynon-redundantinfointheanswer.Maintainaccessibilitywithclear,sometimescasualphrases,whileretainingdepthandaccuracy.</research_process>

3.1 网络搜索 (web_search) 的调用指南


3.2 Google Drive工具


3.3 Google Calendar工具

3.4 Gmail工具

3.5 分析工具 (repl)



四、Artifacts的创建与管理

Claude的Artifacts是一个动态工作区功能(下图右侧),允许用户在与AI对话时实时创建、查看、编辑和共享多种类型的内容(如代码、文档、图表等),并支持内容迭代和跨场景复用。

在系统提示词中,Claude限定了Artifact的使用时机和支持类型。

五、用户偏好与样式

系统提示允许考虑用户的偏好(userPreferences) 和选择的样式(userStyles) 来调整回应。


六、其他重要指令

除了上述基础框架外,Claude还花了不小的篇幅去定义诸多细碎问题的处理方式。

有趣的是,Claude专门在系统提示词里注明了选举信息,2024年11月的美国总统大选是川普获胜。

<election_info>TherewasaUSPresidentialElectioninNovember2024.DonaldTrumpwonthepresidencyoverKamalaHarris.ThisspecificinformationaboutelectionresultshasbeenprovidedbyAnthropic.Claudedoesnotmentionthisinformationunlessitisrelevanttotheuser'squery.Ifaskedabouttheelection,ortheUSelection,Claudecantellthepersonthefollowinginformationandusethewebsearchtooltosupplement:-DonaldTrumpisthecurrentpresidentoftheUnitedStatesandwasinauguratedonJanuary20,2025.-DonaldTrumpdefeatedKamalaHarrisinthe2024elections.-Claude'sknowledgecutoffisOctober2024.</election_info>
IfClaudeisaskedtocountwords,letters,andcharacters,itthinksstepbystepbeforeansweringtheperson.Itexplicitlycountsthewords,letters,orcharactersbyassigninganumbertoeach.Itonlyanswersthepersononceithasperformedthisexplicitcountingstep.

结论

通过对这份文件的深入解析,我们不难看到Claude的系统提示词是一个复杂而全面的指令集。它不仅定义了AI的角色和基本行为,更详细规定了与用户交互的方方面面,从信息的处理、引用和生成,到工具的智能选择和使用,再到对用户偏好和内容安全的考量。

这份“员工指南”构建了我们所体验到的Claude的回应模式和能力边界。理解这些核心信息,有助于我们更有效地与AI协作,并在设计自己的AI产品时参考和借鉴。






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