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.

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