DATASCI 185: Introduction to AI Applications

Lecture 25: Course Revision

Danilo Freire

Department of Data and Decision Sciences
Emory University

Welcome back! 😊

The whole course in 50 minutes

  • Last class: long-term safety and alignment
  • Today: course revision
  • We will go through every lecture, one slide each
  • The goal is to see how everything connects
  • Look for the boxes: they show where the same idea appears in different lectures
Module Topic
0 Orientation
1 How AI systems are designed
2 Language and perception
3 Retrieval, generation, pipelines
4 Data ethics and bias
5 Policy, governance, social impact
6 Applications, limits, and the future

Module 0: Orientation 🧭

What AI is and how we got here (Lectures 1-2)

  • Current AI is all narrow AI: good at one thing, bad at everything else. No system today is “general”
  • LLMs predict the next token. They do not understand language. This one fact explains hallucinations, creativity, and sycophancy
  • The history: symbolic AI (rules, 1950s-80s), AI winters, backpropagation (1986), transformers (2017), ChatGPT (2022)
  • ChatGPT’s real edge was not just scale: instruction tuning + RLHF made it conversational
  • The hype cycle keeps repeating. Worth keeping in mind when reading today’s headlines

Next-token prediction explains hallucinations and creativity (L10) and sycophancy (L24). RLHF comes back in Lectures 4 and 24.

The transformer architecture (2017)

Module 1: How AI systems are designed ⚙️

Data, labels, and the proxy problem (Lecture 3)

  • Data quality beats algorithm complexity. Garbage in, garbage out
  • Labels often measure a proxy, not the real thing. Healthcare spending as a proxy for health needs encodes racial bias
  • Selection bias: a systematic gap between training data and the real world. Very hard to fix after the fact
  • Cohen’s Kappa: do annotators agree beyond chance? (> 0.61 = substantial agreement)

The proxy problem is the most recurring idea in this course: Goodhart’s Law (L5), measurement bias (L15), the Optum case (L16), engagement metrics (L21).

Andrew Ng’s data-centric AI (2021)

Learning paradigms and RLHF (Lecture 4)

Paradigm How it learns Example
Supervised Labelled pairs Spam filter
Unsupervised Finds patterns Customer segments
Reinforcement Trial and error AlphaGo, RLHF
  • Bias-variance trade-off: too simple (underfitting) vs too complex (memorises noise). The goal is the sweet spot in between
  • RLHF: humans rank outputs, a reward model learns from those rankings, and RL optimises the LLM. This is how ChatGPT became useful
  • Risk: reward hacking, where the model games the objective instead of doing what you want

Reward hacking = Goodhart’s Law (L5) applied to training. RLHF returns in Lecture 24 as a key approach to alignment.

RLHF: the method behind ChatGPT

Metrics and Goodhart’s Law (Lecture 5)

  • Accuracy paradox: if a disease affects 1 in 1,000 people, predicting “healthy” for everyone gives 99.9% accuracy but catches zero cases
  • Precision: of those you flagged, how many were right? Recall: of the real positives, how many did you catch? You cannot maximise both
  • K-fold cross-validation: train on some splits, test on others. Catches overfitting
  • Goodhart’s Law: “When a measure becomes a target, it ceases to be a good measure”
  • Always do subgroup analysis: aggregate numbers can hide massive gaps

Goodhart’s Law returns in RLHF (L4), the Optum case (L16), and engagement metrics (L21). Subgroup analysis is formalised as disaggregated evaluation in Lecture 14.

The confusion matrix: TP, TN, FP, FN

Module 2: Language and perception 🗣️

Tokens, embeddings, and context (Lecture 6)

  • Tokens: the basic unit of LLM processing (~100 tokens ≈ 75 English words). Modern LLMs use BPE (Byte Pair Encoding)
  • Non-English languages need more tokens per concept, so they cost more and fill the context window faster
  • Embeddings: each token becomes a high-dimensional vector. Similar meanings end up close together in vector space
  • Context windows: maximum token limit for prompt + response. Go over it and the model starts forgetting
  • Parameters (learned by the model) vs hyperparameters (set by you): temperature controls randomness (low = safe, high = creative)

Embeddings come back in Lecture 7 (images as vectors), Lecture 11 (RAG/cosine similarity), and Lecture 23 (deepfake detection).

king - man + woman ≈ queen

How machines see and hear (Lecture 7)

  • Images = grids of pixels (RGB, each 0-255). CNNs learn a hierarchy: edges, textures, parts, objects
  • Vision Transformers (ViT): treat image patches as tokens. Same architecture as text transformers
  • CLIP: shared embedding space for images and text, trained on 400M image-text pairs. Powers DALL-E and multimodal LLMs
  • Sound = spectrograms (2D images of vibrations). Whisper: 680,000 hours, 99 languages
  • The unifying idea: text, images, and audio all become embeddings. Once in vector space, the model cannot tell the modality apart

Same embedding idea as Lecture 6, applied to images and audio. Same vision tech powers medical imaging and deepfakes (L23). Regulating dual-use models: Lecture 17.

CLIP: images and text in one shared space

Prompting techniques (Lecture 9)

  • PTCF framework: Persona, Task, Context, Format. Specific prompts beat vague ones
  • System prompts: hidden developer instructions. Same model, very different behaviour
  • Zero/one/few-shot: no examples, one example, or 2-5 examples showing patterns
  • Chain-of-thought (CoT): “Let’s think step by step” nearly tripled accuracy on reasoning tasks (17.7% to 58.1%)
  • Agents: the ReAct pattern (Reason + Act, Observe, Repeat). Agents use tools, browse, and write code
  • Prompt injection: malicious input hijacks the agent’s instructions

CoT reduces hallucinations (L10). Prompt injection came back in the chatbot failures (L13) and in why we need regulation (L17).

Chain-of-thought prompting

Module 3: Retrieval, generation, and pipelines 🔍

Hallucinations and creativity (Lecture 10)

  • LLMs optimise for P(next word | context), not P(statement is true). They have no internal fact-checker
  • Sycophancy: LLMs tell you what you want to hear. GPT-4o changed correct answers up to 55% of the time after pushback
  • Types of hallucination: factual errors, fabrication, citation hallucination (worst kind), logical contradictions
  • The creativity-accuracy trade-off: high temperature = creative but risky. The same mechanism that produces hallucinations also produces creative writing
  • Red flags: very specific numbers, precise citations, zero hedging, answers that feel too perfect

Root cause: next-token prediction (L1-2). Fix: RAG (L11). Sycophancy connects to the alignment problem (L24).

Same mechanism, different outcomes

RAG and semantic search (Lecture 11)

  • RAG: give an LLM real, verified documents at query time. Think open-book exam
  • Reduces hallucinations by 30-50% without retraining the model
  • The pipeline: chunk documents (~512 tokens), embed them, store in a vector database. At query time, embed the question, retrieve the top-k similar chunks, inject them into the prompt
  • Cosine similarity: measures the angle between vectors. 0.9+ = very similar, < 0.4 = unrelated. “Budget airfare” matches “cheap flights”
  • Lost in the Middle: LLMs pay most attention to the start and end of context; the middle gets ignored

Uses embeddings (L6) to fix hallucinations (L10). But if the documents are biased, the retrieval will be too (L16).

The RAG pipeline

Pipelines and what can go wrong (Lecture 13)

  • The AI pipeline: prompt, preprocessing, inference, postprocessing, safety filtering, response. Every step can fail
  • Three kinds of drift: data drift (inputs change), label drift (outcomes change), concept drift (the relationship between them changes; worst kind, because the model is confident but wrong)
  • Real failures: Air Canada chatbot (invented a refund policy; company held liable), DPD chatbot (swore at customers), Chevy (sold a car for $1)
  • Test properties (safety, format, consistency), not exact outputs. AI is non-deterministic
  • Input validation blocks prompt injection; output filtering catches harmful content

Concept drift relates to bias (L15): the world changes, the model doesn’t. The chatbot failures set legal precedents that motivated regulation (L17).

The AI application stack

Module 4: Data ethics and bias ⚖️

Documentation as accountability (Lecture 14)

  • Datasheets for Datasets (Gebru et al., 2018): motivation, composition, collection, uses. Without them, you cannot identify bias or reproduce results
  • Model Cards (Mitchell et al., 2019): intended use, metrics, ethical considerations, and what the model is not for
  • System Cards: document the whole AI system, not just one model. Red teaming, oversight, how components interact
  • Disaggregated evaluation: report metrics by subgroup. A model at 90% overall can be 95% for Group A and 70% for Group B
  • Most AI training data is collected without explicit consent

Disaggregated evaluation is how the Optum bias was found (L16). The EU AI Act (L17) now requires this documentation for high-risk systems.

Datasheets: the “nutrition label” for datasets

Where bias comes from (Lecture 15)

  • AI does not invent bias; it picks up patterns from human data and applies them at scale
  • Bias enters at every stage: historical (past discrimination baked in), representation (who is missing from the data), measurement (proxy variables), aggregation (ignoring group differences), evaluation (unrepresentative benchmarks), deployment (wrong context)
  • Feedback loops: predictions shape future training data. Predictive policing: more patrols, more arrests, more patrols
  • Impossibility theorem: with different base rates across groups, you cannot satisfy calibration, equal false positive rates, and equal false negative rates all at once. Fairness is a values choice, not a technical fix

Measurement bias = the proxy problem (L3). Textbook example: Optum (L16). Feedback loops relate to concept drift (L13). The impossibility theorem connects to alignment (L24).

Bias at every stage

The Optum case and proxy variables (Lecture 16)

  • The Optum algorithm used healthcare costs as a proxy for patient needs
  • Black patients spend less even when equally sick (because of access barriers and income inequality)
  • At the same risk score, Black patients had 26.3% more chronic conditions
  • Race was never an input variable. Costs carried racial information because the healthcare system itself was unequal
  • The fix: predict health outcomes instead of costs. Bias reduced by ~84%

Ties together the proxy problem (L3), measurement bias (L15), and Goodhart’s Law (L5). The bias was invisible until disaggregated evaluation (L14).

Obermeyer et al. (2019): changing the target variable fixed the bias

Module 5: Policy, governance, and social impact 🏛️

AI regulation around the world (Lecture 17)

  • Why regulate? Information asymmetry (users cannot evaluate AI), externalities (deepfakes harm non-users), collective action problems (race to the bottom on safety)
  • EU AI Act (August 2024): four risk tiers
Tier Examples
Prohibited Social scoring, real-time biometric ID
High-risk Employment, credit, law enforcement
Limited Chatbots (must disclose they are AI)
Minimal Spam filters, game AI
  • US: sectoral approach, no comprehensive federal law
  • China: regulates commercial AI, exempts state use
  • Brussels Effect: EU rules may become the global default, as happened with GDPR

“High-risk” = the systems from Lectures 15-16. The Act requires documentation from Lecture 14. Brussels Effect connects to GDPR (L19).

The EU AI Act: world’s first binding AI law

Privacy and data protection (Lecture 19)

  • AI makes privacy harder in three ways: scale (collection is cheap), inference (AI predicts sensitive things from harmless data), persistence (data never goes away)
  • You can control what you share, but not what can be inferred from it
  • LLMs can memorise and regurgitate personal information from training data
  • GDPR (2018): rights to access, erasure, portability, objection. Article 22: right not to be subject to purely automated decisions
  • Technical tools: differential privacy (adds noise), federated learning (trains locally), synthetic data. They help at the margins but do not solve the collection problem
  • Privacy paradox: people say they care about privacy but accept all cookies anyway

Inference = the proxy problem (L3) applied to personal data. GDPR is the Brussels Effect (L17) in practice. Consent ties to Lecture 14.

Clearview AI: scraped billions of faces without consent

Labour markets and wellbeing (Lectures 20-21)

Lecture 20: Labour

  • Previous automation targeted physical tasks; AI targets cognitive work
  • Think tasks, not jobs: most jobs are a mix of automatable and non-automatable tasks
  • AI hits white-collar, entry-level work first
  • AI compresses the skill distribution: novices gain more than experts
  • Augmentation vs replacement (Acemoglu): policy choices can shift the balance

Lecture 21: Wellbeing

  • Attention economy: algorithms optimise for engagement, not wellbeing
  • Filter bubbles and polarisation are probably overstated; effects on body image and sleep are real
  • Jevons Paradox: more efficient AI leads to more usage, not less environmental cost

Attention economy = Goodhart’s Law (L5) in action: engagement is the proxy, wellbeing is what we care about. Skill compression relates to bias-variance (L4).

This wave is different: cognitive tasks

What remains hard to automate

Module 6: Applications, limits, and the future 🔮

Misinformation and deepfakes (Lecture 23)

  • Misinformation (false, no intent), disinformation (false, deliberate), malinformation (true, used to harm)
  • Deepfakes: AI-generated media of real people. Used for political manipulation, financial fraud, and non-consensual intimate imagery
  • The authenticity crisis: when anything could be fake, people start dismissing real evidence too
  • We fall for it because of System 1 (fast, intuitive) thinking, confirmation bias, and the bandwagon effect
  • Responses: detection tools, content provenance (C2PA), platform policies, legal frameworks, media literacy
  • No single tool works on its own. Media literacy is the most reliable individual defence

Powered by vision models (L7), detected via embeddings (L6), regulated by the EU AI Act (L17).

The misinformation spectrum

Safety, alignment, and the future (Lecture 24)

  • Five safety problems (Amodei et al., 2016): safe exploration, side effects, reward hacking, scalable oversight, distributional shift
  • The alignment problem: getting AI to do what we actually want, not just what we literally asked for. The King Midas problem
  • Why it is hard: specification problem (you cannot write down everything you care about), Goodhart’s Law, and people disagree about values
  • Current approaches: RLHF, Constitutional AI (Anthropic), debate. None are complete solutions
  • Stuart Russell’s proposal: AI should be uncertain about objectives and defer to humans
  • Neither panic nor complacency. Serious researchers disagree genuinely. Evidence over vibes

Ties together RLHF (L4), Goodhart’s Law (L5), bias (L15-16), and regulation (L17). This is the question the whole course builds toward.

Six threads 🔄

Ideas that run through the whole course

1. Next-token prediction is the foundation

LLMs predict the next word, not the truth. This explains hallucinations, creativity, and sycophancy (Lectures 1, 2, 6, 10)

2. The proxy problem is everywhere

Labels, metrics, objectives, and engagement are all proxies. Optimising a proxy corrupts it (Lectures 3, 5, 15, 16, 21)

3. Embeddings are the universal language

Text, images, and audio all become vectors. RAG, semantic search, CLIP, and multimodal AI all rely on this (Lectures 6, 7, 11)

4. Bias enters at every stage

Data, labels, training, evaluation, deployment. Feedback loops make it self-reinforcing. The impossibility theorem means fairness requires a values choice (Lectures 3, 14, 15, 16)

5. Documentation is accountability

Datasheets, model cards, system cards. Disaggregated evaluation reveals hidden gaps (Lectures 14, 15, 16)

6. Regulation is catching up

EU AI Act, GDPR, the Brussels Effect. Market failures justify intervention (Lectures 17, 19)

If you understand these six threads, you understand the course!

Summary 📝

What we covered this semester

How AI works: next-token prediction, transformers, embeddings, three learning paradigms, metrics and their limits

How AI handles information: tokens, prompting (PTCF, CoT), hallucinations, RAG, pipelines and drift

Ethics and bias: bias at every stage, the impossibility theorem, the Optum case, documentation as accountability

Policy and society: EU AI Act, GDPR, the privacy paradox, labour markets, the attention economy, environmental costs

Safety and the future: concrete safety problems, the alignment problem, multiple plausible futures

You now have the vocabulary to read AI claims critically and ask the right questions about data, bias, and harms. Good luck on the quiz! 🍀

…and that’s all for today! 🎉