A beginner’s guide to prompt engineering: Here’s how you should utilise generative AI

2025-01-06 03:10
BY admin
Comment:0

Hoi Sio Hong, Form 4, Chan Sui Ki Perpetual Help College

Abstract 

In the 21st century, technology is evolving at an unprecedented pace, with artificial intelligence (AI) at the forefront of this transformation. Since the launch of ChatGPT in late 2022, generative AI has garnered significant attention. This innovative technology is increasingly integrated into various electronic devices, revolutionising how we interact with digital content. This article will explore the principles of prompt engineering* and its application in generative artificial intelligence (GAI), particularly focusing on its use in academic settings, as well as discussing the significance of effective prompting techniques, the selection of appropriate AI models, and the potential benefits and challenges of integrating AI tools in education. 


Understanding Prompts and Prompt Engineering 

Prompts are the inputs or queries users provide to chatbots and language models, serving as a way to guide the AI in generating relevant responses. For example, the Poe platform allows users to input prompts to interact with various chatbots. A well-crafted prompt can improve the capacity of language models on a wide range of common and complex tasks such as question answering and arithmetic reasoning, while the practice of developing effective and optimised prompts is known as prompt engineering. 

Prompt engineering allows users to efficiently use language models for a wide variety of applications and research topics. Although it may seem complex, developing effective prompts is a manageable skill. Below, you will find guides and tips to help you develop your prompt engineering skills, making your experience with AI more productive and rewarding. 

1. Choosing the right AI model 

Just as individuals possess unique talents, different AI models excel in various fields of knowledge. Generally, the latest models demonstrate improved performance in both speed and accuracy. For instance, the model GPT-4o developed by OpenAI masters general knowledge, while Claude-3.5 by Anthropic outperforms GPT-4o in coding tasks. Therefore, selecting the most suitable AI model for your specific needs is crucial before you begin crafting your prompts. 

2. Always start simple 

When crafting prompts, it’s best to start as simply as possible. Try avoiding any ambiguity that might confuse the chatbot by asking targeted questions. A simple and concise prompt not only facilitates better responses but also makes later modifications easier. Additionally, avoid adding complexity to the prompt. Consider splitting the target into smaller simpler subtasks or steps to help the chatbot attain a better performance. 

To start with, use direct commands that clearly instruct the model on your expectations. For example, you might use phrases like “Write,” “Classify,” “Summarise,” “Translate,” or “Order” to guide the AI in achieving your desired outcome. 

To illustrate, let’s consider a common academic task: summarising an academic article. Our initial prompt is going to be “Summarise this article.” 

3. Be specific 

Once you’ve crafted your initial prompt, the next and final step is to iterate and enhance it for better results. You can begin by providing background information to guide the chatbot. The more descriptive and detailed the prompt is, the better the results. The details should be relevant and contribute to the task at hand. Taking our initial prompt for an example, the AI can achieve a more accurate and effective summary by specifying the focus. Here’s a revised prompt: “Summarise the key findings of this research article on climate change, highlighting the main arguments and implications.” 

4. Formatting 

After refining your prompt, it’s essential to focus on formatting. A well-structured prompt not only enhances readability but also clarifies your instructions to the chatbot. One effective method for achieving this is through the CO-STAR Framework, which provides a structured approach to ensure clarity and relevance in the responses. Here’s how we are going to enhance our refined prompt with the CO-STAR Framework: 

1. C – Context: 

○ Provide background on the article’s subject and relevance. 

2. O – Objective: 

○ Define what you want to achieve with the summary. 

3. S – Style: 

○ Specify the desired formatting or presentation style. 

4. T – Tone: 

○ Indicate the emotional character or attitude you want in the response. 

5. A – Audience: 

○ Define who the intended audience is. 

6. R – Response Format: 

○ Clarify how you want the information structured. 

By combining all six attributes, a more effective interaction with the chatbot can be achieved, leading to improved results. It provides clarity by giving the chatbot precise guidance on what to focus on, enhances specificity by including relevant context and details about the intended audience and tone, and establishes a clear structure by outlining the expected format. All these methods of prompt engineering make it easier for the chatbot to produce a focused and coherent response.


How Learners Can Utilise AI Tools 

With the prompting techniques we’ve discussed, students can effectively integrate AI into their study routines. Think of it as a superior alternative to traditional flashcards. For example, if you’re preparing for a biology exam, you can scan and upload your notes, then instruct the chatbot to generate a variety of questions – ranging from identification and short-answer questions to more complex case studies. 

Once you’ve answered these questions, you can ask the chatbot to analyse your responses and provide a personalised study plan tailored to your needs. This approach not only helps reinforce your understanding but also strengthens your memory retention, making your study sessions more efficient and effective.

*Prompt engineering is the process of designing and optimising the input prompts given to AI models, particularly language models, to elicit the most relevant, accurate, and useful responses. – Source Poe (explanation added by the Post

This screenshot provided by Hoi last night shows him being interviewed for one of the episodes of Educação e Juventude Dinâmica (“Education and Dynamic Youth”) by the Education and Youth Development Bureau (DSEDJ). 


0 COMMENTS

Leave a Reply