At a Glance

AI is rapidly becoming a routine part of many of our professional and personal lives. But have you ever been unhappy with the results that AI generated for you? Do you wonder if you’re getting the most out of AI? This article provides an introduction to crafting effective prompts so that you maximize your benefits from AI.

Before you start crafting the perfect prompt, visit Navigating Data Privacy to review our guidelines for protecting your data while using these technologies.

What is a Prompt?

Prompts are your input into the AI system to obtain specific results. In other words, prompts are conversation starters: what and how you tell something to the AI for it to respond in a way that generates useful responses for you. After that, you can build a continuing prompt, and the AI will produce another response accordingly. It’s like having a conversation with another person, only in this case the conversation is text-based, and your interlocutor is AI.

A prompt can be as simple as a phrase or as complex as multiple sentences and paragraphs. New models are even able to handle multimodal inputs, including pictures and audio. Despite the increased sophisticated of LLM chat-based interfaces, it’s still helpful to think of a generative AI tool like ChatGPT as “a machine you are programming with words” (Mollick, 2023). Your AI interactions and the output quality hinge largely on how you word your prompts.

How AI Responds to Prompts

The marvel of AI is its adaptability, which means you can (and probably should) direct the results it gives you by creating detailed prompts. Crafting effective prompts can optimize your results.

This is because most AI systems—like ChatGPT, Claude, and others—are primarily built on the combination of two technologies: natural language processing and machine learning (Mollick, 2023). This combination enables AI to understand your prompts even if you write them as if you’re having a conversation with another human being. It also means the system continuously learns from input from you and other users.

Moreover, some AI platforms, such as commercial chatbots, leverage intent recognition (Urban, 2023) to discern user sentiment and intentions better by analyzing context information contained in user query (Wu et al., 2022).

Writing Effective Prompts

To simplify, the way you frame prompts shapes the AI’s output. This art of refining prompts is termed prompt engineering, which “involves selecting the right words, phrases, symbols, and formats” to get the best possible result from AI models (Johnmaeda, 2023).

Given that context, consider these three strategies for prompt engineering: First, provide context. Second, be specific. And third, build on the conversation.

Provide Context

Your prompt can be a simple question, like, “What’s the best time of year to enjoy New England’s fall foliage?” An AI system like ChatGPT will quickly generate a response to that prompt. However, you can also make your prompts more sophisticated by providing some context, or even a voice. Try, for example, “You are an experienced wildlife biologist specializing in trees. Based on the recent weather patterns in the USA, predict the best fall foliage season for New England—and explain it to kindergarteners.”  The response you get will be vastly different than the response to the simpler prompt because it will take into account the parameters you established by adding more context.

If you’d like to obtain results from AI that mimics your own writing style, you can feed your writing samples into the AI tool.

Be Specific

Boost specificity in your prompt. Try adding a year, specific region (north, central, or southern New England), or even add another region for comparison. There are various kinds of specificity you can consider when developing prompts: give a precise task, examples, rules and constraints (Cook, 2023).

AI models often generate outputs based on the clarity and precision of the input queries they receive. Rather than posing a general question like, “Tell me about climate change,” consider detailing the aspects you’re interested in, for example, “Discuss the economic implications of climate change in developing countries over the next decade.” By doing so, you direct the model’s focus, thereby obtaining a more targeted and relevant response. In essence, the granularity of your input is directly proportional to the utility of the output you receive. Therefore, refining your queries with explicit context, constraints, or goals can significantly enhance the quality of results.

Being specific and providing more details helps you understand your prompt better and generates a more customized response with fewer errors (Neil, 2023).

Building On the Conversation

Many AI systems take the form of a chat window. These chat-based systems are capable of remembering what happened earlier in your conversation without re-establishing context (Liu, 2023).

Watch MIT Sloan’s Rama Ramakrishnan walk through the mechanics behind AI writing tools like ChatGPT in his video How ChatGPT Works: A Non-Technical Primer.

Let’s look at the foliage season example above. Once AI generates the response tailored to the kindergarten audience, you can simply add a follow-up. For example, instruct it to “make it funnier,” or “explain it to college students who are English majors using analogies they will understand.” There is no need to repeat the context and other parameters. Additionally, most AI systems will allow you to generate a new response if you’d like to see a different version without entering another prompt.

You can continue to build upon AI’s responses just by adding other prompts. New models continue to improve the ability to carry context across interactions as context windows grow larger (OpenAI, 2023). This iterative process unlocks more potential from AI (Neil, 2023). This continuity can also become a hindrance if you want to work on a new topic, at which point it’s best to start a new chat.

Limitations

While prompt engineering can improve the outputs from AI, there are some limitations to bear in mind.

Focus More on Problems, Less on Prompts

AI platforms and the models they are based upon are rapidly evolving and becoming more sophisticated. For that reason, some experts doubt whether the importance of prompt engineering will be long lasting. Smith (2023) predicts that AI models may soon be able to write prompts themselves.

Acar (2023) foresees a future where advanced AI systems will be able to intuit our intentions without deliberate prompts. He calls for our attention the difference between problems and prompts. “Prompt engineering focuses on crafting the optimal textual input by selecting the appropriate words, phrases, sentence structures, and punctuation. In contrast, problem formulation emphasizes defining the problem by delineating its focus, scope, and boundaries.” (Acar, 2023). In the long run, it may be more important to develop skills in crafting descriptions of problems as compared to mastering prompt engineering (Acar, 2023).

Entering a prompt and receiving output is much like the process of having a conversation with another person. But just like a conversation between two humans, interacting with AI can sometimes be complicated and AI may forget where it was in the conversation. This is another reason focusing more on the problem may be a more helpful approach than repeated attempts at crafting perfect prompts.

Be Aware of AI’s Flaws

Despite rapid advancements, AI isn’t flawless. Concerns around factual accuracy persist, as highlighted by a CNET incident in 2023 where AI-generated content was found factually incorrect (Thorbecke, 2023). Similar cases where AI generated factually false information can easily be found in many different settings, too, including academia. AI tools can produce content that is inaccurate, misleading, and even completely made up (even if it may seem perfectly coherent and believable on the surface). This problem is so common that it’s referred to as an AI hallucination (Weise & Metz, 2023). It is important to keep in mind AI’s limitations when formulating your prompts and always look at results with a critical eye.

Avoid AI’s Potential Harms

AI can perpetuate harmful biases. Many at MIT may be familiar with a controversy where an MIT student of Asian heritage asked AI to turn her photo into a professional looking headshot (Buell, 2023) only to find that it generated an image of her with bright blue eyes and a lighter skin tone. Sam Altman, CEO of ChatGPT, recognizes that AI falls short of removing biases and producing non-inclusive language, and advocates for iterative development that solicits broader public feedback to counter such challenges (Yu, 2023).

Conclusion

As users seek to harness the power of AI, crafting the right prompt becomes an essential skill, guiding AI towards desired outcomes and ensuring optimal results. The promise of AI systems like ChatGPT, Claude, and others lies in their ability to adapt and learn from your carefully crafted inputs, mimicking human conversation and generating pertinent outputs. Yet, we must remain vigilant about potential flaws, biases, and the implications of over-relying on these systems without critical scrutiny.

References

Acar, O. A. (2023, June 8). AI prompt engineering isn’t the future. Harvard Business Review. https://hbr.org/2023/06/ai-prompt-engineering-isnt-the-future

Buell, S. (2023, August 24). Do AI generated images have racial blind spots? See an example. The Boston Globe. https://www.bostonglobe.com/2023/07/19/business/an-mit-student-asked-ai-make-her-headshot-more-professional-it-gave-her-lighter-skin-blue-eyes

Cook, J. (2023, June 26). How to write effective prompts for ChatGPT: 7 Essential steps for best results. Forbes. https://www.forbes.com/sites/jodiecook/2023/06/26/how-to-write-effective-prompts-for-chatgpt-7-essential-steps-for-best-results/?sh=5a76b51e2a18

Johnmaeda. (2023, May 23). Prompt engineering overview. Microsoft Learn. https://learn.microsoft.com/en-us/semantic-kernel/prompt-engineering

Liu, D. (2023, June 8). Prompt engineering for educators: Making generative AI work for you. LinkedIn. https://www.linkedin.com/pulse/prompt-engineering-educators-making-generative-ai-work-danny-liu

Mollick, E. (2023, January 10). How to. . . use ChatGPT to boost your writing. One Useful Thing. https://www.oneusefulthing.org/p/how-to-use-chatgpt-to-boost-your

Mollick, E. (2023, March 29). How to use AI to do practical stuff: A new guide. One Useful Thing. https://www.oneusefulthing.org/p/how-to-use-ai-to-do-practical-stuff

OpenAI. (2023). GPT-4 technical report. OpenAI. https://openai.com/research/gpt-4

Smith, C. S. (2023, April 5). Mom, Dad, I want to be a prompt engineer. Forbes. https://www.forbes.com/sites/craigsmith/2023/04/05/mom-dad-i-want-to-be-a-prompt-engineer/?sh=206f254359c8

Thorbecke, C. (2023, January 25). Plagued with errors: A news outlet’s decision to write stories with AI backfires. CNN Business. https://www.cnn.com/2023/01/25/tech/cnet-ai-tool-news-stories/index.html

Urban, E. (2023, July 18). What is intent recognition? Microsoft Learn. https://learn.microsoft.com/en-us/azure/ai-services/speech-service/intent-recognition

Weise, K., & Metz, C. (2023, May 9). When AI chatbots hallucinate. The New York Times. https://www.nytimes.com/2023/05/01/business/ai-chatbots-hallucination.html

Yu, E. (2023, June 19). Generative AI should be more inclusive as it evolves, according to OpenAI’s CEO. ZDNET. https://www.zdnet.com/article/generative-ai-should-be-more-inclusive-as-it-evolves