Lecture 9

AI and Data Analytics

Byeong-Hak Choe

SUNY Geneseo

November 16, 2026

Part 1: Learning from Data

🌙 Three sleepless nights

Ethan Mollick beside the cover of his book Co-Intelligence.

  • Mollick’s claim: really getting to know AI costs three sleepless nights.
  • LLMs don’t act the way we expect software to act.
  • The reaction: excited and nervous.

What was your first “wait, it can do that?” moment with AI?

🗺️ Where Lecture 9 goes

1. Learning from data

How machines find patterns

2. Inside generative AI

How an LLM produces text

3. Working with AI, responsibly

Rules, risks, and your role

4. Agents and jobs

What is changing right now

🧩 Four terms, one family

Nested circles: artificial intelligence contains machine learning, which contains deep learning, which contains generative AI.

  • AI: machines doing tasks we link to intelligence
  • Machine learning: learning from data, not fixed rules
  • Deep learning: ML with many-layered neural networks
  • Generative AI: creates new text, images, and code

🤖 Machine learning

🤖 What is machine learning?

Illustration of a digital brain surrounded by charts.

  • A computer improves at a task from data, without step-by-step rules.
  • Give it lots of data.
  • It finds patterns.
  • It predicts, classifies, or groups.

🐱 Example 1: Is this a cat?

A decision tree that uses features such as pointy ears and whiskers to classify cats.

  • Rules: define “cat” in code. Very hard!
  • ML: show thousands of photos labeled cat or not cat.
  • It learns the pattern and recognizes new cats.

🎵 Example 2: What song next?

Personalized Spotify mixes.

  • Rules: “Likes pop? Recommend pop.”
  • ML: learn from millions of listeners.
  • Hidden pattern: people who like Artist A often like Artist B.

📧 Example 3: Spam or not?

A classifier sorts incoming emails into an inbox or a spam folder.

  • Rules: “Contains lottery? Spam.”
  • ML: learn from emails labeled spam or not spam.

🙋 Fixed rules, or learning from data?

  • Calculate sales tax on a receipt
  • Flag a suspicious card swipe
  • Sort a table by date
  • Predict tomorrow’s orders

Vote on each one. What would you need to know?

🏷️ How models learn

🏷️ Labeled data: the answer key

Shapes with labels feed a model, which then predicts labels for new shapes.

  • Data that comes with the correct answer attached.
  • Labels come from people, clicks, ratings, or records.
  • Good labels cost money, and they can be subjective.

🎓 Supervised learning

A supervised learning workflow from labeled data to predictions on new data.

  • Learn from examples with answers, like flashcards.
  • Classification: spam or not
  • Regression: home features → price
  • You’ve met one: geom_smooth(method = "lm")

📈 Regression predicts a number

Regression on fictional data Nearby event attendance (hundreds) Orders per hour Fitted line
  • A fitted line summarizes the average pattern. Individual hours differ.

Constructed observations, for explanation only.

🔍 Unsupervised learning

Unlabeled shapes pass through an algorithm and come out sorted into groups.

  • Find patterns with no answer key.
  • Clustering: group similar customers.
  • Topic modeling: group similar documents.

🔍 Clustering finds similar observations

Constructed customer groups Average purchase amount Visits per month
  • Here, similarity uses visits per month and average purchase.
  • You decide whether the groups are useful, and what to call them.

Constructed observations and illustrative groups.

🧪 Good on old data isn’t enough

Data split into training data the model learns from and test data used only to score new answers.

  • Overfitting: memorizing the examples instead of learning the pattern.
  • Fair test: data the model has never seen.
  • For a forecast, test on a later time period.

📊 From an analyst’s question to a method

The question The ML task
How many orders will we get tomorrow? Regression
Will this customer cancel? Classification
What kinds of customers do we have? Clustering

The question comes first, and you choose it.

☕ A running case: the café

☕ Three jobs for a café analyst

Predict demand

How many orders will arrive tomorrow?

Organize feedback

Which comments mention waiting?

Explain findings

What does our sales chart show?

  • We use fictional café records for each job, here and in the classwork.

☕ Our fictional café data

day_id day_type hour orders revenue
D1 Weekday 10 20 100
D1 Weekday 14 30 150
D2 Weekday 10 25 125
D2 Weekday 14 35 175
  • One row is one observed hour, not a whole day.
  • Eight rows across four fictional days.
  • Good for classroom examples, not for real decisions.

📥 Inputs and the outcome

Prediction inputs output Inputs Day type + hour Learned model Patterns from past data Outcome to predict Orders next hour
  • Inputs (features): what you know when you make the prediction.
  • Outcome (target): the number or category you want.

🏋️ Training and using a model

Training

Past inputs + known outcomes

The computer adjusts a model, a learned method for producing outputs.

Use

Inputs for a new case

The model produces an estimate before we know the answer.

  • A prediction of 30 orders is an estimate. The actual count may differ.

⚖️ Prediction errors affect decisions

A bakery predicts tomorrow’s muffin demand.

Predict too low

Sold out by noon, and lost sales

Predict too high

Unsold muffins, and wasted ingredients

  • Errors of the same size can have different costs.
  • Judge a model by the decision it supports.

🥊 Does it beat a simple guess?

The model

Predicts each hour from its inputs

A simple comparison

Always predict the earlier average

  • Test both on the same new cases.
  • A complicated model has to earn its place.

🗃️ Turning comments into a table

Comment Proposed topic
“The muffins sold out by noon.” Menu/product
“Too expensive for a small latte.” Price
“Great coffee, but a long line.” Needs a rule
  • Define each category before labeling.
  • Allow unclear or multiple topics.
  • Keep the original comment, so a person can check the label.

🧠 From predictive AI to deep learning

🏬 What predictive AI did well

🏨 Hotels

Forecast demand from weather, events, and rival prices

📦 Amazon

Forecast orders, arrange shelves, run warehouse robots

📺 Your feed

Guess what to show you next

  • Its limit: narrow tasks. It couldn’t handle language well.

🧠 Deep learning

Portraits of John Hopfield and Geoffrey Hinton, winners of the 2024 Nobel Prize in Physics.

  • ML with many-layered neural networks.
  • Best for messy data: images 🖼️, text 📝, sound 🎵.
  • 2024 Nobel Prize in Physics: Hopfield and Hinton.

🕸️ What is a neural network?

A neural network with input, hidden, and output layers classifying an image as a cat.

  • Input layer takes in the data.
  • Hidden layers transform it.
  • Output layer gives the answer.

🎛️ Weights: millions of tiny dials

A deep neural network with connections between layers.

  • Each connection has a weight.
  • Training adjusts weights to cut errors.
  • Original ChatGPT: 175 billion weights, none set by hand.

⏳ A very short history of AI

Timeline of AI from the 1770 Mechanical Turk to ChatGPT in 2022.

✍️ Classwork: Part 1

  • 1A: record your vote on rules or learning.
  • 1B–1D: question to method, labels, and a fair test.

✅ Part 1 takeaways

  • ML learns patterns from data; it doesn’t follow fixed rules.
  • Supervised learning has an answer key. Unsupervised doesn’t.
  • Test on data the model hasn’t seen.
  • You pick the question, the data, and the test.

Next time: how prediction learned to write.

Part 2: Inside Generative AI

😂 Generative AI arrives

Meme: an older programmer tells a younger one that people once used forums like Stack Overflow to debug.

  • Generative AI creates new content: text, code, images.
  • ChatGPT launched November 30, 2022.
  • It became the fastest-growing consumer app to that point.

🛠️ Generative AI in an analyst’s work

Prepare

Draft a data dictionary. Organize text.

Analyze

Suggest R code. Explain an error.

Communicate

Propose chart titles. Critique a claim.

  • The bottleneck moves from doing to directing and checking.

🔮 How an LLM writes

🔮 Still prediction, with a new target

Predictive AI, 2010s

How many orders next week?

→ a number

Large language model (LLM)

What comes next in this text?

→ a token

  • Technically, a very elaborate autocomplete.

🧱 What is a token?

cat playing extraordinary !

  • The smallest unit of text an LLM reads and writes.
  • A word, part of a word, or a symbol.
  • Exact splits vary by model.

🎲 Predicting the next token

Bar chart of illustrative probabilities for the word after 'The sea is': blue 62 percent, calm 14, deep 9, salty 6, rough 4.

“The sea is ___”

  • The model scores possible next tokens.
  • A little randomness means answers vary.

🔦 Attention: a spotlight on what matters

Attention diagram: the word bank pays most attention to river and some to flooded.

  • Bank near river isn’t bank near loan.

⚙️ The Transformer (2017)

First page of the paper Attention Is All You Need.

  • Google’s paper: Attention Is All You Need.
  • Weighs all the words in a passage together.
  • Attention keeps track of context.
  • It made today’s LLMs possible.

🔁 From prompt to next token

A prompt becomes tokens, then numbers, passes through attention, and yields next-token probabilities; the chosen token is added and the process repeats.

🏋️ Training, context, and tools

🏋️ Two phases of training

Two training phases: pretraining on vast text, then fine-tuning with human ratings, producing a chat model.

  • Pretraining reads odd things: the web, books, even Enron’s emails.
  • Models learn biases and errors along with facts.

👍 RLHF: learning from people’s ratings

Illustration of a person giving feedback to a robot.

  • Reinforcement Learning from Human Feedback
  • People rate answers: better or worse.
  • The model learns to prefer what raters like.
  • Result: more helpful, safer, and eager to please.

📚 Training, then a conversation

Before our conversation

Training learns patterns from many examples.

During our conversation

Your prompt and files give context, which can change the response.

  • Sending a prompt doesn’t retrain the model.
  • Later use of your chat depends on the provider’s policy and settings.

🧰 The model, the app, and its tools

Model tool answer Model Chooses a calculation Tool Runs code on data Response Explains the result
  • A chat app can give a model tools that calculate, search, or read files.
  • Features vary by app, account, and settings.

🖼️ Beyond text

Schematic of a diffusion model turning random noise into an image of a mountain over several steps.

  • Diffusion models turn noise into images, step by step.
  • Multimodal LLMs also read and make images.

🏰 What it can and can’t do

📈 A jump in test scores

10th

GPT-3.5, percentile on the bar exam

90th

GPT-4, a successor model

  • Caution: the answers may have been in the training data.
  • A high score doesn’t prove understanding.

🎬 Guess the movie

👧 👽 👹 🏄 🏝️

🦸 🦸 👦 👧 👶

🤡 🎈

Lilo and Stitch, The Incredibles, It

  • No AI model could do this before June 2020.
  • Models past a certain size suddenly could.

🌱 Why did it suddenly work?

Emergence

New abilities appear as models scale up.

A fixed bottleneck

One weak link gets fixed: say, knowing movie titles.

  • Researchers still disagree.
  • Either way, jumps are hard to predict.

👥 AI imitates a population, not a person

80% wrong

each individual expert, on facts

80%+ right

a model trained on 100 such experts

  • Individual errors can cancel out.
  • Knowledge from different experts can combine.

🎯 Brilliant and clumsy, at the same time

Surprisingly strong

Olympiad math

Poetry that passes as human

Tailored persuasive arguments

Surprisingly weak

Reliably counting objects in a picture

Staying consistent in a long chat

Saying “I don’t know”

🏰 The jagged frontier

Two radial maps of AI capability. Newer models cover more area than older ones, but the boundary stays jagged and some tasks easy for people remain outside it.

🧗 The frontier in an analyst’s work

Can be useful

Explain an R error

Draft a chart caption

Suggest a different comparison

Still needs checking

Did the code use the right rows?

Does the caption match the chart?

Is the comparison fair?

💬 How people actually use ChatGPT

Chart of ChatGPT message shares by topic. Practical guidance 28.3 percent, writing 28.1 percent, seeking information 21.3 percent, data analysis 0.4 percent.

  • Data analysis (under Technical Help): only 0.4%.

Data through July 2025. Source: Chatterji et al. (2025), NBER WP 34255.

✍️ Classwork: Part 2

  • 2A: be the model, with the next-token slide.
  • 2B–2C: map the frontier, and design a fair test.

✅ Part 2 takeaways

  • An LLM predicts the next token, over and over.
  • Attention keeps context. RLHF shapes behavior.
  • Abilities jump in ways that are hard to predict.
  • The frontier is jagged, so you have to test it.

Next time: how to work with something this uneven.

Part 3: Working with AI, Responsibly

📎 Alignment: AI that serves human interests

Thought experiment: an AI told to make paper clips avoids shutdown, grows smarter, and uses every resource.

  • Nothing in the goal says “care about people.”
  • AGI (human-level) and ASI (beyond human) remain hypothetical.

🎯 Alignment at a smaller scale

A narrow target

“Make the average recorded wait as low as possible.”

What if difficult orders are turned away?

The real goal

Serve customers well with reasonable waits.

Track service quality, and who is left out.

  • Alignment: directing AI toward human goals and limits.

🧭 Don’t wait for the apocalypse debate

  • Mollick: doom talk leaves the choices to a few companies.
  • We are already making near-term choices:

Whose data?

Whose biases?

Who does the hidden labor?

Who misuses it?

⚖️ Whose data, whose biases?

⚖️ Whose data?

$1.5 billion

Bartz v. Anthropic settlement, final approval July 2026

Judge’s line

Training on lawfully bought books: fair use

Keeping pirated copies in a library: not

  • Few AI firms asked creators first. Many questions remain open.

🪞 Whose biases?

Bar chart: 97 percent of AI images of a judge were men, compared with 66 percent of U.S. judges.

  • Models mirror skewed data, then amplify it.
  • It comes from a machine, so it can seem objective.

🔭 Who is missing from the data?

Data collected

Comment cards from weekend mornings, in English only

Proposed conclusion

“Customers want longer weekend hours.”

  • Whose experience may be missing?
  • Bias: a systematic distortion in the data or a system’s outputs.

🎭 Who misuses it?

Jailbreaks

Role-play framing talks a model past its guardrails.

Prompt injection

Hidden text feeds AI instructions.

Cheap deception

Tailored phishing and deepfakes for pennies.

🤝 Alignment takes everyone

Companies

Transparency and human oversight

Governments

Sensible rules, though they lag

Researchers

Beneficial uses, not only capability

You

AI literacy and informed pressure

📜 Working with AI: four rules

📜 Four rules for co-intelligence

1. Always invite AI to the table

2. Be the human in the loop

3. Treat AI like a person (but tell it what kind of person it is)

4. Assume this is the worst AI you will ever use

1️⃣ Invite AI to the table

  • No manual exists. You find the frontier by trying.
  • You know your own tasks, so you can become the expert in using AI for them.
  • Limits: law, ethics, and course rules.

2️⃣ Be the human in the loop

Illustration of a driver asleep at the wheel while an AI system drives.

  • Pleasing you can beat being accurate.
  • Polished output makes us stop checking.
  • You answer for the result.

📉 What happens when people stop checking

Chart: 84 percent of consultants got the task right without AI, and 60 to 70 percent with AI.

  • About 800 consultants: AI helped inside the frontier and hurt outside it.
  • Today’s AI can do this task. The habit still matters.

3️⃣ Tell it what kind of person it is

Vague

Explain this error.

Specific

You are a TA for intro R students. Explain this dplyr error in under 100 words, then show the fix. Here are my code and the error.

  • Role + audience + limits + your context.
  • Picture a very fast intern, eager to please.
  • It isn’t a person, and it has no feelings.

📝 A prompt for an analytics task

Goal: Compare orders in the observed 10:00 and 14:00 hours.

Data: cafe_sales has one row per observed hour, with hour and orders.

Scope: Use familiar R functions. Don’t invent columns or assume complete days.

Output: Short R code, with each line explained.

Checks: Report how many rows enter the calculation.

  • Prompt engineering: designing the input so the output is useful and checkable.
  • Clear context helps. It can’t guarantee a correct answer.

4️⃣ Assume this is the worst AI you will ever use

  • Today’s limits may not last.
  • Counting the r’s in strawberry: famous failure, now solved.
  • So re-test what failed. Don’t memorize a list of limits.

📚 The four rules in an analyst’s workflow

Rule, in brief Our analytic habit
Invite AI to the table Start with a small task you can check
Be the human in the loop Verify the evidence and own the conclusion
Tell it what kind of person it is State the audience, task, and limits
Assume this is the worst AI you’ll use Re-test, and record the tool and date

🪤 Two traps

Overconfidence

“It did something amazing, so it can do anything.”

Algorithm aversion

“It failed once, so it’s all hype.”

Hold both ideas: AI is powerful and unreliable.

🧑‍⚖️ Responsible use of AI

🧑‍⚖️ Responsible use: four questions

Four checks before using AI: is it allowed, is the data safe to share, can I check the result, and will I disclose it. Any no means stop or change the plan.

🎓 Is it allowed? In DANL 101

The default

Unless AI is explicitly permitted, work independently.

If permitted and you use it

Name the tools.

Submit your prompts and outputs.

Reflect on your use and learning.

Not sure? Ask first.

🔒 Is it safe to share?

Generally fine

Public data

Made-up sample data

Your own code, with secrets removed

Keep out

Other people’s personal data

Passwords and API keys

Confidential work data

  • Uploads may feed future training. Check the tool’s settings.
  • Removing names alone may not be enough.

🧐 Can I check it? This code runs. Is it right?

“What share of JFK flights left late?”

flights |>
  filter(dep_delay > 0) |>
  summarize(share = mean(
    origin == "JFK"))
# A tibble: 1 × 1
  share
  <dbl>
1 0.327
flights |>
  filter(origin == "JFK") |>
  summarize(share = mean(
    dep_delay > 0, na.rm = TRUE))
# A tibble: 1 × 1
  share
  <dbl>
1 0.384

Both run, and both look fine. Which one answers the question?

🔎 Hallucination: smaller, not gone

2,266

court cases with hallucinated AI content, logged worldwide

3–13%

of URLs cited by AI were made up, even with web search

  • Open every source you cite.

Source: Charlotin database, updated Nov 5, 2026; Rao, Wong, and Callison-Burch (2026), 2025-era models.

🙇 AI tends to agree with you

49%

more often than people, 11 leading models affirmed users’ actions

A better prompt

“What is the strongest argument against my conclusion?”

  • Agreement is not evidence.

Source: Cheng et al., Science 391 (2026), as reported by the Associated Press.

🧠 Protect your learning

50%

quiz score, coders who had AI

67%

quiz score, coders without AI

  • AI wasn’t significantly faster. The gap was largest on debugging.
  • Try first. Ask AI to explain. Redo it yourself.

Randomized trial, 52 mostly junior engineers. Source: Anthropic (Jan 2026).

📝 Will I disclose? Keep a short record

Tool: which AI, which version

Prompts and outputs: attached

What I checked: ran the code, confirmed counts in summarize()

What I changed: fixed the denominator; rewrote the claim

What I learned: why the first version answered a different question

  • It protects you, and it’s good analysis practice.

🏷️ Generated text isn’t evidence

An AI draft

“Customers are happier this month.”

Evidence needed

Comparable feedback records from both months

  • Credit real sources, and disclose AI help.
  • Label invented data or images as illustrations.

🚦 Green, yellow, or red?

  1. AI explains an R error on an assignment that allows it.
  2. You paste classmates’ grades to “find patterns.”
  3. You cite a paper AI suggested, without opening it.
  4. AI drafts a chart title; you check it against the data.
  5. You submit an analysis you can’t explain.

☕ Auditing an AI-assisted analysis

☕ The café decision and the evidence

  • A café manager is considering a change to weekend staffing.
  • Evidence: eight observed hours and six invented comments.
  • AI can help organize the work. The evidence has to support the recommendation.

✅ Four checks for an AI-assisted analysis

Rows

Which rows went in? Did a filter drop any?

Math

What is the denominator? Any missing values?

Code

Did I run it? Can I explain each line?

Claim

Does the evidence support it? Cause, or correlation?

🔢 Rows: what does one row count?

nrow(cafe_sales)
[1] 8
sum(cafe_sales$orders)
[1] 240
sum(cafe_sales$revenue)
[1] 1200
  • 8 observed hours, 240 orders, $1,200.
  • Counting rows counts hours. It doesn’t count orders or customers.

🧮 Rows: which rows went in?

“How many orders came in the 10:00 hours?”

morning <- cafe_sales |>
  filter(hour == 10)

nrow(morning)
[1] 4
sum(morning$orders)
[1] 115
  • Four observed hours, 115 orders.
  • Ask AI to explain each line, then inspect morning yourself.

✅ Rows: do the totals add up?

Hour Observed hours Orders Revenue ($)
10 4 115 575
14 4 125 625
  • Observed hours add to 8, matching the original table.
  • Orders add to 240, matching sum(cafe_sales$orders).
  • An independent check beats an AI saying “correct.”

🧾 Math: which denominator?

Percentage claim The denominator must match
Share of observed hours with long waits Observed hours with a recorded wait
Share of comments about service Comments under the stated labeling rules
Share of customers dissatisfied Customers in a suitable survey
  • Six comments can’t give the share of all customers.

🕳️ Math: what about missing values?

mean(cafe_sales$wait_min, na.rm = TRUE)
[1] 6.285714
  • This averages the seven hours with a recorded wait.
  • na.rm = TRUE skips the missing value. It doesn’t recover it.
  • Each hour counts equally, so this isn’t the average customer’s wait.

💻 Code: showing it isn’t running it

  • An AI answer may show code, a predicted result, or an actual tool result. They aren’t equal evidence.
  • Run it in R, and inspect the output, warnings, and errors.
  • A claim like “I checked the file” needs proof that it did.

🧯 Code: asking for debugging help

I expected total revenue. Here are my code, the error, and the column names. Explain the problem and suggest the smallest fix.

sum("revenue")
sum(cafe_sales$revenue)
[1] 1200
  • "revenue" is text. $revenue selects the column.
  • Give a small reproducible example, then run the fix.

📊 Claim: does the chart match the data?

ggplot(cafe_hour_summary,
       aes(x = factor(hour),
           y = orders)) +
  geom_col(fill = "#0072B2",
           width = 0.6) +
  labs(x = "Observed hour",
       y = "Orders")

Bar chart of fictional café orders in the observed hours: 115 orders at 10:00 and 125 orders at 14:00, each based on four observed hours. The vertical scale starts at zero.

  • Check the values, labels, and zero baseline against the table.
  • Each bar covers four observed hours.

🗣️ Claim: a finding needs its scope

In these eight observed hours, the 14:00 hours had 125 orders, compared with 115 in the 10:00 hours. Each group covers four observed hours.

  • It names the comparison and the observations behind it.
  • It doesn’t say what is typical, or why the difference exists.

🔗 Claim: a difference doesn’t explain its cause

A comparison

Describes a pattern in the observed records

A causal claim

Says changing one thing would change the outcome

  • Weather, events, and promotions could all matter. These records can’t separate them.

🧾 Claim: what evidence would support it?

Draft claim What to check
“Sales doubled” Original totals and the comparison period
“Customers want more staff” The comments, who wrote them, and other explanations
“Weekends cause higher sales” Whether the design can support a cause
  • Separate a wrong number from a conclusion the data can’t establish.

🔬 When the AI knows more than the reviewer

  • Ask for a result small enough to check independently.
  • Use known totals, sample rows, or a second calculation.
  • A second AI agreeing isn’t independent evidence.
  • Get expert help when a conclusion is beyond what you can assess.

✍️ Classwork: Part 3

  • 3A: green, yellow, or red.
  • 3B–3C: run the four checks, then write your own flights code.
  • 3D–3E: write better prompts, and keep a record.

✅ Part 3 takeaways

  • Alignment is everyone’s job, including yours.
  • Four rules: invite, stay in the loop, set the role, expect change.
  • Ask: allowed, safe, checkable, disclosed?
  • The main risk for analysts is plausible and wrong.

Next time: AI that acts, and what it means for your job.

Part 4: Agents and Jobs

🥇 Forecasts keep missing

Timeline of when AI would reach gold-medal level at the International Math Olympiad: forecasters guessed 2035, AI experts about 2030, and it happened in 2025.

  • If experts missed this, be careful with anyone’s forecast.

🪝 A capability overhang

88%

of organizations reported using AI in 2025

Single digits

agent deployment, in nearly every business function

  • Capability overhang: AI can already do more than we use it for.

Source: Stanford HAI, 2026 AI Index, Economy chapter; term from Mollick (2026).

🔄 AI agents

🪜 From chat to agents

Three rising steps: chat, copilot, and agent. More autonomy means more work done and more to check.

🔄 What is an AI agent?

An agent loop: from a goal, the agent plans, acts, observes, and checks repeatedly, then returns a result for a person to review.

  • In 2023, Mollick’s early agent built a 21-step plan for one sentence, then gave up.

⚙️ Automation or agent?

Automation

Code repeats a routine task, such as the same weekly report from new data.

AI agent

Pursues a goal over several steps, and uses results to decide what to do next.

  • Changing its plan mid-task doesn’t retrain the model.
  • A fixed R script may be the better tool for recurring calculations.

🧰 An agent on a data task

The agent… You check…
reads sales.csv Right file? All the rows?
writes and runs dplyr code Does it answer the question?
fixes its own errors What did it drop or change?
makes a chart Are the axes and labels honest?
writes a summary Can you trace every number?

📏 Agents handle longer tasks

Scatter chart with log scale: the length of task AI completes half the time rose from 4 minutes for GPT-4 in 2023 to about 17 hours for the newest model tested in April 2026.

  • Doubling about every four months since 2023.

🚧 Longer doesn’t mean reliable

1 in 3

agents fail this often on structured benchmarks

38%

best agent, right first try on real data questions

85%

of wrong answers: bad plan or faulty code

  • The dangerous failure runs, looks right, and is wrong.

🕵️ A new risk: agents read instructions

Prompt injection: hidden instructions in a web page or file are read by an agent as text, and the agent may obey them.

  • Prompt injection is first on OWASP’s Top 10 risks for LLM apps.

🚦 Drafting and acting need different permission

Proposed action What it needs
Draft a recommendation The analyst checks the evidence
Save changes to original data Approval, and an unchanged copy
Email staff or publish a report Approval from an authorized person
Buy a service or change a schedule Explicit authorization first
  • Giving AI a question doesn’t give it permission to act.

🛡️ Four rules for delegating to an agent

Least access

Only the files and tools it needs

Approve before acting

Sending, deleting, or paying needs a person

Keep a log

See what it read, ran, and changed

Review the result

Your name goes on it, so you check it

💼 AI and jobs

🏭 A general purpose technology

Earlier examples

Steam power and the internet touched every industry, and they spread slowly.

Generative AI

ChatGPT reached 100 million users faster than any earlier product.

  • General Purpose Technology is an economic term, and it’s also abbreviated GPT.
  • There’s little runway, so people and organizations learn as they go.

📦 A job is a bundle of tasks

An analyst's tasks sorted into three groups: just me, delegated, and automated.

  • AI takes tasks. Whether it takes the job is a separate question.

✍️ Sort your future job

  • Pick a job you might want.
  • List five tasks it involves.
  • Sort them: just me, delegated, automated.

Which sort would you defend even if AI got much better?

💼 Three ways AI changes an analyst’s work

Automate

Produce a routine sales report with less manual work.

Assist

Explore more questions and comparisons.

New responsibilities

Review AI outputs and manage the workflow.

  • AI exposure isn’t job loss. Hiring and pay may still change as jobs are redesigned.

📊 The big picture: no clear job shock yet

Yale Budget Lab (Oct 2026)

No clear AI link to changes in occupational mix, employment, or unemployment

Anthropic (Mar 2026)

No systematic rise in unemployment for highly exposed workers

🐦 But watch young workers

Line chart from November 2022 to June 2026 for workers ages 22 to 25: employment rose 10 percent in less AI-exposed jobs and fell 11 percent in the most AI-exposed jobs.

  • A gap of about 19%. Experienced workers show no comparable gap.

🧪 Read the evidence like an analyst

  • Different lens: whole labor force vs. ages 22–25.
  • Different data: national surveys vs. ADP payroll records.
  • Cause? The authors call theirs descriptive, not causal.
  • How? Mostly less hiring, not more firing.

🔀 Automate, or complement?

Young-worker jobs falling

Where AI mainly automates tasks

Codified knowledge

Jobs flat or rising

Where AI mainly complements workers

Tacit, experience-based knowledge

How do you get experience if entry-level tasks shrink?

🎓 New graduates right now

5.2%

recent-graduate unemployment, lowest in over a year

42.5%

recent graduates underemployed, ticking up

  • Better in 2026, still challenging. AI’s share of the blame is debated.

🎙️ What DANL alumni said about AI at work

Coding

Most daily analytics code was AI-assisted, with human review.

Rules

Policies differ. The New York Fed bars public tools and uses a secure in-house system.

Judgment

“You need to know what you’re asking it to do, and what the right answer looks like.”

Fall 2025 career sessions. Their own estimates and workplaces, as of fall 2025.

⚡ Early productivity gains

20–80%

gains in early studies of AI, on tasks from coding to marketing

18–22%

what steam power added in factories

  • Results vary by task, oversight, and how carefully they were measured.

Source: Mollick (2024), Introduction.

⏱️ Feeling faster isn’t being faster

19% slower

measured time on real tasks, with AI

20% faster

what those same developers believed

  • METR now calls this result dated; newer tools likely help.
  • The lasting lesson: measure it.

Randomized trial, 16 experienced developers, 2025. Source: METR (2025); METR (2026) update.

🤔 A puzzle to discuss

2024 evidence

AI helps lower-skilled workers the most.

2026 evidence

Entry-level hiring is slipping in exposed jobs.

How can both be true? Talk with a neighbor.

🌐 Beyond work

Education

AI tutors, feedback, and new ways to assess

Media

Personalized content and disrupted industries

Information

Misinformation at scale, and hard to detect

Creativity

Who is the author, when the work is shared?

🎤 Your analysis, your judgment

⚖️ Decision errors have costs

Possible error Possible consequence
Overstate how much staffing is needed Unnecessary labor cost
Understate a real queue problem Longer waits and lost business
Treat a few comments as everyone’s view A poorly targeted response
  • State the uncertainty, and what evidence would reduce it.
  • The manager, with authority, decides whether to act.

🗣️ A recommendation needs a defensible message

Part What the audience needs
Decision The specific choice being considered
Evidence A relevant comparison, with units and coverage
Limitation What the data can’t establish
Next step A proportionate action, or more evidence
  • AI can suggest wording. You own the meaning.

🧵 A project needs a traceable argument

Project element What someone can inspect
Finding The chart and its calculation
Calculation The R script and relevant rows
Data Source, variables, units, and dates
AI assistance What it proposed, and what you verified

📦 A reproducible handoff

  • Preserve the original data, and describe any changes.
  • Keep an R script that reproduces the summaries and charts.
  • Use labels, units, and captions your audience can follow.
  • State the main limitation, and any required AI documentation.

🌟 What stays valuable

Taste

Which chart tells the truth?

Deep expertise

Spotting the wrong denominator

Context

What these numbers mean here

Agency

Deciding on uncertain information

🧭 What to do this semester

  • Build the fundamentals: R, statistics, reasoning.
  • Practice delegating and checking, where it’s allowed.
  • Keep proof of judgment: your project, your choices, your checks.

✍️ Classwork: Part 4

  • 4C, 4E, 4F: your job sort, the puzzle, and the exit ticket.
  • 4A–4B: an agent’s log, and a hidden instruction.
  • 4D: rewrite two headlines to fit the evidence.

✅ Takeaways and exit ticket

  • Agents act, so there’s more to check.
  • Overall job shock: not visible yet. Young workers: a warning sign.
  • The change may be coming either way. What we do with it is our choice.

Name one task you’d delegate and one you’d keep. Why?

Reading and full source list: AI and Data Analytics reading. Questions: AI classwork.