why you suck at prompt engineering (and how to fix it)
摘要
TLDRThe video critiques common pitfalls in prompt engineering and emphasizes advancing beyond simplistic templates towards strategic and knowledgeable approaches. It discusses the 'midwit' meme, where individuals overcomplicate tasks, missing efficient and direct solutions available to both low and high IQ individuals. By framing prompt engineering as a linear progression — from novice use of AI systems like ChatGPT to expert manipulation — the creator argues for a deepening understanding of techniques such as role prompting, chain of thought, and few-shot prompting. These strategies enhance AI output quality, reduce reliance on more powerful models, and highlight the evolving nature of AI in business. By treating English as a new programming language, the creator shares insights on structure, including markdown formatting, and the emotional influence on AI accuracy. Highlighting efficiency, the video also challenges viewers to improve prompt crafting to leverage cheaper models, ultimately promising significant accuracy gains and business efficacy.
心得
- 🧠 Understand the significance of good prompt engineering for effective AI solutions.
- 🔄 Move beyond rigid templates to thoughtful prompt structuring.
- 🏆 Strive for efficient and effective AI system design.
- 🔍 Utilize techniques like role and emotional prompting for better results.
- 💡 Recognize English as the new programming tool for AI.
- 🏗️ Incorporate markdown formatting for clear AI instruction.
- 📝 Implement few-shot prompting with examples to enhance accuracy.
- 🎯 Focus on cheaper, faster AI models with optimized prompts.
- 💼 Extend prompt engineering strategies to various AI applications.
- 🚀 Aim for accuracy improvement and better AI task performance.
时间轴
- 00:00:00 - 00:05:00
In this video, the speaker discusses prompt engineering, comparing it with a meme about 'midwit' behavior, where people in the middle range overcomplicate simple processes unlike those with low or high IQ who reach the same simple solutions. The aim is to move viewers from being 'midwits' who rely on generic prompt templates to becoming insightful prompt engineers.
- 00:05:00 - 00:10:00
The speaker highlights how understanding the science and principles behind prompt engineering can help one become a proficient AI system user. This expertise allows for extracting maximum value from language models (LLMs), making AI systems more efficient and useful.
- 00:10:00 - 00:15:00
The speaker introduces the concept of conversational prompt engineering versus single shot prompting. Conversational prompting involves interactive prompts with follow-up questions, typically used for personal productivity. Single-shot prompting, however, involves creating reliable, automated systems with no further human intervention.
- 00:15:00 - 00:20:00
The speaker emphasizes the importance of mastering single-shot prompt engineering to build scalable AI systems that can execute tasks reliably, highlighting its potential to generate substantial economic value. The necessity of English proficiency in prompt creation is explained, citing it as the new 'programming language'.
- 00:20:00 - 00:25:00
The speaker asserts that mastering prompt engineering is crucial for working with AI voice systems, AI agents, AI task automations, and building custom AI tools. Such skills ensure the creation of valuable, efficient systems. They contrast effective prompt engineers, who optimize prompts to use cheaper AI models, with those who rely on more expensive models due to inefficient prompts.
- 00:25:00 - 00:30:00
A 'prompt formula' is introduced, consisting of role, task, specifics, context, examples, and notes. These components are based on scientific findings that improve prompt performance, such as role-specific prompting, chain-of-thought prompting, and emotional stimuli. The goal is to raise a user's prompt creation ability, enhancing the effectiveness and efficiency of AI systems.
- 00:30:00 - 00:35:00
Detailed techniques to improve each aspect of the prompt formula are discussed. Role prompting can enhance accuracy by 10-25%. Task-specific instructions benefit from chain-of-thought prompting, providing a 10-90% accuracy boost depending on task complexity. Emotional stimuli improve complex task accuracy by 115%, showing the importance of context in prompts.
- 00:35:00 - 00:40:00
The importance of providing examples is emphasized, with few-shot prompts significantly increasing prompt accuracy. Giving strategic examples helps the model understand desired input-output relationships. Notes are also critical for reiterating key issues and structuring prompts optimally, leveraging findings like the 'lost in the middle' effect to enhance performance.
- 00:40:00 - 00:45:00
Incorporating markdown for structured and readable prompts is advised, as format and structure contribute significantly to better AI response. While no definitive research is cited, evidence from OpenAI practices suggests structured inputs improve AI performance. Practical benefits of markdown include better maintenance and readability.
- 00:45:00 - 00:50:00
The speaker highlights real-world applications using AI systems developed beyond simple chat prompts, encouraging transition from GPT-4 to cheaper models like GPT-3.5 as effective prompting can replicate high-quality outputs of more expensive models, emphasizing economic benefits without sacrificing performance.
- 00:50:00 - 00:56:39
The conversation with the CTO reveals practical insights into enhancing AI model efficacy with prompt engineering, such as using confusing examples to train models more effectively. The speaker concludes by motivating viewers to apply these strategies to become adept at creating efficient, scalable, and economically viable AI-driven solutions.
思维导图
视频问答
Why is prompt engineering crucial for AI systems?
Prompt engineering is essential because it directly influences the effectiveness and efficiency of AI models, determining how well they provide valuable outputs from inputs.
What is the 'midwit' problem in prompt engineering?
The 'midwit' problem refers to individuals who overcomplicate AI tasks instead of simplifying approaches, hindering their efficiency in building AI solutions.
How can understanding different prompting techniques improve AI outputs?
By understanding techniques like role prompting, chain of thought, and few-shot prompting, users can significantly boost the accuracy and reliability of AI responses.
What are the benefits of single-shot prompting compared to conversational prompting?
Single-shot prompting can be automated into systems, ensuring consistent and reliable outputs without human intervention, unlike more forgiving conversational prompting.
Why is English considered the new programming language?
English is viewed as the new programming language because writing effective prompts in natural language can oftentimes replace traditional scripting for AI tasks.
How does markdown formatting enhance prompt engineering?
Markdown formatting can help organize prompts clearly, aiding both the engineer in structuring tasks and the AI in understanding and processing instructions effectively.
What impact does emotional prompting have on AI task performance?
Emotional prompting can improve AI model performance by up to 115% for complex tasks, especially by enhancing truthfulness and informativeness.
How can prompt engineering help save costs and improve efficiency in AI solutions?
Effective prompt engineering can utilize cheaper and faster AI models, providing high-quality outputs without relying on more expensive alternatives.
What role do examples play in improving AI performance?
Providing examples, or few-shot prompting, helps the AI model understand desired output formats and styles, which can dramatically enhance accuracy.
Can prompt engineering be applied beyond text to AI systems like voice agents or business tools?
Yes, prompt engineering principles can extend to areas like voice agents and business automation tools, enhancing their functionality and integration effectiveness.
查看更多视频摘要
Pendant AI: The $99 AI Assistant (What AI PIN SHOULD Have Been)
Picking A Language In 2025
Trading Psychology - Dr David Paul
The EG4 Chargeverter FIXES the Anker SOLIX F3800! Keep the 240v Powered On!
Money, Power and Wall Street, Part One (full documentary) | FRONTLINE
AI for Business: #1 Introduction to AI (types, how it works, and use-cases)
- 00:00:00you probably suck at promt engineering
- 00:00:01and in this video I'm going to tell you
- 00:00:02why how you can fix it and how you
- 00:00:04cannot be the guy in the middle here of
- 00:00:06this mid with me so that's might a
- 00:00:08little bit off topic but if you give me
- 00:00:09a second I'll explain how this applies
- 00:00:11to the majority of people who are trying
- 00:00:13to do prompt engineering and build AI
- 00:00:14systems and why it's probably holding
- 00:00:16you back because you're stuck in this
- 00:00:18midwit range so if you haven't seen this
- 00:00:19meme before basically the low IQ people
- 00:00:22and the high IQ people kind of converge
- 00:00:24on the same solution uh as you see here
- 00:00:26so we have the guy using Apple notes on
- 00:00:28one side and the genius using Apple
- 00:00:30notes on one side and in the middle you
- 00:00:32have the midwit who's over complicating
- 00:00:33it making it very difficult and painful
- 00:00:35for themselves and then we have the same
- 00:00:37thing with NES Cafe Classic on both
- 00:00:39sides and in the middle we have the
- 00:00:40midwit struggling with all these
- 00:00:42different types of coffee and fancy
- 00:00:44methods so how does this apply to prompt
- 00:00:46engineering I know you're asking
- 00:00:47considering you clicked on a video
- 00:00:48that's about prompt engineering but it's
- 00:00:50actually a not so bow curve when it
- 00:00:52comes to prompt engineering and uh on
- 00:00:54the far left we have the stupid person
- 00:00:56who is just using chat GPT and prompting
- 00:00:58it as they wish kind of just throwing
- 00:01:00things in there on the far side we have
- 00:01:02what we're trying to get you to after
- 00:01:03this video which is a genius who has a
- 00:01:05toolkit of prompts and understands the
- 00:01:07science behind it and in the middle we
- 00:01:08have probably you right now which is uh
- 00:01:11I mean no no disrespect to these other
- 00:01:13YouTubers cuz I've made videos on on
- 00:01:15proing myself like I'm I'm I'm part of
- 00:01:17the problem here but uh what these are
- 00:01:19all about is chat gbt prompt templates
- 00:01:23and and sort of taking the thinking away
- 00:01:24from you and putting it in the hands of
- 00:01:26this template that they've created so uh
- 00:01:29I'm not going to sh on my videos too
- 00:01:30much uh because these videos were
- 00:01:32talking more conceptually as well so I'd
- 00:01:34say I'm on that line and the content of
- 00:01:36this presentation in this video is
- 00:01:37intended to take you from this plateau
- 00:01:40of someone trying to do PR engineering
- 00:01:41but not actually understanding the the
- 00:01:44science behind it which is what we're
- 00:01:45going to go into this video point of
- 00:01:46this video is to take you from someone
- 00:01:48who's on that Plateau as you can see
- 00:01:49here um and get you up to the sort of
- 00:01:51genius and and very capable PR engineer
- 00:01:53who's able to do great things with these
- 00:01:55language models and it's so important
- 00:01:57because your ability to prompt them and
- 00:01:59and provide instruction of these models
- 00:02:00directly impacts your ability to get
- 00:02:02value out of them so if there's this
- 00:02:04amazing new technology called llms and
- 00:02:06you're better at using them you're going
- 00:02:07to go further in the AI space and
- 00:02:09further in life if you can better send
- 00:02:11instructions to these models so
- 00:02:13continuing on uh you may be wondering
- 00:02:15hey why is this new style why is the
- 00:02:17camera on the different side why is
- 00:02:18everything so casual um and that's
- 00:02:20because uh I've been wasting a not
- 00:02:22wasting but I've been spending a lot of
- 00:02:23time on my videos uh the past while as
- 00:02:25you may have noticed some of you people
- 00:02:26starting to think that I'm a YouTuber um
- 00:02:29and I'm I've never really thought of
- 00:02:30myself as a YouTuber personally um I'm a
- 00:02:32businessman and YouTube is how I get
- 00:02:34clients for my business and I think you
- 00:02:36guys are starting to see me as a as a
- 00:02:37YouTuber and I I really as much as I
- 00:02:40love making videos and teaching you guys
- 00:02:42everything what I really like doing is
- 00:02:43working on my business and working my
- 00:02:44team and building the cool software that
- 00:02:46we're building through genive and work
- 00:02:47on the morning side and also the cool
- 00:02:49stuff we do with my my education
- 00:02:50Community as well and teaching them how
- 00:02:51to start their own businesses like I so
- 00:02:54probably less Fancy videos that require
- 00:02:56a lot of time and editing and and if I
- 00:02:59have anything interesting to share and I
- 00:03:00want to talk about it like in this video
- 00:03:02because this video is coming out of me
- 00:03:04seeing so many people that I talk to in
- 00:03:05my community not understanding this
- 00:03:07fundamental skill and it is so
- 00:03:09fundamental but people have this
- 00:03:10misconception that they know how to De
- 00:03:12it which I'm going to break like just
- 00:03:14absolutely destroy if you in this video
- 00:03:16uh and rebuild your skills as a prompt
- 00:03:17engineer so doing this because if I have
- 00:03:20something to talk to you about and I
- 00:03:21think it's important for you all um then
- 00:03:23I'm going to share it and also you may
- 00:03:24be wondering why do I do this at all and
- 00:03:26it's because I have a SAS and it helps
- 00:03:29agency owners to build AI solutions for
- 00:03:32businesses so if I don't teach you guys
- 00:03:34how to do prom engineering you're never
- 00:03:35going to use my SAS so I have to do this
- 00:03:37stuff so that I can succeed and and make
- 00:03:38all the money with the SAS that I want
- 00:03:40so I'm you guys get a byproduct of me
- 00:03:42trying to build my SAS which is helping
- 00:03:44you to learn these things so anyway
- 00:03:46atics so why you're probably bad at
- 00:03:48prompt engineering have conversational
- 00:03:50prompt engineering versus single shot
- 00:03:52conversational is what everyone thinks
- 00:03:54is prompt engineering and they go onto
- 00:03:55chat GPT and they go hey hey yeah I got
- 00:03:57this got this cool prompt template and
- 00:03:59they Chuck in there and they can get
- 00:04:01some responses from it and they're like
- 00:04:02man I'm so good at this and then they
- 00:04:04switch off and think that they're a
- 00:04:05prompt engineer and they know how to do
- 00:04:06this stuff um this of course is human
- 00:04:08operated there are follow-up prompts
- 00:04:11that you can do so you can say oh could
- 00:04:12you please like modify this a little bit
- 00:04:14and because of these follow-up prompts
- 00:04:15it's very forgiving in terms of what you
- 00:04:17can say um and how you can tweak it to
- 00:04:19get the RO responses and this really is
- 00:04:21just good for personal use if you're
- 00:04:22working at a job and you might want to
- 00:04:24streamline some of the work play that
- 00:04:25you do there great like I mean Chad GPT
- 00:04:27is an incredible software and I use it
- 00:04:29the time as well so I'm not not
- 00:04:31on it but it is conversational prompting
- 00:04:33and on the other side is single shot
- 00:04:35prompting which is something that we can
- 00:04:37actually bake into a system uh that can
- 00:04:39be automated and can be part of a sort
- 00:04:41of ongoing ongoing system or flow uh
- 00:04:44where an AI task is embedded in it um
- 00:04:47there are no follow-up prompts because
- 00:04:48there's no no human involved in most
- 00:04:50cases there's no room for error in that
- 00:04:52case you can't have jgpt putting hey
- 00:04:54here is the answer and they put in the
- 00:04:55answer it just needs to give you the
- 00:04:56answer every single time while the
- 00:04:58system's going to break uh because of
- 00:05:00this because if we can prompt it into
- 00:05:01something that is reliable we can
- 00:05:03actually have a very scalable system
- 00:05:05that is AI built into it which is ideal
- 00:05:07for these AI assisted systems and this
- 00:05:09is really how you can create value so
- 00:05:12the benefit of conversational prompting
- 00:05:13skills which many of you will have I'm
- 00:05:15sure is that it might make you better at
- 00:05:17your job and might make your boss a bit
- 00:05:19more money CU you're able to do more
- 00:05:21work um maybe make you a bit more money
- 00:05:23on the on the process but the benefit of
- 00:05:25these single shot systems where we can
- 00:05:26build an AI task to do a specific
- 00:05:28function every every single time
- 00:05:30reliably is that it will allow you to
- 00:05:32build AI systems worth potentially
- 00:05:34thousands of dollars a piece as as I've
- 00:05:35done as many people in my community have
- 00:05:37done as well if you don't believe me I
- 00:05:38don't care furthermore on this point of
- 00:05:39why you should take prompt engineering
- 00:05:41seriously Andre Kathy here uh says the
- 00:05:43hottest new programming language is
- 00:05:45English and this is no dummy he is a
- 00:05:47founding member of open AI he's also a
- 00:05:49leading AI researcher what he means here
- 00:05:51by saying the hottest new programming
- 00:05:53language is English is that you being
- 00:05:55able to write instructions in English is
- 00:05:57going to allow you to one generate code
- 00:05:59if you want to so you can translate from
- 00:06:00English to codee that's one way of
- 00:06:02programming in English technically but
- 00:06:04another way is that if you can write
- 00:06:06effective prompts you can replace the
- 00:06:09the the programming required with a
- 00:06:12massive program or a massive script you
- 00:06:14can write a prompt that effectively does
- 00:06:16all of the things that that that script
- 00:06:18would have done so you can replace large
- 00:06:19blocks of code with a well-written
- 00:06:21prompt now which is really what I want
- 00:06:23you guys to focus on and say well I can
- 00:06:24have the abilities of a developer if I
- 00:06:26can write these prompts well using llms
- 00:06:28properly um and furthermore this guy
- 00:06:31also this guy Liam otley I've founded a
- 00:06:33couple AI companies I have my own AI
- 00:06:36agency Morningside AI I have my own AI
- 00:06:38education Community uh my tripa
- 00:06:40accelerator and I also have a software U
- 00:06:43my AI SAS called agentive which is
- 00:06:45really what my focuses on right right
- 00:06:46now and I've got some pretty smart
- 00:06:48people working for me I'm not the brains
- 00:06:49of the operation anymore I I hope I was
- 00:06:52at one point but my CTO Spencer has like
- 00:06:54five six years of NP uh experience and
- 00:06:57he does some really cool stuff for us
- 00:06:58and a lot of what I'm going to sharing
- 00:06:59in this in terms of how you should be
- 00:07:01doing your prod engineering and what
- 00:07:03I've learned and what I now use is from
- 00:07:05him so you might think I'm just some
- 00:07:07goofball who's been doing YouTube for 12
- 00:07:08months uh but I do have teamed and I've
- 00:07:11paid people who are a lot smarter than
- 00:07:13me to give me this knowledge so now I'm
- 00:07:14giving it to you so now I want you to
- 00:07:16remember this a well-written prompt can
- 00:07:17replace hundreds of lines of code going
- 00:07:19back to what I said before this is I
- 00:07:21think it's my quote but I'm just going
- 00:07:23to say someone said it cuz someone must
- 00:07:24have said it but that's essentially what
- 00:07:25you can do if you write a well-written
- 00:07:27prompt um now here's an example so
- 00:07:29there's there a video that will have
- 00:07:30just gone out recently on my channel
- 00:07:31where I manage my phone finances with AI
- 00:07:33I set up a system where my assistant can
- 00:07:35send money I can send screenshots these
- 00:07:37things here through the system and out
- 00:07:39comes the other side a tracker for all
- 00:07:41my expenses within my notion um it
- 00:07:43automatically extracts the extracts the
- 00:07:46transactions from the screenshots
- 00:07:47categorizes them stores them in my
- 00:07:49expense data database within the notion
- 00:07:52and this is kind of the system here you
- 00:07:54can pause and take a look but basically
- 00:07:55so it took me 2 hours to write a very
- 00:07:57good prompt that can success categorized
- 00:08:00format and then pass the data over to
- 00:08:01notion um and that's ended up saving 8
- 00:08:03hours per month for my system so example
- 00:08:06there not the best one but you get the
- 00:08:08idea um if you write a good prompt you
- 00:08:10can replace what would have taken like
- 00:08:12to me for me to do this expensive system
- 00:08:14with code would have taken a a whole lot
- 00:08:16longer and it would have been extremely
- 00:08:17messy um but the AI can just throw all
- 00:08:19the information at it say hey look this
- 00:08:20is what I want you to do with it and
- 00:08:21outcomes the transactions ready to go
- 00:08:23into notion and no we're still not ready
- 00:08:25to move forward because you need to
- 00:08:26understand that if you can just get this
- 00:08:27skill right that many people don't have
- 00:08:29correct they think they can do
- 00:08:30conversational prompt engineering and
- 00:08:31that's going to be enough for them to go
- 00:08:33in and build these systems but in AI
- 00:08:35voice systems which are all the rage
- 00:08:36right now I've done a ton of videos on
- 00:08:37you can go watch them on my channel AI
- 00:08:39voice systems if you can't prompt
- 00:08:41correctly if you don't have good prompt
- 00:08:42engineering skills you can't do AI voice
- 00:08:44systems if you don't have good prompt
- 00:08:46engineering skills you can't create AI
- 00:08:47agents like gpts if you don't have good
- 00:08:49prompt engineering skills you can't
- 00:08:51build ai's tasks into AI automations
- 00:08:53like on zapia and make Etc and you can't
- 00:08:56build custom AI tools on relevance and
- 00:08:58stack Ai and these other platform so if
- 00:09:00you can't just get this thing right and
- 00:09:01watch the rest of this video it's not
- 00:09:02going to be a retention hookie and and
- 00:09:04for your Tik Tok brain I don't care if
- 00:09:06you watch the rest of it but I'm telling
- 00:09:07you if you don't take the time to
- 00:09:09actually soak in this information I'm
- 00:09:11about to tell you and and get good at
- 00:09:13this prompt engineering skill you are
- 00:09:14not going to make any money in AI
- 00:09:15because everything depends on it and
- 00:09:17finally what I want to do is a little
- 00:09:18comparison of the two different types of
- 00:09:20people you can be you can either watch
- 00:09:22this video and come out on the right
- 00:09:23side here or you can continue to do your
- 00:09:26whatever you think you're doing when
- 00:09:27you're prompt engineering um and you can
- 00:09:28be like the guy so go on the left the
- 00:09:30midw he has a handy bag of prompt
- 00:09:32templates he gets stuck when something
- 00:09:34doesn't work because he doesn't
- 00:09:37understand what what the template's even
- 00:09:38doing so then he uses a more expensive
- 00:09:41and a smarter model like he moves from
- 00:09:423.5 turbo to four turbo and he goes oh
- 00:09:45yeah well now it works because he gets
- 00:09:48the models to do the work inad of
- 00:09:49himself so by doing this he creates
- 00:09:51slower and more expensive systems and
- 00:09:54therefore he struggles to create systems
- 00:09:56that are actually valuable for the
- 00:09:57clients cuz if it's costing them a lot
- 00:09:59and they're really slow there's less
- 00:10:01value for the client right and then
- 00:10:03number six he gives up on trying to
- 00:10:05start an AI business and get into this
- 00:10:06AI solution space and then like some of
- 00:10:08you guys in the comments they become a
- 00:10:10triaa as a scam goofball and blame it on
- 00:10:12the model and not your inability to
- 00:10:13learn how to write English and then on
- 00:10:15the right we have the guy that you want
- 00:10:17to be uh he has a toolkit of prompt
- 00:10:19components and methods based on Research
- 00:10:21which I'm going to take you through in
- 00:10:22this video he approaches problems like
- 00:10:25an engineer he skillfully applies these
- 00:10:28techniques he achieves the desired
- 00:10:30performance with fastest and cheapest
- 00:10:32model available so he uses the cheapest
- 00:10:34model he can get and uses his skills to
- 00:10:36make it do what he needed to do
- 00:10:38therefore he's able to create lightning
- 00:10:40quick and affordable AI systems for
- 00:10:41clients that create actual value because
- 00:10:44they're cheap and they're fast and then
- 00:10:46therefore he actually makes money
- 00:10:47because these clients like wow this
- 00:10:49thing is awesome and number seven this
- 00:10:50guy then finds other AI Chads like him
- 00:10:52who know how to do prompt engineering
- 00:10:54and are making money with AI and with
- 00:10:56him and his friends they all get AI Rich
- 00:10:58um yes I'm selling the dream there but
- 00:11:00that is what's possible if you can get
- 00:11:01this thing right and that is what myself
- 00:11:03and a bunch of the other guys that I was
- 00:11:04just namam with they're all doing it uh
- 00:11:06it's happening um whether you like it or
- 00:11:08not so be like this guy don't be like
- 00:11:10this guy um yeah there you go so now we
- 00:11:13get into the perfect prompt formula for
- 00:11:15building AI systems which is the meat
- 00:11:16and poates of this video um Beware Of
- 00:11:19The Prompt formula as I mentioned you
- 00:11:21don't want to be the guy who relies on
- 00:11:22the formula and while is while I am
- 00:11:25giving you a formula in this video I've
- 00:11:26put it in asx's and user capital letters
- 00:11:28so that you understand that I'm kind of
- 00:11:30taking the piss out of formulas because
- 00:11:32what I'm teaching you in this is going
- 00:11:33to be the science behind them um so that
- 00:11:35you guys if you run into an issue you'll
- 00:11:37understand hey look I can apply this
- 00:11:39technique to try and fix it so you'll
- 00:11:41actually be able to write good prompts
- 00:11:42forever if you understand the stuff I'm
- 00:11:44going to teach and you actually absorb
- 00:11:46it so components of this prompt are role
- 00:11:48task specifics context examples and
- 00:11:51notes and behind each of these
- 00:11:53components is a related uh scientific
- 00:11:56paper or some research that has been
- 00:11:58done or some prompting technique that
- 00:12:00has been discovered and backed up with a
- 00:12:01research paper that you can see on
- 00:12:03screen here we have roll prompting Chain
- 00:12:05of Thought prompting emotion prompt F
- 00:12:06shot prompting and lost in the middle
- 00:12:08all of these are going to be covered in
- 00:12:09the next section to this video so let's
- 00:12:11jump into it um oh before we do that
- 00:12:13actually what each of these techniques
- 00:12:15have is a increase in accuracy or
- 00:12:17performance for props and I'm going to
- 00:12:19retention hook you here with all these
- 00:12:21question marks because over time we're
- 00:12:22going to reveal just how much
- 00:12:24performance improvements you can get so
- 00:12:25if you stack all of these up together uh
- 00:12:27you get an increase in performance on
- 00:12:28your PR
- 00:12:29um just a lot of these are very easy to
- 00:12:31implement um but you're going to get a
- 00:12:33massive increase I'm not going to tell
- 00:12:34you how much it is but a huge increase
- 00:12:35just by applying these simple simple
- 00:12:37techniques so we're going to be using an
- 00:12:38example for this video which is an email
- 00:12:39classification system uh and the the AI
- 00:12:43task here in the middle uh is where
- 00:12:44we're going to have be sending our
- 00:12:46prompt and in this case it's going to be
- 00:12:48someone comes onto uh someone's website
- 00:12:50they fill out a form that form then gets
- 00:12:52sent the form submission gets sent by
- 00:12:54email to the company the CEO or the Ops
- 00:12:57guy uh to his email and he gets it and
- 00:12:59then normally has to read through it and
- 00:13:00then classify it and and take action
- 00:13:01from there but what we're going to be
- 00:13:03doing is imagining a system where there
- 00:13:05is this AI task or this AI node and
- 00:13:07make.com or whatever you want to use
- 00:13:09where the email comes in and then it's
- 00:13:10going to be classified using our prompt
- 00:13:13into opportunity needs attention or
- 00:13:15ignore label so super basic system I
- 00:13:16wanted to use as an example here let's
- 00:13:19get into it um we're going to be
- 00:13:20building up a prompt over time of of how
- 00:13:22we can apply this techniques to make the
- 00:13:24to make this thing better and perform
- 00:13:25better so starting off we have the
- 00:13:26typical chat GPT prompt if you asked any
- 00:13:28mid midwit well not even midwit this
- 00:13:30guy's the stupid guy uh if you asked any
- 00:13:32regular uh bottom feeder chat GPT user
- 00:13:35they' probably give you a prompt like
- 00:13:37classify the following email into ignore
- 00:13:39opportunity or need detention labels and
- 00:13:41then they' paste in the email right so
- 00:13:43this is our starting point this is the
- 00:13:44typical CHT prompt and this is as far on
- 00:13:46the on the IQ scale on the left as you
- 00:13:49can go so we're breaking down by
- 00:13:51component we're starting off with the
- 00:13:52rooll I know for you Tik Tok brains here
- 00:13:53you're probably going to look at this
- 00:13:54and be like ah there a lot of writing
- 00:13:55but uh can you just pause this video uh
- 00:13:57I'm not going to go over all of it I
- 00:13:59think some of you already know some of
- 00:14:00these components Ro prompting is
- 00:14:01something that you've definitely done
- 00:14:02before but I want to draw attention here
- 00:14:03to the research results with this little
- 00:14:05rocket ship to show that it's increasing
- 00:14:06the accuracy uh when you assign an
- 00:14:09advantageous role in your role prompting
- 00:14:10by saying you are an email
- 00:14:11classification expert uh trained to be
- 00:14:14the assist this it can increase the
- 00:14:15accuracy of your prompts and the
- 00:14:16performance of them by 10.3% and
- 00:14:19secondly if you give complimentary
- 00:14:20descriptions of your abilities to
- 00:14:22further increase accuracy you can get up
- 00:14:24to 15 to 25% increase in total so this
- 00:14:26is as simple as here's the example you
- 00:14:28are a highly skilled in Creative short
- 00:14:29form content script writer that is the
- 00:14:31role with a knack for crafting engaging
- 00:14:34informative and concise videos so you
- 00:14:36add a role and then you give it key
- 00:14:38qualities like engaging informative and
- 00:14:40concise and you basically hype it up and
- 00:14:42tell it man you're so amazing at this
- 00:14:44this this so you need have a role that
- 00:14:46is strong and tells it that is
- 00:14:47advantageous to what it's doing so if
- 00:14:49you're solving a math problem you are an
- 00:14:51expert math teacher and then you can
- 00:14:53give it some more examples after that of
- 00:14:54the key quality so takeaways here select
- 00:14:56the role that is advantageous for the
- 00:14:58specific task EG math teacher for math
- 00:14:59problems and then enrich the rooll I
- 00:15:01like that word enrich the rooll with
- 00:15:03with additional words to highlight how
- 00:15:05good it is at that task super simple um
- 00:15:08that's Ro prompting so this is what
- 00:15:09we're going to be doing to kind of tie
- 00:15:10everything together in this video which
- 00:15:11is a before and after so this was the
- 00:15:13this was the low IQ one remember this so
- 00:15:15this is our starting point and here we
- 00:15:18have what happens after we add in the
- 00:15:19roll thing so you're going to need to
- 00:15:20pause this as this thing gets bigger
- 00:15:22it's kind of hard for me to put the
- 00:15:23whole prompt on the screen uh but the
- 00:15:25before and after um you're going to have
- 00:15:27the r prompt here highlighted and well
- 00:15:30low lighted in Black uh so you can see
- 00:15:32what we've changed so here we've still
- 00:15:33got the task here we've still got the
- 00:15:35bit before but it's just now part of a
- 00:15:37Li and pront we have the role included
- 00:15:39as well you are an experienced email
- 00:15:40classification system that accurately
- 00:15:42categorizes emails based on the content
- 00:15:44and potential business
- 00:15:45bagged great so task now going back
- 00:15:48there that's pretty helpful this is
- 00:15:49actually the task um so the thing that
- 00:15:51most people actually put into ches or
- 00:15:54into the prompt is the task itself so
- 00:15:56it's basically just telling it what it's
- 00:15:57going to do uh usually starting with a
- 00:15:59verb we want to say generate a this
- 00:16:01Analyze This write this but be
- 00:16:03descriptive as possible while also
- 00:16:04keeping it brief so an example here is
- 00:16:06generate engaging and Casual Outreach
- 00:16:08messages for users looking to promote
- 00:16:10their services in the dental industry
- 00:16:11especially focusing on the integration
- 00:16:13of AI tools to scale businesses your
- 00:16:14messages should be direct so it's
- 00:16:16telling it what it should do use a verb
- 00:16:18nothing too crazy here um but what I
- 00:16:20will mention is that this is where
- 00:16:22because we're doing these single shot
- 00:16:23systems we need to insert values cuz
- 00:16:25it's going to have our prompt written
- 00:16:27and then we need to be throwing
- 00:16:28different like in this case the email
- 00:16:30content is the variable that we need to
- 00:16:32put in this place so in this case you
- 00:16:34see that I have the dental industry as
- 00:16:35the niche and the pink one here which
- 00:16:38the integration of tools as the offer um
- 00:16:40this is from an earlier video that I've
- 00:16:41done within the task is where you can
- 00:16:43insert the variables that are going to
- 00:16:44be used uh throughout the system so if
- 00:16:46you go back a little bit uh we have the
- 00:16:48email content variable and you can see
- 00:16:50here that it's already become part of
- 00:16:51the task so classify the D here's the
- 00:16:54variable based input that we want then
- 00:16:56we have the technique that's associated
- 00:16:57with the task component um and that is
- 00:16:59Chain of Thought prompting this is
- 00:17:00something that's fairly common now and
- 00:17:02pretty widely known um it involves
- 00:17:04telling the model to think step by step
- 00:17:05without our instructions or B yet you
- 00:17:07can provide it with step-by-step
- 00:17:08instructions uh for it to work through
- 00:17:10each time which is my kind of preferred
- 00:17:11way of doing it so here's the example um
- 00:17:14we take this script writer example as
- 00:17:16well um and in this case if you just
- 00:17:18give it a list of six points so hook the
- 00:17:20viewer in briefly explain provide one
- 00:17:22two F standing facts described so we're
- 00:17:24giving it step-by-step instructions on
- 00:17:26how it should perform the task and the
- 00:17:27research results of of thought prompting
- 00:17:29being incorporated into your prompts
- 00:17:31it's a 10% accuracy boost on simple
- 00:17:33problems I me that's like very very
- 00:17:34simple problems like solve this or 4
- 00:17:37plus 2 equals blah BL blah uh but 90%
- 00:17:39accuracy on complex multi-state problems
- 00:17:41which is likely what many of you are
- 00:17:42going to be uh dealing with with the
- 00:17:44system that you're trying to build so
- 00:17:4690% accuracy boost is pretty insane and
- 00:17:48uh considering you only have to write up
- 00:17:50a little list of what it should do chain
- 00:17:52of th promting something you should uh
- 00:17:53you should really incorporate uh key
- 00:17:55takeaway here the more complex the
- 00:17:57problem the more dramatic the
- 00:17:58Improvement using chain of Thor
- 00:17:59prompting so that's the task if we go
- 00:18:02across now you see that we've included a
- 00:18:04chain of Thor component to the task so
- 00:18:06the old one which was just the chat GPT
- 00:18:08uh low IQ person is this and we've added
- 00:18:11on the roll prompt and we've also added
- 00:18:13in a section for how it should approach
- 00:18:16a task a step-by-step Chain of Thought
- 00:18:18prompting method that we've Incorporated
- 00:18:20next we have the specific section which
- 00:18:22is below the task and this is really an
- 00:18:24addition to the task so to not get it
- 00:18:25too bloated on the task component you
- 00:18:27can then have important bullet points
- 00:18:29that reiterate uh more instructions or
- 00:18:31important notes regarding the execution
- 00:18:32of the task so using the example of the
- 00:18:34Outreach message generator prompt
- 00:18:35examples of specifics what this might be
- 00:18:37each message should have an intro body
- 00:18:39and outro with a tone that's informal
- 00:18:41use placeholders like this so it's kind
- 00:18:42of a list of additional points that
- 00:18:44outside of just the core part of the
- 00:18:46task you can give additional uh kind of
- 00:18:48bullet points which is pretty handy uh
- 00:18:50when you're modifying The Prompt when
- 00:18:51you're editing it if you think it's not
- 00:18:52doing something correctly you can just
- 00:18:53easily add another bullet point on so
- 00:18:55this is kind of what I will do most of
- 00:18:56my modification when I'm writing my
- 00:18:57prompts and the tech associated with
- 00:18:59specifics is called emotion prompt and
- 00:19:01this refers to adding short phrases um
- 00:19:04containing emotional stimuli emotional
- 00:19:06stimula emotional stimula right to
- 00:19:09enhance the prom performance so here's
- 00:19:11the research results emotional stimula
- 00:19:13can be things like this is very
- 00:19:14important to my career this task is
- 00:19:16vital to my career and I really value
- 00:19:18your thoughtful analysis this continues
- 00:19:20on from role prompting a bit cuz you're
- 00:19:22kind of continuing to hype this thing up
- 00:19:23and say look like you I really
- 00:19:25appreciate how how good you are at this
- 00:19:27thing and and you being part of this
- 00:19:28business and what we're doing is so
- 00:19:29important and it has massive
- 00:19:31implications on myself and my business
- 00:19:33and also on society as a whole the more
- 00:19:35you can hype it up and tell it that is
- 00:19:37its task is like the world is going to
- 00:19:39fall apart if it doesn't do this thing
- 00:19:40right the better the performance you can
- 00:19:41get out of it so the research results
- 00:19:43here are adding emotional stimula which
- 00:19:45can be as short as these two little
- 00:19:47phrases here this is very important to
- 00:19:48my career um and this is vital to my
- 00:19:50career these little lines here uh
- 00:19:53increased 8% on simple task and 115% on
- 00:19:56complex task compared to zero short
- 00:19:58problem
- 00:19:59so huge increase on complex tasks which
- 00:20:01is likely what you're going to be
- 00:20:02building your problems for anyway and it
- 00:20:04also enhanced the truthfulness and
- 00:20:05informativeness of llm outputs by an
- 00:20:08average of 19 and 12% respectively so
- 00:20:10not only are you getting the increase in
- 00:20:11accuracy is is this thing getting the
- 00:20:13right uh the right output in the right
- 00:20:15response but also it's more truthful and
- 00:20:17informative which is me fluffy things
- 00:20:19but more being more truthful and
- 00:20:21informative is probably a good thing
- 00:20:22right so the ROI just adding a few of
- 00:20:24these words for the performance of your
- 00:20:25prompt is ridiculous there's no reason
- 00:20:27you shouldn't be throwing in a couple
- 00:20:28these emotional kind of lines which is a
- 00:20:30this is very important like this is such
- 00:20:32a key thing in the business that you are
- 00:20:33part of so the key takeaways here adding
- 00:20:35simple phrases like these can encourage
- 00:20:37the model to engage in more thorough and
- 00:20:39deliberate processing which is
- 00:20:40especially beneficial for your complex
- 00:20:42tasks that require more careful thought
- 00:20:44and Analysis so how does this actually
- 00:20:45add into our prompt we have it below the
- 00:20:47task section here I can zoom in and we
- 00:20:50have the specifics this task is critical
- 00:20:51to the success of our business if the
- 00:20:53email contains blah blah blah blah and
- 00:20:55it's just a list of additional
- 00:20:56instructions and we can throw in that
- 00:20:58emotion prompt in there as well so
- 00:20:59that's specifics you can see it's sort
- 00:21:01of coming together here then we jump
- 00:21:03into context this is kind of
- 00:21:05self-explanatory but just giving the
- 00:21:06model a better idea of the environment
- 00:21:08in which it's operating in and why can
- 00:21:10be helpful to increase performance and
- 00:21:12this also gives us an opportunity to
- 00:21:13really further instill the role
- 00:21:15prompting that we did at the start and
- 00:21:17also the emersion prompting that we've
- 00:21:18done in the specific so an example here
- 00:21:20from our email classification system
- 00:21:21could be our company provides AI
- 00:21:23solutions to businesses across various
- 00:21:24Industries but Accord about who the
- 00:21:26business is we receive a high volume of
- 00:21:28emails from potential clients through
- 00:21:29our website contact form Your Role again
- 00:21:32role prompting we're incorporating again
- 00:21:34reminding it of the role that it has is
- 00:21:35classifying this emails is essential
- 00:21:37emotion prompt for our sales team to
- 00:21:40prioritize the efforts and respond to
- 00:21:41inquires inquiries in a timely manner by
- 00:21:44accurately identifying motion prompt
- 00:21:46again Etc so you can read the rest of
- 00:21:47that but we're we're heading up with a
- 00:21:49ro prompt again we're giving it context
- 00:21:50on the system that it belongs to and
- 00:21:52here's here's my general notes I'm
- 00:21:53getting here to myself but General notes
- 00:21:55for context is to provide context on the
- 00:21:57business including the types of
- 00:21:58customers types Services products values
- 00:22:01Etc then you can provide context on the
- 00:22:03system that it is part of as you can see
- 00:22:04here we're saying this is part of our
- 00:22:05sales process and we get a lot of emails
- 00:22:08and then you can provide a little bit of
- 00:22:09context on the importance of the task
- 00:22:11and the impact on the business um so you
- 00:22:13directly contribute to the growth and
- 00:22:15success of our company therefore we
- 00:22:17greatly value your careful consideration
- 00:22:18and attention to classification so just
- 00:22:20kind of reiterating a lot of the stuff
- 00:22:22that we've done in the role and also in
- 00:22:24the uh in the specific section as well
- 00:22:25here's the before and after we've added
- 00:22:27this context section section down the
- 00:22:28bottom uh not rocket science the example
- 00:22:31section kind of self-explanatory but we
- 00:22:33want to give examples to the model on
- 00:22:35how it should perform and and how it
- 00:22:37should be replying to it so you given
- 00:22:39input output pairs is what you usually
- 00:22:40refer to them as um and this goes on to
- 00:22:43the technique of few shot prompting uh
- 00:22:45single shot one shot prompting um and in
- 00:22:48this case we're going to be talking
- 00:22:49about few shot prompting because that's
- 00:22:50giving more than one example so uh I'll
- 00:22:53give you a little bit of a a look into
- 00:22:54the research results here um now all of
- 00:22:56these research results attached to
- 00:22:59Scientific papers that i' I've gone
- 00:23:00through and and found and and put in
- 00:23:01here for you so if you want to get
- 00:23:03access to all of those research papers
- 00:23:04I'll put it on a figma or put it on in
- 00:23:06the description so you can have a look
- 00:23:07at the papers themselves I'm not pulling
- 00:23:08these out of my ass uh these are coming
- 00:23:10from papers where people have actually
- 00:23:11studied these things so um and this
- 00:23:14graph here shows the effect of adding
- 00:23:17these input output examples on the
- 00:23:18performance and accuracy of the prompt
- 00:23:20so zero shot prompting is on the far
- 00:23:22left we have 10% accuracy for these 175
- 00:23:25billion parameters version of gpt3 as
- 00:23:28soon as you add one example to this it
- 00:23:29jumps up from 10 to nearly 50 to 45%
- 00:23:32accuracy and then we get sort of a a
- 00:23:35diminishing returns as we continue to
- 00:23:37increase up to here is 10 examples so
- 00:23:40this is 10 input output pairs so a QA QA
- 00:23:43QA one QA and one example of an input
- 00:23:46and an output that is a a a shock with a
- 00:23:48one shock prompt we got a 45% accuracy
- 00:23:51and as we got up to 10 we got a 60% and
- 00:23:54kind of flattened off after there so the
- 00:23:56research results uh is that GB3 175
- 00:23:59billion parameters achieved an average
- 00:24:0114.4% improvement over its zero shot
- 00:24:04accuracy of 57.4 when using 32 examples
- 00:24:07per task so that's way up here um and
- 00:24:10using a lot of them and it kind of crept
- 00:24:11its way up uh but for us the key
- 00:24:13takeaways is that providing just a few
- 00:24:15examples literally going from zero
- 00:24:17examples to one massively increases the
- 00:24:20performance compared to zero shot
- 00:24:21prompting when it doesn't have any
- 00:24:22examples so accuracy scales with the
- 00:24:24number of examples but it shows
- 00:24:26diminishing returns most of the gains
- 00:24:28can be achieved between uh 10 to 32 well
- 00:24:31crafted examples and personally I go for
- 00:24:33like 3 to 5 I don't really want to be
- 00:24:34sitting there all day writing all these
- 00:24:35examples and the more examples you give
- 00:24:37the more tokens you're putting in the
- 00:24:39input of your prompt and therefore the
- 00:24:40more expensive it is every time every
- 00:24:42time you call that prompt so if it's
- 00:24:43part of this email classification system
- 00:24:45and we have 32 examples we're going to
- 00:24:47have 32 examples worth of context and
- 00:24:49token usage in our Automation and that
- 00:24:52means every single time an email comes
- 00:24:53in it's going to be sending off huge
- 00:24:55amounts of tokens uh as part of the
- 00:24:57input and going to be charged on those
- 00:24:59import tokens as well so 10 to 32 is is
- 00:25:02a sweet spot according to this paper
- 00:25:04just do 3 to 5 it does a job enough um
- 00:25:06and at least in my experience and and
- 00:25:08the stuff that we do at morning side as
- 00:25:09well so a little bit more on examples I
- 00:25:10won't bore you too much here but this is
- 00:25:12kind of the key part here that these
- 00:25:13guys doing these these uh these papers
- 00:25:15and doing the research they documented
- 00:25:17roughly predictable Trends and scaling
- 00:25:18and performance without using fine
- 00:25:20tuning so by giving examples you are
- 00:25:22kind of impr prompt fine-tuning these
- 00:25:24models uh and people talk about fine
- 00:25:26tuning and everyone thinks that you need
- 00:25:27to do it I personally for me and my
- 00:25:30development company we build these AI
- 00:25:32solutions for businesses and we've never
- 00:25:33had to use fine tuning because we're
- 00:25:35actually good at prpt engineering and
- 00:25:37there's only a very limited number of
- 00:25:38use cases where fine shunting actually
- 00:25:40gives you an advantage um and that's
- 00:25:42just from our experience so if you want
- 00:25:43to avoid doing the messy stuff of data
- 00:25:45collection and fine tuning and all that
- 00:25:47crap uh just get good at prompting get
- 00:25:49get good at writing these examples and
- 00:25:51you can achieve the roughly similar uh
- 00:25:54performance increases um as fine tuning
- 00:25:56without fine tuning so this graph here
- 00:25:58shows an interesting uh bit of data that
- 00:26:00I do want to share is getting a little
- 00:26:02bit Ticky but uh this graph on the right
- 00:26:03here shows a significant increase in
- 00:26:05performance from zero shot which is the
- 00:26:06blue to few short completions so if you
- 00:26:08add in some examples you're going to
- 00:26:10jump up from I think it was 42 up to
- 00:26:13nearly 55 60 a big jump immediately just
- 00:26:17by adding a few examples but
- 00:26:18interestingly the gold labels here so
- 00:26:20these orange pillars these orange bars
- 00:26:23uh that refers to the tests done where
- 00:26:25the labels were correct so maybe if the
- 00:26:27email classification was um here's the
- 00:26:29email here's classification and we gave
- 00:26:30it correct examples the performance
- 00:26:33increase within the study was shown
- 00:26:35regardless of whether those labels were
- 00:26:36correct so this tells us something
- 00:26:37interesting that the llm is not strictly
- 00:26:39learning new information so by giving us
- 00:26:42giving it few short examples that have
- 00:26:44the correct labels it's not necessarily
- 00:26:45learning that information it's actually
- 00:26:47just learning from the format and
- 00:26:49structure uh and that helps to increase
- 00:26:51the accuracy of the outputs overall the
- 00:26:53accuracy of the label itself does not
- 00:26:55actually appear to matter too much uh on
- 00:26:57the on the overall performance so you
- 00:26:58can have incorrect labels and it's still
- 00:27:00going to perform just as well um because
- 00:27:02you've given it some examples on how it
- 00:27:03should respond so long story short
- 00:27:04throwing in three to five examples is
- 00:27:06going to greatly increase the accuracy
- 00:27:08and the performance of your prompt um
- 00:27:10and it's also should be thought of more
- 00:27:11as teaching it how to structure the
- 00:27:13output so this is very important if
- 00:27:14you're not getting the structure you
- 00:27:15want and throwing in a whole bunch of
- 00:27:17other rubbish like oh well this is the
- 00:27:18answer to the question if you just give
- 00:27:20it a few examples of how it should
- 00:27:22respond it's going to look very closely
- 00:27:23at that and it's going to perform much
- 00:27:25better for you so think of it as fine
- 00:27:27tuning of the St the tone and the length
- 00:27:29and the structure of the output um and I
- 00:27:31think this is something that a lot of
- 00:27:32people miss out on when they don't add
- 00:27:33these things in because it's it's so
- 00:27:35important if you just wanted to give you
- 00:27:36one word and you kind of try to tell it
- 00:27:38in the task to just give one word
- 00:27:39responses sure it might listen to it but
- 00:27:41if you give five examples of input and
- 00:27:44then just a one word output like in our
- 00:27:45case opportunity or or needs attention
- 00:27:48or ignore these labels for our email
- 00:27:49classification system uh it's going to
- 00:27:51perform so much better so here's a
- 00:27:53before and after again we're getting a
- 00:27:55little bit small here so I'll allow you
- 00:27:56to pause this on screen as you wish but
- 00:27:59we've given it a couple examples you can
- 00:28:00see how I've done it here in this case
- 00:28:02it's email label um I usually tend to go
- 00:28:05for a q and
- 00:28:08a uh that's usually my go-to strategy or
- 00:28:11input output um but that's that's
- 00:28:13basically how we do it we go example one
- 00:28:15uh we give the QA and then we give a
- 00:28:17space example two some you don't even
- 00:28:19need to put these on um you can just
- 00:28:20leave it as that and it sort of figures
- 00:28:22it out uh but that's that's F shot
- 00:28:25property and examples and how we've
- 00:28:27compared them
- 00:28:29now getting on to the final bit stick
- 00:28:30with me because you are learning some
- 00:28:31very good stuff here uh the notes
- 00:28:33section is the final part and this is
- 00:28:34our last chance to remind the llm of key
- 00:28:36aspects of the task and add any final
- 00:28:38details or tweaks uh this is something
- 00:28:40that you'll end up using a lot as you're
- 00:28:42actually doing the prompt engineering
- 00:28:43workflow um in the list I usually end up
- 00:28:46having things like output formatting
- 00:28:48notes like you should put your output in
- 00:28:49X format or do not do X like if it's
- 00:28:52doing something as I do a test this is
- 00:28:53kind of where I'm iterating on the on
- 00:28:55the prompt so if I if it gives me an
- 00:28:56output and it has doing something way
- 00:28:58wrong or just say at the bottom at the
- 00:29:00note section say do not do X or you are
- 00:29:03not supposed to do this never include it
- 00:29:04in your output uh these kind of things
- 00:29:06are very easy to slap onto the note
- 00:29:08section at the bottom um small tone
- 00:29:10tweaks reminders of key points from the
- 00:29:11task or specifics is really what I use
- 00:29:14the note section for um and and as I say
- 00:29:16here it usually starts out quite skinny
- 00:29:18because if you do the all the prompt
- 00:29:19incorrectly you'll have well I've got
- 00:29:20nothing else to say in the prompt all
- 00:29:22I've got nothing else to say at this
- 00:29:23bottom section then you give it a spin
- 00:29:25you throw some inputs at it and it
- 00:29:26starts doing some wacky stuff and you
- 00:29:28come back and go oh well this just
- 00:29:30reminded of some things I've said
- 00:29:31earlier on and you start to add this
- 00:29:33list of things to the notes now don't
- 00:29:34let it become too long u because it's
- 00:29:36going to start to sort of water it down
- 00:29:37you'll notice that it'll start
- 00:29:38forgetting earlier notes if you put too
- 00:29:39many notes in um but less is more here
- 00:29:42and if it's it's really just to tweak
- 00:29:43these outputs to to get the right right
- 00:29:45kind of responses without refactoring
- 00:29:47the whole thing and restructuring how
- 00:29:49you did the task in the specific so it's
- 00:29:50just kind of a lazy way of tacking
- 00:29:52things on to just get it nudged towards
- 00:29:53where you want it to go um now we have
- 00:29:55the note section and it's based off the
- 00:29:56Lost in the middle effect which is from
- 00:29:58another scientific like research paper
- 00:30:00um and this lost INE middle effect is is
- 00:30:03most famous kind of for this graph here
- 00:30:05uh which shows that language models
- 00:30:07perform best when relevant information
- 00:30:09is at the very beginning Primacy I'm
- 00:30:11learning new stuff here as well or end
- 00:30:13recency of the imput context so
- 00:30:15performance significantly worsens when
- 00:30:16the critical information is in the
- 00:30:18middle of a long context and this effect
- 00:30:20occurs even when the models are designed
- 00:30:22for long input sequences so yes gbt 4
- 00:30:2532k back in the day was designed for
- 00:30:2832,000 tokens but it didn't really
- 00:30:29listen to anything in the middle um
- 00:30:31luckily the models that we work with now
- 00:30:34um are much better at retrieving
- 00:30:35information over large context um but
- 00:30:38you should still keep this in mind
- 00:30:39because it still seems to apply um and
- 00:30:41this is why the note section is at the
- 00:30:42end this little graph here basically
- 00:30:44shows you that uh when you place the
- 00:30:46information at the start the accuracy is
- 00:30:47higher and when you place it in the
- 00:30:49middle the accuracy is lower and when
- 00:30:50you place it at the end the accuracy is
- 00:30:52higher but not as high as the start so
- 00:30:54it really listens to the stuff at the
- 00:30:55start so the role prompt it takes it
- 00:30:57very seriously and that's why we have
- 00:30:58our task up the top as well that's why
- 00:31:00we have the context in the middle
- 00:31:01because it's not as important so see
- 00:31:03he's starting to knit together all this
- 00:31:05information understand these how all
- 00:31:07these different uh techniques knitten
- 00:31:09together so the way that I've structured
- 00:31:11this prompt and the way my team have
- 00:31:12structured it I'm going to really re
- 00:31:14retelling you what we do at morning Side
- 00:31:16by adding these things all in together
- 00:31:18uh you see how it starts to fit together
- 00:31:20into a proper strategy and not just
- 00:31:21throwing over the wall and having some
- 00:31:23kind of prompt formula it's actually
- 00:31:25based off the science um and and if I L
- 00:31:27to talk about science these days so uh
- 00:31:29that is lost in the middle I think have
- 00:31:31a little more
- 00:31:32here the research results of course that
- 00:31:34you've been anxiously waiting for is
- 00:31:36that when a relevant document is at the
- 00:31:38beginning or the end of a context GPD
- 00:31:39345 turbo achieves around 95 around 75%
- 00:31:43accuracy on a QA task um an increase of
- 00:31:4520 to 25% compared to when the document
- 00:31:47was placed in the middle um so the key
- 00:31:49takeaways from this is instructions
- 00:31:51given at the start and the end of The
- 00:31:52Prompt are listened to by the LM far
- 00:31:53more than anything in the middle um for
- 00:31:56this reason the note section is a handy
- 00:31:58to append reminders uh for anything that
- 00:32:00happened in the task or the specifics
- 00:32:02that you notice it maybe isn't listening
- 00:32:03to and you need to reiterate um but be
- 00:32:06aware that increasing the context length
- 00:32:08alone does not ensure better performance
- 00:32:09still having less context or fluff will
- 00:32:12mean the remaining instructions are more
- 00:32:14likely to be followed so while lost in
- 00:32:16the middle refers to okay where should
- 00:32:17we put where should we structure the
- 00:32:19prompt to include uh the right
- 00:32:21information to be listen what's the most
- 00:32:22important thing in the prompt and where
- 00:32:23should we put it yes that does that but
- 00:32:25it also it also gives us information on
- 00:32:27how we should try to keep our prompt as
- 00:32:30short as possible because it's over
- 00:32:31longer context periods that these things
- 00:32:33start to get bad so the shorter you can
- 00:32:35keep the prompt in general it could
- 00:32:36listen to the whole thing very very well
- 00:32:38but as soon as you've like really made
- 00:32:39it bloated um it's going to be losing
- 00:32:42some of that stuff in the middle so less
- 00:32:43is more um and having less less fluff is
- 00:32:46always going to make your your prods
- 00:32:47perform better so here you can see in
- 00:32:48the note section uh please provide the
- 00:32:50email classification label and only the
- 00:32:52label as your response so again
- 00:32:53reiterating the format we want the
- 00:32:54output to be in um do not include any
- 00:32:56personal information in your response if
- 00:32:58you're unsure uh on the side of caution
- 00:33:00and assign the needs attenti label so
- 00:33:02little reminders as we've gone through
- 00:33:03and and we tweaking this email
- 00:33:05classification prompt you will add those
- 00:33:06things at over time so getting back to
- 00:33:08this little diagram here we have the
- 00:33:09role prompting covered off you know how
- 00:33:11to use that technique is tell it a roll
- 00:33:13and and tell it how good it is at that
- 00:33:14role Chain of Thought give it a list of
- 00:33:16things that it should do and how it
- 00:33:17should break down the the task motion
- 00:33:18prompt tell it how good it is tell it
- 00:33:20how important everything is that it's
- 00:33:21doing few shot prompting give it
- 00:33:23examples that it knows the kind of
- 00:33:24output format you want lost in the
- 00:33:26middle kind of tells you how to
- 00:33:27structure everything and where to put
- 00:33:29the right information and you can add on
- 00:33:30a couple little uh things at the bottom
- 00:33:32so that it really listens to them at the
- 00:33:33end and finally here we have markdown
- 00:33:36formatting man I'm talking at a mile
- 00:33:39here and I'm getting really hot anyway
- 00:33:42markdown formatting is kind of the final
- 00:33:43piece of this puzzle and tied all
- 00:33:44together and I learned this from a CTO
- 00:33:46Spencer he put me onto this technique
- 00:33:48and I use it all the time now so uh
- 00:33:50markdown formatting is a way that we can
- 00:33:51structure our prompts um for both our
- 00:33:54sake so that it's more readable CU When
- 00:33:55you write these large prompts it can get
- 00:33:57a little bit and like there's a lot of
- 00:33:58stuff going on so for our sake it allows
- 00:34:01us to structure the reprompt better but
- 00:34:03also it allows the llm to understand the
- 00:34:06structure a little bit better as well
- 00:34:07while I don't have any research to back
- 00:34:08that up uh my only data on why we should
- 00:34:12be doing this and why it may perform
- 00:34:13better is because you can see over here
- 00:34:17uh someone managed to extract out the
- 00:34:18system prompt from th 3 within chat GPT
- 00:34:21and open AI themselves are actually
- 00:34:23using uh using these the smart
- 00:34:26formatting so you can see uh a pound
- 00:34:28symbol here and then tool so these are
- 00:34:29marked out headings as we're going to go
- 00:34:31into in a second but if open AI is using
- 00:34:32it um to train their systems and to to
- 00:34:35prob their own systems we should
- 00:34:36probably be using it as well which is
- 00:34:38kind of why we're doing it here so uh
- 00:34:41basically markdown gives us a few new
- 00:34:42tools to structure um you may notice if
- 00:34:45you're writing a prompt you just got PL
- 00:34:46text you don't have any any method to to
- 00:34:48Signal what a hitting would look like or
- 00:34:50what bulb would look like but markdown
- 00:34:52gives us uh those those techniques so we
- 00:34:54have hittings uh hitting one is the
- 00:34:56largest hitting two is the second lest
- 00:34:58hting three is the third lest so you
- 00:34:59have now different layers of hittings so
- 00:35:02you can have like roll task all these in
- 00:35:04the hitting one so just H one as a as a
- 00:35:06pound symbol and then and then a space
- 00:35:09and then whatever you want after it
- 00:35:10which you'll see in a sign um but then
- 00:35:12if you have little subsets or
- 00:35:14subsections like examples hitter and
- 00:35:16then you want example one you can have
- 00:35:17example one as a hitting three or a
- 00:35:19hitting two so you have different layers
- 00:35:20of hitting and importance uh you also
- 00:35:22have bolds italics underlines list
- 00:35:24horizontal rules and more so if you want
- 00:35:26to jump into the fancy stuff I'll teach
- 00:35:28you the basics here of markdown but you
- 00:35:29can also do these other things I'm not
- 00:35:31sure what the effectiveness is um of
- 00:35:33bolds and italics and stuff but I tend
- 00:35:35to just use the use the headings as a as
- 00:35:37a structure tool so key takeaways on
- 00:35:39markdown formatting is use these H1 tags
- 00:35:41single pound symbol uh to Mark each of
- 00:35:43the components for your prompt and then
- 00:35:45you can use the H2 or three tags or even
- 00:35:47bolds and stuff to sort of add add
- 00:35:49additional additional structure to other
- 00:35:51parts of it so here's example of how you
- 00:35:52should add it in hitting one roll
- 00:35:54hitting one task specifics context and
- 00:35:57then Within context I've added in here
- 00:35:58look you might want to break the context
- 00:36:00into subsections of okay let's use a
- 00:36:02heading 2 and go about the business
- 00:36:03about our system so you don't need to do
- 00:36:05that all the time but this is how you
- 00:36:06can start to use other types of headings
- 00:36:09in like H2 or H3 tags to to split up uh
- 00:36:12some of the other subsections under each
- 00:36:14of your main headings and then again
- 00:36:16examples we can have an example one as a
- 00:36:18as a heading three and give the examples
- 00:36:20and the notes so that's roughly and you
- 00:36:22come in here and obviously you are a BL
- 00:36:26blah um
- 00:36:28generate BL BL blah you get what I'm
- 00:36:30doing you get what I'm saying and so
- 00:36:32what this all looks like when we tie it
- 00:36:34together um we now have our completed
- 00:36:38prompt which this is the before remember
- 00:36:40this is where we started this is the uh
- 00:36:42the the the super guy who doesn't not
- 00:36:43had a prompt this is what we started
- 00:36:45with and this is what we have after when
- 00:36:47we apply all of these techniques now
- 00:36:48this is a little bit overol for an email
- 00:36:50classification system but what I want to
- 00:36:52show you is that this is how you would
- 00:36:54apply it to a simple task like this so
- 00:36:55we have the roll that's wrapped in the
- 00:36:57AG one tag we have H1 tag here
- 00:37:00Etc um and we have all of these
- 00:37:01different components role task specifics
- 00:37:03context examples and notes all
- 00:37:06integrating the uh techniques that we've
- 00:37:08been over in this video and now stacking
- 00:37:10up all of the increases in accuracy that
- 00:37:12we get from these different techniques
- 00:37:14we can see that we don't know how much
- 00:37:15markdown formatting gives us uh but the
- 00:37:17total is potentially above 300% increase
- 00:37:21in accuracy then the final step here is
- 00:37:22we can add up all of the different
- 00:37:24increases and and the performance
- 00:37:25increases that we get from these
- 00:37:26techniques and we can can sum it up to a
- 00:37:28300% or more increase in in performance
- 00:37:31so me you can listen to me or you can
- 00:37:34just ignore it or you can use these
- 00:37:36place by Place wherever you think you
- 00:37:37need it um but considering emotion
- 00:37:39prompting is literally just a few words
- 00:37:41saying you're the best and this is
- 00:37:42really important to me and Ro prompting
- 00:37:44is like one or two lines and lost in the
- 00:37:46middle is really just more of a an
- 00:37:48understanding of where to put the right
- 00:37:49information you prompt you've now got a
- 00:37:51toolkit and going back to this guy over
- 00:37:53here look at this guy he's got a toolkit
- 00:37:56he understands the science understands
- 00:37:58from research papers at why these things
- 00:38:00work the way they do and because he has
- 00:38:02this this deeper understanding of what
- 00:38:04makes llms do the right things that they
- 00:38:06want them to do he's better able to
- 00:38:08perform and as you can see he is on the
- 00:38:10upper end of the spectrum here so this
- 00:38:12is the guy that you should be now all
- 00:38:14you need to do is take these and apply
- 00:38:16it and you'll start to see and and
- 00:38:18connect them go okay okay so lost in the
- 00:38:20middle um that's not doing what I want
- 00:38:22maybe I need to change the stuff at the
- 00:38:23start and the end okay uh it's giving me
- 00:38:25the wrong structure and style okay maybe
- 00:38:27maybe I give some more F short examples
- 00:38:29of how it should be responding and I I
- 00:38:31take my time and I write them carefully
- 00:38:32and I tell them the kind of style and
- 00:38:34structure of the response I want it's
- 00:38:35really not rocket science and people
- 00:38:37have already done the hard work by doing
- 00:38:38the the research to get these kind of
- 00:38:40results so um to wrap up this video I've
- 00:38:42given oh actually we have a
- 00:38:43considerations page here uh context
- 00:38:46length and costs as I mentioned earlier
- 00:38:47for high volume tasks um like this
- 00:38:50example of email classification system
- 00:38:52uh I guess it's not too high volume but
- 00:38:53if this thing is doing like 50 50 100
- 00:38:56reps a day it's really being put through
- 00:38:58the ringer and there's a lot of volume
- 00:39:00going through the task that you're
- 00:39:01building you need to focus on making
- 00:39:03that prompt as short and succinct as
- 00:39:04possible uh because every time you run
- 00:39:06it you are charged for the input and the
- 00:39:07output tokens so while you may only be
- 00:39:09outputting a label in this case of just
- 00:39:11needs needs work new opportunity or
- 00:39:14needs attention or ignore you're also
- 00:39:17charged for the input tokens as well so
- 00:39:18all the prop that you put in you're
- 00:39:20going to be charged for plus the
- 00:39:21inserted variables as well so you've got
- 00:39:22the prompt then you're inserting the
- 00:39:24email context you're getting all of that
- 00:39:26information and that over you're you're
- 00:39:28going to get charged on that so uh keep
- 00:39:30in mind that if you're doing a lot of
- 00:39:31volume try to use a a cheaper model as
- 00:39:33we're going into next but also keep the
- 00:39:35The Prompt shorter as well the choice of
- 00:39:36model is important as well better prompt
- 00:39:38engineering and the skills that I've
- 00:39:39just taught you on this going back to
- 00:39:40this guy here he has better prompt
- 00:39:42engineering skills and can get better
- 00:39:43performance out of Cheaper models this
- 00:39:45guy doesn't have the skills so he relies
- 00:39:46on the more expensive and slower models
- 00:39:48which are not good for the client um to
- 00:39:51get the performance that he needs
- 00:39:52because he doesn't have the skills to
- 00:39:53get it to do what he wants and that
- 00:39:54brings me back to this choice at model
- 00:39:56point which is where possible you need
- 00:39:57to use your skills and use your
- 00:39:59advantage to bend the cheapest and
- 00:40:01fastest model to execute the task
- 00:40:02successfully so 3.5 turbo is basically
- 00:40:05free like this thing open AI has made
- 00:40:07that so cheap and whatever whenever
- 00:40:09you're watching this video might be
- 00:40:10different but the cheapest fastest model
- 00:40:12should be your goto and if you can't get
- 00:40:14it working there then you can go up but
- 00:40:16you have the skills now um if it has
- 00:40:18high volume and requires fast responses
- 00:40:20this is when your skills will shine
- 00:40:21because you can create prompts that do
- 00:40:23and perform um fast and cheap then we
- 00:40:26have the temperature and and other model
- 00:40:27settings if you're doing creative rating
- 00:40:29adiation Etc then test higher levels so
- 00:40:310.5 to1 uh but anything else if you're
- 00:40:34putting systems like this whereas
- 00:40:35classification or AI is kind of doing a
- 00:40:37a a fixed piece of the of the puzzle uh
- 00:40:40you want it to be on zero just have that
- 00:40:42we're trying to fight against the
- 00:40:44inconsistency and and natural randomness
- 00:40:46of these models and in order to do that
- 00:40:48we need to uh set that temperature to
- 00:40:50zero and that's going to make the system
- 00:40:52a lot more consistent uh so zero is what
- 00:40:54I typically use for basically anything
- 00:40:55apart from creative writing cutter uh
- 00:40:57script rting prompts the other and the
- 00:40:59other model settings like frequency
- 00:41:00penalty and top PE are not needed in my
- 00:41:02experience just play around with the the
- 00:41:03temperature that's all you need to worry
- 00:41:04about what I'm going to jump to now is
- 00:41:05actually having a chat with my CTO
- 00:41:06Spencer um and he's going to share what
- 00:41:08we've done at morning side on one of our
- 00:41:10projects where we had to go from GPT 4
- 00:41:12uh which was doing the job great and
- 00:41:14then the client wanted to change to GPT
- 00:41:153.5 turbo to save money and then we had
- 00:41:17to kind of rebuild everything in order
- 00:41:19to get it working so uh we're going to
- 00:41:20jump to that and you get to here for
- 00:41:21Spencer again lot smarter than me and a
- 00:41:23lot of the stuff that I'm sharing
- 00:41:24actually came from what he's learned uh
- 00:41:26learned on the job and what he does at
- 00:41:27warning side so everyone if you haven't
- 00:41:29met Spencer already this Spencer my CTO
- 00:41:31he's a lot smarter than I so I'm
- 00:41:32bringing him on to chip into this prompt
- 00:41:34engineering video just briefly because
- 00:41:36um a lot of the stuff that I've just
- 00:41:37told you about has actually come from
- 00:41:39has big brain here he's been sharing a
- 00:41:40lot of the the research papers
- 00:41:42particularly within our slack across the
- 00:41:44companies we're on the same page so
- 00:41:46Spencer I wanted to bring you on here
- 00:41:47particularly because we've been working
- 00:41:48with a one of our biggest clients ever
- 00:41:51today U and I want to particular focus
- 00:41:53on how I was talking in this video about
- 00:41:56the pr engineering skills allowing you
- 00:41:57to get more out of uh lesser and cheaper
- 00:41:59models um and how we've had to switch
- 00:42:01from a gbg4 based SAS that we built over
- 00:42:04to a hbt 3.5 turbo and and the
- 00:42:07difficulties in transitioning that so if
- 00:42:08you just want to um give any notes on
- 00:42:10the on the presentation prior but also
- 00:42:11specifically on uh getting more out of
- 00:42:14these these lesson models really which
- 00:42:15is what I'm trying to teach people in
- 00:42:16this video yeah yeah definitely so um
- 00:42:21yeah it's an interesting one I usually
- 00:42:23uh like to try and break things down so
- 00:42:26um when going through these path the key
- 00:42:29is is that obviously want to use the
- 00:42:30cheaper models first so 3.5 comes comes
- 00:42:33first to mind um in this case
- 00:42:35specifically for this client there's a
- 00:42:37lot of complex uh kind of information
- 00:42:39that they were synthesizing out of it so
- 00:42:41we made the decision to start off with
- 00:42:44gp4 um to to make sure that we were
- 00:42:46getting the responses that we wanted now
- 00:42:49once it kind of got closer to uh to
- 00:42:52release there we realized that the the
- 00:42:53cost that was Associated um with running
- 00:42:55these models is going to be ative so we
- 00:42:58had to yeah kind of take that transition
- 00:43:00now and and gauge down to 3.5 so
- 00:43:02whenever I'm doing that specific task
- 00:43:06the key one that I'm looking at is yes
- 00:43:07prompt engineering one um and then two
- 00:43:10is scope reduction um gp4 is really good
- 00:43:14at a bunch of different things uh and
- 00:43:17and understanding kind of the hidden
- 00:43:18context that uh that's in the words that
- 00:43:20you're doing uh 3.5 is is much less so
- 00:43:23so um you almost want to break it down
- 00:43:26into smaller kind of component size
- 00:43:28chunks for the task um and then use
- 00:43:32those as kind of contributive to to get
- 00:43:35the same results as you would with four
- 00:43:37um so that was the steps that we're
- 00:43:39taking in this particular project
- 00:43:41another good tactic to use as well and
- 00:43:43and one that I would highly recommend is
- 00:43:44using gp4 first and then taking the
- 00:43:47input and output pairings as training
- 00:43:49data to fine-tune a 3.5 model as well um
- 00:43:53because we found that that's that's
- 00:43:54really helpful uh for getting your cost
- 00:43:56down but keeping up that GPT for L
- 00:43:59quality yeah I'm kind of just bashed
- 00:44:01fine tuning earlier in this video
- 00:44:02because I say it's it's unnecessary in
- 00:44:04almost every case um so I mean using few
- 00:44:07short examples is essentially a way of
- 00:44:09of fine tuning VI prompting so if you
- 00:44:10just give a few short examples of gp4
- 00:44:13outputs or human rid outputs would that
- 00:44:15not do a lot in terms of getting more
- 00:44:17towards the outputs that you're looking
- 00:44:19for yeah 100% and you're completely
- 00:44:22right on that one fine tuning for I
- 00:44:24would say a vast amount of use cases
- 00:44:26isn't really NE necessary you can get I
- 00:44:28would say 90 even 95% of the way with uh
- 00:44:31with just good old fashioned prompt
- 00:44:32engineering and and F shot prompt in
- 00:44:34here um with f shot prompting there's a
- 00:44:38interesting paper that came out last
- 00:44:39year um and I can't remember the
- 00:44:42specific name of it but uh it talks
- 00:44:44about the decision boundary so there's
- 00:44:46an important uh kind of lesson to learn
- 00:44:49on that is that for the fot prompts that
- 00:44:51you're giving the important part is to
- 00:44:54give ones that are confusing to the
- 00:44:56model itself so the ones that you notice
- 00:44:58that it's getting wrong consistently if
- 00:45:00you actually categorize those and take
- 00:45:02those in and take the one to five artist
- 00:45:05examples that you get and then use those
- 00:45:09as the uh yeah as the examples in there
- 00:45:12you'll actually get a lot of better
- 00:45:13results coming out of your model too
- 00:45:15well that's that's I'm learning
- 00:45:17something on this on this call in this
- 00:45:18video as well because uh I mean I'd
- 00:45:20always start in my fut show examples
- 00:45:21have kind of like the most common ones
- 00:45:23you might check a a curve B in there as
- 00:45:24well but I just kind of put the five
- 00:45:26three to five common ones um but knowing
- 00:45:28that we should try to figure out when
- 00:45:29it's stuffing up and then and put those
- 00:45:31on next examples is great so any other
- 00:45:33notes you have on on the content just
- 00:45:35Tak a look at the presentation but the
- 00:45:36markdown formatting aspect um any of the
- 00:45:39other any other techniques I know motion
- 00:45:40promps than you want for me so anything
- 00:45:42that you got there yeah uh markdown is
- 00:45:45one that we use extensively um I'm a
- 00:45:48huge ner so I I like writing in markdown
- 00:45:50anyways just because most of the the
- 00:45:51notebooks uh Jupiter notebooks if
- 00:45:53there's any other uh data nerds out
- 00:45:55there like myself um so it's it's rather
- 00:45:58um yeah
- 00:45:59consistent familiar for myself is is any
- 00:46:02data or or papers that you've seen with
- 00:46:05the uh the markdown base because in the
- 00:46:07presentation just before I was like look
- 00:46:08I I can't find any research papers but
- 00:46:10I'm sure just probably G on but uh it's
- 00:46:12more like if open AI using it you'd be
- 00:46:14pretty stupid not to do it and even just
- 00:46:15functionally for us as as writing these
- 00:46:17prompts it's so much more useful to at
- 00:46:19least have some kind of structure to it
- 00:46:21so purely on our side you'd use it
- 00:46:22regardless just to make it easier on
- 00:46:24your on your end yeah absolutely so I
- 00:46:28definitely remember reading I think at
- 00:46:29least a couple papers about structured
- 00:46:31uh structured inputs in markdown format
- 00:46:33and there's other ones as well that you
- 00:46:34can use um but even intuitively so when
- 00:46:37they're doing the fine-tuning or fine
- 00:46:40tuning in terms of
- 00:46:42uh uh reinforcement learning with human
- 00:46:45feedback rlf um what they're doing is
- 00:46:47they're actually providing markdown
- 00:46:49based formatting and that's how they're
- 00:46:51structuring these prompts that they're
- 00:46:52giving to it in order to fing it so
- 00:46:54intuitively of course if it's seen it
- 00:46:57more it's going to do better when it
- 00:46:58sees more of the same that it's been
- 00:47:00trained off um the cool part about using
- 00:47:03markdown as well is you get to actually
- 00:47:04use semantic information so if you're
- 00:47:07writing a Word document if you want to
- 00:47:08put bold in there if you want to put
- 00:47:10something in italics titles subtitles
- 00:47:12all these things it makes it into a much
- 00:47:14more structured format and that Nuance
- 00:47:16comes through on the other side to be
- 00:47:18able to uh yeah make better better
- 00:47:21prompts to to get better outputs the
- 00:47:24other one that uh I would suggest as
- 00:47:26well is they like small little things so
- 00:47:29uh being very encouraging towards uh an
- 00:47:32llm can help so uh I usually start off
- 00:47:34with you're a world class X and you know
- 00:47:38you are an absolute star doing this it
- 00:47:40seems a little bit ridiculous at the
- 00:47:41time that I'm not getting this positive
- 00:47:43feedback to a machine but uh very
- 00:47:46helpful um the other one's telling the
- 00:47:49model to take a deep breath and to think
- 00:47:51it through step by step before
- 00:47:52responding I'm 100% serious has been
- 00:47:56proven to actually increase the quality
- 00:47:58of your responses and that also doubles
- 00:48:00as a as a great one when you're
- 00:48:01significant other as is angry usually
- 00:48:05that yeah yeah I would not suggest that
- 00:48:08as a as a I'll be honest follow the
- 00:48:11chcken by calm
- 00:48:14down anyway it's good you mention that
- 00:48:17sorry that the the hype in the model up
- 00:48:19I talked about this just earlier in the
- 00:48:20video is that look this a motion prompt
- 00:48:22thing where you can get I think 115%
- 00:48:24increase in your in your accuracy it's
- 00:48:26just by being like wow you well firstly
- 00:48:27on the role prompting being like wow you
- 00:48:29are like the best at this and then
- 00:48:31providing enriching it with additional
- 00:48:32words to to reinforce like how good it
- 00:48:34is at that toas and then the other I
- 00:48:37think so um let M anyway back to what
- 00:48:40you said yeah I and it's actually funny
- 00:48:43as well Persona based uh thing so if you
- 00:48:46uh not only tell it it's a world class X
- 00:48:49if you actually use names of specific
- 00:48:51people especially people who have
- 00:48:52written over the Internet or uh you know
- 00:48:54if you say you are Albert Einstein
- 00:48:58it will actually come out with higher
- 00:48:59quality outputs um that are very much in
- 00:49:02the style of writing the the person that
- 00:49:04you're talking about I use it for
- 00:49:06programming personalities so Theo he he
- 00:49:08does the T3 stack um and I'll constantly
- 00:49:11say you're Theo show me how to refactor
- 00:49:14my code like the wood and and that
- 00:49:16actually goes really really well um and
- 00:49:19then the other kind of last one in here
- 00:49:21is on the positivity rout but not using
- 00:49:24negative uh feedback for so a lot of the
- 00:49:27time your your first impulse is going to
- 00:49:29be like stop doing this don't do this
- 00:49:31don't do that if you instead focus on do
- 00:49:35this or do that um the negative conent
- 00:49:40uh words actually are associated with
- 00:49:43worse outcomes than positively France
- 00:49:46yeah it's just interesting because then
- 00:49:48the in the research for this and I was
- 00:49:49trying to put together okay like
- 00:49:50negative prompting is this a real thing
- 00:49:51it seems like the consensus is that it
- 00:49:53doesn't actually uh do much but I will
- 00:49:55I've anecdotally
- 00:49:57the contrary which is uh if if it's
- 00:49:59doing something incorrectly I'll usually
- 00:50:01just put at the very bottom in the notes
- 00:50:02section just never do this in your
- 00:50:05output and it usually tends to work so I
- 00:50:06mean there's both sides there it works
- 00:50:09for me sometimes but it's probably
- 00:50:10something a lack of my skills as well um
- 00:50:12that I should be doing it further up but
- 00:50:14yeah there's some really good things I
- 00:50:15think if you guys can as B said that's
- 00:50:18another GM that I'll be I'll be
- 00:50:19incorporating into my prompting is
- 00:50:20giving it a name giving the rle a name
- 00:50:22um and that's something OB you just say
- 00:50:24you're an expert this this this um but
- 00:50:26if you have an example of a real person
- 00:50:28or that someone that the internet would
- 00:50:30have had information about um you can
- 00:50:31throw that in there as
- 00:50:33well yeah absolutely um yeah I think
- 00:50:37those are the the big topl line ones for
- 00:50:39me at least right yeah no that's really
- 00:50:41helpful again this is why I brought
- 00:50:42Spencer on even I've I've learned
- 00:50:44something here um but yeah we can jump
- 00:50:45back to the video thank you Spencer
- 00:50:47thanks so much then so I hope that's
- 00:50:48drilled in the importance of PR
- 00:50:49engineering and and being able to use
- 00:50:51these cheaper and faster models to
- 00:50:53achieve the outcomes that your clients
- 00:50:54want otherwise you're not going to make
- 00:50:55any money uh but going back to to this I
- 00:50:57just want to say look everything that
- 00:50:58I've just taught you here can be applied
- 00:51:00to all these different types of systems
- 00:51:01and what I want to leave you off with at
- 00:51:02the end of this is examples of things so
- 00:51:05an AI agent is is like GPT is are a good
- 00:51:07example of this um or the building AI
- 00:51:09agents on my own platform in my own
- 00:51:11software agentive if you want to check
- 00:51:13it out we're only on weight list at the
- 00:51:14moment so you can check that out in the
- 00:51:15description uh but agentive allows you
- 00:51:17to build AI agents as does the gbt
- 00:51:20Builder on on the chb site but what we
- 00:51:22want to do if we modifying this prompt
- 00:51:23formula for this use case of AI agents
- 00:51:26is to modify to include how to use the
- 00:51:27knowledge how to use the tools and your
- 00:51:29answer then you can provide examples of
- 00:51:31response styes and Toad so you can pause
- 00:51:33that take a look see but here most
- 00:51:35important things to point out is that
- 00:51:37I've added in U so you can see roll task
- 00:51:39specifics and then tools so the tools
- 00:51:42here if you are adding custom tools into
- 00:51:43your uh into your gpts or into your AI
- 00:51:46agents you can add a little section uh
- 00:51:48using the same kind of format right we
- 00:51:50have a heading and say you have two
- 00:51:51tools to use one I like to include the
- 00:51:54knowledge base if I've added any
- 00:51:55knowledge to my AI agent I'll sell tell
- 00:51:57it use the knowledge base because it's
- 00:51:59actually that's how it's working they
- 00:52:00use it as a knowledge based tool they
- 00:52:02just don't already tell you that it's a
- 00:52:03it's a tool um so you construct it
- 00:52:05knowledge base is one of the tools you
- 00:52:07have you can use it when you're
- 00:52:08answering AI business related questions
- 00:52:10and number two is a coine similarity
- 00:52:11tool it could be other tool that's
- 00:52:13calling relevance or something uh but
- 00:52:15tell it how to use each of the tools
- 00:52:16that's involved and then examples of
- 00:52:18okay here's a question someone ask the
- 00:52:20agent here's how you should respond uh
- 00:52:22Etc so not not rocket science you guys
- 00:52:24can use that uh but that's how I write
- 00:52:25my adapt this formula to do AI agent
- 00:52:28prompts and it works really well next is
- 00:52:30voice agents you need to modify the
- 00:52:32prompt formula to include a script
- 00:52:33outline if necessary uh so sylow BL AI
- 00:52:36air all these things that are popping
- 00:52:37off right now uh you can modify the same
- 00:52:39prompt template uh to do uh really good
- 00:52:42voice agents for you so role task but in
- 00:52:45the task here we're giving you an
- 00:52:46outline of how it should talk and the
- 00:52:47steps involved uh then we have the
- 00:52:49specifics then we have context about the
- 00:52:51business uh this is an example for a
- 00:52:53restaurant um I'm just giving a bit of
- 00:52:54context on the restaurant there then we
- 00:52:56have examples of how it should respond
- 00:52:58to the most common questions as I said
- 00:53:00before you can also come in here and add
- 00:53:01in a script section and add in like a
- 00:53:05rough outline of how the script would go
- 00:53:06but I've kind of included that in this
- 00:53:08uh in this in in this section here from
- 00:53:10a high level at least so voice agents
- 00:53:13same sort of thing modify it to to do
- 00:53:15the job then we have ai automations
- 00:53:16which can be using zapia make air table
- 00:53:18air table now has AI which is cool uh
- 00:53:20but you can create powerful AI tasks and
- 00:53:22businesses they can be relied upon to
- 00:53:23handle thousands of operations a month
- 00:53:25uh what we just built in the email
- 00:53:27classifier is an example of an
- 00:53:28automation so I don't really need to go
- 00:53:29over this but here's another example at
- 00:53:31the end here you can see sometimes I
- 00:53:33like to throw this in um is after I've
- 00:53:35given examples at the bottom I'll go q
- 00:53:38and then I'll put the constraint in or
- 00:53:39in this case the variable uh in again
- 00:53:42and then I'll leave the a open up put
- 00:53:44space and then it's just going to kind
- 00:53:45of autofill that and it's a it's another
- 00:53:46technique you can use to to get it to
- 00:53:48only output uh the exact kind of uh
- 00:53:50output style that you want so feel free
- 00:53:52to use that as you need AI tools um you
- 00:53:56may not know what I mean by tools but
- 00:53:57basically we can set up a bunch of
- 00:53:59inputs say Okay Niche offer then we can
- 00:54:01insert that into a uh into a into
- 00:54:04pre-written prompt and then that's going
- 00:54:06to be allowed to connect to either gpts
- 00:54:08or you can build it um on on a on a
- 00:54:11landing page and it can be used to speed
- 00:54:12up workflows so there's so many
- 00:54:14different ways you can use it um here's
- 00:54:16an example again you can pause that this
- 00:54:18an example um here you can see I'm
- 00:54:19inserting the variables uh we have lots
- 00:54:21of input output Pairs and then I'm
- 00:54:24screaming at the end here because
- 00:54:25because it wasn't do what I wanted so uh
- 00:54:28yeah take those I'll I'll leave a link
- 00:54:30to this presentation down on uh I think
- 00:54:32it'll be on my school community so you
- 00:54:33just find this video um there'll be a a
- 00:54:35resource for this thing in the YouTube
- 00:54:37Tab and you can find this video pull
- 00:54:39this up and then and use this as you
- 00:54:41wish so I want to bring you back to this
- 00:54:43um here's a lollipop um because you get
- 00:54:45a lollipop for now completing this
- 00:54:47course and you're now a successful and a
- 00:54:50a genius level I'm not even sure what
- 00:54:51this guy's supposed to his name is
- 00:54:52supposed to be but he looks like a
- 00:54:53genius to me he looks like a Jedi or
- 00:54:55something cool so you now this guy and
- 00:54:57you didn't end up being stuck in this uh
- 00:55:00this midb territory so here's your
- 00:55:01little lop and I'm proud of you for
- 00:55:03getting through this because the skills
- 00:55:04that I just taught you as I say affect
- 00:55:06every different thing you're trying to
- 00:55:07sell in this AI space if you don't have
- 00:55:09this nailed um you're not going to be
- 00:55:10able to build things and you're not
- 00:55:11going to create value for your clients
- 00:55:12cuz you're going to have to use even if
- 00:55:14you're kind of okay but you can't get
- 00:55:16the cheaper model to do what you need it
- 00:55:18to do then you're not going to be able
- 00:55:19to succeed long term and I mean you put
- 00:55:22yourself up if if someone was offering
- 00:55:24the same AI service and you said Hey
- 00:55:25look it's going to cost you this much
- 00:55:27month and it's going to take 10 seconds
- 00:55:29to respond and some other guy goes okay
- 00:55:30it's going to cost you one1 of that and
- 00:55:32it's going to take a quarter of the time
- 00:55:35um who's going to win there so as as
- 00:55:37much PVP there's not much PVP going on
- 00:55:39in the space right now because there's
- 00:55:40very few people selling selling a
- 00:55:42Solutions at agencies so we're still
- 00:55:43very early to it but over time if you
- 00:55:46don't have these skills you're going to
- 00:55:46get wiped out by people who do um and
- 00:55:50yeah keep in mind there's so much
- 00:55:52potential to be squeezed out of these
- 00:55:53prompts and out of the these models if
- 00:55:55you just apply this technique so every
- 00:55:57300% increase I'm going to be making a
- 00:55:59couple more of these Style videos if you
- 00:56:00did like this if you like me being a lot
- 00:56:01more uh no and just telling you
- 00:56:04outs then let me know in the comments
- 00:56:06because I much prefer doing these kind
- 00:56:07of videos even though I'm now getting
- 00:56:09super hot and ready and my cats here but
- 00:56:11I've like making this personally it's a
- 00:56:12lot more fun than my normal videos where
- 00:56:15but uh yeah you get the idea if you've
- 00:56:16enjoyed please let me know down below
- 00:56:18and uh subscribe to the channel if you
- 00:56:19haven't already I'm probably going to
- 00:56:20have a couple more videos like this on
- 00:56:21core things that I think you need to
- 00:56:23understand because if you don't learn
- 00:56:24this then you can't use my sass and I
- 00:56:26can't make money so I'm very selfishly
- 00:56:29teaching you this stuff so that one day
- 00:56:30you can use my sass and I can sell my
- 00:56:31sass for hundreds of millions of dollars
- 00:56:33so forgive me for being selfish but you
- 00:56:35get to win along the way um but yeah see
- 00:56:37you in the next one
- Prompt Engineering
- AI Systems
- Effectiveness
- Efficiency
- Role Prompting
- Chain of Thought
- Few-shot Prompting
- Markdown Formatting
- Emotional Prompting
- AI in Business