From the course: Generative AI for Business Leaders

Prompt engineering

From the course: Generative AI for Business Leaders

Prompt engineering

- Do you know how to talk to AI? The name for this is called Prompt Engineering and this is a key element in generative AI applications and one the business leaders need to be aware of if they want to maximize the potential of this technology. If you're less familiar with it, prompt engineering is the process of designing how to ask AI to generate the desired output you want. One of the biggest challenges in generative AI models is controlling the outputs. Business leaders like yourself need to be sure that the AI models they're using are generating useful, accurate, and relevant results. That's where prompt engineering comes in. By carefully crafting prompts, you can help the AI model understand what you're asking it to do and encourage it to produce the most useful results for you. If you don't know how to enter the right prompt, you probably won't get the right response. The best prompts tend to be specific, nuanced and extremely well articulated. Check out the simple example about explaining quantum physics. I can use the prompt to simply ask, what is quantum physics? And the result will be pretty generic and standard, with a short paragraph. But I can take my prompt to the next level and ask it to write it in a certain length, in a certain style, in this case, ask it to write it for my 10 year old kid with a certain structure. I also ask that to write it as a passionate science teacher who're trying to make it fun, engaging, and easy to understand. Notice that I use the uppercase letters to indicate the importance of fun. And lastly, I ask it to avoid using jargon or listing too many nouns and adjectives. Notice the difference. The second prompt created a truly unique and engaging explanation. This prompt nuances can apply across many use cases. Think of a healthcare company that might want to use AI to synthesize information from medical workers and then identify patterns in health data. By designing careful prompts they can extract a specific data they're after from very large data sets. In the prompt themself, they might want to explicitly call out their unique protocol for how to extract the data in order to put more or less emphasis on recent research as the basis for the response. Those prompt nuances can determine the success of them using AI. Another example is customer experience. A company might want to augment customer service inquiries with the right customer metadata into the prompt to generate accurate and more personalized responses to customer queries. They can even share in the prompt their customer's unique guidelines on how to handle certain edge cases, with a step-by-step instructions about what to do and what not to do. Ultimately, prompt engineering is about providing the AI model with the right context and guidance in order to produce the desired results. There are many nuances to it, and simply entering a quick prompt will not take your AI to its full potential. It takes several tries and iterations as you'll see for yourself once you play with it. It's also valuable to note that prompt engineering is connected to the concept called shot learning, zero-shot, one-shot and few-shot learning refers to situations where AI is able to perform new tasks with very limited learning, even zero learning, basically no data. Prompt engineering can be helpful in shot learning because a well designed prompt can guide the AI model in the right direction, even with limited data to learn from. For example, consider an AI model that is being used to categorize images, like classifying types of birds. By designing a prompt that gives clear instructions about how to identify birds by using specific criteria such as their beak shapes or feather colors, you can help make sure the AI understands what is it being asked to do and then categorize those birds images correctly. As you probably understand by now, prompt engineering serves as a critical interface between the human and the machine, and by optimizing the prompts, you can make sure that the AI model is generating outputs that are truly useful and relevant to your business. It's really important that you try it for yourself. Take a specific task like writing a marketing brief for your company, using GPT Chat and spend at least 30 minutes trying to optimize the prompt. Get as close as possible to your desired outcome. Experiment with the language, the constraints you choose, the structure you write in and the examples you want it to learn from. Play with it and you'll quickly see the difference in the results and have some fun with it.

Contents