Module II: Prompt Engineering

Introduction

As stated in the previous module, the first step to successfully using LLMs is proper model selection. Once you have selected an ideal model for your task, the next step is learning how to interact with the model properly. The process of designing ideal prompts to be sent to the LLM, to achieve an optimized response, is called prompt engineering.

The field of prompt engineering is highly psychological in nature (Sahoo et al., 2023). LLMs gained their knowledge base through the use of the internet. Anyone who uses the internet, especially the various social media platforms, knows that browsing the web is essentially an experiment in human psychology. In this sense, since LLMs were trained on human psychology, some aspects of human psychology can apply to them.

Prompting Techniques

Test Your Understanding

Question 1

Is directional stimulus prompting the most effective when you have no specific expectations about what the output should include? Explain your answer.

Question 2

Create an example of emotion prompting that could be used to improve the quality of an LLM's response when asking it to generate a lesson plan on the animal kingdom.

Question 3

You need to create a prompt for an LLM to analyze a complex literary passage for high school students. Which prompting technique would be most effective if you want the LLM to take on the perspective of a seasoned literature professor? Justify your answer.

Question 4

Explain the key difference between no-shot and few-shot prompting, and provide one advantage and one limitation of few-shot prompting.

Question 5

Which prompting technique involves adding the phrase "Let's take this step-by-step" to encourage the LLM to break down complex problems?

Continue to Module III

Hallucination Detection →