Adapting your skills for creative writing, extraction, problem-solving, and code.
Welcome to Module 8! You have the tools; now let's apply them. Different tasks benefit from different prompting approaches.
We'll explore tailoring prompts for creative writing, information extraction, problem-solving, and code generation, highlighting useful techniques for each.
How this Connects: This module applies everything learned so far to practical scenarios, preparing you for Module 9: Ethical Considerations.
For stories, poems, marketing copy, etc.
Example:
Act as a fantasy novelist. Write a short scene (around 200 words) where a young apprentice wizard accidentally casts a spell that makes teacups dance. The setting is a cluttered magical workshop. Keep the tone lighthearted and whimsical.
Pulling specific data (names, dates, findings) from text.
Example:
From the following paragraph, extract the company name, the product mentioned, and the release date. Format the output as JSON:
[Paste paragraph here]
{"company": "[Company Name]", "product": "[Product Name]", "release_date": "[Date]"}
Brainstorming solutions, analyzing situations, working through problems.
Example:
My goal is to reduce my monthly electricity bill... What are some practical steps I can take? Let's break down the potential solutions step by step, considering cost and effort.
Reflection:
Which task type seems most challenging to prompt for, and why?
Generating snippets, explaining code, debugging, translating languages.
Example:
Write a Python function called 'calculate_area' that takes the length and width of a rectangle as arguments and returns the area. Include a docstring explaining what the function does. Use standard Python formatting.
Task: Creative Writing (Marketing Copy)
Act as a witty copywriter. Generate 3 short, catchy taglines for a new brand of plant-based energy drinks... Focus on natural energy...
Task: Information Extraction (Meeting Summary)
From the meeting transcript below, extract the key decisions made and the action items assigned... Format as two separate bulleted lists... [Paste transcript here]
Task: Code Generation (HTML/CSS)
Generate the HTML and Tailwind CSS code for a simple responsive card component... include an image placeholder, title, description, button. Add comments...
Key Insight:
Emphasis shifts: Creative tasks often need strong Role-Playing/Context; technical tasks demand high Clarity/Formatting.
Scenario Text:
"The Q4 financial report for Innovate Corp, released on January 15th, 2024, showed a net profit of $1.2 million. The key product driving growth was the 'Synergy Hub'."
Goal: Extract Company Name, Report Date, Net Profit, Key Product.
Expected Outcome:
Your prompt clearly states what to extract, provides the source text, and specifies the bulleted list format.
Evaluate the Information Extraction prompt you created.
1. Clarity of Extraction Task: Is it clear *what* to extract?
2. Context Provided: Did you include the source text?
3. Formatting Instruction: Did you specify the output format (e.g., bulleted list)?
4. Overall Effectiveness: Is the AI likely to succeed?
Suggestion for Improvement:
For extraction, precision is key. Ensure you list *every* item needed and clearly define the output structure.
Great work applying your skills to different tasks!
Next Steps: Let's consider the crucial topic of responsible AI use in Module 9: Ethical Considerations.