Posey's Tips & Tricks
Writing Better AI Prompts
A practical guide for IT pros on how to structure clearer, more effective prompts to get more accurate and useful results from Copilot and other AI chatbots.
Whether you are working with Microsoft Copilot or one of the other large language model chatbots, the key to getting the results that you want is to construct your prompt in a way that is in line with the AI model's expectations. In this post, I want to share with you a few techniques that I like to use.
Be Specific. Even though AI chatbots can often decipher vague input well enough to figure out what it is that you are trying to accomplish, you can significantly improve the odds of getting what you want by being specific. In fact, in my opinion, being specific is rule number 1 for working with AI chatbots.
As an example, it would be better to tell an AI prompt to, “write a two paragraph summary of Brien Posey's book Conversational Rocket Science”, as opposed to telling the AI, “tell me about Conversational Rocket Science”.
In the first example, the prompt tells the AI how much text to generate. It also removes ambiguity by mentioning the fact that the work being summarized is a book and by mentioning the book's author (which can be helpful if the AI has trouble locating the book or if there are multiple books with similar titles).
It's also best to avoid ambiguity wherever you can. For example, asking how fast airplanes are would be way too vague. After all, there is a huge difference between an F-35 fighter and the Cessna 172 that I used to fly when I was a teenager. A better way of phrasing the prompt might be, “Tell me the average cruising speed of a commercial airliner”. This prompt, while not perfect, narrows things down so that the prompt isn't quite so ambiguous.
Start with a Verb..The examples above point to another best practice that seems to be quite effective for most large language models. That best practice is to begin the prompt with a single verb that conveys what you are trying to accomplish, in the simplest terms possible. In this case for example, the example started with the word Write. That's because the goal behind this example prompt is to get the chatbot to write something. I of course, follow up with all of the specific details, but the first word of the prompt sets expectations for what you want the chatbot to do.
Experiment With the Prompt's Structure..Even though it's a good idea to start your prompt with a verb such as write, draw, or explain, you still need to provide the chatbot with the details that it needs. If you are writing a short, simple prompt, like the ones from my previous example, then the prompt's structure doesn't really matter all that much. However, if you are writing a long and complex prompt, then try to include the most important details last. Some, but not all, chatbots place a greater emphasis on the details that come last. In fact, Microsoft Copilot falls into this category.
Avoid Using Pretentious Language. When writing a prompt for an AI chatbot, it's best to ask for what you want in the simplest way possible, without skimping on the details. Try to avoid writing prompts that sound like questions from a college exam. Suppose for example, that you want to know about Einstein's theory of relativity. An example of a good prompt might be, “Explain to me the basics of general relativity and tell me why Einstein's theory was such a big deal”. Notice that I started the prompt by using a verb, I avoided overly complex language, and I was very specific about what I wanted the chatbot to do.
In contrast, a poorly written version of the same request might be, "Delve into the ontological implications of Einstein's theory of general relativity, situating it within the broader paradigmatic shifts precipitated by the confluence of quantum mechanics and classical electromagnetism. Specifically, I require an exposition on the manner in which relativistic spacetime geometries instantiate a hermeneutic circle of self-referential causality, thereby problematizing the very notion of objective truth." Believe me when I say that a chatbot is not going to be impressed by your large vocabulary, and the overly complex prompt only serves to confuse the chatbot.
Define Complex Terms. While it's best to avoid overly complex queries if you can, there may be situations in which complexity is unavoidable. In those types of situations, my advice would be to define any acronyms that you are using, so as to avoid confusion with similar acronyms that have different meanings. It's also a good idea to define any industry specific terms as a way of providing the chatbot with some additional context. Let me give you an example.
A poorly written prompt could be something along the lines of, "What was the deal with the space shuttle's OMS-1 burn prior to STS-41C?" This prompt doesn't begin with a verb, but there are other reasons why the prompt is problematic. Specifically, the prompt assumes that the chatbot knows that OMS stands for Orbital Maneuvering System. It also assumes that the chatbot knows what STS-41C is (the 41st shuttle mission). A better prompt might be, "Explain why the first 40 space shuttle launches used the orbital maneuvering system (the OMS-1 burn) to raise the orbital apogee when later missions did not." This second prompt asks the same question but simplifies key terms that the chatbot might not be familiar with.
Focus on a Single Question. While most modern large language models are indeed capable of answering multiple questions within a single prompt, it's usually better to stick to asking one question per prompt if you can. Remember, you can always ask follow up questions.
About the Author
Brien Posey is a 22-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.