Week 11 · Advanced Agentic Workflows
Build a small agentic pipeline — or a forecast — with a checkpoint at every seam. Your job is not to run one analysis; it is to design something repeatable, direct an agent through it under supervision, and prove where human judgement stays in control.
At a glance
Section titled “At a glance”| Time | 75 minutes, in pairs |
| Work with | A partner, or your capstone team |
| You need | Claude Code, or the platform your instructor assigns |
| You hand in | Your Workflow Documentation (portfolio evidence section 5: the design, the checkpoints, the verification evidence) + a risk-and-oversight note (150–250 words) + a governance decision record |
| Graded on | Traceability (40%) · Verification discipline (40%) · Risk acknowledgment (20%) |
The scenario
Section titled “The scenario”Choose one track.
Track A — The reporting workflow. Marketing wants the Monday report automated: ingest the week’s posts, clean them, compute engagement by platform and format, and draft a summary. Data: kk-social-posts.csv — the Unit 02 feed, mess intact. Expect the usual problems: missing values, inconsistent labels ("instagram" vs "Instagram"), outliers or impossible values.
Track B — The responsible forecast. Finance wants a revenue forecast for the next quarter. Anyone can extrapolate a line — your job is a forecast with its assumptions and breaking points named. Data: kk-weekly-revenue.csv — 104 weeks of chain revenue, September 2024 to August 2026.
Track A — The reporting workflow
Section titled “Track A — The reporting workflow”Step 1 — Design first · 20 min
Section titled “Step 1 — Design first · 20 min”Draw the pipeline: ingest, clean, compute, draft. At each seam, write the checkpoint — what is checked, what passes, what happens on failure.
Step 2 — Run it once · 30 min
Section titled “Step 2 — Run it once · 30 min”Direct your agent through the pipeline, enforcing each checkpoint yourself. Where the agent writes code, read it and note what each block does — you are checking logic, not syntax.
Prompt 1 — clean the data:
I have a social-media dataset with posts from multiple platforms.Here is what I need you to do, step by step, and do not skip any:
1. Profile the data. Count rows. List columns. Note any missing values (show the count per column). Identify any obvious data-quality issues (inconsistent labels, outliers, impossible values).
2. Clean it: - Standardise platform names (e.g., all to lowercase) - Remove rows where engagement metrics are completely missing - Fill missing dates by interpolating from surrounding rows (but flag any large gaps)
3. Show me the before and after. How many rows did you keep? Which rows did you drop and why?
Do not analyse yet. Just clean and report.Check: did it actually clean what it said it would? Are platform names now consistent? Did it drop rows correctly, or too many? If not, redirect it — for example:
I see you dropped 50 rows with missing engagement metrics.But those rows still have date, platform, and content type.Please keep them but mark them with a flag.Recount the rows and show me which ones are flagged.Prompt 2 — calculate engagement rate:
Now calculate engagement rate for each post.Engagement rate = (likes + comments + shares) / views * 100.
If a post has zero views, mark it with a flag andset engagement rate to missing, do not divide by zero.
Show me the formula you used.Show me the first ten rows with the new engagement-rate column.Show me summary statistics (min, median, max) for engagement rate.Check: is the formula what you wanted? Any division-by-zero errors? Does the rate look reasonable — a percentage 0–100, not a raw decimal?
Prompt 3 — generate the summary email:
Now write a summary email for a social-media team lead.
Analyse the cleaned data and tell me:1. Which platform has the highest median engagement rate?2. Which content type performs best?3. Is there a best time of day or day of week to post?Then draft an email (200 to 300 words) that:- Opens with one clear finding- Backs it with two to three data points- Ends with one action the team should take next
Make the tone professional but friendly.Do not use jargon. Assume the reader is not a data person.Check: is the opening claim actually supported by the data you saw? Is the recommendation something a social-media lead could act on? Does it carry any caveats (missing posts, small sample)?
Step 3 — Document · 25 min
Section titled “Step 3 — Document · 25 min”Produce: the pipeline diagram, each checkpoint with its rule, what each checkpoint caught on this dataset, and the one seam you would never automate away — that last answer is the unit.
Step What you asked What it produced What you verified Did it pass? the agent or fixed1. Clean [prompt 1] [summary] [what you checked] Yes/No/Partial2. Engagement [prompt 2] [summary] [what you checked] Yes/No/Partial rate3. Summary email [prompt 3] [first words of [what you checked] Yes/No/Partial email]Track B — The responsible forecast
Section titled “Track B — The responsible forecast”Step 1 — Look at the series first · 15 min
Section titled “Step 1 — Look at the series first · 15 min”Plot it before any model. Mark anything that is not smooth trend: recurring peaks, level shifts, stretches that behave differently. For each, decide: does history here represent the future?
Step 2 — Direct the forecast · 30 min
Section titled “Step 2 — Direct the forecast · 30 min”Have the agent produce a baseline forecast, then interrogate it: what did it assume about the anomalies you marked? Require a second version that handles them explicitly, and compare.
Step 3 — Document · 30 min
Section titled “Step 3 — Document · 30 min”Produce: the forecast with an honest uncertainty range, the three assumptions it stands on, the events that would break it, and what you told the agent to treat differently after your own inspection.
Governance decision
Section titled “Governance decision”Whichever track you ran, close with a governance decision comparing one hosted and one self-hosted option for this workflow. State:
- Data sensitivity and residency — where does the data live? Who can see it?
- Cost / control / capability trade-offs — what do you gain and lose with each platform?
- The Rule of Two — does this agent have untrusted data + unconstrained tools + autonomous execution? If so, which one must you remove?
- Safeguards — idempotency keys? Hard budgets? A kill-switch?
- Decision boundary — what must this workflow never decide or send without human approval?
- Selected option and why — which platform, and what’s your primary constraint (cost, control, compliance)?
Verify & submit
Section titled “Verify & submit”- Workflow map or pipeline diagram saved
- Every checkpoint has a pass rule and a failure action (not “looks ok”)
- Track A: at least two checkpoints fired on this dataset and you can show what they caught
- Track B: every visible anomaly in the series is classified (recurring, one-off, regime change) with its forecast treatment, and the write-up separates what the model assumes from what you verified
- The judgement you refused to automate is named, with the reason
- Screenshots or extracts showing at least two steps
- A risk-and-oversight note (150–250 words) naming two specific risks, what you kept, what you fixed, and where a human must say yes or no
- A governance decision record with an explicit decision boundary
Add all evidence to your individual Google Doc and submit the Unit 11 xSiTe checkpoint. Platform setup and backup credentials are provided by the facilitator — you are not required to configure tools outside class.
Companion links: Unit 11 app · lesson plan