Prompt Smarter, Not Harder: The Power of Prompt Engineering in AI

Everything you need to know about Prompt Engineering in 2024

Chandler K
The AI Archives

--

In 2023, a tool that would change the way millions of people work was released: ChatGPT. Now hundreds of millions of people use Generative AI products like ChatGPT and Gemini on a regular basis. However their sudden rise in popularity has left many users struggling to get these LLMs (Large Language Models) to complete their tasks successfully. This is where Prompt Engineering comes in. This essential skill enables people to interact with the model in an optimal way, ensuring that they reach their desired goal in as little time as possible.

This article will explore the following:

  • What is Prompt Engineering?
  • The benefits of Prompt Engineering
  • Tips to improve your prompts
  • Saving good prompts for the future

What is Prompt Engineering?

In its simplest form, prompt engineering is the act of creating or altering the prompts given to an LLM (like ChatGPT) until the desired output has been received. A prompt is what we call a question or command given to a chatbot. So when we talk about prompt engineering, we are referring to altering the messages you send to the AI model. The concept of prompt engineering has varying levels of complexity, from crafting a series of unique prompts to expanding on previous prompts by adding more details, the many approaches to prompt engineering can lead to positive outcomes. An easy way to think about this is to imagine you’re giving a stranger a task to complete. If you said “Clean the house”, they might clean the kitchen or vacuum the floor. While their actions were correct, you may have wanted the bathroom cleaned or the garage swept out. Just like how you may need to be specific when communicating with other people, you’ll need to do the same for LLMs. Remember that current chatbots like ChatGPT or Gemini are only as powerful as the prompts you give them.

Benefits of Prompt Engineering

The most obvious benefit of successful prompt engineering is that you can get your intended output from the model. At the end of the day, prompt engineering is meant to result in better responses that are useful to your current task. This isn’t the only positive though, by improving your prompting abilities, you can save time and reduce the number of prompts that it takes to achieve your desired output. This is especially important when using products like ChatGPT that have message cap limits. If approached incorrectly, a single conversation can use all of your credits.

By interacting with the models successfully, you are also able to accomplish a much wider range of tasks. Many people incorrectly believe that current LLMs are incapable of completing requests after only a few prompts. Through prompt engineering, you’ll quickly see that many complex tasks can be fulfilled if queried in the right way.

Tips to improve your prompts

  • Make your prompt concise. When drafting your prompt, don’t add fluff. Instead keep the prompt short and sweet.
  • Be detailed. Include in your prompt the desired length, type, tone, and format of the response.
  • Avoid telling the model what not to do. Instead, be specific on what you do want. This will help guide the model to provide the best responses.
  • Have a goal in mind. Prompt engineering won’t be useful if you aren’t sure what a useful response looks like. You might want more open-ended prompts if you need the model to be creative or very specific prompts if you know what the output should look like (a summary of a book for example).
  • Provide the necessary context. For some prompts, directing the model toward specific information ensures that it gives relevant answers.

At the end of the day, there are a number of ways you can get better at prompt engineering but the most important thing to remember is that this is a trial and error process. If you’re new to using LLMs, remember that there is often a lot of iteration involved in getting the best outcome. Hopefully by following the above tips, you can save time and create more effective prompts. For even more resources on prompt engineering, check out the OpenAI Docs.

Saving prompts with Keymate

Once you’ve successfully engineered a great prompt, you’ll often move on and leave your prompt behind. Of course you’ll learn from every success and failure but saving a well crafted prompt can save time (and credits) in the future. That’s where Keymate.AI comes in. By storing your prompts in the Keymate Memory Manager, you can reuse the prompts in future conversations in seconds.

There are two ways to save a prompt you like, if you’re using the Keymate GPT, you can simply tell the GPT to save the last prompt to your Keymate Memory. It will look something like this: “Save the previous prompt to my Keymate Memory with the label: ‘XYZ’”. The GPT will then confirm that you want to proceed with saving the prompt before creating a new saved item in your memory. The below image showcases just how simple this process can be.

The other way to save prompts is to head to the Memory Manager and manually add the prompts. Once in your Memory Manager, head to the top right corner and hit “New”.

From here, you can add PDFs, Youtube videos, Google Docs, Websites, ChatGPT prompts / responses, and more. Paste in your well crafted prompt and click “Send”. You’ve now saved your first prompt!

To recall this prompt (or any saved items) you again have two options. You can recall this information in the GPT by telling Keymate the name of the item. Alternatively, you can use the Memory Manager to export the prompts to ChatGPT. For this method, hover over your saved item and select “Go to ChatGPT”. This will copy the necessary information to your clipboard and allow you to paste it into your conversation.

Prompt Engineering will only become increasingly necessary as Generative AI models find new applications in our lives. Even as models get better at understanding our intentions, knowing what works best will ensure that you can effectively interact with these products. By remembering the tips covered here you can start building the skills needed for the AI age.

--

--

Chandler K
The AI Archives

Harvard, UPenn, prev NASA , writing about AI, game development, and more..