Introduction to Prompting
Before we dive into the next exercises, let’s take a moment to understand what prompting really is and why it matters.
When you interact with an AI like a large language model (LLM), the way you ask determines the quality of the answer. That’s where prompt engineering comes in. They provide frameworks to write clever questions and discuss how to communicate clearly and effectively with AI systems.
Prompt engineering helps you:
- Understand what AI can and can’t do
- Get better and more useful results
- Build confidence in using AI tools in real-world settings
Elements of a Good Prompt by Your Story
A well-crafted prompt often includes these four elements:
- Goal: What do you want the AI to do? Be specific.
- Format: What should the answer look like? A list? A paragraph? A table?
- Warnings or Rules: Are there any instructions or examples the AI should follow?
- Context: Any background information that helps the AI give a better answer.
Example:
🎯 Goal: "Suggest a variety of engaging and meaningful activities for a solo trip to Spain. Include cultural experiences, local cuisine, nature spots, and relaxing moments that are ideal for solo travelers...
📄 Format: ...Organize the ideas by category (e.g., food, culture, nature). Provide a short description for each activity and include practical tips for solo travelers...
⚠️ Warnings / Rules: ...All suggestions must be safe and suitable for solo travel. Avoid group-only activities, extreme sports, or anything overly expensive...
🖼️ Context: ...This is a first-time solo trip to Spain. The traveler is confident and curious, looking to explore independently while staying safe and inspired."
More resources and examples at: Student Guide to AI, Writing with ChatGPT, and Prompts for Edu
Prompting Techniques by PromptingGuide.ai
There are different ways to structure prompts depending on the task:
-
Zero-shot prompting: You give the AI a task with no examples.
- Example: “Summarize this article in one paragraph…”
-
Few-shot prompting: You include one or more examples in your prompt to guide the AI.
- Example: “Here’s how to write a good email… Now write one about this topic...”
While you'll be working mainly with zero-shot and few-shot prompting in these exercises, it's worth knowing that there are more advanced techniques out there, for example chain of thought (where the AI explains its reasoning step by step) and prompt chaining (where outputs from one prompt feed into the next). These methods are powerful for more complex tasks, and you're encouraged to explore them as you grow more confident in your prompting skills.
✍ What You’ll Practice
In following exercises, we will practice a technique called reverse prompting. For each task, you’ll be provided with a scenario, some initial information, and an example of an output. Your job will be to write the original prompt that could have generated that output, test it in an AI chat, and compare the results. Use the structure provided above (Goal+Format+Warning+Context) and take into account the additional information given with each example. Try achieving the desired result using only one prompt.
🛠️ Choosing Your AI Tool
For this exercise, you can use any generative AI chat (like Copilot, ChatGPT, Gemini, or Claude). Be sure the chosen tool supports multi modal outputs (table and code).
As SLC students, we recommend you to use Copilot through you school account. It’s integrated with your Microsoft package, supports document export, and won’t use up credits from other platforms. However feel free to choose which ever you feel more confident and comfortable with.
📩 Submission
For each exercise, submit your prompt and generated output in the forms below. Your output doesn’t need to (and hardly will) be identical to the one provided. This exercises aims to practice your ability in understanding and formulating effective prompts for various scenarios.
💡 Tips
- In real-life scenarios, the task and desired output are often not clearly defined. A key part of this exercise is learning how to filter relevant information and organize your thoughts to build a strong prompt.
- Avoid copying and pasting the provided information. Instead, imagine you are experiencing the situation in real time. You are responsible for describing the context and goal in your own words.
- Think critically about what the AI needs to know to produce the desired result. Be specific, but concise.