YouTube2Text

FIXING Opus 5: PROOF that Prompt Engineering IS NOT DEAD — Transcript

by IndyDevDan · 6,821 words · 993 segments · language en · Watch on YouTube

Full transcript

  1. 0:00What's up engineers? Any DevDan here.
  2. 0:01Like me, you've probably gotten sick and
  3. 0:04tired of Opus 5's insanely verbose
  4. 0:07responses and its overuse of phrases
  5. 0:09like load-bearing, worth stating
  6. 0:11plainly, here's the honest truth, and a
  7. 0:13bunch of others. Or maybe you're tired
  8. 0:15of the Anthropic team trying to take
  9. 0:17credit in your Git commit messages for
  10. 0:19intelligence you paid for. Or maybe you
  11. 0:21notice Opus 5 is burning your cash with
  12. 0:25way more alpha tokens than any model
  13. 0:27before it. You're not alone. Myself and
  14. 0:29many engineers feel the exact same way.
  15. 0:31Opus 5 is one of the best
  16. 0:33state-of-the-art ultra-smart models and
  17. 0:36one of the worst state-of-the-art models
  18. 0:38ever released because it talks like a
  19. 0:40complete smartass. In this video, we
  20. 0:42turn smartass Opus 5 into a precise
  21. 0:45senior engineer that's enjoyable to work
  22. 0:48with. How are we going to do that? We're
  23. 0:49going to use one of the most important
  24. 0:51skills any engineer using agents can
  25. 0:54learn. You know what it is. It's prompt
  26. 0:57engineering. The skill that was once a
  27. 0:59complete joke is now the most important
  28. 1:01skill for [music] any engineer to master
  29. 1:04to scale their impact with agents. If
  30. 1:07you hear someone say prompt engineering
  31. 1:09is dead, completely ignore them. They
  32. 1:12have no idea what they're talking about.
  33. 1:14I've been engineering for 15 years now
  34. 1:16and one thing that all the best
  35. 1:18engineers I've worked with know how to
  36. 1:20do extraordinarily well is this. Above
  37. 1:23all, they know how to communicate
  38. 1:24[music]
  39. 1:25with their technology. And guess how you
  40. 1:27communicate with agents. Yes, prompts.
  41. 1:30There are two ways [music] to prompt
  42. 1:32engineer your agents. Most engineers
  43. 1:34only use one when the second is most
  44. 1:36powerful by far. By the end of this
  45. 1:38[music] video, you'll have the prompt
  46. 1:39engineering expertise to make your AI
  47. 1:41agent communicate like a precise cracked
  48. 1:44senior engineer, no matter the model
  49. 1:46that's running. Today it's Opus 5,
  50. 1:47tomorrow [music] it'll be something
  51. 1:48else. Let's fix Opus 5 with system
  52. 1:51prompt engineering.
  53. 1:58What are the two ways to prompt your
  54. 2:00agents? There's of course the user
  55. 2:01prompt, which you're very familiar with,
  56. 2:03the single task at hand. But then
  57. 2:05there's the system prompt, which is the
  58. 2:07law for every task you hand your agent.
  59. 2:10Most engineers fixate on skills, skills,
  60. 2:13skills, skills, slash this, slash that,
  61. 2:15slash plan, slash grill, slash review.
  62. 2:18Don't get me wrong, skills are powerful,
  63. 2:20the user prompt is powerful, but the
  64. 2:21system prompt is vastly more useful and
  65. 2:24most engineers never even touch it.
  66. 2:26Because the system prompt is where every
  67. 2:28single word you write is multiplied over
  68. 2:31every single user prompt. The system
  69. 2:33prompt is essential for setting up great
  70. 2:35communication patterns with your agents
  71. 2:38and for reducing those expensive Opus 5
  72. 2:41output token costs dramatically. The
  73. 2:43system prompt is where the real leverage
  74. 2:45is. Let me show you exactly what I mean.
  75. 2:52In VS Code here, we have the simple
  76. 2:54three file structure. I've cloned down
  77. 2:58Zuck's The Future Is For Everyone. We're
  78. 3:00going to do what all of us degenerates
  79. 3:02do nowadays. We just summarize a long
  80. 3:04article like this. We're not going to
  81. 3:05read this whole thing. We don't have the
  82. 3:06time. We're too busy with 10 million
  83. 3:08agents open in our terminal window. To
  84. 3:10do that, we're going to use a standard
  85. 3:12powerful Claude Opus 5 agent. As we work
  86. 3:15through this, we're going to constantly
  87. 3:17improve the system prompt we're passing
  88. 3:19in to Claude code. I have this simple
  89. 3:22command here called compare. So let's go
  90. 3:23ahead and fire it off. Inside of our
  91. 3:25terminal, we're running Herder. This is
  92. 3:26my terminal multiplexer of choice.
  93. 3:28You'll see exactly why in a second. If I
  94. 3:30type J, you can see all the commands in
  95. 3:32this directory. And what I'll do is just
  96. 3:34type J compare and we'll start with
  97. 3:36zero. I now have a brand new workspace
  98. 3:39open. Let's go and hop into it and see
  99. 3:41what's going on. You can see here I'm
  100. 3:42running two Claude code instances side
  101. 3:44by side. On the left, we have smart ass
  102. 3:47Opus 5 and on the right, we have senior
  103. 3:49Opus 5. Right now, these are both in
  104. 3:51smart ass mode. This is just the default
  105. 3:53system prompt and the default Claude
  106. 3:55Opus 5 model with no tweaks, no changes,
  107. 3:58no prompt engineering to adjust and
  108. 4:00improve the system. As you can see, all
  109. 4:02of the ticks and problems and verbosity
  110. 4:05of this model are coming alive right
  111. 4:08now. Zuck's blog is very, very long, but
  112. 4:10you can see here these models spin for a
  113. 4:12long time. The one on the left is
  114. 4:14really, really going off here with a lot
  115. 4:16of information. Okay, so 53 seconds, 35
  116. 4:19seconds. Most of that was just output
  117. 4:20text. Look at how many output tokens my
  118. 4:23agent just torched responding to me.
  119. 4:25Most of us truly were not reading this
  120. 4:27whole thing, just like we're not reading
  121. 4:29Zuck's blog. We need concise, compressed
  122. 4:31information so we can move on or decide
  123. 4:34to invest more. A lot of engineering
  124. 4:36with agents is about figuring out where
  125. 4:38to spend your time. So, let's improve
  126. 4:40the system by prompt engineering the
  127. 4:42system prompt.
  128. 4:49So, in VS Code, I have senior Opus 5
  129. 4:51system prompt and this is getting passed
  130. 4:53directly into that herder pane. You can
  131. 4:55see here we have one version that's just
  132. 4:58Claude Code Opus out of the box and then
  133. 4:59we have the other where we're pending
  134. 5:01the system prompt file using this
  135. 5:04argument flag. So, that's what we're
  136. 5:05going to do here. And so, if we open up
  137. 5:06this file, right now we have nothing in
  138. 5:08there. So, we just got the default
  139. 5:09response out of it. Let's improve it.
  140. 5:12Let's write a great system prompt to
  141. 5:14steer the behavior of every single run,
  142. 5:17every single input and every single
  143. 5:19output from our model. What we're
  144. 5:20building here is a clear, concise
  145. 5:22communication document. I am typing this
  146. 5:24by hand. When I'm working with pieces of
  147. 5:27autonomous software that's going to be
  148. 5:28multiplied over many, many, many runs, I
  149. 5:31do it by hand. If you don't understand
  150. 5:33your technology, if you're just vibe
  151. 5:34slopping everything, you're not going to
  152. 5:36get the results who someone paying
  153. 5:38attention is going to get. We're going
  154. 5:39to start really simple here. We're
  155. 5:40appending this to the system prompt,
  156. 5:42clear, concise, actionable
  157. 5:43communication, and then we're going to
  158. 5:44talk through the purpose. First things
  159. 5:46first, you and I maintain a no-BS,
  160. 5:49clear, concise, actionable relationship.
  161. 5:51Notice how I'm talking to my agent. I'm
  162. 5:54not giving it a role. I'm just talking
  163. 5:56to my agent as almost if I'm talking to
  164. 5:58like another engineer, okay? And and
  165. 5:59kind of setting the standards. We
  166. 6:01maintain a no-BS, clear, concise,
  167. 6:03actionable relationship. Every word we
  168. 6:05say together reinforces our clear,
  169. 6:08concise, actionable communication. I'll
  170. 6:10jump through some of this. We're here to
  171. 6:12solve problems and create value and our
  172. 6:15communication reflects that. And then
  173. 6:17I'm going to start the next section,
  174. 6:18instructions, and this is going to be
  175. 6:20where we dial into several ideas. We'll
  176. 6:23have four sections and then one kind of
  177. 6:25recap section. Um this will be the
  178. 6:26examples and then we'll work through
  179. 6:28these sections one by one, but I'm
  180. 6:30writing this out to be able to reference
  181. 6:33these sections so that I can clearly
  182. 6:34communicate inside the system prompt
  183. 6:36what I want my agent to focus on, okay?
  184. 6:38So, pay close attention to the details
  185. 6:40throughout instructions to maintain our
  186. 6:43great communication patterns. And then
  187. 6:45I'm going to do something here that I
  188. 6:47think is really important when you're
  189. 6:48prompt engineering. I'm going to do
  190. 6:50explain why. Why? So we can deliver the
  191. 6:52best possible results for our team,
  192. 6:56business, and customers. Just walking
  193. 6:58through things here really, really
  194. 7:00cleanly, really concisely with my agent.
  195. 7:03Let's pause for a second here. Let me
  196. 7:05just actually delete this and just kick
  197. 7:07this off again. Let me save that text
  198. 7:08there. Let's go back into our terminal
  199. 7:10here. Let's close this down. Let's fire
  200. 7:13off our J compare uh with purpose. So,
  201. 7:16it's going to just rerun that exact same
  202. 7:17thing. Already we have one kind of clear
  203. 7:19change in our system. And you can see
  204. 7:22here at the top we do have that
  205. 7:23reference append system prompt. We're
  206. 7:25attaching that, but already we have made
  207. 7:27a small change in our purpose. This is a
  208. 7:29good start. As you can see here, it's
  209. 7:31not going to change a lot of the ticks
  210. 7:33and the problems inside the model. As
  211. 7:36you can see, there's load-bearing right
  212. 7:37there. That's one of the classic ones
  213. 7:39with Opus 5. It's using a lot of dashes,
  214. 7:42but it is communicating a little bit
  215. 7:43better. You can see that one came in at
  216. 7:4435 seconds. Not a huge difference at all
  217. 7:47from previous runs. But you can see
  218. 7:48here, if we look through these, we would
  219. 7:50probably see some glimpses of clear
  220. 7:53communication, but we need more than
  221. 7:54this. This is all very high-level. Let's
  222. 7:56get more mid-level, more low-level with
  223. 7:58our system prompt. So, I'm going to copy
  224. 8:00this in. And now we have instructions.
  225. 8:01Okay, so purpose, instructions. Let's
  226. 8:03start giving some real [music] clear
  227. 8:05communication patterns.
  228. 8:11Now we get into like concrete prompt
  229. 8:13engineering patterns that are repeatable
  230. 8:15across all of your work. For instance,
  231. 8:17here's one clear pattern, positive
  232. 8:18patterns and negative patterns. And so,
  233. 8:21what does this section do? Replicate the
  234. 8:23and I'm going to just write out a H4
  235. 8:25here, positive patterns. And of course,
  236. 8:27we'll have that and then we'll have
  237. 8:29negative patterns. And so, we're just
  238. 8:31going to walk through this and, you
  239. 8:33know, as you can imagine, I'm going to
  240. 8:34clearly reference this section as
  241. 8:36behavioral references. So, I'm saying
  242. 8:38replicate the positive patterns and then
  243. 8:40I'm going to of course say avoid the
  244. 8:42negative patterns. So, we want to
  245. 8:44replicate these and we want to ignore
  246. 8:46and not do these. Okay, so we're doing
  247. 8:48both positive, do this, and negative,
  248. 8:50don't do this. And now we can just start
  249. 8:53writing out these bullets. What do you
  250. 8:54want your agent to do? What do you want
  251. 8:55them to not do? I'm just going to start
  252. 8:56from the top and this is one of the
  253. 8:57important things that is missed a lot.
  254. 8:59So, I'll say, I always see the last
  255. 9:02thing you write first. Place the most
  256. 9:04important information there. As you're
  257. 9:07working with these agents, you've likely
  258. 9:08noticed this too. You see the last
  259. 9:10thing. So, it's important that the last
  260. 9:11thing you see is the most important so
  261. 9:13you can, if you want to, skip all the
  262. 9:15other stuff. What else do we want the
  263. 9:16agent to keep doing? Positive patterns.
  264. 9:18Use plain, specific language. State each
  265. 9:22fact once. There's no need to repeat
  266. 9:25anything. Match the level of detail to
  267. 9:27the level of task and request. Okay, so
  268. 9:30this keeps the agent aligned with the
  269. 9:32amount of detail and effort you're
  270. 9:34putting in. Challenge incorrect
  271. 9:35assumptions directly and explain why. We
  272. 9:38do not want any sycophancy here in our
  273. 9:41responses. We want a useful engineering
  274. 9:43partner optimized for clarity and
  275. 9:46engineering value, not quotability. I
  276. 9:48don't want to have a good conversation.
  277. 9:50I want to deliver engineering value with
  278. 9:52clear concise communication patterns,
  279. 9:54okay? One more note here on domain
  280. 9:56terminology. Use the simplest domain
  281. 9:59terminology that compresses information.
  282. 10:02So, just some positive patterns. Here
  283. 10:04you want to write what you want to see.
  284. 10:06And then of course, the negative
  285. 10:07patterns, you know exactly what we want
  286. 10:09to add to this. Avoid words and phrases
  287. 10:13in this list, okay? And then here we can
  288. 10:15just go crazy with all the obnoxious
  289. 10:18things that this model writes. We can do
  290. 10:20things like load-bearing, that's going
  291. 10:22to be at the top here. We can do things
  292. 10:23like worth stating plainly, here's the
  293. 10:26honest truth, the real [snorts] tension.
  294. 10:29>> [laughter]
  295. 10:30>> And then there's carry the argument.
  296. 10:32There are a bunch of these. Put
  297. 10:34whichever ones here you want. A couple
  298. 10:36things I don't like personally, I don't
  299. 10:38like avoid analogies, discuss what's
  300. 10:41right in front of us. Not a huge fan of
  301. 10:43analogies when working. I just want to,
  302. 10:45you know, focus on the thing right in
  303. 10:47our face. Of course, do not overuse em
  304. 10:50dashes or dash chaining. I think some of
  305. 10:53these are fine. My writing style
  306. 10:55personally has a decent amount of em
  307. 10:56dashes. I have had to personally dial
  308. 10:58these back because I don't want people
  309. 11:00to think I'm just spamming out using
  310. 11:02models when I'm replying. I think it's
  311. 11:03really rude if it looks like you're just
  312. 11:05responding with AI with zero thought in
  313. 11:08specific circumstances. Do not flatter,
  314. 11:10praise, validate, or agree without
  315. 11:14reason. Again, no sycophancy. Just kind
  316. 11:16of re-emphasizing that idea. Do not use
  317. 11:19decorative headings, emoji, or
  318. 11:22motivative language. Again, I just want
  319. 11:25this model to talk like a cracked senior
  320. 11:27engineer. Let's just solve the problem
  321. 11:29at hand. Avoid semicolons, fragments,
  322. 11:33non-standard punctuation. I just want a
  323. 11:36normal conversation. This is one really
  324. 11:38important section in your prompt
  325. 11:39engineering. You can use this when
  326. 11:41you're building plans. For the system
  327. 11:43prompt specifically, this has a lot of
  328. 11:45weight to it. We're explicitly talking
  329. 11:46with our model saying, "Replicate these
  330. 11:48things. Avoid these patterns." So, how
  331. 11:50else can we prompt engineer our system
  332. 11:53prompt for consistent results across
  333. 11:55every single execution? Before we do
  334. 11:57that, let's actually run this. Let's see
  335. 11:59how this is developing. Okay, so I'm
  336. 12:00going to go ahead and just flip this,
  337. 12:02place this here, go ahead and just
  338. 12:03rerun, trash this session, and let's run
  339. 12:05it again. So, now we have pause
  340. 12:07negative. All right? So, let's rerun a
  341. 12:09new pair of cloud code. Again, on the
  342. 12:11left we have our smart ass opus, no
  343. 12:13changes. And on the right we're going to
  344. 12:15have our smart senior concise
  345. 12:18engineering opus. Okay, so let's see how
  346. 12:20it does now. Right away, you can see
  347. 12:21something very very cool. Very few
  348. 12:23dashes here. We do have a couple dashes
  349. 12:24showing up. I don't see load bearing
  350. 12:25anywhere,
  351. 12:26>> [laughter]
  352. 12:27>> which is good. I'll do a quick search on
  353. 12:29that in a second. But, there's a bunch
  354. 12:30of these obnoxious keywords that are not
  355. 12:33getting referenced. 31 second execution,
  356. 12:36so we are speeding things up a bit. And
  357. 12:37by speed I mean it's outputting fewer
  358. 12:40tokens. So, we still have some dashes.
  359. 12:42We didn't say never use them. We said
  360. 12:43use fewer. The language is looking a bit
  361. 12:45clearer. We have clear headers, you
  362. 12:47know, no analogies. We do have a dash
  363. 12:49chain here, private by default. Maybe
  364. 12:50you're okay with that. Maybe you don't
  365. 12:52want to see that. That's up to you. You
  366. 12:53can prompt engineer that however you
  367. 12:54like. You can see here we're making some
  368. 12:56improvement, and we're starting to save
  369. 12:57on the output tokens. Even in your
  370. 12:59subscription, your output tokens still
  371. 13:01churn up the most of your usage. So,
  372. 13:04it's important to keep that in mind. We
  373. 13:05can do this at the system prompt level.
  374. 13:07Why? Because we want to affect every
  375. 13:09single input and output from the agent.
  376. 13:12Your prompts in and its responses out.
  377. 13:14If you have something that you want to
  378. 13:15apply globally, that is the time to
  379. 13:17reach for the system prompt. So, let's
  380. 13:18keep moving. How else can we improve our
  381. 13:20communication patterns with our agents?
  382. 13:27So, number two. This is really powerful
  383. 13:29one that I'm a huge fan of and I think
  384. 13:31you will be too. Check this out. We can
  385. 13:33use reference points. What is this? We
  386. 13:35use and again I'm talking to my agent,
  387. 13:38right? I'm talking directly to them. I'm
  388. 13:39not giving them a weird funky role. I'm
  389. 13:41just talking to them. These models are
  390. 13:43getting smarter and even the lower class
  391. 13:45workhorse models, the A and B tier
  392. 13:47models that aren't your S tier say the
  393. 13:49art models, they respond really really
  394. 13:50well to this additional direction. We
  395. 13:52use reference points to communicate
  396. 13:55quickly with each other. And now what do
  397. 13:57I mean by that? What is a reference
  398. 13:58point? Use numbered lists and markdown
  399. 14:00headings when they improve navigation
  400. 14:02when presenting three or more findings
  401. 14:05and this is stuff like uh decisions,
  402. 14:07options, risks, questions, or actions.
  403. 14:11Assign everyone a short code. Okay, so
  404. 14:14what does that mean? So use D1 for
  405. 14:17decisions and what I'm really looking
  406. 14:18for here is D1, D2, and then DN. You can
  407. 14:22imagine this going on, right? So I'll
  408. 14:23I'll do this and do a dot dot dot and
  409. 14:26I'll skip over this in the video so you
  410. 14:28don't have to wait for me to type all
  411. 14:29this out and then we do dot dot dot for
  412. 14:30continuation. When we don't have
  413. 14:32something here, I want it to invent new
  414. 14:35references for sections we don't have,
  415. 14:38preserve same codes throughout the
  416. 14:41conversation, do not create codes for
  417. 14:43short simple answers. This is really
  418. 14:46cool. So you can see this in action
  419. 14:48right away, right? Let's go ahead and
  420. 14:49fire off our system and see how the
  421. 14:51system prompt materially impacts every
  422. 14:54single prompt. Cuz again, that's the
  423. 14:55scale of what we're dealing with here.
  424. 14:57The system prompt is the law for your
  425. 14:58agents. It affects every single task.
  426. 15:00Let's delete the previous session. Bam
  427. 15:02and let's rerun. This is going to be our
  428. 15:04ref points. So now we have that new
  429. 15:06workspace. We're comparing side by side
  430. 15:09and of course Smart Ass on the left and
  431. 15:10we have our senior opus slowly improving
  432. 15:13with each change we make. So you can see
  433. 15:15here we have the P's, we have the R's
  434. 15:18coming up and so we have risks there and
  435. 15:20now our agent is even referencing one of
  436. 15:23the R's, R6. Okay, so now we can just
  437. 15:25jump to the reference. Our agent isn't
  438. 15:27repeating itself. It's not wasting time
  439. 15:28and tokens and it's repeating the risks
  440. 15:31here. And then if we scroll back up to
  441. 15:33the P's, I assume these are the promises
  442. 15:36that Meta says it's going to actually
  443. 15:38make. What is Meta saying it's going to
  444. 15:39ship? It doesn't really matter what the
  445. 15:40P stands for. The fact is that we can
  446. 15:42reference them now instantly. Okay, so
  447. 15:44for instance, like I can continue the
  448. 15:46prompt here, right? So if I said, "Talk
  449. 15:47more about R6." And of course, my agent
  450. 15:51knows exactly what I'm talking about
  451. 15:52when I say R6 because we've created this
  452. 15:54quick language together. This is risk
  453. 15:57number six in this section, existential
  454. 15:59RSI self-improvement risk that
  455. 16:01Zuckerberg is talking about here and our
  456. 16:03agent is just going to kind of continue
  457. 16:05breaking things down here, right? What
  458. 16:07R6 actually says, the section claims and
  459. 16:09sequence. There it goes and it's going
  460. 16:11to break down that section more. We can
  461. 16:12jump into it and you can see here we
  462. 16:14have another reference here. We have
  463. 16:16F's. These are findings. That's exactly
  464. 16:18what we've encoded here, F's for
  465. 16:20findings. And so our agent is just using
  466. 16:22our reference system. And again, like
  467. 16:24the key I really want to communicate
  468. 16:25here with you for your engineering work
  469. 16:26is like um great communication is great
  470. 16:29engineering and vice versa. Knowing how
  471. 16:31to properly communicate with your
  472. 16:32technology now more than ever is a
  473. 16:35massive advantage you can use. It's so
  474. 16:37underutilized and it's so powerful. You
  475. 16:39can see here we're starting to improve
  476. 16:40things. We're adding layer by layer.
  477. 16:42Let's add some more really important
  478. 16:44layers. [music]
  479. 16:49What is the third improvement to our
  480. 16:51system? Let's go ahead and dial into
  481. 16:53this, hard operational boundaries. Okay.
  482. 16:56One of the very annoying things with
  483. 16:59some of these state-of-the-art models is
  484. 17:01that they will do things that they have
  485. 17:03not been requested. This is part of
  486. 17:05their reinforcement learning. This is
  487. 17:06part of the loops that they're going
  488. 17:08through when these models are being
  489. 17:09trained where they're just taught to
  490. 17:11find the answer at all costs, no matter
  491. 17:14what it takes. Opus 5 is like really
  492. 17:16guilty of this. Comment down below, let
  493. 17:17me know if you've experienced this. Opus
  494. 17:195 will just find and call out and
  495. 17:21reference problems you did not even ask
  496. 17:24for remotely. And it's trying to pull
  497. 17:27everything together. It's trying to do
  498. 17:28as much as possible, but in that it
  499. 17:30actually loses focus pretty quickly. So,
  500. 17:33hard operational boundaries solve that
  501. 17:35problem. Let's write that out. So, in
  502. 17:37addition to clearly communicating, it's
  503. 17:39important that we clearly communicate
  504. 17:41our work operational boundaries. What do
  505. 17:44you mean by that? So, deliver only what
  506. 17:46was requested at the intended scope.
  507. 17:49That single sentence really is this,
  508. 17:52right? But we can add more detail. Do
  509. 17:53not widen work into cleanup,
  510. 17:56refactoring, documentation, or any
  511. 17:58adjacent features. Just stay focused.
  512. 18:01That's what I'm saying here. Stay
  513. 18:02focused. Do not speculate on
  514. 18:05abstractions for future requirements. Do
  515. 18:08not claim completion without evidence.
  516. 18:11Very, very important. These models are
  517. 18:12really good at that. This is not a great
  518. 18:14line to add, but going to add it anyway.
  519. 18:15And then here's another one. So annoying
  520. 18:17when these models do this. Never add a
  521. 18:19co-author to a commit message. Like nice
  522. 18:21marketing trick for Anthropic, but they
  523. 18:23got to stop doing that. For completed
  524. 18:25work, concisely restate, but do not
  525. 18:28overload with response detail. There's a
  526. 18:30better way to say that, but you kind of
  527. 18:32get what I'm saying. Opus 5 specifically
  528. 18:33will respond with everything it's done
  529. 18:35and kind of like do a big recap. Don't
  530. 18:37really want that.
  531. 18:43And let's go ahead and stack another one
  532. 18:44on here. This is a really powerful one
  533. 18:45that I think is very useful, and it
  534. 18:47really starts veering into the fact that
  535. 18:50the system prompt can help you control
  536. 18:51your inputs and your outputs. This one
  537. 18:54is aliases. So, let me break this down.
  538. 18:56Aliases are reminders of great
  539. 18:59communication and patterns we want to
  540. 19:01uphold. When you see these exact
  541. 19:04aliases, expand them and act as if their
  542. 19:07expansions were given to you directly.
  543. 19:10And then we want to clear this up make
  544. 19:12sure we're being very clear. If these
  545. 19:14are referenced in a longer string, they
  546. 19:17are not aliases, do not expand. Okay, so
  547. 19:20these are exactly what you think they
  548. 19:21are. They're short codes, they're bash
  549. 19:23aliases, they're expansions, they're
  550. 19:25commands inside your system prompt. And
  551. 19:27if you want to, these can reference your
  552. 19:29commands, your skills, and other things
  553. 19:31you have, but you can also just write
  554. 19:33them in line like this. SCR equals
  555. 19:35simplify, compress, and repeat your
  556. 19:38response. Let's write a couple more and
  557. 19:39then we'll demo these. Okay, so Eli, you
  558. 19:42already know what this is going to be.
  559. 19:43Explain this like I'm We don't want to
  560. 19:45do five. Explain this like I'm 18.
  561. 19:47Simplify your language, shorten your
  562. 19:49response. What else? Uh one of my
  563. 19:51favorites, folk focus on what matters
  564. 19:54most here. What's the true signal?
  565. 19:57What's the true value? Boil your
  566. 19:59response down into the most important
  567. 20:02thing we need to focus on. And then ref,
  568. 20:05let's just do one more here to reference
  569. 20:07our previous work. Cuz once you start
  570. 20:09building up your system prompt,
  571. 20:10reference other sections. So I'm going
  572. 20:12to say I rewrite your responses with
  573. 20:14reference points, which is exactly what
  574. 20:16we dialed in above. So now let's try our
  575. 20:19improved enhanced system prompt. Same
  576. 20:21deal, open the terminal, kill this
  577. 20:23session with our aliases. So we're going
  578. 20:26to compare, boot these up, and now our
  579. 20:28agent has a little bit more guidance
  580. 20:31into exactly what it's going to do.
  581. 20:33Okay, so you can see there we have C123,
  582. 20:35that's our core thesis. We have our
  583. 20:37risks addressed. This is a much better
  584. 20:39generation really using all of our
  585. 20:41reference points. Very nice. And done in
  586. 20:4330 seconds, done 30 seconds on the left.
  587. 20:45So you know, sometimes the generations
  588. 20:46are just fast. These are not
  589. 20:47deterministic systems, so they're not
  590. 20:49always going to be generated faster. And
  591. 20:51in fact, we can improve that, which
  592. 20:52we'll do in a second here, but remember
  593. 20:54we just added those aliases. So let's
  594. 20:56run SCR, simplify, compress, and repeat.
  595. 20:59This is effectively a micro scale you're
  596. 21:01giving your agent. So there we go, it's
  597. 21:03compressing that, it's simplifying it,
  598. 21:05and it's repeating it. So much more
  599. 21:07simplified. I can act on this
  600. 21:09information a lot faster. Even if our
  601. 21:11agent responds with a lot, which again
  602. 21:13we'll tweak in a second, we can improve
  603. 21:15on that. So, let's run another, right?
  604. 21:16FOC, focus. This is focus on what
  605. 21:19matters the most here. So, our agent
  606. 21:21sees that and is going to do it. Now,
  607. 21:22there should be a lot more concise.
  608. 21:24There we go. The signal, alignment is
  609. 21:26being redefined from the model holds the
  610. 21:28lab's value to the agent holds yours.
  611. 21:31Everything else is downstream of that.
  612. 21:33This is speaking pattern from Opus that
  613. 21:35you might want to get rid of, totally up
  614. 21:37to you. We have why it matters, and then
  615. 21:39pulling some memory stuff here, and then
  616. 21:41we have our final paragraph there,
  617. 21:43right? Couple of things I want to do
  618. 21:44here. And once you like set up this
  619. 21:46foundation inside of your system prompt,
  620. 21:48you can really start to control it and
  621. 21:50fine-tune it. These patterns and these
  622. 21:52sections are really important because we
  623. 21:53can now collapse, and we can jump into
  624. 21:55anyone we need to very, very quickly. By
  625. 21:57hand, we are controlling the experience
  626. 22:00of our agent. Again, I really want to
  627. 22:01stress this point. The more
  628. 22:02multiplicative the thing you're working
  629. 22:04on is going to be for the rest of your
  630. 22:05work, the more you should stop, slow
  631. 22:08down. Don't just throw a prompt at this,
  632. 22:10even if it's a state-of-the-art model.
  633. 22:11As you can see, the state-of-the-art
  634. 22:13models have problems. They might
  635. 22:14accomplish your goal, but they'll add or
  636. 22:16do a bunch of other We're being
  637. 22:17really, really clear here. We're doing
  638. 22:19this by hand. We're slowing down. I know
  639. 22:21a lot of people are using Whisper flow.
  640. 22:22They're just talking into their device.
  641. 22:25There is going to be a level of detail
  642. 22:26that is missed, and you're going to be
  643. 22:28very exposed and very leaning on the
  644. 22:31normal distribution of what the models
  645. 22:33can do, and you're going to be inside
  646. 22:35that zone if you're just vibe prompting
  647. 22:37things. There's a time and place for
  648. 22:38that, but the high-leverage places is
  649. 22:40when you want to slow down and step in
  650. 22:42to the loop. And I mean old-school
  651. 22:45hands-on. So, anyway, let's look at
  652. 22:46this. So, I want to do some positive
  653. 22:49Where do I want to put this? This
  654. 22:50definitely going to be positive, and I
  655. 22:52want to say if you can communicate the
  656. 22:54idea in one paragraph instead of two, do
  657. 22:57so. And or to say without losing
  658. 23:00valuable information, do so. Same idea
  659. 23:02for one sentence versus two sentences.
  660. 23:05So, I'm just saying, be a little bit
  661. 23:06more compact, be a little bit more
  662. 23:07concise. This is important. Do not
  663. 23:10repeat yourself. State every idea once.
  664. 23:13Only repeat if it's relevant to
  665. 23:15subsequent queries. Yeah, something like
  666. 23:17that. Because we really don't want
  667. 23:19repetition. And then, I want to add
  668. 23:21another positive pattern here. Don't use
  669. 23:23overloaded terms that could mean more
  670. 23:27than one thing. Use the simplest word
  671. 23:29that satisfies the idea you're trying to
  672. 23:32communicate. Or I should say simplest
  673. 23:34words. And maybe parent that. You might
  674. 23:37be like, wow, you're getting really
  675. 23:39detailed here. And yeah, that's exactly
  676. 23:41right. I am getting really detailed
  677. 23:42here. And we can see the results of
  678. 23:43that. So, let's put this up again. And
  679. 23:45this is going to be uh fine-tuned. And
  680. 23:47now, let's go ahead and see what this
  681. 23:49execution looks like. And to be clear
  682. 23:51here, we are using a pen system prompt,
  683. 23:53not overwrite system prompt. But let's
  684. 23:55see how uh this execution runs now.
  685. 23:58Fewer dashes, no load-bearing. We have
  686. 24:01our reference points. Policy ask, again,
  687. 24:03with reference points. And our sentences
  688. 24:06are simpler, they're more concise,
  689. 24:08they're not getting overloaded, where
  690. 24:09the argument is the weakest. Still
  691. 24:11outputting a lot here. This is a pretty
  692. 24:13big one. 35 seconds, so not great, but
  693. 24:16it is going to be better than this
  694. 24:17generation on the left. Again, these are
  695. 24:19not a deterministic system, so it's not
  696. 24:21going to be consistent. 43 versus 35,
  697. 24:23not bad. We could probably do better in
  698. 24:25our compression. If this happened though
  699. 24:27in this specific case, we can just throw
  700. 24:28an SCR at this to get a simplify,
  701. 24:31compress, repeat. Or we can do an ELY.
  702. 24:33Or an ELY added, explain this like I'm
  703. 24:3518.
  704. 24:37And there you can see the language is
  705. 24:38really going to get boiled down. And
  706. 24:40sometimes this is just useful, right? It
  707. 24:41doesn't mean you're an idiot if you want
  708. 24:43simpler, concise language. It means
  709. 24:45you're effective. But you can see here,
  710. 24:47even still, the agent is saying a bunch
  711. 24:48of stuff. So, I might run an SCR after
  712. 24:50this, simplify, compress, and repeat.
  713. 24:52So, as we start stacking up the user
  714. 24:54prompts, in between every execution of a
  715. 24:56user prompt, the system prompt is still
  716. 24:58going to be ever present. So, you can
  717. 25:00see Zuk's argument really broken down
  718. 25:01here. AI is safest when everyone has it,
  719. 25:03not when a few model labs control it.
  720. 25:05Other labs say AI is dangerous, lock it
  721. 25:08down. He says, "When just a few people
  722. 25:10have it with enormous power, that's
  723. 25:11never gone well. One safe AI fails
  724. 25:14because people want different things.
  725. 25:15Any single AI has to pick whose values
  726. 25:18win." He's got a lot of really great
  727. 25:19arguments in here. I recommend you read
  728. 25:21and then compress if you need to uh the
  729. 25:23kind of core ideas coming out of Zuk's
  730. 25:25argument here. With these like uh CEO
  731. 25:27led posts, it's always like understand
  732. 25:30the incentives. When you're not leading
  733. 25:31the AI race, of course you would have a
  734. 25:33narrative something like this that you
  735. 25:35would want to share. I agree with him
  736. 25:37frankly on a lot of this stuff, but it
  737. 25:38is very let's say positional of him to
  738. 25:40put out something like this. That's not
  739. 25:42the focus of this video though. I'll
  740. 25:43link that in the description for you if
  741. 25:44you haven't seen that yet. One more
  742. 25:45thing I want to show you that can
  743. 25:46really, really dial in the performance
  744. 25:48of your models. And it's a prompt
  745. 25:51engineering technique as old as time.
  746. 25:53Again, if someone tells you prompt
  747. 25:54engineering is dead, don't listen to
  748. 25:55them. The Pi coding agent has a small
  749. 25:57system prompt. Cloud code just got rid
  750. 25:59of a lot of their system prompt. That is
  751. 26:01not the signal to not use a system
  752. 26:02prompt. That is the wrong signal.
  753. 26:04They're doing that because the models
  754. 26:06can just do a bunch of stuff without
  755. 26:08needing it. If you want the model to do
  756. 26:09specific things, to perform in specific
  757. 26:12ways, to not torch your output tokens,
  758. 26:15to have cool, unique capability like
  759. 26:18aliases or reference points or hard
  760. 26:21operational boundaries or patterns that
  761. 26:22you want to see and words and concepts
  762. 26:24you don't want to see, you must system
  763. 26:26prompt engineer. The system prompt is
  764. 26:28the most effective place to prompt
  765. 26:30engineer because it's applied across
  766. 26:32every one of your prompts going into
  767. 26:34your agent and the responses coming out
  768. 26:37of your agents. Okay? So, one more
  769. 26:38section here for you. Check this out.
  770. 26:44Examples to kind of put it all together.
  771. 26:47Here are concrete examples of how we do
  772. 26:48and do not communicate together.
  773. 26:50Replicate how we do communicate and
  774. 26:51avoid how we do not communicate. A lot
  775. 26:53like our positive and negative prompting
  776. 26:55section, except the main differentiator
  777. 26:57here is we're giving real examples. So,
  778. 27:00it's just like training data. User, is
  779. 27:02legacy JSON still referenced? To do, no,
  780. 27:05the only matches the file itself, there
  781. 27:07are no imports, blah blah blah blah
  782. 27:08blah, or documentation links. Very good.
  783. 27:10Um we could also, you know, make this
  784. 27:11tighter. The only match of the file is
  785. 27:13itself. We can make this the to do. And
  786. 27:15then here's a what not to do. Great
  787. 27:17question, I will research the repository
  788. 27:19and blah blah blah blah blah. Just do
  789. 27:21the work, respond concisely, right? And
  790. 27:22then here's another one, engineer
  791. 27:24recommendation, and it looks like I'm
  792. 27:25missing my user prompt here, so I'm just
  793. 27:27going to add that here. User, should we
  794. 27:29add Redis to this system? Write
  795. 27:31something just like this. To do, do not
  796. 27:34add Redis here. This process has one
  797. 27:36writer, stores from SQL, and has no
  798. 27:38cross-host coordination requirement.
  799. 27:40Redis adds a failure domain without
  800. 27:41solving the correct constraint, the
  801. 27:43current constraint. What not to do,
  802. 27:44you're absolutely right, blah blah blah
  803. 27:46blah blah. Again, just a really simple
  804. 27:47prompt engineering technique that is
  805. 27:49older than time at this point. Um I was
  806. 27:52writing these examples back when GPT 3.5
  807. 27:55was the model, GPT-4, when there was
  808. 27:57really no Anthropic. This is still
  809. 27:59relevant today. And that's how you know
  810. 28:01something is a valuable skill to learn,
  811. 28:03when years ago it was still relevant.
  812. 28:05These concepts, these patterns, these
  813. 28:07principles, great engineering is great
  814. 28:09communicating. These things just kind of
  815. 28:11don't go away. That's how you know you
  816. 28:12have something valuable to hold on to.
  817. 28:14Now, we can continue doing this, and
  818. 28:15kind of one big idea, one Easter egg for
  819. 28:18whoever's still watching, engineers that
  820. 28:20are really trying to absorb this value,
  821. 28:21one thing I want to mention here is that
  822. 28:23you can boot up a model, let's say you
  823. 28:25want to boot up a Claude Fable model,
  824. 28:27and you want to run that same prompt
  825. 28:29that we're running. So, let me just go
  826. 28:30ahead and pull that, explain this, copy,
  827. 28:33paste. And so, Fable 5 I think is a
  828. 28:35great model. I think it responds well.
  829. 28:37It doesn't have as many ticks and
  830. 28:39problems and repeated patterns and
  831. 28:41verbosity as Opus 5 has. So, what I like
  832. 28:44to do is in-context distillation.
  833. 28:47In-context distillation is exactly what
  834. 28:49you think. That's what examples are,
  835. 28:50right? It's in context distillation. Do
  836. 28:53this, don't do that. And you can do this
  837. 28:55by pulling out specific context,
  838. 28:58specific responses from models that you
  839. 29:01like. For instance, like this one-line
  840. 29:03core thesis here. Maybe we like this, we
  841. 29:06just copy this out, and we create
  842. 29:07another one here summarizing a blog. And
  843. 29:10then user is summarize the blog, and
  844. 29:13then XYZ, we just template this out. And
  845. 29:15then we have our to-do text. And then we
  846. 29:17can paste the response from the model
  847. 29:19that we like, and we can go even
  848. 29:21further, we can tweak the response from
  849. 29:22the model that we like. Get rid of
  850. 29:24couple of lines, make sure it's
  851. 29:26formatted properly. So we can do a dash
  852. 29:28search to get rid of all of our dashes,
  853. 29:30all of our framing. Maybe we like that
  854. 29:32one, we keep that one in. Super
  855. 29:33intelligence, super intelligence, super
  856. 29:34intelligence. This should be more
  857. 29:35concise and compact like this. So maybe
  858. 29:37we like this version, then we say not to
  859. 29:39do text, text. We hop back over to the
  860. 29:42previous version, right? We go to our
  861. 29:43smartass Opus, and we copy all this.
  862. 29:47This is not what we want to see. So it's
  863. 29:48just a bunch of extra information, and
  864. 29:49we want to see a concise, simple
  865. 29:51response. Really just get to it, and
  866. 29:53really I would want to see something
  867. 29:54like this. A little bit more broken up,
  868. 29:56easier to read. Even Fable has some
  869. 29:58long, kind of run-on sentences here.
  870. 30:00Might break this up a little bit more
  871. 30:01into a couple section. And then we would
  872. 30:03fire this off. We have a new version
  873. 30:04here, let's go ahead and run this. Super
  874. 30:06cracked senior Opus. And then we can run
  875. 30:08our comparison here. So now our agent
  876. 30:11has examples of how we like to
  877. 30:13communicate, it has reference points. We
  878. 30:16have cleaned up the language, we taught
  879. 30:18it to respond concisely, with fewer em
  880. 30:21dashes. It's not load-bearing anymore.
  881. 30:24We have reference points. This one does
  882. 30:26not have reference points, so thankfully
  883. 30:28we've encoded a way to add those, so we
  884. 30:30can just type ref, and now our short
  885. 30:32aliases are going to expand the
  886. 30:34response. There we go, you can see we
  887. 30:35now have references. You'll notice this
  888. 30:38response from smartass took 41 seconds.
  889. 30:40Our original response over here took
  890. 30:42just 22 seconds. So, we are saving our
  891. 30:45output tokens. And again, if you need to
  892. 30:47spend output tokens, spend them. But, in
  893. 30:49this case, you know, when we're
  894. 30:50summarizing things, when we're just
  895. 30:51getting concise responses, we don't want
  896. 30:53all of that. You know, you can see here,
  897. 30:54we have a nice response. We use our ref
  898. 30:56alias, which we have encoded into the
  899. 30:59system prompt. If we just search for ref
  900. 31:01equals, you can see exactly what this
  901. 31:02expands into. You could point this to a
  902. 31:04scale, you could point this to a
  903. 31:05command, whatever you want to do here,
  904. 31:07you can do. My whole point here is to
  905. 31:09communicate with you that if you really
  906. 31:10want to control your agent and get the
  907. 31:12best results, you must know how to use
  908. 31:14your tool. A lot of engineers are
  909. 31:16over-leveraged on the user prompt, and
  910. 31:18you get literally less leverage, you get
  911. 31:20less output by fixating on the user
  912. 31:23prompt. Opus 5 and all models coming
  913. 31:25out, they are going to be smartasses.
  914. 31:28Quite literally smart. What we want to
  915. 31:29do is keep the smart, but drop the ass.
  916. 31:31>> [laughter]
  917. 31:32>> With system prompts, you can do that
  918. 31:33across every user prompt you write. You
  919. 31:35can use these exact prompt engineering
  920. 31:37patterns to guide Opus 5 and whichever
  921. 31:40state-of-the-art models come next. If
  922. 31:41you don't like this response, we can
  923. 31:42shoot up another alias at it. Eli,
  924. 31:44explain it like I'm 18, or whatever age
  925. 31:47you want to set your response reasoning
  926. 31:50level to. You can add an Eli 5, you can
  927. 31:52add an Eli 10, whatever you want to do.
  928. 31:53Great engineering is about great
  929. 31:55communicating, right? Great
  930. 31:56communication with your team of
  931. 31:58engineers, with your agents, and most
  932. 32:00importantly, with yourself. And this is
  933. 32:02how you can tap into that. You've
  934. 32:04noticed this if you're using agents on a
  935. 32:06daily basis. For many tasks, you and I,
  936. 32:08the developer, are the bottleneck. It's
  937. 32:10not the model, it's not the tools, it's
  938. 32:11not anything else. The hard part now is
  939. 32:13communicating quickly, concisely, and in
  940. 32:17the most value-accretive way. I'll leave
  941. 32:20this cracked senior engineer prompt
  942. 32:22linked in the description for you. It's
  943. 32:24super, super simple. You can do the
  944. 32:25comparison side by side and see yourself
  945. 32:28improving every time you add something
  946. 32:30by running the just compare command.
  947. 32:33I'll also add my classic read me and
  948. 32:35just install and all the quick start, so
  949. 32:37that you don't have to waste your time
  950. 32:38doing any setup and configuration. I
  951. 32:40want this to be as simple and quick and
  952. 32:41easy for you to use. On the channel,
  953. 32:43we've been focused on much higher levels
  954. 32:45of abstraction on top of agents like
  955. 32:48software factories, agent sandboxes. Uh
  956. 32:50check out last week's video if you want
  957. 32:51to dive into some really advanced
  958. 32:53agentic engineering concepts. I'll link
  959. 32:54that in the description as well. But,
  960. 32:56every once in a while, it's going to be
  961. 32:57really important for us to step back
  962. 32:59into the fundamentals. You don't want to
  963. 33:00miss the atomic units, the primitives
  964. 33:03that make up the larger powerful
  965. 33:05composition pieces because if you stack
  966. 33:08a bunch of agents together and you burn
  967. 33:09a bunch of tokens doing in half the time
  968. 33:11by just putting together the right
  969. 33:13system prompt, you want to be doing that
  970. 33:15instead. Don't waste time using really,
  971. 33:17really clever solutions when there's a
  972. 33:18much simpler solution. Engineering's
  973. 33:20about getting the job done, not looking
  974. 33:22cool, not doing whatever everyone else
  975. 33:24is doing, [music] not listening to the
  976. 33:25idiots that say prompt engineering is
  977. 33:27dead. That returns false. Your agent is
  978. 33:29just another tool. If you understand
  979. 33:31your tools, you'll [music] understand
  980. 33:32the results you can get from your tools.
  981. 33:34Use your system prompt as the law for
  982. 33:36every task [music]
  983. 33:38you send to your agents and use your
  984. 33:39user prompt for individual tasks. If you
  985. 33:42got value out of this video and you made
  986. 33:44it to the end, like, subscribe, drop a
  987. 33:46comment and let me know [music] how
  988. 33:48you're leveraging your system prompt to
  989. 33:50get outsized results and to clean up
  990. 33:52some of the insane verbosity from models
  991. 33:54like Opus 5. You know where to find me
  992. 33:57every single Monday. Stay focused and
  993. 33:59keep building.

About this transcript

This page contains the full transcript of FIXING Opus 5: PROOF that Prompt Engineering IS NOT DEAD by IndyDevDan, generated from the public captions YouTube serves with the video. The transcript has 6,821 words across 993 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.