{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Prompt engineering and reflection\n",
    "### Notebook for assignment 4 of the course \"Text as Data\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Part 1: Prompt engineering\n",
    "In this exercise, you will experiment with different prompt formulations to achieve desired outputs from an LLM. You will explore how the structure, specificity, and context of prompts can affect the model's response.\n",
    "\n",
    "Access an LLM platform such as an LLM platform of your choice (e.g. a chat interface or Hugging Face) or Hugging Face's model interface. Ensure you have a basic understanding of the tool's interface and how to input prompts.\n",
    "\n",
    "1. **Initial Experimentation**  \n",
    "   Start with a simple prompt such as, \"Write a product description for a new type of running shoe.\" Note the response.  \n",
    "   - Modify the prompt by adding context, e.g., \"Write a product description for a new type of running shoe targeted at professional athletes.\"  \n",
    "   - Observe how the output changes and take notes.\n",
    "\n",
    "2. **Prompt Variations**  \n",
    "   Create at least five different variations of the original prompt, changing aspects such as:  \n",
    "   - Length (short vs. detailed prompts)  \n",
    "   - Tone (e.g., formal, conversational, persuasive)  \n",
    "   - Perspective (e.g., \"as a sales representative,\" \"as a sports journalist\")  \n",
    "   Record how each change impacts the output.\n",
    "\n",
    "3. **Reflection and Analysis**  \n",
    "   Analyze your results and reflect on the following questions:  \n",
    "   - How did changes to the prompt affect the output?  \n",
    "   - What patterns did you notice in terms of specificity, tone, and context?  \n",
    "   - How can prompt engineering be used to optimize customer engagement, or brand messaging?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Part 2: Leveraging Text as Data for Marketing Strategy\n",
    "\n",
    "Imagine that your company is launching a new product and aims to maximize customer reach and engagement using the tools covered in this course. Your task is to critically reflect on the following aspects:\n",
    "\n",
    "1. **Use Case Exploration**: Identify and describe a specific marketing scenario where using text as data can add value (e.g., customer sentiment analysis, personalized content creation, chatbots for customer service, or market trend analysis). Provide a brief background on the hypothetical business and its product/service. \n",
    "2. **Benefits and Challenges**: Focus on two different tools you have learned about in this course. Discuss the potential advantages and weaknesses of applying these tools in your chosen use case. \n",
    "3. **Implementation Strategy**: Based on an overall assessment, which tool or approach would you choose for implementing your strategy? Outline a high-level plan for integrating your proposed approach into your marketing case. This should include a brief overview of the tools and processes you might use, how you would measure success, and relevant data sources.\n",
    "4. **Critical Reflection**: Consider potential challenges such as ethical implications, biases, privacy concerns, or limitations in interpretation and contextuality."
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
