AI as a Service Design Layer
Welcome · 01 / 27
ISB1 · Digital Service Innovations · ITP Summer 2026

Day 6

Generative AI Service Design Foundations · Tuesday 16 June

Mohammad Soltaniehha· Boston University
AI as a Service Design Layer
Welcome · 02 / 27
Your instructor · Days 6–8

Hi, I’m Mohammad.

Mohammad Soltaniehha
msoltani@bu.edu · www.soltaniehha.com
NowClinical Assistant Professor, Information Systems · Boston University, Questrom School of Business
BeforePh.D. in computational physics (Northeastern) · data scientist at Infor’s Dynamic Science Labs: churn forecasting, anomaly detection, optimization
I teachBig-data analytics, Python & R, cloud computing, databases, and now building with AI
These daysEmbodied AI & interactive avatars · LLMs for social impact · Google Cloud Faculty Expert
AI as a Service Design Layer
Day 6 · 03 / 27
DSI 2026 · Generative AI for Service Design

Foundations. And your new studio.

What the evidence says about AI in service encounters, then a proper grounding in Claude Code: the history, the mechanics, the craft.

Today’s podcast · generated by NotebookLM
Why Honesty Kills Eighty Percent of Sales
--:--
01 · READINGSThree papers, discussedHybrid encounters · the disclosure cliff · copilots at work
02 · CLAUDE CODE, FROM ZEROHistory → mechanics → craftHow models work, where Claude lives, prompting, CLAUDE.md
03 · DEMOS & STUDIOFollow along, hands onYou leave today with a working Claude Code session of your own
AI as a Service Design Layer
Readings · 04 / 27
Reading 1 of 3 · the conceptual map

The hybrid service encounter.

When AI can be the provider, the user, or both at once, service design needs a new map.

Mortati & Freitas (2026) · AI in Service Design: A New Framework for Hybrid Human–AI Service Encounters · Journal of Service Research 29(1)
Human → HumanAI in the backstageAI quietly assists a clinician during a telemedicine visit
Human → AIAI as service userYour AI agent books the hotel room on your behalf
AI → HumanAI as service providerRecommendation engines, chatbots, adaptive fitness coaching
AI → AI“InterAI” servicesAlgorithm-to-algorithm exchange, e.g. automated traffic regulation
Service AI, definedTechnology that co-creates value and co-pilots service delivery, frontstage and backstage.
Hybridityeither side of the encounter can be human or AI
Co-pilotingAI co-shapes the journey in real time
AI as a Service Design Layer
Readings · 05 / 27
Reading 2 of 3 · trust as a design parameter

The disclosure cliff.

Purchase rates in a randomized field experiment: 6,255 outbound loan-renewal calls.

Luo, Tong, Fang & Qu (2019) · Machines vs. Humans: The Impact of AI Chatbot Disclosure on Customer Purchases · Marketing Science 38(6)
Human agents
Novice workers
4.9%
Expert workers
25.1%
AI chatbot
Bot, undisclosed
23.7%
Bot, told at call start
4.8%
Bot, told after the pitch
11.0%
Bot, told after the decision
23.2%
−79.7%
Disclosing the bot before the conversation cut purchases from 23.7% to 4.8%.
Voice mining showed the bot matched expert agents in knowledge and empathy. The penalty is perception, not performance. That makes framing, persona and timing design levers.
FIELD EXPERIMENT · N = 6,255
AI as a Service Design Layer
Readings · 06 / 27
Reading 3 of 3 · the copilot pattern

Copilots raise the floor.

A GPT-3 assistant rolled out to 5,172 customer-support agents at a Fortune 500 software firm, back before ChatGPT existed. Who gained?

Brynjolfsson, Li & Raymond (2025) · Generative AI at Work · Quarterly Journal of Economics 140(2)
+15%Issues resolved per hour, on averageStaggered rollout, difference-in-differences, 3 million chats
+30%For the least experienced agentsTop performers: no significant gain, and slight quality dips when over-relying
2 mo ≈ 6 moAI-assisted rookies matched six-month veteransGains persisted during outages; the copilot is also a training technology
handle time −8.5% “get me a manager” −25% new-agent attrition −40%
The copilot transfers the tacit know-how of your best agents to everyone else. You do the same when you codify expert practice into a system prompt.
AI as a Service Design Layer
Readings · 07 / 27
Synthesis · today’s three readings

Three patterns, three build rules.

Today’s evidence becomes tomorrow’s design constraints.

PatternEvidenceDesign constraintSource
Backstage copilotNovices +30%, experts flat; gains persist even during outagesAugment the floor; keep the human accountableBrynjolfsson et al.
Frontline AI agent−79.7% purchases when the bot is disclosed up frontIdentity, timing and framing are design parametersLuo et al.
Hybrid encounterAI can sit on either side of the encounter, even bothBlueprint the unscripted: fail-safes and escalation pathsMortati & Freitas
Claude Code is your studio for all three: prompts, skills and connectors on top of your Day 5 blueprint. The rest of today sets it up.
AI as a Service Design Layer
How we got here · 08 / 27
A short history, part one

From punch cards to Python

Seventy years of telling machines what to do. Every era removes another layer of ceremony.

1950 — 1968
Punch cards & mainframes
DO 10 I = 1, 100
A program is a stack of cards. Drop the stack, lose the day.
1982 — 1989
Commodore 64 BASIC
10 PRINT "HELLO"
Hit RETURN, the machine answers. Code from a magazine.
Sub Greet()
  PRINT "HI"
End Sub
1991 — 1998
QBASIC & Visual Basic
Sub Form_Load()
Drag a button. Write the handler. Ship to Windows.
{  }
2000 — 2009
Java & the early web
System.out.println("hi")
Compile, deploy, refresh. The browser becomes the runtime.
>>> print("hello, world")
hello, world
>>>
2010 — 2019
Python everywhere
print("hello, world")
One line. It just runs. Data, science, and beginners welcome.
1950s
1980s
1990s
2000s
2010s
AI as a Service Design Layer
How we got here · 09 / 27
A short history, part two

From n-grams to next-word prediction

A language model has one job: guess the next word. The story of AI is the story of getting better at that guess.

The capital of France is Paris
Model's top guesses · softmax probabilities
Paris
87%
Lyon
6%
Rome
4%
Berlin
2%
Words live in a space
word2vec showed that capital − country is the same direction everywhere. Meaning becomes geometry.
France
Paris
Japan
Tokyo
UK
London
countrycapital
← generalspecific →
1948
n-gram models
Count which words follow which. Fast, shallow, no notion of meaning.
2013
word2vec / GloVe
Words become vectors. Distance encodes relatedness.
2014
RNN & LSTM
Sequences with memory. Models can read a sentence.
2017
Transformer
Attention lets every word look at every other. Scales.
2018 — 2022
GPT-1 → GPT-3
Same recipe, more data, more parameters. Emergence.
AI as a Service Design Layer
How we got here · 10 / 27
A short history, part three

From autocomplete to autonomous teammates

In five years, code assistants grew from suggesting the next character to running for hours on their own.

01
2021
Inline completion
def greet(name):
  return f"Hello"
Tab to accept.
02
2022
Chat about code
why slow?
O(n²)
fix it
Q&A, paired.
03
2023 — 2024
Write & refactor
def parse(l): l.split() shlex.split(l) +4 files
Functions & diffs.
04
2025
Long-running agents
routes.py+24
schema.sql+8
login.tsx+12
old.py−5
Hours, unattended.
05
2026 →
Multi-agent teams
planner
builder
reviewer
tester
shared memory
Parallel teammates.
// Agent
RUNNING
Runtime
00:00:00
Tests passing
0 / 0
00:00// human: add SSO + email login, write tests
Each step hands the machine more of the work. We now design for a teammate, not a tool that waits.
AI as a Service Design Layer
How models work · 11 / 27
How models work, part one

One call: prompt in, text out.

01Prompt
summarize this contract in plain English
02Model
Haiku 4.5fast · cheap
Sonnet 4.6everyday
Opus 4.8hard problems
Fable 5frontier
03Completion
The contract gives Acme three months to deliver, after which late fees apply

// The knobs you can turn

  • Promptwhat you say, every turn
  • System promptpersistent personality & rules
  • Modelspeed vs. depth tradeoff
  • Temperaturehow surprising the output gets
  • Toolswhat it’s allowed to call
// Five dials. Same model, different settings, very different service.
AI as a Service Design Layer
How models work · 12 / 27
How models work, part two

The model has a desk. Everything you talk about goes on it.

0 tokens~1,000,000 tokens →
be helpful, honest
don’t reveal keys
System prompt
project goals
style guide
test commands
CLAUDE.md
turn 1: “hey…”
turn 2: “ok try…”
turn 3: …
turn 4: …
turn 5: …
Conversation
contract.pdf
notes.md
Attachments
1Mtokens
≈ 2,000 pages of text
Big, but not infinite. When the desk fills, the oldest pages fall off the edge.
// Tip: when the agent “forgets,” it’s usually the desk, not the model.
AI as a Service Design Layer
Where it lives · 13 / 27
The 2026 surface area

Same brain, six surfaces.

claude.ai
The web app
Where most people start. Chat, projects, files, Skills.
claude.ai
 Good evening, Mo
How can I help you today?
Fable 5 ▾
claude.ai/code
Claude Code on the web
A coding agent in a cloud sandbox, wired to GitHub.
claude.ai/code
Describe a coding task…
⎇ acme/storefrontmain
add dark mode togglerunning
fix flaky auth testPR #481
Desktop app
Claude Code, local
Parallel sessions on your machine, files and terminal included.
ChatCoworkCode
Sessions
refactor checkout
onboarding copy
api docs
Add CSV export to reports
Planned 3 steps · editing…
Reply to Claude…
VS Code · Cursor
Editor extension
Claude in a panel beside your code. JetBrains too.
checkout.ts — acme
function parse(line) {
  return shlex.split(line);   // was: line.split()
}
Claude
Quoted paths broke the old split. Fixed here and in 2 other files.
✓ tests pass
Terminal / CLI
claude in your shell
The engine itself. Scripts, CI pipelines, batch jobs.
~/projects/acme
Welcome to Claude Code!
/help for help · cwd: ~/projects/acme
> fix the failing tests
✓ 142 passed · 0 failed · PR #1142 opened
iOS · Android
Mobile companion
Watch long tasks, approve and ship from your phone.
Claude Code
refactor checkout flow
running · 12m · 4 files
migrate tests to Vitest
✓ done · PR ready
ApproveView
update API docs
queued
AI as a Service Design Layer
Meet the model · 14 / 27
The model · released June 9, 2026

Meet the engine: Claude Fable 5.

The headline

A Mythos-class model, made safe for general use.

State of the art on nearly every tested benchmark: coding, knowledge work, vision, research. It plans, runs for hours, and checks its own output as it goes.

Sees & remembers

Vision, state of the art: reads exact values off scientific figures, rebuilds an app from a screenshot. Memory: stays focused across millions of tokens.

The hook: it checks itself

Validates its own work

It asks before acting when it’s uncertain. Later, we’ll wire the human handoff to exactly that signal.

$10 / $50
per 1M tokens in / out
on paid plans free until June 22
50M lines
Stripe migration, done in 1 day
scoped at 2 months for a team
1,000+ hrs
external red-teaming
zero universal jailbreaks
claude-fable-5 · GA today
Fable 5, safeguarded: cyber, bio/chem & anti-distillation classifiers on top; falls back to Opus 4.8 behind them.
restricted access
Mythos 5, safeguards lifted. Project Glasswing partners & vetted life-science researchers only.
AI as a Service Design Layer
Model selection · 15 / 27
Pick the smallest that does the job

Two dials: model + effort.

// tier 01 · Haiku 4.5 · fast & cheap
Haiku
Classify. Route. Score.
Sub-second, pennies per thousand calls. Use it where the AI is invisible.
Speed
Cost
Depth
// reach for it when
01Intent classification"is this a booking, a complaint, or spam?"
02Routing & taggingtag tickets, queue to the right host
03Confidence scoringrate a guest message 0–1 for urgency
// tier 02 · Sonnet 4.6 · everyday
Sonnet
Read. Write. Refactor.
The everyday workhorse: drafting, summarising, coding. Most of what you ship.
Speed
Cost
Depth
// reach for it when
01Drafting host replieswarm tone, edited by a human
02Day-to-day codingedits, refactors, test-writing in Claude Code
03Summarising & blueprintingturn 40-page PDFs into a 1-page brief
// tier 03 · Opus 4.8 · hard problems
Opus
Reason. Plan. Debug.
Multi-step planning, ambiguous specs, deep debugging. For genuinely hard work.
Speed
Cost
Depth
// reach for it when
01Plan-mode for big refactorsa 4-step plan across 20 files, no guessing
02Ambiguous service specsreconcile contradictory stakeholder notes
03Hard bug archaeologywhy does checkout fail only on Sundays?
// tier 04 · Fable 5 · paused
Fable
Frontier. Self-checking.
The Mythos-class engine, state of the art on nearly everything. For frontier moments.
Speed
Cost
Depth
// reach for it when
01Long-horizon buildsruns for hours, validates its own output
02Senior-grade analysisresearch & reasoning at analyst depth
03The hardest 5%escalate the calls where Opus falls short
Temporarily unavailable Why → Anthropic’s statement
// price per 1M tokens · in / outa heavy day of agentic coding ≈ coffee money on Haiku, dinner money on Fable
$1 / $5 · baseline
$3 / $15 · 3× Haiku
$5 / $25 · 5× Haiku
$10 / $50 · 10× Haiku
Effort → lowmediumhighxhighmax The second dial, right next to the model picker. Fable 5 topped Cognition’s FrontierCode at just medium. Pick the smallest model and the lowest effort that do the job.
AI as a Service Design Layer
Inside the model · 16 / 27
The effort dial · test-time compute

Spend more thinking when it matters.

REASONING
// scanning service-blueprint.md for the booking flow…
// found: 3 entry points (web, kiosk, phone)
// considering: kiosk doesn't have payment hardware
// → must hand off to web for payment step
// checking constraint: first-time guest rule
// rule fires before payment, so handoff is fine
// considering: what about the evening peak?
// → kiosk should refuse politely, point to staff
// drafting response…
// double-checking against tone rules…
// tone rules from CLAUDE.md: warm, short
// → keep the apology brief
// final answer ready.
// scanning service-blueprint.md for the booking flow…
// found: 3 entry points (web, kiosk, phone)
// considering: kiosk doesn't have payment hardware
// → must hand off to web for payment step
// checking constraint: first-time guest rule
// rule fires before payment, so handoff is fine
// considering: what about the evening peak?
// → kiosk should refuse politely, point to staff
// drafting response…
// double-checking against tone rules…
// tone rules from CLAUDE.md: warm, short
// → keep the apology brief
// final answer
"Sorry — payment can't run on the kiosk. Want me to text you a checkout link?"
On Opus 4.8, extended thinking is off by default. One control turns it up: effort, from low to max (or thinking: adaptive in the API). More reasoning, fewer mistakes on hard problems. The trade-off is time: the thinking happens before the answer.
// Raise the effort when correctness matters. Keep it low for classification and routing.
AI as a Service Design Layer
Start on the web · 17 / 27
Where you’ll build today

Open a tab, ship a task. No install required.

1
Fresh VM per task
Anthropic spins up a clean, disposable sandbox computer in the cloud.
2
Your repo, cloned in
Connects to GitHub, clones the repo, works on a branch, opens a PR.
3
Survives the tab
Close the tab or check from your phone. The same session keeps running.
claude.ai/code
 What are we coding next?
add a dark mode toggle to the settings page
⎇ acme/storefrontmain
Recent tasks
refactor checkout flow to use the new payments SDK running · 12m
migrate test suite from Jest to Vitest PR #482
fix flaky auth integration test PR #481
AI as a Service Design Layer
How we got here · 18 / 27
2022 → 2026

Same brief: eight weeks, then three days.

2022
Stack Overflow
+ ctrl-c ctrl-v
2023
Copilot
autocomplete
2024
Chat-in-IDE
(Cursor, Cody)
2025
Agentic CLI
(Claude Code v1)
2026
Plugins, agents,
parallel sessions
2025// six humans · eight weeks
who works when →
week 1week 4week 8
PM
Designer
Backend ×2
Frontend
QA
Booking-app MVP → 8 weeks · $96k
2026// one designer · three days
who works when →
day 1day 2day 3
Designer
Claude Code
Subagent ×3
Cowork review
Same brief → 3 days · $40 in API spend
AI as a Service Design Layer
A new craft · 19 / 27
Vibe coding

The medium is the prompt. Sketch becomes service.

// frame 01
Napkin sketch
// frame 02
A short prompt
> build the screen in this sketch
# attached: napkin.jpg
warm, calm, lots of air
// frame 03
Live UI
Vibe coding is when the prompt describes the feeling and the agent fills in the structure. You don't write the code. You write vibes that compile.
AI as a Service Design Layer
A new craft · 20 / 27
Agentic coding

Read. Plan. Act. Verify. Loop.

// 01Read
// 02Plan
// 03Act
// 04Verify
01
Read
Pull the relevant files, recent diffs, and constraints into context.
02
Plan
Draft numbered steps. Ask for any missing context. Stop.
03
Act
Run tools, write files, execute commands. One step at a time.
04
Verify
Run tests, read the result back, screenshot. Self-check, then loop.
Agentic coding is when you give the goal and the agent runs this loop on its own. Your job moves to the verify step: catch a wrong turn early, approve the right one.
AI as a Service Design Layer
Inside the model · 21 / 27
Tool use

Every action is a round-trip.

A
Agent
decides, then reads the result
1 · the agent calls the tool 2 · the result comes back
T
Tool
runs in the real world
user: when's the next free sauna slot tonight?
// 1 · the agent calls a tool
→ tool_call: db.query("availability", date="2026-06-16", after="18:00")
← tool_result: [{slot: "19:30", capacity: 4}, {slot: "20:30", capacity: 2}]
// 2 · the agent reads the result and replies
agent: "There's a slot at 19:30 with 4 spaces. Want me to book it?"
// data Query the world SQL · search · file read
// act Change the world POST API · send email · book
// browse Use a browser click · fill · screenshot
// agent Delegate to another subagent · MCP server · plugin
AI as a Service Design Layer
Inside the model · 22 / 27
Context rot

Long sessions quietly decay. Design for it.

// 01 · Compaction (the hard limit)

The desk fills up. Hit 80%, Claude compacts.

0 tokens500k1M
!
What survives
CLAUDE.md, recent turns, files on the desk.
~
What gets squeezed
Old conversation turns, reduced to a summary line.
/
What you can do
/clear to start fresh. /compact to trigger early.
// 02 · Context rot (the silent limit)

Long before 80%, accuracy quietly degrades.

what you'd hope for what actually happens ACCURACY CONTEXT LENGTH →
Well below the limit, the model starts to lose the thread: instructions buried mid-chat get missed, similar names get mixed up, early constraints get forgotten.
Refresh often
Start new sessions for new tasks. Don't let one thread carry every conversation.
Front-load what matters
Put the most important rules at the top of CLAUDE.md or the end of the prompt.
AI as a Service Design Layer
Prompting · 23 / 27
Prompt engineering

A prompt is an interface you design.

// 01
Context
be clear & direct
Explain the why, not just the what. Treat the model like a brilliant new hire who walked in with zero context.
// 02
Persona
assign a role
Give it a role in the system prompt. One sentence shifts the whole tone and focus of the reply.
// 03
Output design
show, don’t tell
Give 3–5 examples of the output you want, and specify the format and length.
// 04
Guardrails
scope & effort
Say what is in scope and what is off limits. Raise the effort when the stakes are high.
// before · vague
“summarize this complaint”
// after · designed
You are a support lead. Summarize this complaint in 3 bullets for a non-technical manager, flag any GDPR-sensitive details, and end with a recommended next action.”
AI as a Service Design Layer
Prompting the frontier · 24 / 27
Prompting the frontier

Frontier models take you literally.

1Literal instruction-following
It does what you say, not what you meant.

Vague in → vague out. State scope explicitly: “apply to EVERY section, not just the first.”

2Length follows complexity
Short on simple asks, long on open-ended ones.

If you need a fixed format or a fixed length, say so. Don’t assume a default.

3Effort is the main lever
Raise effort for hard work, lower it for cheap classification.

Dial low→max instead of stuffing the prompt. Start modest; in the API use thinking: adaptive.

4Efficient & self-checking
More done in fewer turns, and it validates its own work.

Token-efficient by default. Say so when you want to see intermediate steps or specific tool calls.

AI as a Service Design Layer
Project memory · 25 / 27
CLAUDE.md

Your project's house rules, in one file.

# Booking assistant — house rules
## Tone
Warm, short, plain language. No emoji.
## Privacy
Never log names, emails, or payment details.
No customer data in analytics events.
## Failure modes
First-time guest? → hand to human.
Refund or complaint? → hand to human.
Double-booking conflict? → hand to human.
## Where things live
UI: index.html · Logic: app.js · Tests: app.test.js
A markdown file at the project root. Claude reads it at the start of every session, so the rules never have to live in every prompt.
1
Service constraints
Tone, brand, what the service must never do.
2
User populations
Who shows up. What they need. What they fear.
3
Failure modes
When the agent must stop and hand back to a human.
4
Privacy & structure
What never to log, and where the code and tests live.
AI as a Service Design Layer
Project memory · 26 / 27
Project memory · across prompts

CLAUDE.md is the memory.

A folder with nothing but a CLAUDE.md. The rules live in the file, so they never have to live in the prompts.

demo/day-06/CLAUDE.md
# Visit Feedback Kiosk
A tiny one-page app for collecting visitor feedback.
## Rules
Everything in a single index.html. No frameworks, no build step.
Look: cream background, charcoal text, terracotta accent.
Buttons must be large and touch-friendly.
Counts live in localStorage. No accounts, no tracking, no personal data.
Keep the code short and commented for beginners.
Prompt 1 · build it
> Build the feedback kiosk: one question, “How was your visit today?”, three big buttons (Good / Okay / Bad), and a running count under each button.
Prompt 2 · follow up
> Staff want to clear the counts each morning. Add a small reset link.
Prompt 2 says nothing about colors, files, or storage. The result still follows every rule, because CLAUDE.md is the memory.
AI as a Service Design Layer
Demo · 27 / 27
Demo · follow along

Build it, then test it.

A booking slot checker, built live from an empty folder. Copy the CLAUDE.md and the two prompts, and build it yourself.

demo/booking/CLAUDE.md
# Booking Slot Checker
Check whether a requested 30-minute slot is free, given today’s bookings.
## Where things live
UI: index.html  (imports app.js as a module)
Logic: app.js  (exports isFree; pure, no DOM)
Tests: app.test.js  (run with: node --test)
package.json: { "type": "module" }
## Behaviour
Times are "HH:MM" 24-hour; slots are 30 minutes.
bookings: array of "HH:MM" starts. isFree(bookings, requested) → true/false.
Free only if it overlaps no booking; back-to-back is free; bad input throws.
Seed 4–5 random busy slots (09:00–17:00) so the demo looks real.
## UI & look
Show busy slots, a start-time field, a Check button; say free or taken.
Vanilla HTML/CSS/JS. Cream, charcoal, terracotta.
Small, commented functions for beginners.
Prompt 1 · build it
> Build the slot checker: show today’s bookings, let me type a start time, and tell me whether that 30-minute slot is free. Put the overlap logic in an isFree() function in app.js.
Prompt 2 · test it
> Now write tests for isFree() in app.test.js: an overlapping slot, a back-to-back slot, and bad input. Run them with node --test and fix anything that fails.
$ node --test tests 6 · pass 6 · fail 0