EP 44: Master Prompt Engineering

Expert Strategies for Crafting Effective Prompts in ChatGPT and Beyond

Dive into the world of prompt engineering with George Schoenstein and Santi Cuellar in this episode of Tech UNMUTED. Discover the secrets to crafting clear, specific, and context-rich prompts that enhance AI interactions. From breaking down complex questions to choosing the right format for responses, this episode is packed with practical advice and best practices used by George and Santi themselves. Whether you're navigating ChatGPT, Copilot, or any AI platform, these insights will revolutionize how you communicate with AI, ensuring more precise and useful responses. Join us and elevate your AI prompting skills!

Watch & Listen

Tech UNMUTED is on YouTube
Catch up with new episodes or hear from our archive. Explore and subscribe!


Transcript for this Episode:

INTRODUCTION VOICEOVER: This is Tech UNMUTED. The podcast of modern collaboration – where we tell the stories of how collaboration tools enable businesses to be more efficient and connected. With your hosts, George Schoenstein and Santi Cuellar. Welcome to Tech UNMUTED.

GEORGE: Welcome to the latest episode of Tech UNMUTED. Today we're going to take a look at best practices related to prompt creation, effectively some people call it prompt engineering. That seems to be what Santi and I call it. Santi's going to walk through several elements that you need to be aware of when creating prompts, and this will help you be more effective in getting the output that you want to get from the prompts.

SANTI: I'll tell you, we do a lot of prompting especially on this podcast. We've done prompting on MidJourney for images, we've done prompting for trying to analyze lottery data, and all that fun stuff. What happens is, a lot of folks don't quite understand yet what some of the best practices are for prompts because it's really not that hard. You just have to think about the structure a little bit. What I want to do today is I want to just touch on some of these. By the way, these are best practices that I use, that George uses. We're just sharing with you what's been working for us. Let me just start off with the first one.

First of all, just be clear and specific. I know it sounds pretty basic but yes, just be clear and specific. In other words, you want to clearly state your request or your question. You want to provide specific details to help the AI, whether it's ChatGPT or whether it's Copilot. It's irrelevant. You want to make sure that you're detailed, so for example, I'll give you an example. Clear and specific. Can you explain the process of photosynthesis in plants, including the key stages and the role of chlorophyll? That was a very specific question, but it was clear. It was to the point. Obviously, it has to do with plants and the whole process and I'm being as specific as I can.

That is a good prompt. That AI will take that and know what to do with it. That's the first rule of thumb that we use, just try and be as clear and as specific as you can. It doesn't have to be an extremely lengthy question, just clear and specific.

GEORGE: If you had just done, “tell me what photosynthesis is,” you would've gotten a definition with a broad set of stuff.

SANTI: Correct.

GEORGE: You narrowed the focus down to be able to get the specific piece of information-

SANTI: Very specific.

GEORGE: -that you were looking for. We've talked about this on previous podcasts. The risk with starting with the short prompt is to come back and add those other pieces in later.

SANTI: Correct.

GEORGE: Sometimes it works perfectly fine. Sometimes it just goes off down a different path-

SANTI: That's correct.

GEORGE: -and you're unable to get it to give you the answer that you're looking for.

SANTI: Yes, that is correct. If I'm off to a bad start, meaning I didn't do exactly what we just said, I was not clear and specific and so I'm getting all these broad statements. I find that I'm better off just starting a fresh new chat and then focus on being clear and specific. Then I start getting better responses.

The other thing which we do is sometimes you use context. Because what happens is, a specific question can take on a different meaning if you change its context, but that happens in natural language anyway. Because it is using natural language to process this, it makes sense.

If you want to refer to a specific context or scenario, go ahead and include that. Include that as part of your prompt. Here, an example. Let's say, in the context of computer programming-- There it is, I set the context. In the context of computer programming, explain the difference between a stack and a queue. Because a stack and a queue could have a different meaning in another context. Or you can't assume that the AI is going to automatically know that you're referring to the context of computer programming. There you go.

If you add context to your prompt you can, back to your point, George, you can narrow down your response. Always think about context and feel free to bring that into your prompt. Another thing is, it is okay to have a-- Some of us call it a lengthier prompt, I just call it a complex prompt. In other words, what it is it's not just one sentence because there's some complexity to where you're trying to ask, you tend to want to add sections to it. Fine. That's good. What you want to do is if the question you're trying to ask is complex, don't just ask a continuous lengthy sentence, break it down.

Break down a complex question into smaller bits so that the AI can take those smaller bits and put everything together. I have an example of that. I like to use the first and then statements. Listen, if you entered two-sentence questions, they'll figure it out but I prefer to prefix those. I'll say something like, first, explain the concept of artificial intelligence, then discuss its application in healthcare. There you go. Very specific. In this case, I was clear and specific. I used some context because I brought in the healthcare piece, but I broke down a complex question into two sections by prefixing that with, hey, first, and then.

That's one practice that I-- It works out well for me. I use it quite often. Also, there's nothing wrong with specifying what format you want for the output. We don't think about that. By the way, we could take an output and create our format outside of the AI, but why not include it in your prompt? What I mean by that is if you want a bulleted list, ask for it, or if you want a step-by-step explanation, ask for it. Or pros and cons, ask for it, and it'll do that for you. It'll generate that format. For example--

GEORGE: That all depends on the LLM, right?

SANTI: Of course.

GEORGE: I've noticed in particular ChatGPT likes to do bullets. It will create a paragraph and then a bunch of bullets and maybe close again with a paragraph. If you need something different, you have to go back and say--

SANTI: You have to ask.

GEORGE: Yes, you have to specifically ask. It's probably easier upfront to put it in the prompt to remember to put it in. Because you save yourself a step plus indicating length and other things for the response as well.

SANTI: 100%. If I want a list, I'll say list. I'll say something like, list the advantages or disadvantages of X. If what I want is pros and cons, then I'll say, give me the pros and cons of, I don't know, renewable energy. By doing that, I'm now going to get a format in the output. It'll break it up. If it's pros and cons, it'll give me the pros. It may list the pros but it'll give me pros and it'll give me cons. All I'm trying to say is, rather than just say, hey, explain this, you can also in your prompt include what output you're looking for.

Granted, you can take all that, copy it, paste it, and create your own format but just do it in the prompt. All right, so the last two I want to touch on. By the way, those are just best practices. I use those all the time. They work. If you follow those, you're going to have pretty successful outputs. However, sometimes you need to kind of, it's not so much that you're asking for question or you're trying to break down complexity. It's really more that you are not sure about a specific topic. With all the structures I gave you, you know the topic or you know what you're focused on.

Here, what I want you to think about is you can also ask for clarification. Which is something that we don't realize we can do sometimes. For example, so let's say that-- All right, so you're not sure about a topic or you want a detailed response. Say something like, can you elaborate on the impact of climate change on biodiversity? Then I can add something like focusing on specific examples. Since I don't know what those examples are, I'm asking it to just go ahead and generate that for me. It's okay to ask collaboration questions as well as far as your prompt. You don't necessarily have to understand the topic or have the examples in hand.

It'll generate them for you. Granted, I'm still following my structure up above. I'm still being clear and specific. I am breaking down the question because it's a little bit complex. I'm just adding something. I said, can you elaborate? I said, can you focus on specific examples? I'm going to get a response. It's probably a broader response too. It'll be more of a narrative, but it works. The last thing and this is one that we all do by default. We don't realize we do it, but we do it all the time. That is, we tend to ask, we get a response, and then we want to iterate and expand further.

It's almost like experimentation. It's perfectly fine. I do it all the time. You do it all the time. It's part of learning how to-- It's like a dance with artificial intelligence to some degree. Go ahead and experiment and go ahead and iterate if you have to. Something like, for example, so I'll say something like, "Hey, I need more details on the historical events that led up to the Renaissance. Great, I could stop there, but I can iterate and say, please provide a comprehensive overview.

If I would have said, please provide a comprehensive overview, it might've given me a pretty long narrative, a mid-narrative, a short narrative. It might've just pointed me somewhere. By me iterating that, what I'm looking for is a comprehensive overview, it's probably going to give me a comprehensive overview. Anyway, not to draw this out anymore, it's not that hard. I know we give prompting or prompting AIs these fancy words like engineering and also, no, listen, if you stick to this structure, these six things, you're going to get good responses.

You don't necessarily need to be a prompt engineer. I'll close with a prompt that I wrote out that captures a lot of what we just covered. For example, discuss the impact of artificial intelligence on job automation and its potential effects on the future workforce. Provide both positive and negative perspectives. That's a great prompt. That's a great prompt because I'm looking for a discussion, I'm being very specific, I'm providing context. Especially when the context, especially as it affects future workforce, that's context. Then I'm actually asking for an output, a format, by saying, give me both positive and negative perspective.

I'm expecting a list that's going to say, here are the positives, here are the negatives. That's it. That's really all there is to it. It's not that hard. It's called conversational AI and also called natural language AI because it's meant to be that way. It's like if I was to ask George a question, the more specific and clear, and structured my question to George is, the better answer response George is going to provide me. AI is no different. It really isn't. I challenge everybody to just take a stab at this, jot down these six approaches that we use on a regular basis to prompt AI and try it out.

By the way, I would love to hear back from you. If you're trying this approach to asking these questions to ChatGPT or even Copilot, I want to hear from you. Comment below and let us know how these structured prompts are working for you because we would love to hear your feedback. I think that brings this podcast to an end, George. Folks, listen, this is a great time to remind you to subscribe. Subscribe because you will not miss out on future podcasts and you don't want to miss out on future podcasts.

I know you don't want to miss out, so just subscribe and do it right now. See, I'm being very specific with my prompt. That being said, folks, remember to stay curious and stay connected.

CLOSING VOICEOVER: Visit www.fusionconnect.com/techunmuted for show notes and more episodes. Thanks for listening.


Episode Credits:

Produced by: Fusion Connect

2023 TMCnet Best Tech Podcast award winner
Tech ROUNDUP

Expert insights, exclusive content, and the latest updates on Microsoft products and services - direct to your inbox. Subscribe to Tech ROUNDUP!

Tech UNMUTED, the podcast of modern collaboration, where we tell the stories of how collaboration tools enable businesses to be more efficient and connected. Humans have collaborated since the beginning of time – we’re wired to work together to solve complex problems, brainstorm novel solutions and build a connected community. On Tech UNMUTED, we’ll cover the latest industry trends and dive into real-world examples of how technology is inspiring businesses and communities to be more efficient and connected. Tune in to learn how today's table-stakes technologies are fostering a collaborative culture, serving as the anchor for exceptional customer service.

Get show notes, transcripts, and other details at www.fusionconnect.com/techUNMUTED. Tech UNMUTED is a production of Fusion Connect, LLC.