Uncategorized

Formulate ChatGPT prompts: context, questions and tasks

In the first part of this series, I already thought about how to effectively formulate prompts for ChatGPT. Specifically, it was about the structure, the tone and the depth of information. This second part deals with the context and the question or task.

An effectively designed ChatGPT prompt is based on the understanding and use of two key factors, in addition to structure, tone and depth of information: the context and the question or task. The context refers to the information behind the actual question, which forms the framework for ChatGPT’s answer.

So it’s all about the backstory, the facts, and the details related to the specific question or task being asked. The question or task is then the formulated actual question or task that is at stake and for which an answer from ChatGPT is desired.

Context and question/task are closely interwoven and together form the output – the answer from ChatGPT. To put it differently and more succinctly: the quality of the context and the question/task have a direct influence on the quality of the output. The saying “garbage in, garbage out” aptly describes what is meant. Now let’s take a closer look.

ChatGPT Prompts: The context

The context plays an important role so that ChatGPT even understands what is meant by a question or a task. It places the question or task in a specific situation or scenario and gives ChatGPT the necessary framework to be able to give a meaningful answer.

Without sufficient context, ChatGPT could provide an answer that is technically correct (and ChatGPT does), but lacks relevance and depth. This is because language models like ChatGPT learn to generate responses based on patterns in the data they were trained on.

They do not have the knowledge or understanding of the real world and therefore cannot (yet) generate context themselves. Therefore, context serves as an important bridge to steer ChatGPT’s response in the direction that is most appropriate for the given context or situation.

For example, when ChatGPT is asked “What should I wear today?”, it cannot provide a viable answer without the appropriate context. It lacks information about, for example, the type of event, the weather, applicable dress codes and so on that would help us as humans to decide what clothing would be useful or appropriate.

ChatGPT Prompts The question or task

Let’s now look at the question or task, i.e. the specific question or task in the context of the prompt. The way in which this is formulated can have a decisive influence on the result. Vague and ambiguous questions or tasks can lead to equally vague and ambiguous answers.

In contrast, specific, well-structured questions or tasks can lead to more focused, accurate, and insightful answers. To illustrate the effect of wording for questions or tasks, let’s consider two questions on a common theme:

  1. “Tell me about World War II” and
  2. “What were the main causes of the Second World War”

The first question is vague and could lead to an overly general answer about WWII, covering a range of topics such as the causes, the main events, the salient people or the aftermath. The second question, on the other hand, is much more precise and targeted and leads ChatGPT to an analysis of the causes of the Second World War.

The connection between context and input

It is important to understand that context and question/task cannot be viewed separately. It builds on context, and a well-crafted context can allow for simpler questions/tasks while maintaining high-quality responses.

Let’s look again at an example based on the above. Let’s say we’re writing an article about the impact of World War II on Europe. The starting context could be: “Write a comprehensive history essay for a high school 10th grader on the socio-economic impact of World War II on Europe”.

The specifically formulated task for ChatGPT could then be: “Start with the background to the outbreak of the Second World War, then explain the social and economic effects after the outbreak, then describe the consequences at the end of the war and finally explain which developments continued after the end of the war”.

This allows ChatGPT to understand what it is being asked to do – namely to generate content suitable for a tenth grade high school essay dealing with the impact of WWII on Europe in specific (temporal) situations.

Summary: The context for ChatGPT prompts

In summary, both context and question/task framing are essential to creating effective prompts. They form the foundation on which ChatGPT builds and customizes its responses. Good prompts tend to have clear context and a precise, targeted question or task.

Poor prompts, on the other hand, don’t have clear enough context, or the question or task is too broad or vague, which can result in less helpful or inaccurate answers. Understanding and mastering the balance between context and question/task is key to quality ChatGPT results.

Finally, let’s look at some examples of good and not-so-good prompts related to context and question/task definitions. We’ll start with simple prompts and then move on to more complex prompts.

Examples of good and bad ChatGPT prompts

Good simple ChatGPT prompt and why it works:

  • Context: “I’m an amateur astronomer trying to understand the night sky.”
  • Task: “Explain to me what a constellation is”

ChatGPT understands from the context that the user is an amateur astronomer who is probably looking for a simple but comprehensive explanation of constellations. The task given is sufficiently precise, and the context helps determine the depth and complexity of the answer.

Bad basic ChatGPT prompt and why it doesn’t work:

  • Context: “I’m an amateur astronomer trying to understand the night sky.”
  • Task: “Tell me about stars”

This context and task prompt is vague and is expected to lead to a wide range of information, from the basics of stargazing and what stars are to how they form and the types of stars. It is therefore better to describe in more detail that aspect of “stars” in which the specific interest exists.

Good complex ChatGPT prompt and why it works:

  • Context: “I am doing research for an advanced-level academic work on the development of digital currencies and their impact on the global economy.”
  • Task: “Give me a detailed overview of the most important milestones in the development of Bitcoin”

The context suggests that a high level of detail is required within the scope of the answer. The task specifically asks for an overview of the development of Bitcoin, making it clear that ChatGPT should focus on the history of this cryptocurrency and focus on the essential circumstances.

Bad, complex ChatGPT prompt and why it doesn’t work:

  • Context: “I am doing research for an advanced-level academic work on the development of digital currencies and their impact on the global economy.”
  • Task: “Tell me about money.”

The context suggests that ChatGPT’s response is intended to focus on digital currencies and their impact on the global economy, but the task at hand is too general and too vague.

In particular, it is not specified whether information is requested about the history of money up to cryptocurrencies, the types of money in general and cryptocurrencies in particular, the concept of money or something else entirely.

This is likely to result in just a general answer that probably doesn’t have much to do with the specific focus described in context.

Context, question/task and ChatGPT prompts: Three important insights

All of the above leads to three important insights:

  • The quality of the context and the question/task has a direct impact on the quality of the results when interacting with ChatGPT.
  • The context forms the basis and framework for ChatGPT’s response and provides the necessary background information.
  • The specifically formulated question or task guides the response from ChatGPT. Precise, well-structured, and worded questions or tasks lead to more accurate and insightful answers.

Misunderstandings regarding context and questions/tasks in prompts

Which misunderstandings often exist with regard to context and questions/tasks with prompts:

  • “ChatGPT can generate accurate answers with minimal context or vague questions or tasks.” In fact, while ChatGPT is powerful, it still needs a certain amount of context and well-structured tasks to generate meaningful and accurate answers.
  • “A lot of context then brings better results”. Context, perhaps even extensive, is often necessary. But overloading ChatGPT with too much context can result in unnecessary verbosity in the response.

Practical tips for ChatGPT inputs

Finally, I would like to give three practical tips:

  • Every question or task, if we were to ask a human being, has a context, whether openly stated or not. However, ChatGPT cannot recognize this based on circumstances. When creating a prompt, you should therefore always consider what information ChatGPT needs in order to give the most meaningful answer related to the question or task, and incorporate this information into the prompt.
  • It makes sense to practice writing prompts using different levels of context and complexity of the question/task. This helps to understand the relationship between these two factors and the outcome of ChatGPT.
  • The development of prompts is an iterative process in which the desired result is approached through iterations. So don’t be afraid to tweak the specific context and question or task until you get the desired result.

Also interesting:

Leave a Reply

Your email address will not be published. Required fields are marked *