AI时代的无马马车(AI Horseless Carriages)
AI Horseless Carriages
最近我注意到一件有趣的事情:相比于使用大多数由 AI 构建的应用程序,我更享受使用 AI 来构建软件的过程。
当我使用 AI 构建软件时,我感觉可以快速地创造出几乎任何我能想象的东西。AI 就像一个强大的工具,非常有趣。
但许多 AI 应用并非如此。它们的 AI 功能感觉像是事后添加的,毫无用处,甚至适得其反。
我开始怀疑,这些应用是 AI 时代的“无马马车(horseless carriages)”。它们之所以糟糕,是因为它们模仿了旧的软件构建方式,不必要地限制了所使用的 AI 模型。
为了说明我的意思,我将从一个设计糟糕的 AI 应用例子开始。
Gmail 的 AI 助手
不久前,Gmail 团队发布了一项新功能,允许用户使用 Google 的旗舰 AI 模型 Gemini 从头开始生成电子邮件草稿。它看起来是这样的:
Gmail 的 Gemini 邮件草稿生成功能
在这里,我向界面添加了一个提示,要求为我老板写一封邮件草稿。让我们看看 Gemini 返回的结果:
Gmail 的 Gemini 邮件草稿生成功能响应
正如你所看到的,Gemini 生成了一个完全合理的草稿,但不幸的是,它听起来完全不像我实际会写的邮件。如果我自己写这封邮件,它听起来会像这样:
Hey garry, my daughter woke up with the flu so I won't make it in today
我可能会写的邮件
草稿的语气不是唯一的问题。我可能写的邮件实际上比原始提示还短,这意味着我花在向 Gemini 寻求帮助上的时间,比我自己直接写草稿的时间还要多。令人惊讶的是,Gmail 团队发布了一款完美地捕捉了管理一个表现不佳员工的体验的产品。
数百万 Gmail 用户都有过这样的体验,我相信他们中的许多人已经得出结论,认为 AI 还不够聪明,无法写出好的电子邮件。
这与事实相去甚远:Gemini 是一个非常强大的模型,完全有能力写出好的电子邮件。不幸的是,Gmail 团队设计了一个阻止它这样做的应用程序。
更好的邮件助手
为了说明这一点,这里有一个简单的 AI 邮件助手演示,如果 Gmail 发布它,实际上会为我节省大量时间:
Email Reading Agent System Prompt
You are an email labeling assistant. Analyze the following email and take the appropriate actions. If the email is... ...from my wife Sumana: draft a reply & label: Personal, red, priority 0 ...from my boss Garry: draft a reply & label: YC, orange, 1 ...from anyone else with an @yc.com addr: draft a reply & label: YC, orange, 2 ...from a founder (NOT @yc.com): draft a reply & label: Founders, blue, 2 ...tech-related, e.g. a forum digest: label: Tech, gray, 3 ...trying to sell me something: archive Context for draft replies: You're Pete, a 43 year old husband to Sumana, father, programmer, and YC Partner. You're very busy and so is everyone you correspond with, so you do your best to keep your emails as short as possible and to the point. You avoid all unnecessary words and you often omit punctuation or leave misspellings unaddressed because it's not a big deal and you'd rather save the time. You prefer one-line emails. Do your best to be kind, and don't be so informal that it comes across as rude. Emojis and soft language are OK in personal emails, but not for anything else.
Available Tools
`labelEmail(label, color, priority)`
`archiveEmail()`
`draftReply(body)`
You have access to the following tools: labelEmail: Use this tool to label an email with a specific category, color, and priority level. Arguments: { "label": string, "color": string, "priority": number } archiveEmail: Use this tool to archive an email that doesn't need to be labeled. Arguments: None draftReply: Use this tool to draft a reply to the email. Arguments: { "body": string } You MUST respond using only these tools. Do not respond with plain text or explanations. You can use any combination of these tools in your response. Example usage for a single tool: <tool>labelEmail({"label": "Personal", "color": "red", "priority": 0})</tool> OR <tool>archiveEmail()</tool> OR <tool>draftReply({"body": "Thanks for letting me know. I'll be there on Wednesday."})</tool> Example usage for multiple tools: <tool>labelEmail({"label": "YC", "color": "orange", "priority": 1})</tool> <tool>draftReply({"body": "Hi Garry, Wednesday works for me. Looking forward to our walk."})</tool>
Process Emails
Email Inbox (12)
DataAnalytics Plus
Special Pricing on Data Analytics Tools
▶
Maya Rodriguez
Technical co-founder?
▶
TechCrunch Weekly
This Week in Tech: AI Developments and M...
▶
HackerNews Digest
Top Stories: New Programming Languages o...
▶
The Verge Updates
Latest Product Launches and Industry New...
▶
Sumana
dinner tonight
▶
Sarah from SaaS Solutions
Exclusive Offer for New Customers
▶
Mark at Enterprise Tools
Transform Your Workflow with Our Platfor...
▶
Alex Chen
advice on fundraising
▶
Garry Tan
reschedule
▶
Gustaf Alströmer
founder intro?
▶
DevOps Pro Team
Security Solutions for Growing Companies
▶
一个使用 OpenAI 的 gpt-4o-mini
构建的、真正有用的邮件助手演示。
这个演示使用 AI 来 阅读 邮件,而不是从头开始编写它们。每封邮件都被分类和确定优先级,有些邮件被自动存档,而另一些邮件则获得自动起草的回复。助手根据自定义的“System Prompt”单独处理邮件,该提示准确地解释了我希望如何处理每封邮件。你可以通过编辑 System Prompt 来尝试你自己的标记逻辑。
很明显,这种方法强大得多,那么为什么 Gmail 团队没有以这种方式构建它呢?为了回答这个问题,让我们更仔细地看看他们的设计存在的问题。我们将从它的一般语气开始。
AI 垃圾
Gmail 的 AI 助手生成的草稿冗长而奇怪地正式,而且非常不像 Pete,以至于如果我真的把它发给 Garry,他可能会把它误认为是某种网络钓鱼攻击。这是 AI 垃圾。
每个使用 LLM 进行写作的人都有过这种体验。它太常见了,以至于我们中的大多数人在编写提示时,已经不知不觉地采用了避免它的策略。最简单的策略就是编写更详细的指令,引导 LLM 朝正确的方向发展,就像这样:
let my boss garry know that my daughter woke up with the flu and that I won't be able to come in to the office today. Use no more than one line for the entire email body. Make it friendly but really concise. Don't worry about punctuation or capitalization. Sign off with “Pete” or “pete” and not “Best Regards, Pete” and certainly not “Love, Pete”
通过提示工程走向成功
这里有一个小型的草稿编写器演示,你可以用它来比较我最初的提示和这个扩展的提示:
Your Request
OriginalPrompt-hacked
Let my boss Garry know that my daughter woke up with the flu this morning and that I wont be able to come in to the office today.
Generate Draft
Email Draft
Your generated email will appear here...
一个使用 gpt-4o-mini
构建的 Gmail 草稿生成器虚拟版本。
生成的草稿听起来更好,但这显然很愚蠢。新的提示甚至比原来的提示还要长,而且每次我想写一封新邮件时,都需要写出类似的东西。
对于这个问题,许多 AI 应用程序开发者似乎忽略了一个简单的解决方案:让我编写自己的“System Prompt”。
System Prompts 和 User Prompts
从外部来看,大型语言模型实际上非常简单。它们读入一串单词,即“prompt”,然后开始一个接一个地预测接下来可能出现的单词,即“response”。
这里需要注意的重要一点是,所有的输入和所有的输出都是文本。LLM 的用户界面只是文本。
像 OpenAI 和 Anthropic 这样的 LLM 提供商已经采用了一种约定,以帮助简化提示编写:他们将提示分成两个部分:一个 System Prompt 和一个 User Prompt,之所以这样命名,是因为在许多 API 应用程序中,应用程序开发者编写 System Prompt,而用户编写 User Prompt。
Combined Prompt
System Prompt: Instructions that define the assistant's behavior...
User Prompt: Specific query or instruction from the user...
Large Language Model
Processes the combined prompt and generates a response
System Prompt 向模型解释如何完成一组特定的任务,并一遍又一遍地重复使用。User Prompt 描述要完成的特定任务。
你可以将 System Prompt 视为一个 函数,User Prompt 视为它的 输入,而模型的响应视为它的输出:
You have access to the following tool. Use ONLY this tool to return your response. computeAnswer: { "answer" : "numerical answer to the question" } Example responses: { "answer" : "250" } { "answer" : "two hundred and fifty" }
System Prompt (function)
User Prompt (input)
Response (output)
Generate Output
一个使用 gpt-4o-mini
演示系统/用户提示关系的简单例子。
在我最初的例子中,User Prompt 是:
Let my boss Garry know that my daughter woke up with the flu this morning and that I won't be able to come in to the office today.
我最初的 User Prompt
Google 保密了 System Prompt,但从输出结果来看,我们可以猜测它是什么样的:
You are a helpful email-writing assistant responsible for writing emails on behalf of a Gmail user. Follow the user’s instructions and use a formal, businessy tone and correct punctuation so that it’s obvious the user is smart and serious.
Gmail 的邮件草稿编写器 System Prompt (推测)
当然,我在这里说得有些轻率,但问题不仅仅是 Gmail 团队编写了一个糟糕的 System Prompt。问题是我不允许更改它。
Pete 的 System Prompt
如果 Gmail 没有强迫我使用他们一刀切的 System Prompt,而是允许我编写自己的,它看起来会是这样的:
You're Pete, a 43 year old husband, father, programmer, and YC Partner. You're very busy and so is everyone you correspond with, so you do your best to keep your emails as short as possible and to the point. You avoid all unnecessary words and you often omit punctuation or leave misspellings unaddressed because it's not a big deal and you'd rather save the time. You prefer one-line emails. Do your best to be kind, and don't be so informal that it comes across as rude.
Pete 的 System Prompt
凭直觉,你可以看到这里发生了什么:当我编写自己的 System Prompt 时,我正在教 LLM 以我的方式编写电子邮件。它有效吗?让我们试一试。
System Prompt
Gmail Version (Presumably)Pete Version
You are a helpful email-writing assistant responsible for writing emails on behalf of a Gmail user. Follow the user’s instructions and use a formal, businessy tone and correct punctuation so that it’s obvious the user is really smart and serious.
User Prompt
Let my boss Garry know that my daughter woke up with the flu this morning and that I won't be able to come in to the office today.
Generate Draft
Email Draft
Your generated email will appear here...
根据 System Prompt 的不同,gpt-4o-mini
对同一个 User Prompt 返回截然不同的响应
尝试使用(想象中的)Gmail System Prompt 生成草稿,然后使用上面的“Pete System Prompt”执行相同的操作。“Pete”版本会给你类似这样的东西:
Garry, my daughter has the flu. I can't come in today.
使用 Pete System Prompt 生成的电子邮件草稿
太完美了。这太容易了!
不仅这个特定草稿的输出更好,而且 每个 未来的草稿都会更好,因为 System Prompt 会一遍又一遍地重复使用。不再需要一遍又一遍地向 Gemini 解释如何像我一样写作了!
最棒的是什么?教导像这样的模型,令人惊讶地有趣。
花几分钟思考一下你是如何写电子邮件的。尝试编写一个“你的 System Prompt”,看看会发生什么。如果输出看起来不对劲,试着想象一下你遗漏了什么解释,然后重试。重复几次,直到输出开始让你感觉良好。
更好的是,尝试使用其他几个 User Prompt。例如,看看你是否能让 LLM 用你的声音写出以下电子邮件:
Let my wife know I'll be home from work late and will miss dinner
个人邮件 User Prompt
Write an email to comcast customer service explaining that they accidentally double billed you last month.
客户支持请求 User Prompt
教会 LLM 以你相同的方式解决问题并看着它成功,这有一种神奇的感觉。令人惊讶的是,这实际上比教一个人更容易,因为与人不同,LLM 会立即给你诚实的反馈,告诉你你的解释是否足够好。如果你得到一个你满意的电子邮件草稿,你的解释就足够了。如果你没有,那就还不够。
通过公开 System Prompt 并使其可编辑,我们创造了一种产品体验,既能产生更好的结果,而且实际上也很有趣。
截至 2025 年 4 月,大多数 AI 应用仍然没有(有意地)公开他们的 system prompt。为什么不呢?
无马马车
每当一项新技术被发明出来时,最初用它构建的工具都不可避免地会失败,因为它们模仿了旧的做事方式。“无马马车”指的是早期的汽车设计,它大量借鉴了之前的马车。这是我在 Wikipedia 上找到的 1803 年蒸汽马车设计的一个例子:
Trevithick 1803 年的伦敦蒸汽马车
这种设计的缺陷在当时对每个人都是隐形的,但在事后看来却可笑地明显。
想象一下,生活在 1806 年,第一次乘坐这些东西中的一辆。即使木制框架能够让你到达目的地,木制座椅和缺乏悬架也会让旅程难以忍受。
你可能会想“我绝对不会选择引擎而不是马”。你是对的,至少在汽车被发明出来之前是这样。
我怀疑我们正在经历一个与 AI 应用程序类似的时期。它们中的许多都令人恼火地无用,就像 Gmail 的 Gemini 集成一样。
赋予我们最初的无马马车的“旧世界思维”是用引擎代替马,而不重新设计车辆以处理更高的速度。是什么样的旧世界思维在限制这些 AI 应用程序?
旧世界思维
直到最近,如果你想让计算机做某事,你有两种方法可以实现:
- 编写程序
- 使用他人编写的程序
编程很难,所以我们大多数时候都选择选项 2。这就是为什么我宁愿花几美元购买现成的应用程序,也不愿自己构建它,以及为什么大公司宁愿花数百万美元购买 Salesforce,也不愿构建自己的 CRM。
现代软件行业建立在一个假设之上,即我们需要开发者作为我们和计算机之间的中间人。他们将我们的愿望转化为代码,并将其从我们身后抽象成简单的、一刀切的、我们可以理解的界面。
分工很明确:开发者决定软件在一般情况下的行为方式,而用户提供输入来决定它在特定情况下的行为方式。
通过将 prompt 分成 System 和 User 组件,我们创建了与这些旧世界领域干净地映射的类似物。System Prompt 管理 LLM 在一般情况下的行为方式,而 User Prompt 是决定 LLM 在特定情况下行为方式的输入。
有了这个框架,很自然地会假设编写 System Prompt 是开发者的工作,而编写 User Prompt 是用户的工作。我们一直都是这样构建软件的。
但在 Gmail 的例子中,这个 AI 助手应该代表我。这些是我的邮件,我希望它们用我的声音写出来,而不是由 Google 产品经理和律师委员会设计的一刀切的声音。
在旧世界中,我不得不接受一刀切的版本,因为唯一的替代方案是编写我自己的程序,而编写程序很难。
在新世界中,我不再需要中间人告诉计算机该做什么。我只需要能够编写我自己的 System Prompt,而编写 System Prompt 很容易!
将属于用户的还给用户
我在本文中的核心论点是:当 LLM 代理代表我行事时,我应该被允许通过编辑 System Prompt 来教导它如何做到这一点。
这是否意味着我总是想从头开始编写自己的 System Prompt?不。我已经使用 Gmail 二十年了;Gemini 应该能够使用我的电子邮件作为参考示例,为我编写一个草稿 prompt。但我希望能够看到该 prompt 并对其进行编辑,因为我编写电子邮件的方式以及我与人通信的方式会随着时间的推移而改变。
那些不知道如何编写 prompt 的人呢,他们是否需要开发者为他们做这件事?也许一开始需要,但是编写 prompt 非常直观,而且从 ChatGPT 的快速普及来看,我认为人们会弄清楚的。
那么那些不太个性化的代理呢,比如 AI 会计代理或 AI 法律代理?在这种情况下,软件开发者是否更应该聘请专业的会计师或律师来编写一刀切的 System Prompt?
如果我是用户,这可能是有道理的。用于做 X 的 System Prompt 应该由 X 领域的专家编写,而我不是会计或法律方面的专家。但是,我怀疑大多数会计师和律师也会希望编写自己的 System Prompt,因为他们的专业知识是特定于上下文的。
例如,YC 的会计团队以 YC 特有的方式运作。他们使用内部和现成软件的特定组合。他们使用 YC 特有的约定,这些约定只对其他 YC 员工有意义。他们管理的基金结构对 YC 来说是独一无二的。一个一刀切的会计代理对我们的团队来说,就像一个对 YC 一无所知的专家会计师一样有用:一点用处都没有。
这对于我曾经工作过的每家公司的每个会计团队来说都是如此。这就是为什么金融的很大一部分仍然运行在 Excel 上:它是一种可以处理无数特定用例的通用工具。
在大多数 AI 应用程序中,System Prompt 应该由用户编写和维护,而不是由软件开发者,甚至是开发者聘请的领域专家来编写。
大多数 AI 应用程序应该是 代理构建器,而不是代理。
...将属于开发者的还给开发者
如果开发者不编写 prompt,他们会做什么?
首先,他们将创建用于构建在特定领域(如电子邮件收件箱或总账)中运行的代理的 UI。
大多数人可能不想从头开始编写每个 prompt,而且好的代理构建器也不会强迫他们这样做。开发者将提供模板和 prompt 编写代理,以帮助用户引导他们自己的代理。
用户还需要一个界面来审查代理的工作并迭代他们的 prompt,类似于我上面包含的小型虚拟电子邮件代理构建器。这个界面为他们提供了一个快速的反馈循环,用于教导代理可靠地执行任务。
开发者还将构建 代理工具。
工具是代理作用于外部世界的机制。我的电子邮件编写代理需要一个工具来提交草稿供我审查。它可能会使用另一个工具来发送电子邮件而无需我的审查(如果我足够自信允许这样做),或者搜索我的收件箱中来自特定电子邮件地址的先前电子邮件,或者检查 YC 的创始人目录,看看电子邮件是否来自 YC 创始人。
工具为代理提供安全层。代理是否可以做某件事,取决于它是否有权访问哪些工具。使用代码编写的工具来强制执行边界比在用文本编写的 System 和 User Prompt 之间强制执行边界容易得多。
我怀疑在未来,我们会回顾过去,并嘲笑“prompt 注入”(如“忽略之前的指令……”)是值得关注的事情。开发者应该保护 prompt 的一部分免受 prompt 的另一部分的影响,这种想法很愚蠢,并且强烈表明我们使用的抽象已经损坏。正如这篇文章所明确指出的:如果 prompt 的任何部分位于用户空间中,那么整个 prompt 都位于用户空间中。
一个用于阅读我的电子邮件的代理
正如我上面提到的,但是,一个更好的 System Prompt 仍然无法节省我太多从头开始编写电子邮件的时间。
当然,原因是 我希望我的电子邮件尽可能简短,这意味着用我的声音编写的任何电子邮件的长度都大致与描述它的 User Prompt 相同。每次我尝试使用 LLM 编写某些内容时,我都有类似的经历。令人惊讶的是,生成式 AI 模型实际上对于生成文本并不是那么有用。
LLM 擅长的事情是阅读文本并转换它,这就是我想使用代理的原因。让我们重新审视我们的电子邮件阅读代理演示:
Email Reading Agent System Prompt
You are an email labeling assistant. Analyze the following email and take the appropriate actions. If the email is... ...from my wife Sumana: draft a reply & label: Personal, red, priority 0 ...from my boss Garry: draft a reply & label: YC, orange, 1 ...from anyone else with an @yc.com addr: draft a reply & label: YC, orange, 2 ...from a founder (NOT @yc.com): draft a reply & label: Founders, blue, 2 ...tech-related, e.g. a forum digest: label: Tech, gray, 3 ...trying to sell me something: archive Context for draft replies: You're Pete, a 43 year old husband to Sumana, father, programmer, and YC Partner. You're very busy and so is everyone you correspond with, so you do your best to keep your emails as short as possible and to the point. You avoid all unnecessary words and you often omit punctuation or leave misspellings unaddressed because it's not a big deal and you'd rather save the time. You prefer one-line emails. Do your best to be kind, and don't be so informal that it comes across as rude. Emojis and soft language are OK in personal emails, but not for anything else.
Available Tools
`labelEmail(label, color, priority)`
`archiveEmail()`
`draftReply(body)`
You have access to the following tools: labelEmail: Use this tool to label an email with a specific category, color, and priority level. Arguments: { "label": string, "color": string, "priority": number } archiveEmail: Use this tool to archive an email that doesn't need to be labeled. Arguments: None draftReply: Use this tool to draft a reply to the email. Arguments: { "body": string } You MUST respond using only these tools. Do not respond with plain text or explanations. You can use any combination of these tools in your response. Example usage for a single tool: <tool>labelEmail({"label": "Personal", "color": "red", "priority": 0})</tool> OR <tool>archiveEmail()</tool> OR <tool>draftReply({"body": "Thanks for letting me know. I'll be there on Wednesday."})</tool> Example usage for multiple tools: <tool>labelEmail({"label": "YC", "color": "orange", "priority": 1})</tool> <tool>draftReply({"body": "Hi Garry, Wednesday works for me. Looking forward to our walk."})</tool>
Process Emails
Email Inbox (12)
Sarah from SaaS Solutions
Exclusive Offer for New Customers
▶
Gustaf Alströmer
founder intro?
▶
The Verge Updates
Latest Product Launches and Industry New...
▶
Sumana
dinner tonight
▶
HackerNews Digest
Top Stories: New Programming Languages o...
▶
Alex Chen
advice on fundraising
▶
Garry Tan
reschedule
▶
Mark at Enterprise Tools
Transform Your Workflow with Our Platfor...
▶
TechCrunch Weekly
This Week in Tech: AI Developments and M...
▶
DevOps Pro Team
Security Solutions for Growing Companies
▶
DataAnalytics Plus
Special Pricing on Data Analytics Tools
▶
Maya Rodriguez
Technical co-founder?
▶
一个使用 OpenAI
的 gpt-4o-mini
构建的、真正有用的邮件助手演示。
不难想象像这样的电子邮件阅读代理可以节省我多少时间。它似乎已经在检测垃圾邮件方面做得比 Gmail 的内置垃圾邮件过滤器更好。它比我今天使用的复杂的过滤器集更强大,更容易维护。它可以为我认为紧急的每条消息触发通知,当我打开它们时,我将准备好用我的声音编写的回复草稿。它可以自动存档我不需要阅读的电子邮件,并总结我确实需要阅读的电子邮件。
见鬼,如果可以访问一些额外的工具,它也可以取消订阅列表、安排约会和支付我的账单,而我无需动一根手指。
这就是我真正希望从 AI 原生电子邮件客户端中获得的东西:自动化繁琐工作的能力,以便我可以花更少的时间处理电子邮件。
AI 原生软件
对于我们许多人来说,这就是 AI 的“杀手级应用”的样子:教计算机如何做我们不喜欢做的事情,以便我们可以将时间花在我们喜欢做的事情上。
我想在本文中包含工作演示的原因之一是,想表明大型语言模型已经足够好,可以代表我们完成此类工作。事实上,在大多数情况下,它们绰绰有余。阻止我们实现我在上一节中描述的未来的不是缺乏 AI 智能,而是应用程序设计。
Gmail 团队构建了一辆无马马车,因为他们着手将 AI 添加到他们已经拥有的电子邮件客户端中,而不是询问如果从头开始使用 AI 设计电子邮件客户端会是什么样子。他们的应用程序是将少量 AI 塞入一个为平凡的人工劳动而设计的界面中,而不是为自动化平凡劳动而设计的界面。
AI 原生软件应该最大限度地提高用户在特定领域的影响力。AI 原生电子邮件客户端应该最大限度地减少我必须花在电子邮件上的时间。AI 原生会计软件应该最大限度地减少会计师花在记账上的时间。
这就是 AI 的未来让我如此兴奋的原因。这是一个我不必花时间做繁琐工作,因为代理会为我做这些工作的世界。在这里,我只关注我认为重要的事情,因为代理会处理其他一切事情。在这里,我会在我喜欢做的工作中效率更高,因为代理会帮助我完成它。
我迫不及待了。
感谢所有阅读本文草稿的人,包括我的父亲、dang、wcl & cpl,以及我在 YC 的同事。
脚注:
1:我省略了一些细节,当然今天的模型也可以输入和输出声音和视频。就我们的目的而言,我们可以忽略这一点。 2:已经有一些电子邮件客户端正在研究这一点,特别是 Superhuman 和 Zero © 2025 Pete Koomen Built from scratch