How I Prompt

原始链接: https://thorstenball.com/talks/how-i-prompt/

在 Laracon US 2026 的演讲中,编程助手“Amp”的联合开发者 Thorsten Ball 分享了他进行高效 AI 提示(prompting)的方法论。尽管 Amp 本身是一个主要由 AI 编写的复杂分布式系统,但 Ball 认为其中并无所谓的“秘诀”,关键在于提供上下文的基本原则。 他的核心原则是:**始终考虑信息的来源。** AI 无法读心,它只能从训练数据、代码库或提示词提供的上下文窗口中获取信息。要进行有效的提示,你必须充当桥梁,确保模型能够访问相关的代码文件、文档和逻辑约束。 Ball 的实用技巧包括: * **“组合拳”策略:** 在下达主要指令前,先要求 AI 查找必要的信息(如文件、文档、日志)。 * **利用截图:** 视觉线索可以作为复杂任务或错误的高效摘要。 * **使用 `agents.md` 文件:** 在代码库中记录处理特定任务(如运行测试或 Storybook)的方法,让 AI 可以直接从项目结构中“阅读”说明。 归根结底,有效的提示在于目标明确:通过提供 AI 所缺失的信息,使其能够成功执行你的目标。

这篇 Hacker News 的讨论探讨了高效提示词(Prompting)的细微差别。虽然原作者认为与人工智能的成功互动类似于向人类委派任务,即需要明确的信息和背景,但社区补充了几个关键的注意事项: * **提示并非万能:** 用户指出其有效性因领域而异。例如,虽然视觉提示(截图)对某些人有帮助,但在处理复杂的几何或技术任务时却很吃力,通常需要 AI 编写代码来“观察”错误。 * **示例的力量:** 许多贡献者认为,“具体示例”远比通用指令有效。具体的反例能强迫模型遵守规则,而抽象的原则往往被解读得过于宽松。 * **工作流程的演进:** 随着模型(如 GPT-6 Astra)的进步,对复杂、手动多智能体编排的需求正在减少。模型在自我指导方面变得越来越强,使得开发者可以从“手把手”的指导转向高层级指令。 * **效率与成本:** 批评人士指出,“懒惰”的提示可能会导致在复杂代码库中产生极高的 Token 消耗和不可预测的结果。成功往往在很大程度上依赖于用户对其项目架构的深度熟悉,这使得“简单”的提示在复杂性上可能具有欺骗性。
相关文章

原文

Thorsten Ball · Laracon US · 29 Jul 2026 · Video · transcript from auto-generated captions, aligned to slides via frame matching; timestamps link into the video

Intro — Aaron Francis

Up next, we've got Thorsten. Okay, and if you don't know who Thorsten Ball is, you should ask your favorite developer who their favorite developer is, and odds are it's Thorsten. Okay? Thorsten is, one of the clearest thinkers in, in this space and has been for a very long time. Okay? He's written a couple of books, writing an interpreter in Go, writing a compiler in Go. So, I have seen people here with their books getting Thorsten to sign them. Now these days he spends his time thinking about, writing about, and writing software for, his new company that he co-founded, Amp. So, he's going to talk to us about Amp today. Previously, he's at Sourcegraph. Previously, he's at Zed. So, he's been in developer tooling for an incredibly long time. So, this is someone with a deep well of expertise that's going to help us think more about the frontier. So, all the way from Germany, please welcome Thorsten

Slide 2 (title)

here we are. It's nice to be here. This is my first Laracon, and I know this is talk, and you shouldn't use too many efforts up here, but I just want to say it's fantastic to be here. just phenomenal, you know? so today I want to talk to you about how I prompt, how I prompt coding agents specifically. The problem with a lot of people who talk about AI is, of course, when you ask them, "What have you shipped?" the answer is, "Well, goes to a different school, you wouldn't know it, blah blah blah, it's hard, I can't talk about it." So, to establish my credentials a little bit, I'm one of the co-creators of Amp, which is a coding agent that came out last year, couple of weeks after Claude Code. We were one of the first, and a lot of people call it polished or high taste. Aaron actually told his wife that it is a delight, which, pretty good thing to hear. And

联系我们 contact @ memedata.com