Intro0:00
Hey, how's it going? I'm Dan, I'm co-founder of PromptHub, a prompt management tool designed for teams to make it easy to test, collaborate, and deploy prompts. Today I want to talk to you a little bit about prompt engineering, including over 3 easy-to-implement tactics to get better and more accurate responses from LLMs.
But first, why prompt engineering? Can't I just say what I want to the model and I get something pretty good back? And well, for the most case, that's true. Additional techniques can go a long ways in terms of making sure that your responses are always better.
Why Prompt Engineering?0:34
The non-deterministic nature of these models makes it really hard to predict, and I've seen that having little changes in a prompt can have outsized effect on the outputs. And this is especially important for anyone who's integrating AI into their product, because one bad user experience, or one time the model decides to go off the rails, can result in disaster for your brand or your product, resulting in a loss of trust.
Additionally, users, now that we all have access to ChatGPT and can really easily access these models, we have very high expectations when we're using AI features inside of products. We expect outputs to be crisp, exactly what we wanted.
We should expect to see never see hallucinations, and in general, it should be fast and accurate.
And so I want to go over 3 easy-to-implement tactics to get better and safer responses. And like I said, these can be used in your everyday when you're just using ChatGPT, or if you're integrating AI into your product, these will help go a long way to making sure that your outputs are better and that users are happier.
The first is called multipersona prompting. This comes out of a research study from the University of Illinois. Essentially what this method does is it calls on various agents to work on a specific task when you prompt it, and those agents are designed for that specific task.
Multipersona1:55
So for example, if I was to prompt the model to help me write a book, multipersona prompting would lead the model to get a publicist, an author, maybe the intended target audience of my book, and they would work hand in hand in kind of a brainstorm mechanism with the AI leading this brainstorm.
They'd go back and forth throwing ideas off the wall, collaborating until they came to a final answer. And this prompting method is really cool because you get to see the whole collaboration process, and so it's very helpful in cases where you have complex tasks at hand or it requires additional logic.
I personally like using it for generative tasks.
Next up is the according to method. What this does is it grounds prompts to a specific source. So instead of just asking, you know, what part of the digestive tube do you expect starch to be digested, you can say that and then just add to the end, "according to Wikipedia."
According To2:54
So adding according to specified source will increase the chance that the model goes to that specific source to retrieve the information, and this can help reduce hallucinations by up to 20%. So this is really good if you have a fine-tuned model or a general model that you know that you're reaching to a very consistent data source for your answers.
This is out of Johns Hopkins University, and it was published very recently. And last up, and arguably my favorite, is called the motion prompt. This was done by Microsoft and a few other universities, and what it basically looked at was how LLMs would react to emotional stimuli at the end of prompts.
Emotion Prompt3:32
So for example, if your boss tells you that this project is really important for your career or for a big client, you're probably going to take it much more seriously. And this prompting method tries to tie into that cognitive behavior of humans.
And it's really simple. All you have to do is add one of these emotional stimuli to the end of your normal prompt, and I'm sure you'll actually get better outputs. I've seen it done time and time again, from everything from cover letters to generating change logs.
The outputs just seem to get better and more accurate, and the experiments show that this can lead to anywhere from an 8% increase to a 115% increase, depending on the task at hand.
Wrap-Up4:33
And so those are 3 really quick, easy-hit methods that you can use in ChatGPT or in the AI features in your product. We have all these available as templates in PromptHub. You can just go there and copy them.
It's prompthub.us. You can use them there, run them through our playground, share them with your team, or you can have them via the links. And so thanks for taking the time to watch this. I hope that you've walked away with a couple new methods that you can try out in your everyday.
If you have any questions, feel free to reach out, and I'd be happy to chat about this stuff. Thanks.





