# Working with Agents

---

# Working with Agents (continued)

---

# 📆 Today

- [Project 4](../../projects/04/project-4.project.md) due at 2:30pm
- Start [Project 5: Look and Feel](../../projects/05/project-5.project.md), due Thursday, October 1
- Thursday, October 8: midterm project due at 2:30pm; demos and a short exam review
- Tuesday, October 13: fall break — no class
- Thursday, October 15: midterm exam (on paper, in class, one hour)

---

# Stay in the loop!

1. Evaluate the current state of the project
2. Work with the agent to plan the next steps
3. Execute the next steps
4. Back to step 1

---

# Have your agent present options

- Create images for UI/style references (mood boards, etc.)
- Create HTML mockups of ideas with multiple options
- Refine then incorporate into the project

---

<!--
play:
  variant: section
-->

# Why does wording steer the agent?

---

<!--
play:
  variant: fact
-->

# The map is frozen.

Your prompt chooses where you stand on it.

^ Callback to [Context](../07-context/07-context.lecture.md): weights do not update when you talk to the model. Prompting changes where the model goes, not what it knows.

---

```mermaid
flowchart LR
  P[Your prompt] --> T[Tokens]
  T --> L["Lookup: fixed numbers per token"]
  L --> M["Layers mix in context"]
  M --> N["Scores for every next token"]
  M -.-> E["Embedding model: one point for the whole text"]
```

^ The lookup table is part of the frozen weights: “bank” starts with the same numbers every time. Attention layers mix in the neighbors, so “river bank” and “bank loan” end up in different places.

---

<!-- layout: wide -->

<x-embedding-lab-space />

^ Press **Tour** for the guided walkthrough, then take requests from the room. Students can explore later in the [Embedding Space Lab](../../labs/embedding-space.lab.md).

---

# What moves a prompt?

- **Role:** “You are a cardiologist.”
- **Vocabulary:** “ejection fraction,” “arrhythmia”
- **Audience:** “for a five-year-old”
- **Format:** “as a lullaby,” “as a table”
- **Examples:** one sentence in the style you want

^ Precise vocabulary is the bridge to Project 5: product words move the agent toward product-quality work.

---

# The "movie store" demo

---

1. Add images/references
2. A simple prompt to create a plan (in markdown)
3. Iterate with agent in a loop

---

<!--
play:
  variant: section
-->

# Project 5: Look and Feel

Give your midterm project a design pass.

---

# Speak product

| Vague          | Precise                                                                 |
| -------------- | ----------------------------------------------------------------------- |
| make it nicer  | Give the results **screen** a clear **visual hierarchy**                |
| it's confusing | Map the **user flow** and add an **empty state**                        |
| make it pop    | Follow the **style guide**: one accent color for the main **component** |

^ Terms are in the [glossary](../../resources/course.glossary.md) and on the midterm exam: UI, UX, screen, user flow, wireframe, mockup, moodboard, style guide, design system, component, modal, empty state, responsive, visual hierarchy.

---

# UI vs. UX

- **UI:** what people see and touch
- **UX:** how it feels to get something done

---

# Iterate visually

1. Ask for an artifact you can **open**, usually an HTML page
2. Look at it the way a user would
3. Give **one** specific change, with a screenshot
4. Repeat, then apply it to your app

^ Prompts for every artifact: [Prompting for product design](../../resources/design-prompts.guide.md).

---

# The Project 5 loop

1. References → `design/moodboard.html`
2. Design system → `src/system/` + `design/style-guide.html`
3. User flow → `design/user-flow.html`
4. Apply it one screen at a time, test each change
5. Write your own design notes

---

# Start now

[Project 5: Look and Feel](../../projects/05/project-5.project.md)

Find 3–6 references before you prompt anything.
