0% found this document useful (0 votes)
2 views

Week 8 Session 2 Lesson Plan

The lesson plan for Week 8, Session 2 of the Prompt Engineering Specialization course focuses on integrating AI-generated outputs with external tools, specifically spreadsheets. Students will learn to design workflows, write scripts for data storage, and collaborate to troubleshoot their projects during a 90-minute session. The session includes lectures, hands-on activities, and a preview of the next topic on ethics and bias in prompting.

Uploaded by

McKay Thein
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Week 8 Session 2 Lesson Plan

The lesson plan for Week 8, Session 2 of the Prompt Engineering Specialization course focuses on integrating AI-generated outputs with external tools, specifically spreadsheets. Students will learn to design workflows, write scripts for data storage, and collaborate to troubleshoot their projects during a 90-minute session. The session includes lectures, hands-on activities, and a preview of the next topic on ethics and bias in prompting.

Uploaded by

McKay Thein
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Below is a detailed **Lesson Plan** for **Week 8, Session 2** of the Prompt Engineering Specialization

course, titled *"Combining Prompts with External Tools."* This session continues the intermediate phase
(Weeks 6-10), building on the automation skills from Week 8, Session 1 by integrating AI-generated
outputs with external tools like spreadsheets. It’s designed for a 90-minute class (1.5 hours), combining
lecture, demonstration, and hands-on practice to create practical workflows.

---

### Lesson Plan: Week 8, Session 2

**Title**: Combining Prompts with External Tools

**Date**: [Insert specific date, e.g., October 23, 2025, assuming a Tuesday/Thursday schedule]

**Duration**: 90 minutes

**Location**: Classroom or virtual platform (e.g., Zoom)

**Instructor**: [Your Name]

**Target Audience**: College students (beginner to intermediate level, mixed technical backgrounds)

**Prerequisites**: Attendance at prior sessions; familiarity with automation scripting from Week 8,
Session 1

---

### Learning Objectives

By the end of this session, students will:

1. Understand how to integrate AI prompt outputs with external tools (e.g., spreadsheets).

2. Design workflows that connect AI generation to practical applications (e.g., data storage, analysis).

3. Write and test a script that sends prompts to an AI tool and saves results to a spreadsheet-compatible
format.

4. Collaborate with peers to troubleshoot and refine integrated workflows.

---

### Materials Needed


- Slides or visual aids (e.g., PowerPoint, Google Slides) with workflow diagrams, spreadsheet examples,
and script snippets

- Access to a generative AI tool with an API (e.g., Grok via xAI API, OpenAI API, or a free alternative)

- Python environment: Instructor’s computer with Python and `csv` module (e.g., Jupyter Notebook);
students’ laptops with Python (or lab setup)

- Spreadsheet software: Excel, Google Sheets, or similar for demo (optional student access)

- API keys or tokens (instructor-provided or student-generated with guidance)

- Whiteboard or digital equivalent (e.g., Jamboard) for notes and workflow sketches

- Handout: "Prompt-to-Spreadsheet Guide" (optional, with code like `csv.writer`, sample CSV layouts)

- Homework submissions: Students’ notes from Week 8, Session 1 (automation script, output file,
pro/con)

---

### Session Schedule

#### 0:00–0:10 | Welcome and Homework Debrief (10 minutes)

- **Activity**: Automation Reflections

- Instructor welcomes students, recaps Week 8, Session 1 (automation with APIs and batch processing).

- Ask 2-3 volunteers to share their homework:

- “What did your script do?” (e.g., “Generated 3 tips, saved to file”).

- “What was in your output file?” (e.g., “Cooking: Stir. Studying: Focus.”).

- “One pro or con?” (e.g., “Pro: Fast! Con: File formatting messy”).

- Note insights on whiteboard (e.g., “Scale works,” “Format matters”).

- **Purpose**: Connect automation to tool integration, highlight output usability.

- **Transition**: “You’ve automated prompts. Now, let’s pipe those outputs into tools like spreadsheets
for real workflows.”

#### 0:10–0:30 | Lecture: Combining Prompts with External Tools (20 minutes)

- **Content**:
- **Why Integrate?**: Organize outputs (e.g., spreadsheets), analyze results, share easily vs. plain text
files.

- **External Tools**:

- Spreadsheets (Excel, Google Sheets): Store data (e.g., “Tagline, Date”).

- Future potential: Databases, docs (mentioned briefly).

- **Workflow Basics**:

- Step 1: Generate via API (e.g., “Write 3 ad slogans”).

- Step 2: Format as CSV (e.g., rows: “Slogan 1,” “Slogan 2”).

- Step 3: Save to file, open in spreadsheet.

- **Example Script**:

```python

import requests

import csv

api_url = "API_URL"

api_key = "YOUR_KEY"

prompts = ["Ad for coffee", "Ad for tea", "Ad for juice"]

responses = []

for p in prompts:

r = requests.post(api_url, data={"prompt": p, "key": api_key})

responses.append([p, r.text])

with open("ads.csv", "w", newline="") as f:

writer = csv.writer(f)

writer.writerow(["Prompt", "Output"])

writer.writerows(responses)

```

- **Delivery**:

- Slides with examples:

- Text file: “Ad 1\nAd 2” → Hard to analyze.

- CSV: “Prompt,Output\nCoffee,Rich brew!” → Spreadsheet-ready.


- Live Demo (5 minutes):

- Run script: Generate 3 tips, save to “tips.csv.”

- Open in Excel/Google Sheets: Columns “Prompt,” “Tip” (e.g., “Study,Focus!”).

- Ask, “How could this help organizing?”

- **Engagement**: Pause at 0:25 to ask, “What tool do you use that could take AI outputs?” (Quick
responses, e.g., “Sheets,” “Notes”).

- **Purpose**: Show workflows as a step up from raw automation.

#### 0:30–0:40 | Break (10 minutes)

- **Activity**: Students stretch or chat; instructor preps coding environment.

- **Purpose**: Refresh for hands-on integration.

#### 0:40–1:15 | Activity: Build a Prompt-to-Spreadsheet Workflow (35 minutes)

- **Content**: Students script a prompt task and save outputs to a CSV file.

- **Activity**: Workflow Integration Challenge

1. **Setup (5 min)**:

- Instructor explains: “You’ll script 3+ prompts, save outputs to a CSV, and test it in a spreadsheet.”

- Provide starter code (pre-tested with API, e.g., Grok):

```python

import requests

import csv

api_url = "API_URL" # Instructor provides

api_key = "YOUR_KEY"

prompt = "Write a 1-line tip for "

topics = ["cooking", "travel", "coding"]

data = []

for t in topics:

full_prompt = prompt + t

r = requests.post(api_url, data={"prompt": full_prompt, "key": api_key})


data.append([t, r.text])

with open("tips.csv", "w", newline="") as f:

writer = csv.writer(f)

writer.writerow(["Topic", "Tip"])

writer.writerows(data)

```

- Ensure Python/API access (e.g., Jupyter link or lab setup).

2. **Individual Work (15 min)**:

- Students:

- Run the starter script, check “tips.csv” (e.g., “cooking,Stir well”).

- Modify it: Change prompt (e.g., “Suggest a gift for…”), list (e.g., “mom, dad, friend”), or columns
(e.g., add “Date”).

- Test, open CSV in spreadsheet, note issues (e.g., “Quotes missing” → tweak prompt).

- Stretch goal: Add a condition (e.g., “If short, add ‘Brief’”).

3. **Group Share (15 min)**:

- Form small groups (3-4 students).

- Share script, CSV, and spreadsheet view.

- Discuss: “Is it usable? What could improve?”

- Instructor circulates, asking, “How’s it look?” or “Any bugs?”

- **Facilitation**: Encourage usability (e.g., “Add headers!”) and peer fixes.

- **Purpose**: Build integrated workflows, test real-world output.

#### 1:15–1:30 | Wrap-Up and Preview (15 minutes)

- **Content**:

- Recap: “Prompts plus tools like spreadsheets make workflows—automation meets practicality.”

- Debrief Activity: Invite 1-2 groups to share (e.g., “My gifts list is ready for shopping!”). Note tips on
whiteboard (e.g., “CSV needs commas”).

- Next Session Preview: “We’ll explore ethics and bias in prompting—keeping AI responsible.”

- Homework: “Script a prompt-to-CSV workflow (3+ outputs). Bring code, CSV, and one pro/con.”
- **Activity**: Quick Q&A (e.g., “Any CSV messes?” “Tool tips?”).

- **Purpose**: Solidify integration skills, prep for ethical focus.

---

### Assessment

- **Formative**:

- Participation in debrief and activity (observed engagement).

- Quality of workflows during activity (informal feedback).

- **No graded deliverables**: Focus on technical integration.

---

### Contingency Plans

- **If time runs short**: Shorten group share to 10 minutes, summarize as a group.

- **If tech fails**: Use pre-run CSVs (e.g., “Here’s my tips.csv…”), focus on code explanation.

- **If students struggle**: Simplify to 1 prompt (no loop), or pair with coders.

---

### Post-Session Notes for Instructor

- Reflect: Did students manage CSV output? Any spreadsheet issues?

- Prep for Week 9, Session 1: Prepare ethics/bias examples, review homework.

---

This plan enhances automation with practical tool integration, keeping it hands-on and workflow-
focused. It builds on scripting skills while introducing usability, suitable for all levels. Let me know if you’d
like tweaks—like more tools or simpler tasks!

You might also like