YouTube2Text

Engenharia de Prompt: O Guia Definitivo — Transcript

by Bruno Picinini · 16,174 words · 2,348 segments · language en · Watch on YouTube

Full transcript

  1. 0:00I read, studied, and tested the
  2. 0:02techniques from over 35 scientific
  3. 0:04articles by names and people like
  4. 0:07Google Mind, Meta, Microsoft, Alibaba,
  5. 0:09and also researchers from universities
  6. 0:12in Washington, Singapore, the
  7. 0:14University of California, and many
  8. 0:16others. I also thoroughly examined all
  9. 0:19the documentation of some of the
  10. 0:21largest language models to ensure I
  11. 0:23didn't miss anything when creating a
  12. 0:25good prompt and extracting the best
  13. 0:28results. In addition, I've created over
  14. 0:3020 customized agents that I use here at
  15. 0:33my company to automate tasks and save
  16. 0:35time, and which I also teach to all my
  17. 0:38students, generating thousands of uses
  18. 0:41for some of my agents that I make
  19. 0:43available on platforms, such as PL,
  20. 0:45where I have the third most used bot in
  21. 0:48the Portuguese language. This led me to
  22. 0:51become the first artificial
  23. 0:52intelligence consultant for companies
  24. 0:54in Brazil. And combining that with a
  25. 0:57massive study of all the courses I
  26. 1:00found, the demos, those obscure ones
  27. 1:02you only find after hours on Twitter,
  28. 1:05to finally test them all, the prompts
  29. 1:08and the output in literally millions of
  30. 1:11words, to now bring you everything
  31. 1:13pre-digested and ready to use. And
  32. 1:16that's why here's my promise to you: in
  33. 1:18this masterclass, you will learn how to
  34. 1:21do prompt engineering, that is, how to
  35. 1:23extract the maximum possible from these
  36. 1:26language models—this Ferrari that we
  37. 1:28have in our hands, but that few know
  38. 1:30how to use. All in a simple, direct,
  39. 1:33and practical way for normal people
  40. 1:36like you and me, who just want to make
  41. 1:38the most of these tools to help our
  42. 1:41lives, save work, and produce more.
  43. 1:44This entire class was designed to help
  44. 1:46everyone from beginners, who may have
  45. 1:48never created a prompt in their lives,
  46. 1:51to the most advanced, those who may
  47. 1:53even have some SAS or are developing
  48. 1:55some kind of chatbot. All so that you
  49. 1:58never again have to go looking for
  50. 2:00prompts and lists of 5,000 prompts that
  51. 2:02I see people selling out there. Never
  52. 2:04put it in quotation marks because it's
  53. 2:06a very long period, speaking of
  54. 2:08artificial intelligence, but certainly
  55. 2:10enough for this to be resolved and for
  56. 2:12you to have complete confidence in your
  57. 2:14abilities to achieve and generate the
  58. 2:17results you want. And how are we going
  59. 2:18to do this? We have seven modules here
  60. 2:21that I recommend you do in order, but
  61. 2:23if you want to skip one or revisit
  62. 2:25something, you can use the chapters
  63. 2:27below to skip ahead. So, what are these
  64. 2:29modules? The first one, fundamentals,
  65. 2:32where we'll see the basics and learn
  66. 2:34how to work correctly with long
  67. 2:36documents. The second is a basic prompt
  68. 2:39structure to put you on the right track
  69. 2:41. The third is the recommended process.
  70. 2:44What makes sense to think about in the
  71. 2:46prompt and what makes sense to think
  72. 2:48about outside of it, such as choosing
  73. 2:50the right model for the results you
  74. 2:52want. Then we move on to basic
  75. 2:54techniques that will help you get much
  76. 2:56better answers from your prompts until
  77. 2:59we reach more advanced techniques, such
  78. 3:02as creating interactive menus to make
  79. 3:04much more complex prompts that require
  80. 3:07more reasoning. Next, I'll show you
  81. 3:09some practical examples, both mine and
  82. 3:11others ', to show you how it all works
  83. 3:13in practice. And lastly, the
  84. 3:15recommended tools to help you
  85. 3:17accelerate all of this. And in case you
  86. 3:19don't know me, this is Bruno Pitnini
  87. 3:21speaking. I've already sold over eight
  88. 3:24figures online while visiting more than
  89. 3:2670 countries around the world. And on
  90. 3:28this channel, I want to help other
  91. 3:30entrepreneurs and experts do the same,
  92. 3:32to have a SED-type business, which is a
  93. 3:35simple, lean, fun, and scalable
  94. 3:37business, with the goal of not only
  95. 3:39achieving financial results but also
  96. 3:41more time and quality of life. So let's
  97. 3:48start with what makes the most
  98. 3:50difference and what we'll be using most
  99. 3:52throughout the lessons: the
  100. 3:54fundamentals. Starting with the
  101. 3:56definition. After all, what is prompt
  102. 3:58engineering? The simplest definition
  103. 4:01we'll adopt for the rest is prompt
  104. 4:04engineering. It's the empirical science
  105. 4:07, that is, based on real-world results
  106. 4:10and the answers we get from there, and
  107. 4:14not just theory, of planning, creating,
  108. 4:17and testing prompts to generate better
  109. 4:20answers in large language models. And
  110. 4:25why is it so important? Because it's
  111. 4:27the meta-skill that unlocks all others.
  112. 4:30Learning this, you can then use it to
  113. 4:33do whatever you want, for your own
  114. 4:35prompts, for students, for your company
  115. 4:38, for software, whatever. And it's so
  116. 4:41important that companies like, for
  117. 4:44example, Antropic, which makes Clode,
  118. 4:47used to have a job offer for a prompt
  119. 4:50engineer, and now the most current one
  120. 4:53they have is this one here, which is
  121. 4:55for a prompt engineering researcher,
  122. 4:58just take a look, salary of 315 to
  123. 5:01510,000 per year. If we put that in
  124. 5:04reais, it's roughly R $ 2,700,000 in
  125. 5:08Brazil. Obviously, that's a value in
  126. 5:10the United States, but it serves to
  127. 5:12show the importance of everything
  128. 5:14you're going to learn here. And to
  129. 5:16learn, what we're going to do is use
  130. 5:18what I once saw in a book by a guy
  131. 5:20named Josh Witskin, who co-wrote a book
  132. 5:23with Tim Ferriss, including about how
  133. 5:25to learn. And there he told the story
  134. 5:28of when he learned chess; the way he
  135. 5:30started was a little different from
  136. 5:32others, which was more like this. That
  137. 5:35is, he started with the endgame. Why?
  138. 5:38Because, in this situation of a king
  139. 5:40and a pawn against only one king, he
  140. 5:42focuses on the fundamentals without so
  141. 5:44many complicated things, without so
  142. 5:46many rules, to understand the essence
  143. 5:49of the game, in addition to learning
  144. 5:51this part that few people train,
  145. 5:53because sometimes they dedicate too
  146. 5:55much time to openings and the
  147. 5:57middlegame, and not the endgame. So in
  148. 5:59this lesson itself, we're going to use
  149. 6:01a similar process. We're going to start
  150. 6:03with the very basics, so much so that
  151. 6:06we're already here at the fundamentals
  152. 6:08and we'll build upon this skill so that
  153. 6:11both beginners can benefit, but those
  154. 6:13who want to advance and use it for more
  155. 6:16complicated scenarios or more complex
  156. 6:18cases also have the tools. And that's
  157. 6:20precisely why I like to use this
  158. 6:22example here, which is an egg. This is
  159. 6:24a reference I use when I give talks at
  160. 6:26events. I even like to interact with
  161. 6:28the people I mention to put the right
  162. 6:31mindset when thinking about the prompts
  163. 6:33, which again, are fundamentals. If I
  164. 6:35tell you how to make an egg, you might
  165. 6:37get several answers. At that point, I
  166. 6:39ask the audience to speak; some say fry
  167. 6:41, boil, but are you trying to say buy,
  168. 6:43or the question of the egg or a chicken
  169. 6:45, a philosophical question. I say
  170. 6:47exactly, that's the point. If you don't
  171. 6:49make it clear what you want, there's no
  172. 6:51way to know. This applies to both
  173. 6:53humans, which we'll see next, and
  174. 6:55machines. So, the first golden rule
  175. 6:57we're going to consider is this: what
  176. 6:59instructions would you give someone to
  177. 7:01do? Because if you show those
  178. 7:03instructions, which would be your
  179. 7:05prompt, to a person, they would be able
  180. 7:07to execute them. If they couldn't,
  181. 7:09depending on what it is, perhaps the
  182. 7:11major language models, like chat, EPT,
  183. 7:13Clou, GM, and many others, wouldn't
  184. 7:15work either. So, always remember this,
  185. 7:18it's a rule that, if we consider how I
  186. 7:21would instruct someone next to me,
  187. 7:24there's a good chance that translating
  188. 7:27it into a prompt will work very well.
  189. 7:30And you'll see how this simple rule
  190. 7:32will later have direct applications,
  191. 7:35from the simplest prompts to much more
  192. 7:37advanced techniques that you will learn
  193. 7:40here. But initially, what is most
  194. 7:42important? Start simple and then
  195. 7:45complicate. That's why we're going to
  196. 7:47follow this order. Don't complicate
  197. 7:49more than necessary. Do the basics.
  198. 7:51Simple prompts will work to solve most
  199. 7:54problems. Like two examples. Look here,
  200. 7:57I was in the GPT chat asking precisely
  201. 7:59because I wasn't sure if this was the
  202. 8:01author who gave this chess example,
  203. 8:03which I remembered reading, but I
  204. 8:05wasn't sure. So I didn't need to
  205. 8:07complicate things too much or use a
  206. 8:08technique or anything like that. I
  207. 8:10simply asked with the necessary
  208. 8:12information so that the GPT chat could
  209. 8:14find the answer I needed. And there are
  210. 8:17some things here about why it already
  211. 8:19gives a more detailed answer with other
  212. 8:20lessons that we'll learn later. Another
  213. 8:23one here, another prompt I was unsure
  214. 8:25about, like when the English says "
  215. 8:27don't invent stuff," I had the
  216. 8:28impression it sounded a bit like the
  217. 8:30Portuguese "do," your "con" trying to
  218. 8:32say "não inventa coisa"(don't invent
  219. 8:34things), and the more Americanized,
  220. 8:36natural way they would say it is "don't
  221. 8:38make things up." So, a simple prompt
  222. 8:41that I don't need to complicate further
  223. 8:43. Another important detail that will
  224. 8:45help you create better prompts is, as
  225. 8:47much as possible, to start with more
  226. 8:50expensive models that tend to perform
  227. 8:52better. For example, here at Cloud, if
  228. 8:54you go to their page, they have these
  229. 8:56three current models. The Opos, which
  230. 8:59is the most powerful of them, is about
  231. 9:01five times more expensive, depending on
  232. 9:04what you do. So that will make a
  233. 9:06difference. That's why I prefer to
  234. 9:08start with the best models, even if
  235. 9:10they are more expensive, and then
  236. 9:12reduce them later. I'm talking about
  237. 9:14more complex prompts, okay? The other
  238. 9:16simple ones, as I showed, aren't
  239. 9:18necessary, but when we want to push the
  240. 9:20limits of what can be done and get a
  241. 9:22very precise response, then it will
  242. 9:24make a difference. So start with the
  243. 9:27most expensive ones to eliminate that,
  244. 9:29don't try to optimize with the cheapest
  245. 9:31ones, because those are usually the
  246. 9:33most expensive, and then we go to the
  247. 9:35cheaper ones to refine and scale. Now,
  248. 9:37before we move on to a basic, super
  249. 9:39simple prompt structure, a warning,
  250. 9:42okay? It will get easier and easier,
  251. 9:44because we are now on certain models
  252. 9:46that are being trained, and the next
  253. 9:49ones, maybe when you're watching this
  254. 9:51video, we'll already be on GPT 5, 6, or
  255. 9:547, imagine when it's 10. So, it will
  256. 9:56become less and less necessary to
  257. 9:58complicate things so much and be more
  258. 10:00direct and simple. But some of these
  259. 10:03techniques that you will learn will
  260. 10:05still endure because they help organize
  261. 10:07the text both visually for us and for
  262. 10:10the machine to interpret. The main
  263. 10:12point I want to make clear here is not
  264. 10:15to overdo it, because it's not worth it
  265. 10:17, as it will become increasingly easier
  266. 10:19. As Naval often says, "aá" means that
  267. 10:22computers are learning our language
  268. 10:25instead of us having to learn theirs.
  269. 10:28So, for example, when I started in
  270. 10:29digital marketing back in 2010, I had
  271. 10:31to write HTML by hand, write all the
  272. 10:33code, integrate my website. Today, you
  273. 10:36click, drag, integrate, automate, and
  274. 10:38everything is solved. Because there are
  275. 10:40already no-code and low-code tools that
  276. 10:42solve this. And in terms of prompts,
  277. 10:45it's increasingly about knowing how to
  278. 10:47express yourself and communicate good
  279. 10:50ideas rather than complicated
  280. 10:52programming. Therefore, yes, learn how
  281. 10:54to create good prompts, as I will show
  282. 10:57you here, but beyond that, focus on
  283. 10:59having good processes behind them,
  284. 11:01having good communication—the golden
  285. 11:04rule. If this is a process that would
  286. 11:06be easy for someone to do, eventually,
  287. 11:08if the model can't do it now, it will
  288. 11:10become better. I even just participated
  289. 11:13in a meeting with a company that wanted
  290. 11:15my help precisely to automate their
  291. 11:17processes with agents. And what did I
  292. 11:19recommend to them? Don't just think
  293. 11:21about what the models can do now,
  294. 11:23because if you do that, when it's ready
  295. 11:26, you're already behind. Try to look
  296. 11:28and take a shot. Because the laws of
  297. 11:30scaling and exponentiality, as we're
  298. 11:32going, and I use this formula on my
  299. 11:34wrist to remind myself of this, that's
  300. 11:36what's going to happen. So plan for
  301. 11:39what will be available, maybe in one or
  302. 11:41two years, because then your time to
  303. 11:43build, the technology will already be
  304. 11:46there to deliver exactly what was once
  305. 11:48a dream, which will now be a reality.
  306. 11:51And with that, you gain a competitive
  307. 11:53advantage, because while they're
  308. 11:55looking back, you're doing what Peter
  309. 11:57Drucker said: what was the best way to
  310. 12:00predict the future, which is to invent
  311. 12:02it. Now, moving on a bit, we're going
  312. 12:09to see a basic structure for generating
  313. 12:12a good prompt, which, if in doubt, you
  314. 12:14can use because it will work for most
  315. 12:16cases, because then we'll go into more
  316. 12:19advanced techniques to expand on it. So
  317. 12:21, this technique, which I've coined
  318. 12:23with the acronym PROMPT, encompasses
  319. 12:26all of this. How does it work? Each of
  320. 12:28these letters represents one of the
  321. 12:30parts of a prompt's structure. Remember
  322. 12:35not to complicate things unnecessarily.
  323. 12:37What does the first letter of the P
  324. 12:38stand for? It stands for persona. You
  325. 12:41are an expert in marketing, social
  326. 12:42media, and human psychology, for
  327. 12:44example. So, since the training of
  328. 12:46these great language models has a lot
  329. 12:49of content, if we don't direct it, they
  330. 12:51won't be sure what we're talking about.
  331. 12:54So, we're giving them context before
  332. 12:56moving on to the second letter, which
  333. 12:58is the script. I want help creating a
  334. 13:00script for a res. This is an example of
  335. 13:03what I want to do for the third
  336. 13:04objective. The objective is to grab
  337. 13:06attention with a captivating story and
  338. 13:08then make a call to action to subscribe
  339. 13:10before moving on to the M model. How do
  340. 13:12I want this result? I want the result
  341. 13:15divided into 8 to 10 slides. This is
  342. 13:17just an example; later we'll see in the
  343. 13:19more advanced techniques how much you
  344. 13:21can work on this, especially if you're
  345. 13:23going to use it for other purposes.
  346. 13:25Overview. My client is an expert, sells
  347. 13:28online courses, blah blah blah blah. Or
  348. 13:30, in addition, later in some of the
  349. 13:32techniques we'll look at here, you can
  350. 13:34add more information as examples and
  351. 13:36many others that will greatly help with
  352. 13:38the results. And lastly, the issue of
  353. 13:40the "transform" part, which is
  354. 13:42important to understand. When we put
  355. 13:44the prompt there, don't expect it to
  356. 13:46give the perfect answer right away.
  357. 13:48Sometimes it will be an interaction, an
  358. 13:51initial base, it will send, give
  359. 13:52feedback, and do. And I'll even show
  360. 13:55you some techniques on how we can make
  361. 13:58this improvement, this optimization,
  362. 14:00both with your feedback and with the
  363. 14:03machine training itself. We'll see this
  364. 14:05calmly now. So, in this "transform"
  365. 14:07part, we'll give feedback. Change this,
  366. 14:09do this, do that, implement this,
  367. 14:12implement this. This is the basic
  368. 14:14structure of a good prompt, let's say,
  369. 14:19the 2080, which already works for most
  370. 14:21cases. Oh, and as a warning, don't be
  371. 14:22afraid to change the order, okay? This
  372. 14:24is one of the orders I put it in to
  373. 14:26make it easier. In fact, many times,
  374. 14:28when I'm creating a prompt, I literally
  375. 14:30start by typing those six letters and
  376. 14:32from there I begin typing my prompt,
  377. 14:34because then I know it will follow a
  378. 14:36structure. There are some things we'll
  379. 14:38see here, for example, if it's a very
  380. 14:40long document, this has to come before
  381. 14:42or after the instructions. This is
  382. 14:44important and makes a big difference in
  383. 14:46the result, which I'll now explain
  384. 14:47calmly. Given this, what process do we
  385. 14:54follow now? If a simple prompt didn't
  386. 14:57solve the problem, if this structure I
  387. 14:59just described didn't work either, what
  388. 15:02process do we use to develop more
  389. 15:04robust prompts that require a greater
  390. 15:06process of reasoning and logic to
  391. 15:08generate the result we want? So, the
  392. 15:10process recommended by a study I did of
  393. 15:13various companies, tutorials, and
  394. 15:15courses on how to do it is the
  395. 15:17following. It involves several steps.
  396. 15:19The first of all, the most basic and
  397. 15:22fundamental, is to define the task and
  398. 15:24the success criteria. This is very
  399. 15:26important because many people start
  400. 15:28developing the prompt or even the
  401. 15:30entire thing and don't even know where
  402. 15:32the goal is to score. They don't know
  403. 15:34where they want to go and it can't work
  404. 15:36. So, why is this important? There are
  405. 15:38three criteria for us to look at. First
  406. 15:40, performance and precision. How good
  407. 15:42does this model need to be, because
  408. 15:43depending on what you need, it might
  409. 15:45just be a generic response. Now, for
  410. 15:47example, I have a project with my
  411. 15:50mentees, where we help monetize
  412. 15:52knowledge at scale with agents. The
  413. 15:55type of response you have to give, with
  414. 15:57judgment, from COP, marketing and so
  415. 15:59many others, requires a very high
  416. 16:01degree of precision, to the point that
  417. 16:03I don't even use Chat GPT anymore and
  418. 16:04today I use Cloud more for some of the
  419. 16:06things we need, including in the
  420. 16:08clearer model. So this influences my
  421. 16:10decision on how to think about the
  422. 16:12process to create my prompt. Second,
  423. 16:15latency. What is the acceptable
  424. 16:17response time? Because more expensive
  425. 16:19models, not always, but for example, in
  426. 16:21the case of Cloud it's very clear, tend
  427. 16:24to be slower, because they have a
  428. 16:26reasoning process, a larger base, I
  429. 16:28don't know exactly how it works, larger
  430. 16:30. So, it takes longer to respond, but
  431. 16:32it's a more precise response. Now, if
  432. 16:34you're in an online chatbot, maybe you
  433. 16:36need a more practical response,
  434. 16:38sacrificing some quality, but to have a
  435. 16:40more instantaneous response, for
  436. 16:41example, if you're connected to
  437. 16:43WhatsApp. So that also influences
  438. 16:45things. And lastly, price. What's your
  439. 16:48budget for this? Because depending on
  440. 16:50what you're doing, it will make a big
  441. 16:52difference. As I showed here in the
  442. 16:54cost table, but in the cloud here at
  443. 16:57Haiku Pro Opus, there's a huge
  444. 16:59difference in terms of cost. So all of
  445. 17:01this will change a lot depending on how
  446. 17:03you think about the prompt. Once the
  447. 17:05task and the success criteria are
  448. 17:07defined, we move on to the second step,
  449. 17:09which is developing test cases. OK? If
  450. 17:12I want to get there, how do I know I'm
  451. 17:14close? How do I know that this prompt
  452. 17:17is generating the results I expect? So,
  453. 17:20we need to develop these test cases,
  454. 17:22mainly the standard ones, those that
  455. 17:25correspond to 80%, but also those that
  456. 17:27we call edge cases, that is, the
  457. 17:30exception to the exception. Could our
  458. 17:32prompt also handle that? It's worth
  459. 17:34including here, because then we can
  460. 17:36write an initial prompt. We can use
  461. 17:38that structure I just showed, the
  462. 17:39acronym prompt, at least to have a base
  463. 17:42and see if we're on the right track.
  464. 17:44Because, remember, the idea is
  465. 17:45iteration. We don't get it right the
  466. 17:48first time; it's a constant process,
  467. 17:50because we'll test against examples
  468. 17:52that we can judge ourselves or use
  469. 17:55other LLMs, other great language models
  470. 17:57, to judge and see if it's right,
  471. 17:59including suggesting improvements,
  472. 18:01refining this prompt. There are some
  473. 18:05prompts here that I'm constantly
  474. 18:07refining. I have, for example, an email
  475. 18:09editor that helps me with all the
  476. 18:11emails, which I write 100%myself, I use
  477. 18:13it as an editor. And almost every time
  478. 18:16I go there, I add some more
  479. 18:17modification that helps me identify and
  480. 18:20improve it more and more. So, it's like
  481. 18:22I'm training someone, but instead of
  482. 18:24training a person, I'm training this
  483. 18:27one so that this prompt, now ready,
  484. 18:29gets better and better and even more.
  485. 18:32And now I can share it with my students
  486. 18:33, which is really cool. So, refine the
  487. 18:35prompt and finally, put it into
  488. 18:37production. After it's ready, now I
  489. 18:38have many of the ones I have here,
  490. 18:40which are already in production, that I
  491. 18:42use constantly for the tasks I need.
  492. 18:48Having seen this basic introduction,
  493. 18:50we're now going to the techniques part,
  494. 18:53which I believe many people who hear
  495. 18:55the words "prompt engineering" would
  496. 18:57tend to think is what we're going to
  497. 18:59see now. But the important thing is, as
  498. 19:01I said before, to have these
  499. 19:03fundamentals that we just learned,
  500. 19:05because we're going to learn how to
  501. 19:07build from the back to the front, so
  502. 19:09that we can now add on top. So that's
  503. 19:11what we're going to do now. The first
  504. 19:13thing we're going to learn isn't a
  505. 19:15specific prompt engineering technique,
  506. 19:18but it's very helpful; it's about
  507. 19:21markdown. In case you're not familiar,
  508. 19:23markdown is this type of text here, for
  509. 19:25example, which has this hash symbol
  510. 19:27here and others. It's a type of text
  511. 19:29that can be converted; it's used for
  512. 19:32plain text, as we call it, but it can
  513. 19:34also be interpreted as titles and
  514. 19:37subtitles. So, for example, if I remove
  515. 19:39this hash symbol, it becomes normal
  516. 19:41text. If I add one, it becomes two. It
  517. 19:44becomes a heading, a heading one. If I
  518. 19:46add two, it decreases, because a
  519. 19:48heading two, three, and so on, which is
  520. 19:51what we use in HTML pages. There's also
  521. 19:53, for example, what's in WhatsApp,
  522. 19:55where if I put, for example, an
  523. 19:57asterisk around this word here, and an
  524. 20:00asterisk on the other side, it makes it
  525. 20:02italic. If I move my mouse away from it
  526. 20:05, and then two asterisks, it becomes
  527. 20:07bold. If I put, for example, an
  528. 20:09underline, it also becomes italic. And
  529. 20:12if I put this tilde symbol here, two
  530. 20:15tildes on each side, in this program
  531. 20:17here, it makes this strikethrough, it
  532. 20:19makes the strikethrough. And there are
  533. 20:22also other commands, for example here
  534. 20:24in Obsidian that I'm using, if I put
  535. 20:26two equals signs, it becomes a
  536. 20:28highlight. So there are different types
  537. 20:30of markdown and then we can even look
  538. 20:32for a markdown sheet, which is a quick
  539. 20:34and practical guide to markdown.
  540. 20:36Searching quickly on Google, I already
  541. 20:38found two that I can leave the link to
  542. 20:40below, if not just type markdown sheet
  543. 20:42sheet into Google and you should find
  544. 20:43them. So there's heading, bold, italics
  545. 20:46, code that you'll see we'll use a lot,
  546. 20:48lists, links and so many others. The
  547. 20:51main ones are these up here. There's
  548. 20:53another image here that you can use,
  549. 20:55but what's important in all of this is
  550. 20:57understanding markdown. First, because
  551. 20:59visually, doing it here in Obsidian
  552. 21:01makes it easier to locate things. And
  553. 21:04because these great language models
  554. 21:06learned from text, they replicate it.
  555. 21:09So, a well-organized text is very
  556. 21:12likely to work for the machine as well.
  557. 21:16Remember the golden rule I mentioned at
  558. 21:17the beginning? Here it serves to show
  559. 21:20you one of its applications. A
  560. 21:21well-organized text helps a lot for you
  561. 21:24and for the models to respond better.
  562. 21:27So, for example, in this prompt here,
  563. 21:29which is for summarizing tasks for
  564. 21:31mentees, which I showed in another
  565. 21:33video on this channel, I show and you
  566. 21:35can see how it's organized. I have
  567. 21:36headings to separate some of the
  568. 21:38sections. I have this type of tag that
  569. 21:42we'll call XML tags. There's bold,
  570. 21:45there's italics. I give indications
  571. 21:47that I want the response to come in
  572. 21:48markdown, because the type of response
  573. 21:50it gives is better later. I give
  574. 21:52examples and many others, and that's
  575. 21:54how I format it. So, visually it helps
  576. 21:56me, and I know that this gets a better
  577. 21:58response from the GPT chat, Cloud, or
  578. 22:00whatever. Actually, this is something I
  579. 22:03just discovered in my research: a
  580. 22:05well-formatted prompt gives a different
  581. 22:08response. In the cloud documentation,
  582. 22:10for example, they say this. And it's
  583. 22:12understandable why, if these language
  584. 22:14models are created to simulate how our
  585. 22:17brain works with neural networks, you
  586. 22:19just have to think about how you adapt
  587. 22:22the way you speak depending on who
  588. 22:24you're talking to. If you're going to
  589. 22:26talk to your grandmother or a close
  590. 22:28friend, your manner and the words you
  591. 22:31choose are different. So, in the
  592. 22:33language model it's the same thing. A
  593. 22:36well-formatted prompt is like the GPT
  594. 22:38chat, Claude or Gino understanding: "
  595. 22:40Here is a polite person, I will respond
  596. 22:43in the same way." So this is a type of
  597. 22:45response it gave based on this
  598. 22:47well-organized prompt, it gave this
  599. 22:49type of response. You can see that it's
  600. 22:52organized, which is what I showed in
  601. 22:54the last video, using markdown, using
  602. 22:56lists, bold, italics and everything
  603. 22:58else needed, in a way that is visually
  604. 23:00better for me and my students. Now,
  605. 23:02before we wrap up here, something
  606. 23:03important, two things I want you to pay
  607. 23:05attention to. This here and this here.
  608. 23:07What is this? This symbol is an
  609. 23:10extensive markup language, XML,
  610. 23:13extensive markup language. This is
  611. 23:16important because it's quite a bit in
  612. 23:18the cloud documentation, not so much in
  613. 23:19short, but it makes sense. It's very
  614. 23:21helpful because sometimes, especially
  615. 23:24with long documents, it's easy to get
  616. 23:26lost trying to understand what's a
  617. 23:29reference, what's an instruction,
  618. 23:31what's an example, and using this to
  619. 23:33separate them helps. So, you can see
  620. 23:36that here I've put the transcript, I've
  621. 23:39put it with this curly brace, and below
  622. 23:41you can see that I've put the slash to
  623. 23:44close this command. And when I refer to
  624. 23:47it, I would say, for example, this way,
  625. 23:50take this into account. Transcript,
  626. 23:52closes the transcript. This is
  627. 23:54literally in the documentation, so it
  628. 23:55makes a difference. So that's one of
  629. 23:57the things. Two. This is between these
  630. 23:59two brackets because this is the part
  631. 24:02where I know that I, or my students,
  632. 24:04when I give them some of the prompts,
  633. 24:07need to come and modify them. This is
  634. 24:09very good because look, if I copy and
  635. 24:11paste that prompt, put it here in the
  636. 24:13Antropic console, which is to test
  637. 24:15their model, you can see that it has
  638. 24:17already formatted this part of the
  639. 24:19transcription nicely. What does this
  640. 24:21mean? This is now a variable that, if I
  641. 24:23come to the site and go to this part of
  642. 24:26variables and click, it already gives
  643. 24:28me the space to just paste my
  644. 24:30transcription here. So it makes a lot
  645. 24:33of sense to leave these spaces with
  646. 24:35this command, because visually it's
  647. 24:38easier to find and some of the tools
  648. 24:40also interpret it correctly. And to
  649. 24:43close here, two more examples. I put
  650. 24:45this here because when I want it to
  651. 24:47create insights, I'm giving some
  652. 24:49examples and you'll see later in the
  653. 24:51more advanced techniques how much we'll
  654. 24:54use this type of markup to help. And
  655. 24:56here I give examples. Example of the
  656. 24:57original insight, example of the
  657. 24:58improved insight, because sometimes it
  658. 25:00wasn't producing what I wanted. So this
  659. 25:02helps a lot. And lastly, here's an
  660. 25:05extra tip: if you work with very long
  661. 25:07documents, because in this case, when I
  662. 25:09use this prompt, what goes into the
  663. 25:12transcript is a transcript of one of
  664. 25:14our mentoring sessions, from my 3-hour
  665. 25:16mentoring group, which is about 40,000
  666. 25:19words. That's a lot of text. And even
  667. 25:21in the other video I hadn't done this
  668. 25:23yet, and here I've already corrected it
  669. 25:24. When you have this, the template
  670. 25:27instructions themselves say this. When
  671. 25:29you have very long documents, include
  672. 25:31them before the instructions, which is,
  673. 25:34for example, what Antropic recommends
  674. 25:36here, structuring long documents. When
  675. 25:39working with very long documents, use
  676. 25:42XML tags, which helps a lot, or XML.
  677. 25:45And in terms of positioning, position
  678. 25:48them first and then put the
  679. 25:50instructions below, which is exactly
  680. 25:53what I did here. I'll give you the
  681. 25:55transcript. Pay attention because I'll
  682. 25:57ask you questions later. Here you would
  683. 25:58have the transcription and then the
  684. 26:00instructions for that prompt. Therefore
  685. 26:03, for long documents, put the
  686. 26:04instructions first. But there are some
  687. 26:07cases when the document is not only
  688. 26:08long, but it's also divided and broken
  689. 26:10into sections. Then there are some
  690. 26:12problems that we have techniques on how
  691. 26:14to solve, which I will show mainly in
  692. 26:17the examples I will show here at the
  693. 26:19end of the lesson, when we will put all
  694. 26:21or almost all the techniques together
  695. 26:23in one place. As a second technique,
  696. 26:25let's say, we're going to see what a
  697. 26:27prompt is. This helps a lot to refine
  698. 26:31the result you get. What is this for?
  699. 26:34If you look, for example, here in the
  700. 26:36Antropic console, there is a prompt in
  701. 26:37the system. This is when you put a
  702. 26:40message about how you want the system
  703. 26:42to act. So, some examples are, for
  704. 26:44example, instructions for a task,
  705. 26:47answer in a certain language, answer in
  706. 26:49a certain way, answer in a Socratic way
  707. 26:52or in questions or in logic and so many
  708. 26:54other things. So this helps a lot in
  709. 26:56the interpretation of your prompt,
  710. 26:59better results, as I said, answer in a
  711. 27:01language, something like that. So here
  712. 27:04in my GPT chat, if I go to the GPT chat
  713. 27:07customization section, here are some
  714. 27:09things that part of this prompt I got
  715. 27:12from my friend Alan, which we created
  716. 27:14together in the past. So I adapted some
  717. 27:17of the things for myself. Here it asks
  718. 27:19what it should know about me to give a
  719. 27:21better answer and how it should respond
  720. 27:23. In this case it's deactivated now,
  721. 27:25but it could be activated. And it will
  722. 27:26do some of these things. And here in
  723. 27:28this part of the system prompts, which
  724. 27:31is one of the techniques we're going to
  725. 27:34use to significantly reduce
  726. 27:36hallucination and help with the quality
  727. 27:38of the responses, which we'll see later
  728. 27:41in some of the techniques. These system
  729. 27:44prompts themselves aren't always used,
  730. 27:46but it's worth considering because if
  731. 27:48it's something very repetitive of a
  732. 27:50certain language style that you want
  733. 27:52the model to act on, it's worth
  734. 27:54including. As a third technique or
  735. 27:57prompt strategy, we have what we call
  736. 27:59zero shot. And you'll see this term
  737. 28:01repeated many times. What does it mean?
  738. 28:04The model is trained on billions of
  739. 28:06parameters. When we ask it a question
  740. 28:09without any references or examples, we
  741. 28:11call that "zero shots," meaning zero
  742. 28:14examples. So, interpret "shots" as
  743. 28:16examples for the model to follow. You
  744. 28:19can see here, for example, that in this
  745. 28:21prompt, I was asking for help
  746. 28:23optimizing the title I was creating,
  747. 28:25asking how to better organize this
  748. 28:27sentence to make it clearer. I simply
  749. 28:30pasted my title. I didn't give any more
  750. 28:32examples or shots of what an expected
  751. 28:35title is, how I believe it should be,
  752. 28:37because that would certainly improve
  753. 28:39the answer. But in this case, I just
  754. 28:41wanted to get straight to the point:
  755. 28:42tell me how to improve it. And here it
  756. 28:43gave some suggestions on how it would
  757. 28:45do it. But obviously, and we'll see
  758. 28:47shortly, with examples, the answer is
  759. 28:49absurdly better, which is one of the
  760. 28:51techniques we use. So here it did that,
  761. 28:54gave more suggestions. In another
  762. 28:56prompt, I sent another title I was
  763. 28:58working on and it told me how to
  764. 29:00improve it. I didn't give many
  765. 29:02alternatives; in fact, I asked it to
  766. 29:03generate alternatives for me. So this
  767. 29:05is the Zero Shot, which I don't give
  768. 29:07any references for, I just ask my
  769. 29:08question very directly. And now we're
  770. 29:10starting to get into some techniques
  771. 29:12that aren't super advanced, but I want
  772. 29:14to show you their origin to explain
  773. 29:16them better and also to understand that
  774. 29:19it's not simply a few little videos on
  775. 29:21YouTube generating lists of prompts.
  776. 29:23There are scientific studies by serious
  777. 29:25people in the field, and I want to show
  778. 29:27you some of them because it's the
  779. 29:28research I did and have already
  780. 29:30interpreted for you so you wouldn't
  781. 29:31have to read all of this. So, one of
  782. 29:33them here, in this paper here, from
  783. 29:36people at the University of California,
  784. 29:38Santa Barbara, and Microsoft, they
  785. 29:40demonstrate and prove, they show here
  786. 29:43this technique called directional
  787. 29:45prompt stimulation. Something that
  788. 29:47doesn't seem complicated to me, 27
  789. 29:49pages of a study that I've already
  790. 29:51understood, already translated for you,
  791. 29:52which is this idea here. And I'll show
  792. 29:54you an example. What's the idea? In a
  793. 29:57normal prompt, it would say, for
  794. 29:58example, to summarize the article in
  795. 30:00two or three sentences and give a
  796. 30:02certain sentence. And here's a score
  797. 30:04that was achieved. If you simply make a
  798. 30:07super simple modification, based on the
  799. 30:09tips I'm translating directly from
  800. 30:11English, and give these tips, his
  801. 30:14response will already be much better,
  802. 30:16because now you've directed what you
  803. 30:19want through this stimulus. Let me show
  804. 30:21you a practical example. I took another
  805. 30:24paper that we'll see later in the
  806. 30:27techniques section, called Skeleton of
  807. 30:30Thought. And to help me interpret all
  808. 30:33of this, I put it here using PL, which
  809. 30:35is one of the A tools I use, in the
  810. 30:37Opus model, which is the best in Cloud,
  811. 30:39200K, with a larger context window. And
  812. 30:41here at the end, the first tip I gave
  813. 30:44before, I put the document before, and
  814. 30:46here at the end I asked him to
  815. 30:48summarize all of this. But instead of
  816. 30:50just giving instructions to summarize,
  817. 30:52I came here and said: "Organize the
  818. 30:55markup in an organized way using the
  819. 30:57keywords below, which is exactly what
  820. 30:59came from there." So, I used keywords,
  821. 31:02I put a command here to differentiate a
  822. 31:04bit: examples, practical application,
  823. 31:06results, and comparisons, because that
  824. 31:08way I know that with this directional
  825. 31:10stimulus, it has a greater chance of
  826. 31:12finding the right references and
  827. 31:14organizing them in the best way that
  828. 31:16interests me. This is a super simple
  829. 31:19technique, but it helps a lot,
  830. 31:20especially when working with large
  831. 31:22documents that we're going to use. And
  832. 31:24then, this very one that I showed,
  833. 31:26which I used as a reference for this
  834. 31:29thought framework, you'll see how it
  835. 31:31works to create something even more
  836. 31:33robust. The next technique we have is
  837. 31:35relatively simple, but when used well,
  838. 31:38with a well-calibrated prompt, it will
  839. 31:41already generate most of the results
  840. 31:44you need. It's called fu shot. What
  841. 31:47does that mean? What did we talk about
  842. 31:48before? Zero shot, where I don't give
  843. 31:50any references. Therefore, in the fu
  844. 31:52shot, I'll come here and do this, look
  845. 31:54at the difference it can make. This
  846. 31:56here are the results they showed of how
  847. 31:59much precision with zero shot, one shot
  848. 32:01, which is just one example, or f,
  849. 32:03which is several examples. And the
  850. 32:05improvement is significant, it's really
  851. 32:07huge. So, as an example, a prompt I use
  852. 32:10, which is an infinite title generator,
  853. 32:12that I give to my students and mentees.
  854. 32:14Instead of simply giving the
  855. 32:16instructions I already have here, I
  856. 32:19also give examples of what good titles
  857. 32:22are. Some of the references I got from
  858. 32:24big names, like John Benson, Stephen
  859. 32:26George, Craig Clemens, and other
  860. 32:28copywriting guys. So I put these titles
  861. 32:31here as examples, the explanation of
  862. 32:33each one, because what is this?
  863. 32:35Remember the golden rule? If I were to
  864. 32:38ask someone to do it, if I show them,
  865. 32:40create a title here, example of 20
  866. 32:42winning titles that worked for us, what
  867. 32:45is the chance that this person would
  868. 32:47produce a better result? So, all this
  869. 32:50study is basically to say that. Put
  870. 32:52examples. And we'll even see what types
  871. 32:55of examples work best, but simply
  872. 32:57giving positive examples already helps
  873. 32:59a lot. Going back to our basic
  874. 33:01structure that I showed before, these
  875. 33:03shots or examples are what I would put
  876. 33:06here in the overview section, where I
  877. 33:08not only give information about my
  878. 33:11client or whatever else I want, but
  879. 33:13also better guide the model and produce
  880. 33:16a better result, a better answer. The
  881. 33:19next technique we're going to learn is
  882. 33:21one of the most famous and it's called
  883. 33:22chain thinking. This one is very good
  884. 33:25to use when it requires a line of
  885. 33:28reasoning and logic, for example, for
  886. 33:30arithmetic or complex problems, more
  887. 33:33than just a, let's say, raw answer. How
  888. 33:36does it work? I'll show you an example.
  889. 33:38So, in this paper here from the Google
  890. 33:40research team, as you can see here,
  891. 33:42they did these tests. So, here's a
  892. 33:44normal prompt, where there's a logic
  893. 33:46problem and the wrong answer. In this
  894. 33:49chain of thinking, they include in the
  895. 33:51input, that is, in the prompt they put,
  896. 33:53an example of the question and how the
  897. 33:56model should behave, which in this case
  898. 33:58is to do this chain of thinking, which
  899. 34:00is how we would do it. This would be a
  900. 34:03bit like those logic and reasoning
  901. 34:05interview questions they sometimes ask,
  902. 34:07or claim to ask, like: "How many
  903. 34:09balloons fit in this room?" You
  904. 34:11wouldn't go crazy and say 26, would you
  905. 34:13? No, right? You'd probably do a
  906. 34:16step-by-step process thinking, okay,
  907. 34:18what's the size of the balloon? What's
  908. 34:20the size of this room? How many meters?
  909. 34:22You'd do a multiplication and then try
  910. 34:25to estimate based on that, not just
  911. 34:27guess. So these techniques try to
  912. 34:29simulate this reasoning process,
  913. 34:32because that's how we do it, and with
  914. 34:34that we get a more precise result for
  915. 34:37more complex problems. Notice again how
  916. 34:40many times we go back to the golden
  917. 34:41rule. Try to think about what the most
  918. 34:44appropriate process would be for us to
  919. 34:46solve the problem. And that's what this
  920. 34:48does. It shows how this model should
  921. 34:52work. I'll show you an example that
  922. 34:54isn't exactly this, but in a way it's
  923. 34:56where I was trying to solve a problem
  924. 34:58on my website. I had a code for a Vurb
  925. 35:01sales video, which is a tool we use,
  926. 35:04that was causing problems. And instead
  927. 35:06of waiting for a response, I came here
  928. 35:08to the EPT chat, posted the code, and
  929. 35:09explained my problem. This is giving an
  930. 35:11error. Please help me, because I don't
  931. 35:13understand it well enough. He modified
  932. 35:15the code and then, because this is in
  933. 35:18the instructions behind it that we'll
  934. 35:20see later, to avoid hallucination, he
  935. 35:23helps me explain what was done. Because
  936. 35:25this not only helps me understand what
  937. 35:28he did to implement the solution, but
  938. 35:30also helps him think and give me better
  939. 35:32answers. And we continued, it's still
  940. 35:34not working. Then he made a new change
  941. 35:36and explained it to me and gave me
  942. 35:38debugging suggestions. If this isn't
  943. 35:40working, let's try this to try and
  944. 35:42adjust it. So that's the chain of
  945. 35:44thought. When you have a bigger logical
  946. 35:47reasoning problem, letting the models
  947. 35:50think explicitly works better. And here
  948. 35:53in the Cloud, they give some more
  949. 35:55suggestions on how to take this further
  950. 35:57and produce even better results. For
  951. 35:59example, regarding a question they
  952. 36:01posed to me here, which requires a
  953. 36:03certain type of reasoning, they suggest
  954. 36:06breaking it down step by step to arrive
  955. 36:08at the answer. But what you can do, and
  956. 36:11this depends on where you're going to
  957. 36:13apply it, is use the XML tags I showed
  958. 36:15earlier to separate what is thought
  959. 36:17from what is the answer. And you'll see
  960. 36:20how we'll use this later in the
  961. 36:21hallucinations. So here it instructs
  962. 36:23you to think using a space for "
  963. 36:26thinking" and then put the answer
  964. 36:28inside "answers." This is very good. If
  965. 36:31, for example, you want to develop a
  966. 36:32SAS or some platform on WhatsApp to
  967. 36:34provide answers, you can have a space
  968. 36:36and then do some filtering where the
  969. 36:38model thinks, for example, if it needs
  970. 36:40to do some calculation, and the answer
  971. 36:42is only within these specific tags so
  972. 36:44that the client doesn't see what they
  973. 36:46shouldn't see. And in this case, I was
  974. 36:48talking here with Professor Sandec from
  975. 36:50his channel. I recommend it to anyone
  976. 36:51who wants to follow him. This guy is
  977. 36:52really skilled, he understands what
  978. 36:54he's doing, he truly understands the
  979. 36:55subject matter, and not just like many
  980. 36:57who watched a few YouTube videos and
  981. 36:58now think they're experts, teaching
  982. 37:00like professors on the subject. And I
  983. 37:01was talking to him about this. Can the
  984. 37:04model perform this type of reasoning
  985. 37:07internally? Because here at Cloud they
  986. 37:10explicitly say so. It's important to
  987. 37:13note that this thinking cannot happen
  988. 37:16without output, without results. Cloud
  989. 37:18must produce its own thinking to truly
  990. 37:21think. What's the disadvantage of this?
  991. 37:23Cost, because the output is the most
  992. 37:25expensive, 75 per million tokens, in
  993. 37:27the case of Cloud, in the most advanced
  994. 37:30model. So, yes, if necessary, fine, but
  995. 37:33there's a cost. And then we were trying
  996. 37:35to see if this would make a difference
  997. 37:37or not in other models. The answer is
  998. 37:39that for other models, for GPT chat, it
  999. 37:41seems there's some kind of internal
  1000. 37:44process, but I'm not 100%sure. For
  1001. 37:46Cloud, they explicitly say: "You have
  1002. 37:48to make Cloud produce this thinking
  1003. 37:51because otherwise it won't use it as a
  1004. 37:53reference." And on top of that
  1005. 37:55technique, we're going to the next one,
  1006. 37:57which is the chain of thought, let's
  1007. 37:59say, which is from the people in
  1008. 38:01Singapore and Alibaba, which is super
  1009. 38:03simple, thinking about what we just
  1010. 38:05learned in terms of how to put the
  1011. 38:06steps to do it. What helps a lot with
  1012. 38:09some models more than others is not
  1013. 38:11only giving the model the correct
  1014. 38:13explanation, like "this is the answer I
  1015. 38:16want," but also giving the wrong
  1016. 38:18explanation, like "this is what I don't
  1017. 38:20want," because that way the model can
  1018. 38:22learn from both the correct and
  1019. 38:24incorrect examples. Okay, Bruno? I
  1020. 38:26understand the chain of thought, but
  1021. 38:28how do I ask these questions, give
  1022. 38:29these answers, and provide instructions
  1023. 38:31? Sometimes it's already obvious, you
  1024. 38:33already have examples you want to
  1025. 38:35include, but there's a shortcut from
  1026. 38:38another study on how to shorten this a
  1027. 38:40bit, which we can even use in the
  1028. 38:42system prompt instructions, which are
  1029. 38:45zero-shot reasons, which they called
  1030. 38:47the chain of thought with zero shots.
  1031. 38:49What is that? This is very simple, okay
  1032. 38:52? Everything we talked about before
  1033. 38:54regarding the chain of thought, where
  1034. 38:56to put it, giving the instructions on
  1035. 38:58how the model should think. If I don't
  1036. 39:00have that, simply instructing the model
  1037. 39:03to speak, let's think about this step
  1038. 39:05by step. Breathe calmly and think
  1039. 39:08logically step by step. Sometimes, in
  1040. 39:11more advanced models, it's enough for
  1041. 39:13the model to naturally do this whole
  1042. 39:16process without you having to
  1043. 39:18explicitly give examples. It doesn't
  1044. 39:21always work, it depends on what you
  1045. 39:23want, but it often helps. And now with
  1046. 39:25this you understand when, for example,
  1047. 39:28when launching the GMini 1.5 Pro to
  1048. 39:30interpret tables like this, what do
  1049. 39:32these tables mean? These are the names
  1050. 39:34of the tests. You can search on Google
  1051. 39:37or Perplexity to find out what
  1052. 39:39different types of tests they use to
  1053. 39:42compare models. And that's what these
  1054. 39:4510 shots, five shots, 11 shots mean,
  1055. 39:48which means that in the model inputs
  1056. 39:50they put 11 examples of what they
  1057. 39:53wanted. And even if you look down here,
  1058. 39:56for example, in this one, formatted as
  1059. 39:59CT problems, that is, chain of thought
  1060. 40:03problems. That's what this acronym
  1061. 40:05means, including some with zero shots
  1062. 40:07for comparison when you don't give any
  1063. 40:09examples of how they perform. The cool
  1064. 40:11thing is that by understanding all this
  1065. 40:14, you can now better interpret when
  1066. 40:16they post graphs like this or those
  1067. 40:18comparative tables of models. That's
  1068. 40:20why when Gemini Ultra came out, I
  1069. 40:22wasn't so impressed because there's a
  1070. 40:24detail here that I don't know if you
  1071. 40:26noticed, but I'll show you now. First,
  1072. 40:29here they are reporting against GPT4,
  1073. 40:31right? Sota means state of the art
  1074. 40:34model, that is, the best model on the
  1075. 40:36market at the moment, which was GPT4.
  1076. 40:38But look, remember we learned what
  1077. 40:41shots are? In this one, they are
  1078. 40:43comparing one with a COAT chain of
  1079. 40:46thought of 32 shots compared to one
  1080. 40:49with five shots in GPT4. That makes a
  1081. 40:53big difference. So they post this as if
  1082. 40:56it were something incredible. But is it
  1083. 40:59really? You can't be 100%sure,
  1084. 41:00especially since Google is kind of
  1085. 41:02desperate. And it's funny, besides, a
  1086. 41:04little extra comment, this graph is
  1087. 41:07like a rocket exploding towards the
  1088. 41:09moon, but if you put it into
  1089. 41:11perspective, it's more like this. It's
  1090. 41:13not such a big change comparatively.
  1091. 41:15Yes, it is, I know that on a
  1092. 41:17logarithmic scale things are getting
  1093. 41:19better and better, but because we need
  1094. 41:21to be doing very well, thank you. And
  1095. 41:23if you look at it in other ways, it's
  1096. 41:25not so amazing anymore. But anyway,
  1097. 41:27it's worth emphasizing again. Choosing
  1098. 41:29the right model will make a big
  1099. 41:31difference in the final result. The
  1100. 41:33same prompt you run on GPT, on Gem, or
  1101. 41:36on Cloud will give a completely
  1102. 41:38different response. In general, I've
  1103. 41:41been using the cloud on most of the
  1104. 41:43time, but there are certain commands
  1105. 41:45that I've used on Gemini or GPT and
  1106. 41:47produced better results. It depends on
  1107. 41:50your goals. No, it just depends on how
  1108. 41:52it changes with each update, so you
  1109. 41:54have to keep testing and monitoring as
  1110. 41:56things change. Now, at this moment, a
  1111. 41:59warning. Remember I said we were
  1112. 42:01building on top of the skills? What
  1113. 42:03you've seen so far is, honestly, more
  1114. 42:05than 2080. For most people on this
  1115. 42:08channel, it will already be enough.
  1116. 42:11What we're going to see now are some
  1117. 42:13techniques that delve deeper into more
  1118. 42:16complex prompts to produce better
  1119. 42:19answers. Anyway, even with that said, I
  1120. 42:21recommend you keep watching. Why?
  1121. 42:24Because first, it's super interesting.
  1122. 42:26Second, it will give you ideas on how
  1123. 42:28to expand your mind and then, for a
  1124. 42:30prompt, produce better answers. And
  1125. 42:32third, it serves as a reference in case
  1126. 42:34you want to create something bigger or
  1127. 42:36impress your friends with your
  1128. 42:38knowledge; you'll already know how it
  1129. 42:40works. And also because many of these
  1130. 42:42next techniques will be shown and
  1131. 42:44incorporated into the examples I'll
  1132. 42:46show here at the end. Starting then
  1133. 42:52with the most advanced, the first one
  1134. 42:55is called self-consistency, which is
  1135. 42:57the one in this paper they released
  1136. 43:00through Google. Where what they say
  1137. 43:02here, right off the bat, is that the
  1138. 43:05chain of thought technique has produced
  1139. 43:08excellent results, but the risk is that
  1140. 43:10, as it works, it's a bit naive.
  1141. 43:13Sometimes it generates a line of
  1142. 43:14reasoning, but it's not the right one,
  1143. 43:16and that causes an error. How do they
  1144. 43:18...one of the ways to solve this (and
  1145. 43:20we're talking more specifically about
  1146. 43:22prompts here, but perhaps, if you're
  1147. 43:24more advanced, you could even run them
  1148. 43:26in parallel) is that they suggest that,
  1149. 43:28instead of generating just one chain of
  1150. 43:30thought, you generate three, and then
  1151. 43:32the model itself compares the three to
  1152. 43:34see which one has the highest chance of
  1153. 43:36producing the final result. So, this
  1154. 43:39isn't something I use all the time, but
  1155. 43:41I thought it was interesting to show
  1156. 43:42for a reason I just mentioned, to give
  1157. 43:44you an idea. Because, if you're having
  1158. 43:47difficulty and see that the answer you
  1159. 43:49want isn't coming, is slow to come,
  1160. 43:51perhaps incorporating some of these
  1161. 43:53more advanced techniques, generating
  1162. 43:56multiple answers, might help you. Even
  1163. 43:58if it's not for the model to judge
  1164. 44:01itself, but so that you can visually
  1165. 44:03judge and say: "I liked 2, 3, and 7". I
  1166. 44:06often use prompts like this: I generate
  1167. 44:0810 suggestions, like some we'll see
  1168. 44:10here, I choose three and work on those
  1169. 44:13three, because that way I have a better
  1170. 44:15chance of success. Next, we now have
  1171. 44:18the thought chain for the thought tree,
  1172. 44:21which has two papers here: one from the
  1173. 44:24DeepMind team and another from a lab in
  1174. 44:27San Jose, California, where they talk
  1175. 44:30about this thought tree technique,
  1176. 44:33which is, again, expanding the thought
  1177. 44:36chain to get even better results. How
  1178. 44:38does it work? Visually it's easy to
  1179. 44:40understand, but the practical
  1180. 44:41application is not so much. Here they
  1181. 44:44show an initial example of the basic
  1182. 44:46prompt, input, output. Here they show
  1183. 44:49how the thought chain, abbreviated CT,
  1184. 44:51works and what we just saw about
  1185. 44:53self-consistency, where we generate
  1186. 44:55multiple responses and from there
  1187. 44:58choose those that have the highest
  1188. 45:00chance of being correct. What they
  1189. 45:02recommend here is that this is for more
  1190. 45:04complex problems, and that's why many
  1191. 45:06of these more advanced techniques,
  1192. 45:08sometimes they add up to something
  1193. 45:09really cool, seem incredible, but don't
  1194. 45:11have much practical use, or at least
  1195. 45:13not for most people. So I'm going to
  1196. 45:15show some of them here, because it is
  1197. 45:17possible to incorporate some of these
  1198. 45:18things, as I will show, but not as much
  1199. 45:20as what we saw before. But the idea is
  1200. 45:22to develop a knowledge tree here, where
  1201. 45:25these alternatives are studied so that
  1202. 45:27from these possibilities, because it's
  1203. 45:30a process that resembles how we think.
  1204. 45:33Let's solve this problem. Hmm. We can
  1205. 45:35do one, two, or three, but this one has
  1206. 45:36this problem, this one. You know how we
  1207. 45:38develop it? That's the idea, to try to
  1208. 45:41replicate this reasoning process within
  1209. 45:43these models. So, in this, this type of
  1210. 45:46study here, this is another paper they
  1211. 45:48did that's similar, but it has, let's
  1212. 45:50say, a router that they use internally
  1213. 45:52to generate the results. How would this
  1214. 45:55be in practice in terms of a prompt?
  1215. 45:56There's a guy I found here on GitHub
  1216. 45:58who made a suggestion that I adapted.
  1217. 46:00And here he mentioned that he read
  1218. 46:02about this role and he suggested this
  1219. 46:05prompt here, which incorporates this
  1220. 46:07idea he talks about: "Imagine three
  1221. 46:09different experts and they talk to each
  1222. 46:11other and we let the model do it." And
  1223. 46:14look how I did it in practice here,
  1224. 46:15because I even went further. I used
  1225. 46:17this tool called [tool name] that
  1226. 46:19allows me to talk to two, three, four,
  1227. 46:22or six models at the same time. And in
  1228. 46:24this case, I set it to talk to the GPT
  1229. 46:26chat and the Cloud to compare the
  1230. 46:29response. So what I did, which was one
  1231. 46:31of the techniques I was studying to
  1232. 46:33test the application of this, I created
  1233. 46:35three personas: one that is the
  1234. 46:37copywriter who writes the headlines,
  1235. 46:39the prospect as if they were my
  1236. 46:41potential clients judging, and a
  1237. 46:43manager who gives instructions to the
  1238. 46:45copywriter. Then I create a loop here
  1239. 46:48using commands, again, notice that I'm
  1240. 46:50using XML tags, as I said. And here I'm
  1241. 46:53going to do this process. I want you to
  1242. 46:54execute it. And then, as the copywriter
  1243. 46:57writes, the prospect judges, the
  1244. 46:59manager takes this feedback and passes
  1245. 47:01it on. So they start here and go
  1246. 47:03through this process. I understand the
  1247. 47:05information, pass it to me so I can
  1248. 47:06begin. Then I said, okay, I passed
  1249. 47:08along some of the titles I had shown in
  1250. 47:10the other one, and he, the copywriter,
  1251. 47:11starts making some suggestions, then
  1252. 47:13come suggestions, then feedback from
  1253. 47:15the prospect, suggestions from the
  1254. 47:17manager, and so on. And here he makes
  1255. 47:18the next one. Then I just said, "
  1256. 47:20Continue," and he keeps repeating this
  1257. 47:22process. So I could do this several
  1258. 47:24times until I was satisfied to see
  1259. 47:27other ideas, suggestions. But, instead
  1260. 47:29of it having to be me, or someone from
  1261. 47:31my team, or someone else giving
  1262. 47:33feedback, or if I wanted, I could come
  1263. 47:35here to where I typed "continue," and
  1264. 47:37give my own feedback to this manager,
  1265. 47:39which would simulate, in a way, what
  1266. 47:41the structure of my company would be
  1267. 47:43like, so that they could incorporate
  1268. 47:45what I said and put it here for
  1269. 47:47judgment. So, this is one of the
  1270. 47:49applications I'm showing here as an
  1271. 47:51example. I even want to do some more
  1272. 47:53advanced tests on it because I see the
  1273. 47:56potential of how you can take this
  1274. 47:58technique we just learned about the
  1275. 48:00tree of thought and have a real
  1276. 48:02application for your prompts. The next
  1277. 48:05one we have is one I mentioned before
  1278. 48:07called the thought skeleton. This is a
  1279. 48:10paper from people in China, the United
  1280. 48:12States, Belgium, and other places. And
  1281. 48:14what's the idea behind this? I was
  1282. 48:16already applying it in a certain way,
  1283. 48:18but it was interesting to learn how to
  1284. 48:21do it in a more structured way because,
  1285. 48:23in fact, this paper, this study, is
  1286. 48:26more for internal training of the
  1287. 48:28models than for the prompt itself. But
  1288. 48:30what did I do? I took all of this,
  1289. 48:33which is 51 pages, gave it a good look
  1290. 48:35and read it, saw the prompts they gave
  1291. 48:37as examples and suggestions. And where
  1292. 48:39did I apply it? First, I went there—
  1293. 48:41remember I showed you that I used Poll
  1294. 48:43here to interpret, to help me interpret
  1295. 48:46this study and give me suggestions? And
  1296. 48:48then something I was already doing,
  1297. 48:50which I want to show you now, an
  1298. 48:51example of how I use this, already
  1299. 48:53mixing some techniques. So here I am in
  1300. 48:54the guide. So here I am in the
  1301. 48:55implementation guide of my mentorship
  1302. 48:57program, which is the Exponential
  1303. 48:58Expert program. And here in the
  1304. 48:59marketing part, I have what I call the
  1305. 49:01main surprising cause, which is where
  1306. 49:03we create a unique mechanism for the
  1307. 49:04problem. If you don't know what that is
  1308. 49:06, that's okay now, but it's basically
  1309. 49:07to differentiate from the competition.
  1310. 49:09And in this one, to help me create,
  1311. 49:11instead of giving a direct answer, what
  1312. 49:13do I do? And I'll show you here as an
  1313. 49:14example. So here I have a specific
  1314. 49:17agent that does this. It gives the
  1315. 49:19instructions. I first sent the data
  1316. 49:20from my client that I generated with
  1317. 49:23other people that I showed before. And
  1318. 49:25here now, instead of immediately asking
  1319. 49:28for the definitive answer, I ask it to
  1320. 49:31generate a thought process framework,
  1321. 49:33which is basically generating a list of
  1322. 49:36possibilities we can pursue. It even
  1323. 49:39has this name, "thought process
  1324. 49:41framework," with scientific study, but
  1325. 49:44it's a reasoning process for how we
  1326. 49:46would make good decisions: a brainstorm
  1327. 49:48of ideas for us to put in now, judge
  1328. 49:51them with a quick explanation, but this
  1329. 49:53could also be adapted, for example,
  1330. 49:55into a processing of some reasoning to
  1331. 49:58judge and move on to the next steps.
  1332. 50:00What do I do now? In this model, I
  1333. 50:03create a kind of menu so I can, for
  1334. 50:05example, give feedback, explore more
  1335. 50:07options, and choose more. And I, okay,
  1336. 50:10I put letter A, let's explore a little
  1337. 50:12more, I sent more details. Remember
  1338. 50:14what I said before? Not just machine
  1339. 50:16feedback, but human feedback as well.
  1340. 50:18I'm guiding my feedback as if it were a
  1341. 50:21person next to me towards what I want.
  1342. 50:23I understand. It made more suggestions,
  1343. 50:25I thought it was good, it gave me more
  1344. 50:27suggestions. Now combine these.
  1345. 50:29Remember when I said we were going to
  1346. 50:30do this? And now he's starting to do it
  1347. 50:32. I'm developing it because it's faster
  1348. 50:35this way, and I also save tokens if I'm
  1349. 50:37using an API rather than having him
  1350. 50:39develop what we're going to do every
  1351. 50:41time. I chose a specific one here, and
  1352. 50:44then I ask, now I want to detail what's
  1353. 50:46embedded in this agent, the explanation
  1354. 50:48of what I want, which is to create a
  1355. 50:50technical definition, a simple
  1356. 50:51definition, and an elevator pitch, plus
  1357. 50:53metaphors and brand suggestions. I
  1358. 50:56pre-program all of this so that my
  1359. 50:58students and mentees already have these
  1360. 51:01suggestions to explore together. We go
  1361. 51:04back to our work that we do weekly and
  1362. 51:07bi-weekly to explore together what the
  1363. 51:10best ideas are. Including finding some
  1364. 51:12suggestions for arguments, what
  1365. 51:15information and evidence I need to use
  1366. 51:17so that this argument I just created is
  1367. 51:20more, not just more, truthful, so I can
  1368. 51:23prove what I'm trying to say; including
  1369. 51:25finding arguments to help me prove what
  1370. 51:28we just created. So he finds all this,
  1371. 51:31goes through the whole process, gives
  1372. 51:32me back the options of what I want to
  1373. 51:34do, and so on. So that's the idea.
  1374. 51:36Instead of starting with something
  1375. 51:38already super complex, I develop at
  1376. 51:40least a structure as if it were an
  1377. 51:42index of what I want to do, and then I
  1378. 51:45develop it step by step. This is very
  1379. 51:47good, and I use it a lot, for example,
  1380. 51:49when creating a longer COP (Cost of
  1381. 51:51Action). I know there are seven steps I
  1382. 51:53have to hit, things I have to do, but
  1383. 51:55instead of doing it all at once, which
  1384. 51:57is very difficult and carries a high
  1385. 51:59risk of error, we subdivide it, and
  1386. 52:01with this reference, we work point by
  1387. 52:03point. The next one we have here is
  1388. 52:05this one, which is knowledge generation
  1389. 52:07through prompts. And you'll see that as
  1390. 52:09we advance, some of these techniques
  1391. 52:12become less and less practical. They're
  1392. 52:14really only for extreme cases, but in
  1393. 52:16this one I'll show you how I used it.
  1394. 52:18What's the idea behind this? It's about
  1395. 52:20generating knowledge that the AI itself
  1396. 52:22, the model itself, generates to use as
  1397. 52:24a basis for generating subsequent
  1398. 52:26answers. And although it's something a
  1399. 52:28bit more advanced, on a large scale
  1400. 52:31this is what companies like OpenA and
  1401. 52:33Meta consider doing to train their
  1402. 52:36models, that is, generating a kind of
  1403. 52:38synthetic knowledge, content to use and
  1404. 52:41train the models. So it's not a bad
  1405. 52:43idea at all. How did I use this? In the
  1406. 52:45other prompt I showed here, when I was
  1407. 52:48creating a profile of my ideal client,
  1408. 52:50which is to make a 10-word title. If
  1409. 52:52the model has more information about my
  1410. 52:55client, the chance of it getting those
  1411. 52:5710 words right is greater. So that's
  1412. 52:59what I do here to generate a profile of
  1413. 53:01the ideal client. I passed some
  1414. 53:02information and it generated this whole
  1415. 53:05profile with various pieces of
  1416. 53:07information that I then use to generate
  1417. 53:09the next steps. Sometimes it's not
  1418. 53:11about generating long texts, but even a
  1419. 53:13title. That's more information and
  1420. 53:15context that helps improve the answer.
  1421. 53:17The next one is the Maieutic prompt.
  1422. 53:20It's one I haven't used as much. Yes,
  1423. 53:22it does have applications, again, in
  1424. 53:23certain cases where you might be having
  1425. 53:25difficulty. The idea is to use a
  1426. 53:27teaching technique that we already use
  1427. 53:29in school, again remembering the golden
  1428. 53:31rule, more similar to how we learn,
  1429. 53:33which is to justify your answer. So we
  1430. 53:35ask the model to give the answer and
  1431. 53:37justify it, because then perhaps it
  1432. 53:39itself understands what mistakes it is
  1433. 53:41making and thus also improves the
  1434. 53:43answer. The next one we have here is
  1435. 53:45the reasoned generation of recovery,
  1436. 53:47which I have already translated
  1437. 53:49directly here. This is an article from
  1438. 53:51Meta, where they talk about one of the
  1439. 53:53limitations of all these models. We
  1440. 53:55talked about the techniques of first
  1441. 53:57shot, zero shot, chain of thought, but
  1442. 53:59there is a limit to how much I can put
  1443. 54:01into the prop, because I have, for
  1444. 54:03example, all my knowledge base from my
  1445. 54:05classes, transcripts, files, videos and
  1446. 54:08podcasts. So here they suggest that
  1447. 54:10this is the next step. This is already
  1448. 54:12much more advanced, which I know most
  1449. 54:14people here will not apply. But for
  1450. 54:16those who really want to advance and
  1451. 54:18get even better answers, it's not just
  1452. 54:21about putting it in the prompt: you
  1453. 54:23combine language models so that they
  1454. 54:25work with an external knowledge base to
  1455. 54:27argue the answer and, with that, again,
  1456. 54:30produce a much better result. I'll show
  1457. 54:32you two examples now. One a little like
  1458. 54:35this, not exactly what they talk about
  1459. 54:36in this article, and the other a little
  1460. 54:38more advanced, but also nothing crazy,
  1461. 54:40so you can see how this works in
  1462. 54:42practice. So I'm here in Obsidian,
  1463. 54:44which is the tool I use for note-taking
  1464. 54:46. And I'm going to show you what the
  1465. 54:48idea is, because as I said, relying
  1466. 54:50only on the prompt itself has a certain
  1467. 54:52limit. Yes, we'll put this information
  1468. 54:54in the prompt, but ideally we should
  1469. 54:56have a way to consult other information
  1470. 54:59, other knowledge bases in a dynamic
  1471. 55:01way. I'll show you a super simple one
  1472. 55:03here. So, here in Obsidian there's a
  1473. 55:05plugin called Copilot, which is the one
  1474. 55:07I'm using, that integrates different
  1475. 55:09models that I connect to my API. In
  1476. 55:11this case, I'm using Clode because I
  1477. 55:13like it a lot. And here I can see in
  1478. 55:15the chat and connect some of this
  1479. 55:17information that I already have saved,
  1480. 55:19which I use to do what I need. So I
  1481. 55:21would say something like, use the
  1482. 55:23information you find when I press the
  1483. 55:26bracket; it brings me this menu where I
  1484. 55:29can literally link this article that's
  1485. 55:31here, and it will put that information
  1486. 55:34in my prompt. So, use the information
  1487. 55:36you find in persuasive premises and
  1488. 55:39then consult my client profile, which
  1489. 55:44is here, using what you learn, client
  1490. 55:487D. And now I press enter, and behind
  1491. 55:51the scenes it will do this and send
  1492. 55:54this information to create it. So the
  1493. 55:56advantage is that with a prompt that,
  1494. 55:58in theory, if you look at it, is
  1495. 56:00relatively small, it's just this. But
  1496. 56:03what happens behind the scenes? I'm
  1497. 56:05sending all this information that's
  1498. 56:07here. Here, there are some details of
  1499. 56:09what I go through in my mentorship
  1500. 56:11program about seven criteria that I
  1501. 56:13want the person to look at to design
  1502. 56:14the profile of an ideal client. And
  1503. 56:16here's an overview of my client that
  1504. 56:19I've already designed, from the
  1505. 56:20mechanism and offer to who my client is
  1506. 56:23, with more specific information. And
  1507. 56:25based on that, it can give me a much
  1508. 56:27better answer, as you can see here. So,
  1509. 56:30that's one way to use it. Now, there
  1510. 56:33are others, for example, if I come here
  1511. 56:35to this tool, which is ChatBase, which
  1512. 56:38you might know, that uses the Open API
  1513. 56:40behind it to create a chatbot: here I
  1514. 56:42show how it's used, but in a more
  1515. 56:44dynamic way, where I have a chat that
  1516. 56:47could be embedded in my page, on
  1517. 56:49WhatsApp, on Instagram, or in other
  1518. 56:51ways. And I created a simple
  1519. 56:53conversation just testing what the
  1520. 56:55one-to-one rule is, which is one of the
  1521. 56:57concepts I teach in my mentorship
  1522. 56:58program. And it gives this answer. You
  1523. 57:00can see that this isn't an answer it
  1524. 57:02pulled from its training database. It
  1525. 57:05went to the documents I uploaded here,
  1526. 57:07which we trained on. Flávia helped me
  1527. 57:10do this, and from there, he gave the
  1528. 57:12answer and gave an example I wanted,
  1529. 57:14strategies on how to use it, and then,
  1530. 57:16what is the 7D profile of a client as
  1531. 57:18well, which is this concept I just
  1532. 57:20showed that's in Obsidian, it's in my
  1533. 57:23classes; he takes this and returns it
  1534. 57:25as an answer. All of this here has some
  1535. 57:27information from the model, the
  1536. 57:29temperature that is used, which I
  1537. 57:30mentioned before. We come here to this
  1538. 57:32panel of this tool, which is the base
  1539. 57:34chat. And what did we do? We train it
  1540. 57:37so that it can respond with this
  1541. 57:39information. So now we don't just give
  1542. 57:42answers based on the prompt or what
  1543. 57:44that model has in terms of information,
  1544. 57:47but we pull in external knowledge and
  1545. 57:49upload it through files. You can see
  1546. 57:52that we uploaded the transcript.
  1547. 57:53Actually, not just the transcript, okay
  1548. 57:55? There's a right way to handle this
  1549. 57:57information to upload it here. And
  1550. 58:00giving you a tip, the best way is to
  1551. 58:02use a question and answer format. So,
  1552. 58:04there are prompts we use that transform
  1553. 58:06the transcripts I had from my classes
  1554. 58:09into questions and answers, because it
  1555. 58:11more closely resembles what will happen
  1556. 58:13when someone comes here to a chat;
  1557. 58:15they'll probably ask questions. If that
  1558. 58:18question is as similar as possible to
  1559. 58:20what's already in their training
  1560. 58:22database, the chance of them answering
  1561. 58:24with greater confidence is higher,
  1562. 58:26which is what happens here. So I have
  1563. 58:28here not only the transcript files, but
  1564. 58:31also the processed transcript files
  1565. 58:34that we uploaded here. I could also
  1566. 58:36upload more from my website, which
  1567. 58:38would then be more or less a questions
  1568. 58:40and answers section, and even from
  1569. 58:42Notion. So here in the Questions and
  1570. 58:44Answers section, we come here to add
  1571. 58:46some of those questions that perhaps
  1572. 58:48weren't covered or weren't good enough,
  1573. 58:50which we can see here in activities, at
  1574. 58:52least in this tool here. Here I come
  1575. 58:55and you can see my chat, and here it
  1576. 58:57gives me a confidence index of how well
  1577. 58:59it's been answering. My confidence is
  1578. 59:02low. Here it's 0.88, here it's 9.50. So
  1579. 59:06, depending on how much of that
  1580. 59:08knowledge he believes he has in his
  1581. 59:10training database, he'll give a better
  1582. 59:13answer. So this, let's say, this
  1583. 59:15article they describe here, is a way
  1584. 59:18that you don't just solve it with the
  1585. 59:20prompt; it's the prompt with an extra
  1586. 59:23knowledge base to add this information
  1587. 59:26and, with that, generate the closest
  1588. 59:28possible answer to what you already
  1589. 59:31know, whether it's from a class, a
  1590. 59:33transcript, a PDF, or articles you've
  1591. 59:36already created that you feed into some
  1592. 59:39tool. Here I only showed one of them,
  1593. 59:40but there are so many others to
  1594. 59:42generate the perfect answer. Now, this
  1595. 59:44one I found very interesting, which is
  1596. 59:46how to use programming language
  1597. 59:48techniques, but in language models. So,
  1598. 59:51what's the idea here? They demonstrate
  1599. 59:53in this example how they used, for
  1600. 59:55example, the creation of variables to
  1601. 59:58use in the reasoning chain of the model
  1602. 1:00:01. How did I use it? When I make, for
  1603. 1:00:03example, announcements that I send to
  1604. 1:00:04students and mentees, instead of having
  1605. 1:00:06to put them in the middle of the text,
  1606. 1:00:08I used this idea of variables and I
  1607. 1:00:09create them and put them at the
  1608. 1:00:11beginning. Using my XML tags here, I'm
  1609. 1:00:13placing variables I created, for
  1610. 1:00:16example, audience, main promise,
  1611. 1:00:19misleading culprit, and then below I
  1612. 1:00:21have an ad template where I leave space
  1613. 1:00:25for these variables. This makes it
  1614. 1:00:27easier because I'm asking the template
  1615. 1:00:30to adjust the language, but without
  1616. 1:00:32modifying it too much. So, if I have a
  1617. 1:00:34template for a specific copy that I
  1618. 1:00:36want my students to sign up for without
  1619. 1:00:39changing it too much, this is one of
  1620. 1:00:41the best ways to do it. So, this is one
  1621. 1:00:43way to use this technique that comes
  1622. 1:00:45from programming languages, but for
  1623. 1:00:48prompts, for creating text, copy, and
  1624. 1:00:50others. And now the last one for this
  1625. 1:00:52moment is this one, which is excellent.
  1626. 1:00:54It's a way of thinking for more
  1627. 1:00:57sophisticated agents that don't perform
  1628. 1:00:59a single task, but multiple tasks, like
  1629. 1:01:02some examples I'll show, such as React,
  1630. 1:01:05which uses reasoning with actions. In
  1631. 1:01:07other words, if I wanted to execute a
  1632. 1:01:09larger task, I wouldn't simply do it in
  1633. 1:01:12a single pass. I would have a first
  1634. 1:01:14step, a second, a third, and a fourth.
  1635. 1:01:16And each of these steps might have
  1636. 1:01:18tasks and subtasks. So this here, this
  1637. 1:01:21is the idea behind this paper developed
  1638. 1:01:24by the people at Princeton and Google,
  1639. 1:01:26where they show with examples here, and
  1640. 1:01:29I'll show more or less a practical
  1641. 1:01:31example, where for a given task they
  1642. 1:01:34divide it starting from thought to the
  1643. 1:01:36first action and observation. If you've
  1644. 1:01:39ever used some kind of mini-agi, baby
  1645. 1:01:41or something like that, it's this type
  1646. 1:01:43that works, where it generates this
  1647. 1:01:45first thought and then it develops a
  1648. 1:01:47chain, okay? OK? But this generates a
  1649. 1:01:49second thought that I need to do such
  1650. 1:01:52and such and such, which is how we
  1651. 1:01:54would reason. So that's the moral of
  1652. 1:01:57this prompt technique, where we put
  1653. 1:02:00reason and action. It's not simply
  1654. 1:02:02executing all at once, but questioning
  1655. 1:02:05and seeing what each of our actions
  1656. 1:02:08implies to decide the next steps. It's
  1657. 1:02:10not exactly that, okay? But, for
  1658. 1:02:12example, in this one where I have a
  1659. 1:02:14prompt that helps me edit my emails,
  1660. 1:02:16what I do is divide it up, which is one
  1661. 1:02:18of the techniques we saw before in
  1662. 1:02:20thinking and suggestions, because that
  1663. 1:02:22way I can see some of the ideas it's
  1664. 1:02:24analyzing before seeing the general
  1665. 1:02:26suggestions. And as we saw earlier,
  1666. 1:02:29because I give the model space to think
  1667. 1:02:32, the chance is that its comments later
  1668. 1:02:35will be better. And as an example of
  1669. 1:02:37how this is more or less embedded, I'm
  1670. 1:02:39here on the website of one of these
  1671. 1:02:41Baby ADI agents, where it executes a
  1672. 1:02:43simple plan—I just gave this command
  1673. 1:02:45instruction here—and it starts
  1674. 1:02:47developing subtasks. So it goes through
  1675. 1:02:50this process of reasoning action,
  1676. 1:02:51reasoning action. And it realizes that
  1677. 1:02:54there are specific tasks it needs to do
  1678. 1:02:56and the dependencies of each one, and
  1679. 1:02:58then it starts executing one at a time.
  1680. 1:03:00You can see that some of them gave
  1681. 1:03:01errors, so it's not a perfect system
  1682. 1:03:03yet, but that's the idea of this
  1683. 1:03:05technique, which for more sophisticated
  1684. 1:03:07agents is the way to solve problems.
  1685. 1:03:09And now, to close this part, one of the
  1686. 1:03:11biggest difficulties many people have
  1687. 1:03:13is how to avoid hallucinations, because
  1688. 1:03:16if you use it to create copy, emails,
  1689. 1:03:18or even as a chatbot, sometimes this
  1690. 1:03:20bot can invent things that aren't very
  1691. 1:03:22nice. There are even some funny stories
  1692. 1:03:24about that. How do we do it? There are
  1693. 1:03:26some techniques. I'm, for example, here
  1694. 1:03:27in the EPT chat. If I come here to my
  1695. 1:03:29little bubble and click to customize
  1696. 1:03:31the EPT chat, it opens this screen here
  1697. 1:03:33that we talked about earlier. And
  1698. 1:03:35here's the secret. How do you want the
  1699. 1:03:37GPT chat to respond? First, you can see
  1700. 1:03:39that I put the thought process strategy
  1701. 1:03:42of reasoning step by step. And you can
  1702. 1:03:45see that this command here helps me
  1703. 1:03:47with that to avoid hallucinations.
  1704. 1:03:49Generate accurate and factual content.
  1705. 1:03:51Then I have others: when citing sources
  1706. 1:03:54, indicate the link or reference. And
  1707. 1:03:56this one especially: if you speculate
  1708. 1:03:59or predict something, let me know, feel
  1709. 1:04:02free. And this is the main part, okay?
  1710. 1:04:04This is a recommendation from the model
  1711. 1:04:06itself, from their documentation. Feel
  1712. 1:04:07free to say you don't know the answer,
  1713. 1:04:10because if you don't, the models will
  1714. 1:04:12make things up, because they want to
  1715. 1:04:14please you. So, let them be free to
  1716. 1:04:17tell you if they don't know the answer.
  1717. 1:04:20Just this helps a lot to avoid many of
  1718. 1:04:22the hallucinations so that they don't
  1719. 1:04:25invent things that aren't true. Another
  1720. 1:04:27technique that helps a lot is similar
  1721. 1:04:29to what we saw earlier: before
  1722. 1:04:31processing the answer, ask them to look
  1723. 1:04:34for quotes or insights in the text you
  1724. 1:04:37are sending, because then, with that,
  1725. 1:04:39they can use this information and you
  1726. 1:04:41can instruct them. Try to base yourself
  1727. 1:04:44as much as possible on the situations
  1728. 1:04:46or, again, give them permission to say
  1729. 1:04:49"I don't know." Doing this and putting
  1730. 1:04:52it here in the output, in the explicit
  1731. 1:04:54result, reduces the chances of them
  1732. 1:04:56inventing something. And lastly,
  1733. 1:04:58another thing that few people know,
  1734. 1:05:00when I make, for example, the summary
  1735. 1:05:02and tasks of my mentoring that I taught
  1736. 1:05:04in the last video, I don't want them to
  1737. 1:05:06invent too much. I want it to stay as
  1738. 1:05:07close as possible to what I described,
  1739. 1:05:09which is in this prompt here. So, one
  1740. 1:05:11setting that needs to be used is to go
  1741. 1:05:13to the template settings. In this case,
  1742. 1:05:16I'm using, for example, the Untropic
  1743. 1:05:18Cloud template, but it would be more of
  1744. 1:05:19an API thing, because the GPT chat
  1745. 1:05:21itself doesn't have this specifically.
  1746. 1:05:23So, it's more for the API, for those
  1747. 1:05:24who use, for example, chatbots, and
  1748. 1:05:26it's about lowering the temperature,
  1749. 1:05:28because the higher the temperature, the
  1750. 1:05:30greater the creativity. So, if I want
  1751. 1:05:32ideas, titles, and other things, I'll
  1752. 1:05:34increase it because I want it to invent
  1753. 1:05:36. If I don't want that, and I want it
  1754. 1:05:38to be more factual and more similar to
  1755. 1:05:40the text I sent, I'll lower the type to
  1756. 1:05:4301, 02, maximum 03, so that it doesn't
  1757. 1:05:45deviate too much from the received text
  1758. 1:05:47. And the last thing to guarantee is
  1759. 1:05:49this technique we saw before of
  1760. 1:05:51self-consistency, where you can ask it
  1761. 1:05:54to generate more than one response and
  1762. 1:05:56have it develop a consensus on what the
  1763. 1:05:59most expected response is. Okay? Now
  1764. 1:06:06let's see all this in practice in a
  1765. 1:06:08relatively complex, but quite large,
  1766. 1:06:10prompt for creating landing pages,
  1767. 1:06:12which is this one I developed in
  1768. 1:06:15partnership with the people at Great
  1769. 1:06:17Pages, a page builder in the market
  1770. 1:06:19that you might know. So I'm going to
  1771. 1:06:21take this prompt that I already have
  1772. 1:06:23here, saved in Notepad, to show you
  1773. 1:06:25what it's doing and how I programmed it
  1774. 1:06:28to do this. Before we evaluate the
  1775. 1:06:30prompt itself, this is the agent
  1776. 1:06:32configuration screen. If you don't know
  1777. 1:06:34how to do it, there will be a link
  1778. 1:06:35above or right after, or in the
  1779. 1:06:37description, to see a lesson on how to
  1780. 1:06:39create your first agent, take
  1781. 1:06:40everything we've been doing now and put
  1782. 1:06:42it in here. But at this moment I just
  1783. 1:06:44want to study the prompt itself more,
  1784. 1:06:45because it's important, okay? And some
  1785. 1:06:47of the other configurations we have
  1786. 1:06:49here, mainly because we have this file
  1787. 1:06:51in this format, which is what we're
  1788. 1:06:53going to look at. First thing, I want
  1789. 1:06:55to show you the type of result it
  1790. 1:06:57generates, okay? Because from here on
  1791. 1:06:59out, I want you to start thinking, "How
  1792. 1:07:01did he do that?" And then I'll show you
  1793. 1:07:04how it's done in practice in the prompt
  1794. 1:07:06so you understand not only how to
  1795. 1:07:08generate something more complex than a
  1796. 1:07:11simple response, but also multi-step
  1797. 1:07:13processes, if necessary. For example,
  1798. 1:07:15asking for customer information, asking
  1799. 1:07:17for more details and working on that,
  1800. 1:07:19which is something many people want.
  1801. 1:07:20And some of the techniques we've
  1802. 1:07:22studied so far, for example, the one
  1803. 1:07:24from React, can make a lot of sense. So
  1804. 1:07:27initially, I just clicked on "start,"
  1805. 1:07:30which is one of the conversation
  1806. 1:07:32starter buttons I defined here with
  1807. 1:07:34some basic functions. I put this one
  1808. 1:07:37here, "start," and it began. This is a
  1809. 1:07:39standard text I put there for it to say
  1810. 1:07:42every time. Initially, in a next
  1811. 1:07:44example I'll show you of one of the
  1812. 1:07:46most used GPTs in the world, they use
  1813. 1:07:48something similar. I'll show you how I
  1814. 1:07:50did it. Here I leave two links. Number
  1815. 1:07:52one, this one for the person to click.
  1816. 1:07:54And there's already a way to do an
  1817. 1:07:55opt-in. And I got a lead, in case other
  1818. 1:07:57people use it, because I have agents
  1819. 1:07:59that are public and others that aren't.
  1820. 1:08:02And I also want to mention that in this
  1821. 1:08:04case I developed a landing page
  1822. 1:08:06template that's in PDF format. How do I
  1823. 1:08:08attach it here? Actually, I just
  1824. 1:08:09created a link, and I'll show you how I
  1825. 1:08:12did it within Promptu. And this is just
  1826. 1:08:16a PDF. A simple PDF that I put together
  1827. 1:08:19with this structure, numbering each of
  1828. 1:08:21the sections. This is more of a visual
  1829. 1:08:24reference for those using the agent to
  1830. 1:08:26find their way around more easily. So I
  1831. 1:08:28created this for my students and for
  1832. 1:08:30the Great Pages team to make it easier
  1833. 1:08:32for them. And I just thought it would
  1834. 1:08:34be interesting to put it here right
  1835. 1:08:35away so that people can click on this
  1836. 1:08:37link and access this template. Then, as
  1837. 1:08:39they fill it out, they come here and
  1838. 1:08:40they know which section I'm talking
  1839. 1:08:42about. As I said, more of a visual
  1840. 1:08:44reference. Then it begins. First, you
  1841. 1:08:46already have the customer avatar. I
  1842. 1:08:47programmed this to ask...I sent some
  1843. 1:08:49basic information about what I have,
  1844. 1:08:51and it starts: "Okay, I understand.
  1845. 1:08:53Let's start the tasks. Here are the
  1846. 1:08:56sessions we have, how it pulls these
  1847. 1:08:58sessions, and the details of each one
  1848. 1:09:01are what I'm going to show you how I
  1849. 1:09:03programmed in this prompt. Which
  1850. 1:09:05sessions would you like to create?
  1851. 1:09:07First, let's start with session two,
  1852. 1:09:09the central problem. Here are the
  1853. 1:09:11details, and here it makes a brief
  1854. 1:09:13draft. I'm not going to go into details
  1855. 1:09:15now about whether it's good, bad, worse
  1856. 1:09:16, or better. In this case, I want to
  1857. 1:09:18show you. But of course, I try to pull
  1858. 1:09:20it in to get the best possible answer,
  1859. 1:09:22at most having a final edit before
  1860. 1:09:23going to the site itself. Here it
  1861. 1:09:25already gives some suggestions of what
  1862. 1:09:27to do, and it says:' Okay, perfect. Did
  1863. 1:09:28you like the draft? Great. Which
  1864. 1:09:30session do you want to continue with
  1865. 1:09:32next? 'And then the process continues
  1866. 1:09:34here, where I can create more than one
  1867. 1:09:35session at a time. So, if the person
  1868. 1:09:37wants to create other sessions, they
  1869. 1:09:38give the options here. They can consult
  1870. 1:09:41the model here to get an idea of what
  1871. 1:09:43it's about and ask this specific agent
  1872. 1:09:45to create it for them. Now, how..." How
  1873. 1:09:47did I do all this? How did I program it
  1874. 1:09:49here, in the prompt along with this
  1875. 1:09:52file, to produce this kind of result?
  1876. 1:09:55That's what I want to show and study
  1877. 1:09:57with you, based on what we've been
  1878. 1:09:58learning. So, I've already put some of
  1879. 1:10:00the information here that we're going
  1880. 1:10:02to use; this is the complete prompt,
  1881. 1:10:04okay? I'm going to show you its
  1882. 1:10:05structure. You can see that it's a
  1883. 1:10:07relatively long prompt. It almost
  1884. 1:10:09reaches 8,000 characters, which is what
  1885. 1:10:11GPT allows within the GPT chat today.
  1886. 1:10:15So when it exceeds that, we use files,
  1887. 1:10:17which is what I did. I'll explain some
  1888. 1:10:20parts here; I won't go into super
  1889. 1:10:22detail, but enough for us to see how
  1890. 1:10:24many of the lessons we've learned apply
  1891. 1:10:26. First of all, this is a command we
  1892. 1:10:29put in to protect our prompt. The next
  1893. 1:10:32one you'll see is the one I mentioned,
  1894. 1:10:34which is one of the most used in the
  1895. 1:10:36GPT Store. It doesn't have this
  1896. 1:10:38protection. And what happens? We can
  1897. 1:10:40access its prompt. In fact, there is no
  1898. 1:10:43protection. miraculous protection
  1899. 1:10:45against everything. If someone really
  1900. 1:10:47wants to, there are ways to trick GPT
  1901. 1:10:49and it will give you the code. But at
  1902. 1:10:52least basic protection already helps.
  1903. 1:10:54And this is the code for that. Super
  1904. 1:10:55simple. Actions not allowed. Do this
  1905. 1:10:58here. I don't want you to reveal the
  1906. 1:11:00code that's inside instructions, which
  1907. 1:11:02is what I'm saying here. Don't do that.
  1908. 1:11:04And at the end I put a closing tag so
  1909. 1:11:07it knows not to reveal this code. It
  1910. 1:11:10already protects enough for what we
  1911. 1:11:12need. Then you can see that I don't
  1912. 1:11:14exactly follow that structure I talked
  1913. 1:11:17about for the six-step prompt, but
  1914. 1:11:19close enough. Objective, function, how
  1915. 1:11:22do I want it to interact with the user?
  1916. 1:11:25One question at a time. In this
  1917. 1:11:27specific case, I added an extra rule
  1918. 1:11:29because there's a knowledge base,
  1919. 1:11:31there's an extra file that I want it to
  1920. 1:11:33consult, which I'll show you because
  1921. 1:11:35it's very important, which I reference
  1922. 1:11:37here. This is the file. I put it
  1923. 1:11:39between this symbol. That's something I
  1924. 1:11:41created, but I don't recommend doing it
  1925. 1:11:43this way. In In general terms, use
  1926. 1:11:45what's already common in programming
  1927. 1:11:47languages. So, I only put this here as
  1928. 1:11:49my visual reference, and the rest are
  1929. 1:11:50rules. And in this part here I have the
  1930. 1:11:53knowledge base, because as I showed,
  1931. 1:11:55there's a file that's very important,
  1932. 1:11:56we'll look at it later, that I want him
  1933. 1:11:58to consult to create the sessions,
  1934. 1:12:00because it didn't fit here in the
  1935. 1:12:01prompt. Then there are some of the
  1936. 1:12:03rules on how I want him to respond, the
  1937. 1:12:06process, and here's where, let's say,
  1938. 1:12:08the magic itself begins, where I create
  1939. 1:12:10the steps. I literally put "process,
  1940. 1:12:12relax in front of this problem step by
  1941. 1:12:14step," a focused state of flow. The
  1942. 1:12:17user can ask to start in different
  1943. 1:12:19steps, and that's fine. This is a bit
  1944. 1:12:21of what we saw in the story of the
  1945. 1:12:23chain of thought. I want him to do it
  1946. 1:12:25calmly, one question at a time,
  1947. 1:12:27confirming and answering, because that
  1948. 1:12:29increases the chances of the user
  1949. 1:12:31understanding how the GPT itself gives
  1950. 1:12:34a better answer. Step zero. Remember I
  1951. 1:12:36said I gave those welcome messages?
  1952. 1:12:38It's here. Print what's included within
  1953. 1:12:41the tags. Welcome. And that's what he
  1954. 1:12:43...Okay, right here. And you can see
  1955. 1:12:45that I formatted this as Markdown,
  1956. 1:12:47which is what we wanted. Remember I
  1957. 1:12:49mentioned one of the techniques at the
  1958. 1:12:51beginning? This is what I do: you put
  1959. 1:12:53the word you want to appear in square
  1960. 1:12:55brackets and the link in parentheses.
  1961. 1:12:57This is the formatting that, looking
  1962. 1:12:59here, becomes a clickable link that the
  1963. 1:13:02person can use. And here's a tip: it
  1964. 1:13:04doesn't always get this 100%right, but
  1965. 1:13:06in this case it worked perfectly. So I
  1966. 1:13:09put the landing page template here
  1967. 1:13:11again, using square brackets for the
  1968. 1:13:13word I want and parentheses to use the
  1969. 1:13:16link. And another tip for using
  1970. 1:13:18Markdown is that here in the GPT Chat
  1971. 1:13:22GPTS I can even add images, like I did.
  1972. 1:13:25How do I do that? If you look at the
  1973. 1:13:27prompt, I have this part of the code
  1974. 1:13:29here, which is what we did with the
  1975. 1:13:31links; but the detail is that you put
  1976. 1:13:33this exclamation point in front of it
  1977. 1:13:36and...Then follows the process: the
  1978. 1:13:38text (which in this case won't appear)
  1979. 1:13:40is in square brackets, and the link is
  1980. 1:13:42in parentheses. If you have any
  1981. 1:13:44questions, refer to what I said at the
  1982. 1:13:45beginning of the markdown section,
  1983. 1:13:46where I explain it a bit better, and
  1984. 1:13:47there are guides on the internet to
  1985. 1:13:49help you with this. Let's begin. And
  1986. 1:13:50then I'll list the next steps. So, this
  1987. 1:13:53was step zero. And here I literally
  1988. 1:13:56list the steps. Remember what I said at
  1989. 1:13:59the beginning, the main thing, of
  1990. 1:14:01course, techniques help, but even more
  1991. 1:14:03important is having a clear process
  1992. 1:14:04that, if you left it in someone's hands
  1993. 1:14:06, they would know what to do. So I try
  1994. 1:14:08to translate that here. I say first,
  1995. 1:14:11ask for details about the customer
  1996. 1:14:12avatar. Remember that many of the
  1997. 1:14:14prompts we saw were, for example,
  1998. 1:14:15knowledge generation? That's what I'm
  1999. 1:14:17embedding. How will they create a COP
  2000. 1:14:19if they don't know who the customer is
  2001. 1:14:21or what they need? So, by feeding them
  2002. 1:14:24this information, the chances increase.
  2003. 1:14:26But since I don't know if the person
  2004. 1:14:28who will use this agent already has it,
  2005. 1:14:30I put it here as one of the steps. To
  2006. 1:14:33ask if he knows, create them. Use it,
  2007. 1:14:39because that will improve our response.
  2008. 1:14:41In other words, I'm using that
  2009. 1:14:43knowledge generation technique so that
  2010. 1:14:46from that, and even a mix of that
  2011. 1:14:47programming code language, where I give
  2012. 1:14:50some suggestions of what I want him to
  2013. 1:14:52do to use in the next steps. Then I ask
  2014. 1:14:54if he knows about the offer, because if
  2015. 1:14:56I don't know the client and I don't
  2016. 1:14:57know what I'm going to offer, how am I
  2017. 1:14:59going to create my page? So I want him
  2018. 1:15:01to check that before we get to the page
  2019. 1:15:04. And that's why here in the agent,
  2020. 1:15:06when I sent, since I already sent
  2021. 1:15:09client information and offer
  2022. 1:15:11information, he went straight to the
  2023. 1:15:13next steps, because he understood that
  2024. 1:15:16steps 1, 2 and 3 were already OK. So
  2025. 1:15:19let's go to the next one, actually step
  2026. 1:15:21four as well, which was to help create
  2027. 1:15:23an offer. And he came to step five,
  2028. 1:15:26list the sessions of the
  2029. 1:15:28landingpages.jonjason template in your
  2030. 1:15:32knowledge base. Why Jason? Because this
  2031. 1:15:35JSNO format is It means JavaScript
  2032. 1:15:39object, that is, a JavaScript
  2033. 1:15:41annotation object. To better understand
  2034. 1:15:46it, it looks like this: Instead of
  2035. 1:15:47simply being this in Markdown as text,
  2036. 1:15:49which, for example, at the beginning, I
  2037. 1:15:52was putting like this: "Session one",
  2038. 1:15:54putting a heading, as I recommended in
  2039. 1:15:56Markdown, but for this specific case,
  2040. 1:15:58when we put it here in the agent and
  2041. 1:16:00put it as a file, it was constantly
  2042. 1:16:01getting lost. I would have it list
  2043. 1:16:03these sessions here, session one,
  2044. 1:16:05session two, and it would always get
  2045. 1:16:07lost. So this format in Jason is a
  2046. 1:16:10format that computers are used to
  2047. 1:16:13reading and, therefore, is easier for
  2048. 1:16:15it. After I changed to this, it never
  2049. 1:16:18got lost again. It never again got the
  2050. 1:16:20session name wrong, nor the order, nor
  2051. 1:16:23the details of each session it uses to
  2052. 1:16:25list. So, if I look here, when I said I
  2053. 1:16:27wanted to create problem number two, as
  2054. 1:16:29I put here, it takes the session,
  2055. 1:16:31session number two, central problem.
  2056. 1:16:33And here it lists close enough, if not
  2057. 1:16:36literally, what it has. In the file
  2058. 1:16:38here in section two. This is the real
  2059. 1:16:40cause of the problem, the missing 1%.
  2060. 1:16:42And here he did exactly that. Section
  2061. 1:16:44two, central problem. This is the real
  2062. 1:16:46cause of the problem, the missing 1%.
  2063. 1:16:48So that's the tip. When working with
  2064. 1:16:50long files, in addition to the others
  2065. 1:16:52I've already mentioned here, if you're
  2066. 1:16:54going to use it as a knowledge base,
  2067. 1:16:55try converting it to Jason. There are
  2068. 1:16:58some tools that do this on the internet
  2069. 1:17:00, but I literally took, I think it was
  2070. 1:17:02in the GPT chat itself, what I had as
  2071. 1:17:04Markdown text, sent it to him and said:
  2072. 1:17:07"Convert this into a Jason file so I
  2073. 1:17:09can download it later." And he did what
  2074. 1:17:11I needed, which I've now saved and
  2075. 1:17:13uploaded here for him to use as a
  2076. 1:17:15reference. So this is a very important
  2077. 1:17:17tip that took me a while to discover
  2078. 1:17:19through a lot of trial and error. Then
  2079. 1:17:21I discovered that this was the best way
  2080. 1:17:23to do it and I recommend that you do it
  2081. 1:17:25from this section here, he will take it
  2082. 1:17:27and then he follows the process. Now
  2083. 1:17:29that he has this here, I'm doing that
  2084. 1:17:31process of not exactly separating In
  2085. 1:17:34tags, but I'm feeding it information so
  2086. 1:17:36the user can read and understand it. Ah
  2087. 1:17:38, this is the structure that Bruno, in
  2088. 1:17:40this case, recommends. And based on
  2089. 1:17:42that, he will develop, and the more
  2090. 1:17:43information he has, the better the
  2091. 1:17:45response will be. And then he continues
  2092. 1:17:47here. L six. User selects the sessions,
  2093. 1:17:50generates them, reading the details of
  2094. 1:17:52this file, confirms each session,
  2095. 1:17:54repeats for additional sessions, and
  2096. 1:17:56that's what he does, without much
  2097. 1:17:58mystery, right? Then, in what we have
  2098. 1:18:00here, the rest, what is it? Drafts. I
  2099. 1:18:04give some more instructions for this
  2100. 1:18:06draft he created here, which is this
  2101. 1:18:08part where he does how I want it to be.
  2102. 1:18:11It's always about producing the best
  2103. 1:18:13text. Be creative, focus on creating
  2104. 1:18:15high-converting text. Focus on writing
  2105. 1:18:18in a simple way, without complicated
  2106. 1:18:20words. Again, the golden rule. How
  2107. 1:18:22would I instruct a person, in this case
  2108. 1:18:24, a copywriter, to write? I would give
  2109. 1:18:26them these tips, these instructions. So
  2110. 1:18:29, every time I noticed an error, I It
  2111. 1:18:31would come here and improve and improve
  2112. 1:18:33and improve. What's the advantage? Once
  2113. 1:18:35it's here, the tendency, even more so
  2114. 1:18:37with increasingly better models, is
  2115. 1:18:38that it already follows and does
  2116. 1:18:40exactly what I want. And lastly, at the
  2117. 1:18:42end here, the part about remembering to
  2118. 1:18:44reinforce anything that is very
  2119. 1:18:46specific, in case it's making a mistake
  2120. 1:18:48, sometimes it's worth repeating. This
  2121. 1:18:50is an extra tip. Just because you put
  2122. 1:18:52it once, depending on the size of the
  2123. 1:18:54text, doesn't mean it will follow 100%.
  2124. 1:18:56So, repeat it. And lastly, something
  2125. 1:18:59that isn't 100%proven. I tried to find
  2126. 1:19:02more scientific, let's say, reliable
  2127. 1:19:04studies, to see if the tip would make a
  2128. 1:19:06difference in the model's performance,
  2129. 1:19:08because I only saw some people talking
  2130. 1:19:10about tests that weren't reliable, that
  2131. 1:19:12if you repeated them, they wouldn't
  2132. 1:19:14reproduce and there's no proof. But in
  2133. 1:19:16the next prompt we'll see, in the next
  2134. 1:19:18agent we'll see, we also have this. So,
  2135. 1:19:20I thought it was interesting. Since it
  2136. 1:19:22doesn't take up much space, I'll leave
  2137. 1:19:23this here. If you do well Very well,
  2138. 1:19:25I'll give you a tip of 1,000,000. Why?
  2139. 1:19:28Because since these models are based on
  2140. 1:19:31and trained with many of our texts, how
  2141. 1:19:33do we work? The tendency is to reward
  2142. 1:19:36and penalize. So this is a reward, and
  2143. 1:19:38if you fail this task, you will be
  2144. 1:19:41fired and replaced—a threat. So I put
  2145. 1:19:44this here, no, if there's proof, if it
  2146. 1:19:46works, but since it doesn't take up
  2147. 1:19:48much space, there it is, and I'll close
  2148. 1:19:50with the instructions. So this is the
  2149. 1:19:52overview of the agent I created here,
  2150. 1:19:54here was the prompt, the initial
  2151. 1:19:56commands, the file that we just studied
  2152. 1:19:59here, the general prompt, and the
  2153. 1:20:01sessions worked on in Jason. As another
  2154. 1:20:04example, if you come here to the GPTs
  2155. 1:20:05store, one of the most used GPTs in the
  2156. 1:20:08world, which is here in the programming
  2157. 1:20:10section, is this one from GMW, whose
  2158. 1:20:11code I've already gotten in the past;
  2159. 1:20:13it was even running the command it's
  2160. 1:20:15developing for me, which is this one.
  2161. 1:20:17If you want to get how you get the
  2162. 1:20:19commands that aren't protected, I sent
  2163. 1:20:22you some GPT code; just type this
  2164. 1:20:24command here, and it will give you all
  2165. 1:20:26the code for that GPT, which you can
  2166. 1:20:28use as a base to build your own until
  2167. 1:20:31they eventually protect themselves, but
  2168. 1:20:33for now, that's enough. But this is a
  2169. 1:20:36very good prompt that's worth studying
  2170. 1:20:38briefly. Of course, I'll leave the code
  2171. 1:20:41for you later if you want to tinker
  2172. 1:20:42with it. So, what's the idea behind it?
  2173. 1:20:45It divides and organizes this
  2174. 1:20:47information. Much of what we've been
  2175. 1:20:50looking at, including how to create
  2176. 1:20:52shortcuts, as I did in the section
  2177. 1:20:53section where I type some letters and
  2178. 1:20:55it executes the next commands. So, you
  2179. 1:20:58can see that it starts by giving some
  2180. 1:21:00basic information, it starts by giving
  2181. 1:21:02very direct information in a list of
  2182. 1:21:05how it wants this blue GPT to act. You
  2183. 1:21:07can see that it even uses the tipping
  2184. 1:21:09technique; whether it works or not,
  2185. 1:21:11we're not sure. It even mentions some
  2186. 1:21:13things, which is an extra tip for
  2187. 1:21:15prompts, okay? In general, it's not
  2188. 1:21:18good to put "don't do this" because No,
  2189. 1:21:20because the way agents, not just agents
  2190. 1:21:23but prompts, read the tokens, it's
  2191. 1:21:25possible that it might read this here,
  2192. 1:21:27not do it, and then read this
  2193. 1:21:29separately and not understand that this
  2194. 1:21:32is a phrase together. So, in general,
  2195. 1:21:35it's better to try to put it in an
  2196. 1:21:37active and positive way. Do it in such
  2197. 1:21:40and such a way. Sometimes I complement
  2198. 1:21:42both, I say: "Do such and such, that is
  2199. 1:21:44, don't do X". Because as the models
  2200. 1:21:46are getting smaller and smaller, this
  2201. 1:21:48is less serious, but in general,
  2202. 1:21:49recommendations try to go for the
  2203. 1:21:51positive rather than the negative. And
  2204. 1:21:53here you can see that it starts to do
  2205. 1:21:54several other things. It puts something
  2206. 1:21:55similar to what I do. It used triple
  2207. 1:21:57quotes, because it's in the Python
  2208. 1:22:00language, which is how the GPT chat is
  2209. 1:22:02made. It knows that this is code to be
  2210. 1:22:05read all together. And it says: "Put
  2211. 1:22:07this message every time you start, or
  2212. 1:22:10welcome traveler.""And here's where the
  2213. 1:22:13rest of it begins. Tutorial. He starts
  2214. 1:22:15using it now. The way he organizes it
  2215. 1:22:17is cool because it's at the character
  2216. 1:22:19limit. It has 7900, if I'm not mistaken
  2217. 1:22:21. And you can see that he also uses
  2218. 1:22:22Markdown to divide it. He puts these
  2219. 1:22:24hashes here that divide it into some
  2220. 1:22:26sections, and for each of them he puts
  2221. 1:22:29letters of what he wants it to do some
  2222. 1:22:31of the shortcuts. He even creates a
  2223. 1:22:34little menu here. You can see again how
  2224. 1:22:36he separates a hash into twos and
  2225. 1:22:37threes, which is heading 1, 2, and 3.
  2226. 1:22:39In other words, here it may not make
  2227. 1:22:41that much difference, but visually,
  2228. 1:22:42going to the machine to interpret it
  2229. 1:22:44will make a difference because it's a
  2230. 1:22:46more organized text. And it's something
  2231. 1:22:48similar to what I did in another prompt
  2232. 1:22:50of mine, where I organized it here
  2233. 1:22:51again, in the same way as the other: I
  2234. 1:22:53gave the instructions and, as a second
  2235. 1:22:56step, I leave here as" what do you want
  2236. 1:22:58to do now "and created a little menu so
  2237. 1:23:00that, when I or my students are using
  2238. 1:23:02it, instead of having to type, it
  2239. 1:23:03already offers options. I want to, you
  2240. 1:23:05want to give feedback, explore options.
  2241. 1:23:07" Or choose one that's a surprising
  2242. 1:23:09main cause, which is what we were doing
  2243. 1:23:12. So it does something very similar
  2244. 1:23:14here. It gives commands like in
  2245. 1:23:15Counter-Strike, right, the WASD keys,
  2246. 1:23:17whatever you want it to do, gives other
  2247. 1:23:19shortcuts, and here it does it. It's
  2248. 1:23:21quite interesting to read this prompt,
  2249. 1:23:23okay? There are some cool things, as it
  2250. 1:23:25already mentions, some tips on how to
  2251. 1:23:27use certain links so that the agent
  2252. 1:23:29itself can create these external links.
  2253. 1:23:31There are several other functions, I
  2254. 1:23:33won't read them one by one because I
  2255. 1:23:35just wanted to show the general way it
  2256. 1:23:37organizes things and some slightly more
  2257. 1:23:39advanced techniques, mixing programming
  2258. 1:23:42into how it does it. You can even see
  2259. 1:23:44that it has some external files here,
  2260. 1:23:46like these two here that it put, which
  2261. 1:23:49it uses to do things. A few final
  2262. 1:23:51reminders and one last warning that if
  2263. 1:23:53you use external documents, reference
  2264. 1:23:56them most of the time, because I want
  2265. 1:23:59you to use them and not just invent
  2266. 1:24:01anything. Great, Bruno. I understood
  2267. 1:24:08everything you said, but there's a
  2268. 1:24:09little problem. It seems a bit too
  2269. 1:24:11complicated. So don't worry, Oh noble
  2270. 1:24:13warrior, because I created, or rather,
  2271. 1:24:15I'm finishing creating, this prompt
  2272. 1:24:17engineering agent here—I might change
  2273. 1:24:19the name, but I'll leave the link below
  2274. 1:24:21in the description—precisely to help
  2275. 1:24:23you create better prompts. So instead
  2276. 1:24:25of having to do everything from scratch
  2277. 1:24:27, you just come here, and this is a
  2278. 1:24:29pre-programmed agent with everything
  2279. 1:24:31we've seen here and a little more to
  2280. 1:24:33help you create better prompts. So, if
  2281. 1:24:35you have any questions, you can come
  2282. 1:24:36here, click to help me create a prompt,
  2283. 1:24:38and follow the instructions that I've
  2284. 1:24:40already pre-programmed with many of the
  2285. 1:24:42best techniques you've just learned.
  2286. 1:24:44Another very good tool besides my agent
  2287. 1:24:46that I'll be optimizing is this one
  2288. 1:24:48from Antropic itself, which is in their
  2289. 1:24:50API console. It has a "generate prompt"
  2290. 1:24:53option that you can click and use. For
  2291. 1:24:55example, I already have a text here to
  2292. 1:24:57write a 300-word email promoting my
  2293. 1:24:59artificial intelligence mentorship for
  2294. 1:25:01experts, mentors, and consultants. And,
  2295. 1:25:04by clicking here to generate a prompt,
  2296. 1:25:06it will pick up and use many of the
  2297. 1:25:07strategies and techniques. What you've
  2298. 1:25:10been learning here, in addition to
  2299. 1:25:12their own documentation, generates a
  2300. 1:25:14very complete prompt. As you can see,
  2301. 1:25:16it makes extensive use of tags,
  2302. 1:25:18variables, and many other guidelines,
  2303. 1:25:20which greatly shortens the process. The
  2304. 1:25:23great thing is that not only is it very
  2305. 1:25:25detailed and uses all the techniques,
  2306. 1:25:27but it also clearly states what
  2307. 1:25:29activities the agent itself should
  2308. 1:25:30perform. And then you can click here to
  2309. 1:25:33start editing. This will take the
  2310. 1:25:35prompt you just created and put it into
  2311. 1:25:38the console, which, as I showed before,
  2312. 1:25:40we can edit. So here's the prompt. I
  2313. 1:25:43have my variables here, which are in
  2314. 1:25:45red with these two brackets. If I click
  2315. 1:25:47on this little variables button, I can
  2316. 1:25:50edit them directly and then run the
  2317. 1:25:52code. And to access this agent, you can
  2318. 1:25:54access the link below in the
  2319. 1:25:56description, which has not only the
  2320. 1:25:58link to the agent itself, but also a
  2321. 1:26:00summary and a complete guide to
  2322. 1:26:02everything you just learned in this
  2323. 1:26:04lesson to make your life easier and
  2324. 1:26:06help you implement more easily. So
  2325. 1:26:08click on the link below the description
  2326. 1:26:10and you'll have access to this guide.
  2327. 1:26:12Ah, but Bruno, why didn't you just go
  2328. 1:26:13straight to teaching this tool instead
  2329. 1:26:15of giving this whole lesson? Because
  2330. 1:26:17it's no use just giving you the tool,
  2331. 1:26:18putting a Ferrari in your hands, if you
  2332. 1:26:20don't know what it's producing. It
  2333. 1:26:22won't generate perfect results. You
  2334. 1:26:24need to understand what the prompt it
  2335. 1:26:26generates is trying to do, just like a
  2336. 1:26:29programming code, so you can improve it
  2337. 1:26:31, but at least it gets a good part of
  2338. 1:26:33the hard work done. Of course, that's
  2339. 1:26:36just the prompt itself. And if you want
  2340. 1:26:38to transform it into a real agent that
  2341. 1:26:40helps you automate tasks, save energy,
  2342. 1:26:43and save time, then you need to know
  2343. 1:26:45how to transform these prompts into
  2344. 1:26:47agents. And for that, I recommend this
  2345. 1:26:49video here that shows you how to create
  2346. 1:26:51your first agent in just 32 minutes.
  2347. 1:26:53Click here and I'll see you on the
  2348. 1:26:55other side.

About this transcript

This page contains the full transcript of Engenharia de Prompt: O Guia Definitivo by Bruno Picinini, generated from the public captions YouTube serves with the video. The transcript has 16,174 words across 2,348 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.