top of page
  • Writer's picturePatrick Law

Cracking the Code: Understanding Prompt Engineering and How to Speak to AI





As we learn about the new technological era and the rise of AI (Artificial Intelligence), we'll be diving deep into the exciting topic of the fourth industrial revolution and how we'll be advancing with the help of AI. It's no secret that communicating with AI is essential for our future, and it's essential to know how to do it correctly. The key to interacting with AI lies in writing "prompts," which are merely commands that the AI can understand.


Think of it like speaking a different language, but instead of words, we use prompts to communicate with AI. Just like how you wouldn't go to France without knowing any French, you shouldn't try to communicate with AI without knowing how to write prompts effectively.

In simpler terms, it's all about designing the perfect input that will give you the output you want from an AI system, which is often associated with the term “Prompt Engineering”.


WHAT IS PROMPT ENGINEERING?


It's a fancy term for the art of communicating with AI algorithms using a blend of language and technical skills. But don't worry - you don't need to be a coding whiz to do it! All you need is a decent grasp of language and grammar, data analysis, and critical thinking.

In fact, according to Andrej Karpathy, Tesla's former chief of AI, English is the "hottest new programming language." So, if you're good with words, you could be on your way to becoming a skilled prompt engineer!


But what exactly does a prompt engineer do? Mairi Bruce, a UK-based prompt engineer and AI researcher at AutogenAI, explains that it's all about understanding the context and the user's intention. You need to be direct, relevant, and unambiguous - no beating around the bush!


"It's like art," Bruce says. "There's no specific formula for it, but you've got to use your words with intention." In other words, you need to make it as easy as possible for the AI to understand what you want it to do.


HOW DO AI LANGUAGE MODELS WORK?


This cutting-edge technology relies on deep learning algorithms and natural language processing (NLP) to fully comprehend human language. It's like a super-smart language robot!

To make this possible, these language robots need to undergo intense training using massive datasets. These datasets include articles, books, journals, reports, and more. It's like feeding a growing baby robot with tons of language knowledge to help it learn and develop its language skills.


But not all training is the same. Depending on the language model, there are two primary learning methods: supervised or unsupervised learning. Think of it like a baby robot's nanny. In supervised learning, the robot's nanny provides it with the right answers to questions. In unsupervised learning, the robot's nanny gives it puzzles to solve on its own. GPT-4 uses unsupervised learning, so it's like giving the robot a challenging puzzle to solve, and it does it like a pro!


WHAT ARE THE PROMPT CLASSIFICATIONS?


Writing quality prompts is essential in ensuring smooth communication with AI language models. It's important to understand the different categories of prompts to structure them with a target response in mind.

Here are some of the major categories of prompts and examples of each:


  1. Information-seeking prompts - These prompts are used to gather information and typically start with "What" or "How." For instance, you can ask "What are the best restaurants in town?" or "How do I fix my broken phone screen?"

  2. Instruction-based prompts - These prompts give instructions to the model to perform a specific task. For example, you can say "Play my favorite playlist on Spotify" or "Set a timer for 30 minutes."

  3. Context-providing prompts - These prompts provide information to the AI to help it better understand what the user needs as a response. You can structure your prompt like this: "I'm looking for a hotel in Paris, what are the best options near the Eiffel Tower?"

  4. Comparative prompts - These prompts are used to compare or evaluate different options given to the model to help the user make an appropriate decision. You can ask "What are the pros and cons of electric cars compared to gasoline cars?" or "Which laptop brand offers the best value for money?"

  5. Opinion-seeking prompts - These prompts are designed to get the AI's opinion on a given topic. You can ask "What do you think about the future of space travel?" or "Do you believe in ghosts?"

  6. Reflective prompts - These prompts are designed to help individuals gain a deeper understanding of themselves, their beliefs, and their actions. They are more like encouragement/self-growth prompts based on a topic or personal experience. For example, you can ask "How can I become a more positive person?" or "What are some ways to deal with stress?"

  7. Role-based prompts - These prompts provide responses by framing the user's request within a specific role. You can use the 5 Ws framework to make these prompts more effective:


  • Who: Assign a role to the model, such as a teacher, developer, or chef.

  • What: State the action you want the model to take.

  • When: Set a desired timeline to complete the task.

  • Where: Provide context or location for the prompt.

  • Why: State the reasons, motivations, or goals for the prompt.


The process may seem intimidating, but it's not as complex as it sounds. In fact, it's quite simple! Once you learn the basics of writing prompts, you'll be able to communicate with AI like a pro. You'll be able to ask it questions, get responses, and even give it commands to complete specific tasks.


In today's fast-paced world, having a great understanding of AI prompt engineering is crucial for success in the industry. With AI technology advancing at an incredible rate, the ability to communicate effectively with language models has become increasingly important. By mastering the different categories of prompts and structuring them with a target response in mind, you can maximize the potential of AI technology and gain a competitive edge in the industry.


So, get ready to enter the world of AI communication and discover the endless possibilities that it brings. Trust us; it's going to be an exciting journey!


SOURCES:


  • Nyakundi, H. (2023, April 20). How to Communicate with ChatGPT – A Guide to Prompt Engineering. Freecodecamp.org.

https://www.freecodecamp.org/news/how-to-communicate-with-ai-tools-prompt-engineering/


  • Derungs, A. (2023, March 27). PROMPT ENGINEERING: HOW TO SPEAK TO AI TO GET WHAT YOU WANT. Nichepursuits.com.

https://www.nichepursuits.com/prompt-engineering/


  • El Atillah, I. (2023, March 30). AI prompt engineering: How talking to ChatGPT became the hottest tech job with a six-figure salary. Euronews.com

https://www.euronews.com/next/2023/03/30/ai-prompt-engineering-how-talking-to-chatgpt-became-the-hottest-tech-job-six-figure-salary


  • Bochard, L. (2022, December 17). How to Talk to ChatGPT: An Intro to Prompt Engineering. Hackernoon.com

https://hackernoon.com/how-to-talk-to-chatgpt-an-intro-to-prompt-engineering


  • Bryden, T. (2022, August 2). What is Prompt Engineering? [Video File]. Retrieved from https://www.youtube.com/watch?v=sztL7rp_TkY.

16 views0 comments

Comments

Couldn’t Load Comments
It looks like there was a technical problem. Try reconnecting or refreshing the page.
bottom of page