• Prompts Unlocked
  • Posts
  • Prompt Engineering 101: Everything you need to know about prompting in 2023

Prompt Engineering 101: Everything you need to know about prompting in 2023

Prompt Engineering - The Ultimate Guide

What is Prompting?

In English, it’s essentially how you talk to the model to guide its responses.

Here are a few examples of prompting that have generated pretty wild (but fun!) results:

Write me a poem..

Building tables..

What’s happening in the background?

Imagine for a second that you're a software engineer. You're building a smart fridge app that orders Instacart delivery when your smart fridge tells you you're out of food. What happens?

On a high level, your code controls what's displayed on the app. It connects your app to the database, and uses Instacart's APIs to place an order automatically. In essence, the code you write tells the app what to do.

It's the exact same thing with prompting, but the coding and APIs and database stuff is abstracted away. Instead, the words you write tell the AI exactly what you want it to do within the parameters you specify. It can be as generic as "write me a song" or as specific as "write me a poem about a fat cat hunting birds with an ABAB rhyming scheme." (It can go even deeper). But that's what makes it interesting!

In this post, you'll learn all about prompt engineering, the different types of prompts you can use, and how you can get started writing prompts of your own.

Why You Need to Learn Prompt Engineering

You've probably heard about ChatGPT by now. It's the chatbot that's slowly but surely becoming integrated with all aspects of our lives. That's not a bad thing though - if you learn how to write the right prompts.

Prompt engineering is becoming increasingly important as the use of AI continues to grow in various industries. Every company large and small are either exploring integrations with OpenAI or building their own AI product.

As we continue to delegate decision-making to machines, it's essential to understand how these decisions are being made. Without proper guidance, machine learning models can perpetuate biases or make decisions that don't align with our values and ethics. Prompt engineering can help ensure that these decisions align with our intentions.

Types of Prompting

Androids acting?

There are various types of prompt engineering, including:

  1. General Prompting - In this type of prompting, a single prompt is provided to guide the entire decision-making process. The prompt can be a question, a statement, or a combination of both.

  2. Role Prompting - Role prompting focuses on prompts that guide the model's understanding of specific roles. For example, in a medical diagnosis model, role prompts would guide the model's understanding of the roles of a doctor, a patient, and a disease.

  3. Chain of Thought Prompting - In chain of thought prompting, a series of prompts is created to guide the decision-making process. Each prompt builds on the previous one, guiding the model's thinking in a specific direction.

  4. Counterfactual Prompting - Counterfactual prompting involves creating prompts that help the model understand what might have happened if a different decision had been made.

  5. Exemplar Prompting - Exemplar prompting involves providing the model with examples of previous decisions to guide its decision-making in the future.

  6. Other types of Prompting - Zero-shot prompting, multi-shot prompting, and more!

Benefits of Learning Prompt Engineering

Learning prompt engineering can be beneficial for individuals from all walks of life, regardless of their job function. By understanding how to create prompts, you can improve your critical thinking skills, data literacy skills, and future-proof your career.

With the increasing importance of AI in various industries, learning prompt engineering can help individuals stay ahead of the curve. In addition, prompt engineering can be a valuable addition to a resume, demonstrating a candidate's understanding of the latest technologies and their ability to innovate.

Getting Started

There are several resources available for those interested in learning prompt engineering. These include:

  1. OpenAI's GPT-3 Playground - The GPT-3 Playground allows users to experiment with GPT-3 and explore its capabilities. OpenAI just released GPT-4 which is an upgraded version of its previous model. You can try GPT-4 by searching “GPT4” on Google. They use the same interface.

  2. Bing Chat - Bing Chat is available on a limited basis. But it’s still relatively easy to get Bing as long as you join the waitlist and have used Microsoft products before. You can try writing your own prompts in Bing and tweaking your prompts to modify your results. You only get 20 tries with Bing.

Although they’re powered by the same model, there are some differences between the two. ChatGPT’s responses can be longer and uses more of an explanatory style whereas Bing responses are shorter and to the point. Bing uses live data and links out to sources whereas ChatGPT is limited to data up to 2021. You also don’t get multiple chats with Bing - it’s all one chat that you reset when you’re done or run out of tries.

Ready to try your first prompt?

Copy and paste this one into your chatbot of choice and let me know what you get in the comments below!

Build me a table of the different large language models. Include columns for name, release date, company it was developed by, # of parameters, and underlying technology

Reply

or to participate.