Skip to Main Content

AI-assisted Technology in Education

What is prompt engineering?

Prompt engineering is a process of designing and crafting prompts or instructions for natural language processing models (NLP) like ChatGPT and other similar AI tools. The goal of prompt engineering is to elicit specific and desired responses from these NLPs by carefully crafting the input text or query. If the GPT is not giving you the answer you want, consider how you are communicating with it.

You will need the following when prompting:

  • The task, e.g., create a training program for a 70kg male to gain muscle over three months with two 1-hour gym sessions per week. This is the most important part of your prompt.
  • Context, e.g., the individual is a beginner with limited gym experience and access to basic equipment.
  • An example, e.g., provide the GPT with an example plan and dietary requirements.
  • Persona, e.g., ask the GPT to assume the role of a personal trainer.
  • Tone, e.g., ask the GPT to maintain a confident and personal tone.

Pro tip! Ask the GPT to ask you questions for clarity. For example, "Ask me three questions to help you better perform the task." or "Tell me what you think I want so that I con confirm it."

When crafting your query, consider the following:

  • Prompts should be clear and specific in conveying the desired task or information to the model. Ambiguous or vague prompts may lead to unpredictable or incorrect responses.
  • Providing context and background information within the prompt can help guide the NLPs response. Contextual cues can be essential for generating accurate and relevant answers.
  • The length and format of the prompt can influence the model's output. Some tasks may require concise prompts, while others may benefit from more detailed instructions or context.
  • Prompts can be designed to encourage or discourage certain types of responses. For example, you can reinforce ethical guidelines or discourage harmful content through the way you phrase your prompts with positive and negative enforcement.
  • Prompt engineering often involves an iterative process. You may need to experiment with different prompts and tweak them based on the model's responses until you achieve the desired output.
  • It's important to evaluate the quality of the model's responses to your prompts. This can involve both manual review and automated metrics to assess accuracy, relevance, and other factors.
  • Ethical considerations are important in prompt engineering. Designing prompts to mitigate bias and promote fair and responsible AI usage is crucial.

Lo (2023) suggests the CLEAR framework for prompt engineering to facilitate more effective generated content.

  • Concise: brevity and clarity in prompts

For example, instead of requesting, "Please provide me with an extensive discussion on the factors that contributed to the economic growth of China during the last few decades", use a concise prompt like, "Identify the factors behind China's recent economic growth."

  • Logical: structured and coherent prompts

For example, a logically structured prompt could be, "Describe the steps in the scientific method, starting with forming a hypothesis and ending with drawing conclusions."

  • Explicit: clear output specifications

For example, instead of, "What are some renewable energy sources?", and explicit prompt would be, "Identify five renewable energy sources and explain how each works."

  • Adaptive: flexibility and customisation in prompts

For example, if asking, "What are some ways to conserve water?" leads to generic responses, try a more targeted and adaptive prompt like, "List household practices for conserving water and their potential impact."

  • Reflective: continuous evaluation and improvement of prompts

For example, after receiving AI-generated content, evaluate the response's accuracy, relevance, and completeness. Use insights from the evaluation to refine prompts, such as asking for more specifics or focusing on certain aspects.

Report a problem