New to prompting LLMs at all? Start with Prompting 101 — a generic, project-independent primer (what a prompt is, zero/few-shot, chain-of-thought, common failure modes) using a free chat app, no ComplianceGPT code required. Everything below and in Week 1–3's slides builds on it.

AI Fundamentals

You don't need to understand every detail of how neural networks work. You need a mental model accurate enough to reason about why AI systems fail and how to improve them.

Artificial Intelligence (AI)

Systems that perform tasks normally requiring human intelligence: recognizing images, understanding language, making decisions. AI is an umbrella term — it includes everything below.

Machine Learning (ML)

AI that learns from data rather than from hand-written rules. You show it millions of examples, it learns the pattern. The pattern is a mathematical function (the model).

Deep Learning (DL)

ML using layered artificial neural networks. Especially powerful for language and images. GPT-4, Gemma, Llama are all deep learning models.

Large Language Models (LLMs)

Deep learning models trained on trillions of words from the internet. They predict the next token given the previous tokens. Emergent behavior: they can read, summarize, reason, and generate text.

What is a Token?

LLMs don't process characters or words — they process tokens, which are roughly word-pieces. "compliance" might be one token; "anti-inflammatory" might be three. GPT-4 was trained on ~13 trillion tokens. This matters for your research: the cost of running a model scales with token count, so shorter prompts = faster experiments.

What is Hallucination?

LLMs generate plausible-sounding text — but plausible does not mean accurate. A model might confidently cite a HIPAA subsection that doesn't exist, or invent a fictional court case. This is called hallucination. One of your projects directly studies this phenomenon in the legal compliance context.

Recommended Videos

The Road to LLMs — A 70-Year Story

Every model you use this summer is the product of 70 years of incremental ideas. Here's the progression that matters most for understanding why LLMs work and why they fail.

1956

The Dartmouth Conference — AI Is Born

John McCarthy coins the term "artificial intelligence." Early vision: write enough rules, and computers will think. Programs play chess, prove theorems. The dominant approach for 30 years: hand-coded rules.

The problem: rules don't scale. HIPAA alone has hundreds of exceptions, sub-conditions, and edge cases. Maintaining rules for every possible patient scenario is impossible.

1986

Backpropagation — Neural Networks Can Actually Learn

Rumelhart, Hinton, and Williams publish the backpropagation algorithm. Neural networks (inspired by biological neurons) can now be trained on data by adjusting millions of numerical weights to minimize prediction error. The idea is elegant: show the network labeled examples, compute how wrong it is, propagate the error backward, adjust every weight slightly. Repeat millions of times.

The bottleneck: not enough data, not enough compute. The method worked in theory but not at scale — yet.

2012

AlexNet — Deep Learning Works (Proof of Concept)

The ImageNet Large Scale Visual Recognition Challenge asked models to classify 1.2 million images into 1,000 categories. The best systems had ~26% error. AlexNet — a deep convolutional neural network trained on GPUs — achieved 15.3%. The next-best competitor: 26.2%. A 10-point gap, not 1 point.

Three things converged: (1) data — the internet generated billions of labeled examples; (2) compute — GPUs built for gaming are massively parallel and perfect for training; (3) algorithms — ReLU activations and dropout made deep networks trainable. Research investment in deep learning exploded immediately.

2013

Word2Vec — Words Become Numbers (Semantic Geometry)

Tomas Mikolov at Google trains a neural network on billions of words with one task: given context words, predict the missing word. The hidden layer weights — never the intended output — turn out to be extraordinarily useful: they are word embeddings.

"hospital" and "clinic" end up close in the 300-dimensional vector space. "hospital" and "lawsuit" are far apart. The famous demonstration: king − man + woman ≈ queen. Meaning encoded as geometry. This is how modern LLMs "know" that "judicial mandate" and "court order" are related — their embeddings end up close.

~2015

RNNs and LSTMs — Sequences, with Limits

Language is ordered: "the dog bit the man" ≠ "the man bit the dog." Recurrent Neural Networks (RNNs) process tokens one at a time, passing a hidden state forward — a memory of what came before. Long Short-Term Memory networks (LSTMs, 1997, Hochreiter & Schmidhuber) added gates to control what to remember and forget.

The fundamental problem: sequential processing is slow (can't parallelize on GPUs), and information from early tokens fades over long sequences. A legal narrative might have the crucial fact in sentence 1 and the disclosure in sentence 20. By sentence 20, the LSTM has lost the thread. This is the failure mode that the Transformer fixed.

2017

"Attention Is All You Need" — The Transformer

Vaswani et al. at Google Brain publish an 8-page paper. The core idea: self-attention. For every token, compute how much it should attend to every other token when determining its meaning. "He signed the order" — when computing the meaning of "order," the model attends to "signed" (action) and "judge" (context) with high weight, resolving the ambiguity toward "court order."

Crucially: every token attends to every other token in parallel. No sequential bottleneck. The whole sentence is processed at once. This allows training on 10,000 GPUs simultaneously — and the models can be made enormously larger.

Architecture split: Encoder (reads text → builds contextual representations → used for understanding) and Decoder (generates tokens one at a time → used for text generation). Or both: encoder-decoder for translation and summarization.

2018

BERT and GPT — Two Paths from the Transformer

BERT (Google, 2018) — encoder-only, 110M parameters. Pre-trained to predict masked words bidirectionally (it can see context on both sides). Fine-tuned on specific tasks: question answering, classification, named entity recognition. Dominated NLP benchmarks immediately. Still used in search engines today.

GPT-1 (OpenAI, 2018) — decoder-only, 117M parameters. Pre-trained to predict the next token, left-to-right. Designed for generation. The beginning of the GPT lineage.

2019–20

GPT-2 and GPT-3 — The Scale Hypothesis

GPT-2 (1.5B parameters, 2019): OpenAI decided not to release it, worried about misuse. When they did, it could write convincing paragraphs, complete stories, fake news. The first glimpse of emergent generation capability.

GPT-3 (175B parameters, 2020): the model that proved the scale hypothesis — bigger models, trained on more data, develop qualitatively new capabilities. GPT-3 demonstrated few-shot learning: show it 3 examples in the prompt, and it generalizes to new examples — without any fine-tuning. For the first time, you could "program" a model with natural language instructions.

2022

RLHF and ChatGPT — Alignment Changes Everything

InstructGPT (OpenAI, 2022): GPT-3 could generate text but wasn't reliably helpful or safe. Researchers applied Reinforcement Learning from Human Feedback (RLHF): human raters rank model outputs, a reward model is trained on those rankings, and the LLM is fine-tuned to maximize reward. The result: a model that tries to give correct, helpful answers rather than just plausible-sounding ones.

ChatGPT (November 2022): 100 million users in 60 days. The fastest consumer product adoption in history. The general public discovered LLMs existed. Every company reallocated resources. Universities rewrote academic integrity policies. Regulatory bodies scrambled. The world changed in about 10 weeks.

Now

Claude, Gemini, Llama, Gemma — The Current Era

The models you're working with. Gemma3:4B is a 4-billion-parameter model from Google DeepMind — "small" by 2025 standards, runs locally on a laptop, but achieves 94.2% on the HIPAA GoldCoin benchmark with the right extraction layer. Claude Sonnet is Anthropic's frontier model, trained with Constitutional AI (a variant of RLHF). Llama 3 is Meta's open-weight model. All of them descend from the 2017 Transformer.

The gap between what these models know and what they can operationalize precisely is exactly what your research is about.

NLP Fundamentals

Natural Language Processing (NLP) is the field of AI that deals with human language. Your research is applied NLP.

Key Concepts

Embeddings

A way to represent words (or sentences) as points in a high-dimensional space. Similar words are close together. "Hospital" and "clinic" are near each other; "hospital" and "lawsuit" are far. Embeddings are the foundation of semantic search and RAG.

Transformers

The architecture underlying every modern LLM (GPT, Gemma, Llama, BERT). Key mechanism: attention — the model weighs how much each word should attend to every other word when computing its meaning. "He signed the order" — is "order" a court order or a food order? Attention uses context to decide.

Structured Output

Making an LLM output a specific format (JSON, CSV, XML) rather than free text. Critical for ComplianceGPT: we need the model to extract fields like sender_role and purpose reliably. JSON mode, structured output APIs, and careful prompting all help.

Information Extraction (IE)

The task of identifying specific entities and relationships in text. Named entity recognition (NER), relation extraction, event extraction. Our LLM extraction task is a form of IE: given a scenario, extract who, what, why, and how.

Why NLP is Hard for Legal Text

Regulations

You don't need to become a lawyer. You need to understand the structure of each regulation well enough to recognize when a scenario might trigger an exception or violation.

HIPAA — Health Insurance Portability and Accountability Act (1996)

What it protects

Protected Health Information (PHI): any health information that can identify a patient. Diagnoses, treatments, test results, billing records, appointment dates.

Who must comply

Covered Entities (CEs): hospitals, clinics, health plans, pharmacies, clearinghouses. Business Associates: anyone handling PHI on a CE's behalf.

The core rule

A CE may not disclose PHI except under one of ~15 permitted exceptions: treatment, payment, healthcare operations, patient authorization, law enforcement, public health, research, judicial process, etc.

Why it's hard for AI

Each exception has sub-conditions, qualifications, and edge cases. Law enforcement disclosures require specific legal instruments. Research disclosures require IRB approval or patient waiver. A model must track all of these simultaneously.

GDPR — General Data Protection Regulation (EU, 2018)

Covers all personal data (not just health) of EU residents. Key concepts: lawful basis (consent, legitimate interest, legal obligation, vital interests, public task, contract), data minimization, right to erasure, data processor vs. controller. Maximum fine: 4% of global revenue or €20M, whichever is higher.

GLBA — Gramm-Leach-Bliley Act (US, 1999)

US financial privacy law. Banks and financial institutions must protect customer non-public personal information (NPI). Customers have opt-out rights. Analogous to HIPAA but for finance: covered entity = financial institution, PHI = NPI.

SOX — Sarbanes-Oxley Act (US, 2002)

Corporate governance and financial reporting. Public companies must maintain accurate financial records, implement internal controls (Section 404), and prohibit retaliation against whistleblowers (Section 806). Not a privacy law — more about financial integrity and audit trails.

Overlap with HIPAA: A patient asking a public hospital to delete their billing records runs into both HIPAA (limited deletion rights) and SOX §802 (records tied to financial audits cannot be destroyed). When both apply, the more restrictive rule governs.

CCPA — California Consumer Privacy Act (US, 2020)

California's comprehensive consumer privacy law. Applies to for-profit businesses that collect personal information from California residents above certain size/revenue thresholds.

Key rights

  • Right to know — consumers can request disclosure of what personal information a business has collected and who it was shared with
  • Right to delete — consumers can request deletion of their personal information (with exceptions)
  • Right to opt-out — consumers can stop the sale of their personal information to third parties
  • Right to non-discrimination — businesses cannot penalize consumers for exercising CCPA rights

Overlap with HIPAA

HIPAA-covered entities are partially exempt from CCPA for PHI they hold as a covered entity. But the same organization may hold non-PHI data about the same patient (marketing data, website cookies, app analytics) that falls under CCPA only. A question like "Can I delete my records?" may require answering both laws separately for different data categories.

Why it matters for this project

Project 5 (Cross-Regulation Overlap Study) directly tests whether ComplianceGPT can recognize when CCPA applies alongside HIPAA. A California patient asking to delete their health data is not a pure HIPAA question.

COPPA — Children's Online Privacy Protection Act (US, 1998)

Federal law protecting the online privacy of children under 13. Enforced by the FTC.

Core requirement

Operators of websites and online services directed at children (or with actual knowledge they are collecting data from children under 13) must obtain verifiable parental consent before collecting, using, or disclosing personal information from those children.

What counts as personal information under COPPA

  • Name, address, phone number, email, date of birth
  • Social Security number, photos, videos, audio files
  • Geolocation data, persistent identifiers (device IDs, cookies)
  • Health information collected online

Overlap with HIPAA

A pediatric patient portal at a hospital must comply with both HIPAA (as a covered entity handling PHI) and COPPA (as an online service collecting data from children under 13). Disclosing a 10-year-old's medical records to a school requires navigating HIPAA §164.512, COPPA parental consent rules, and potentially FERPA (Family Educational Rights and Privacy Act) — three separate regulatory frameworks simultaneously.

Why it matters for this project

When a scenario involves a minor patient, COPPA may activate in addition to HIPAA. Current ComplianceGPT formalization handles HIPAA only — recognizing when COPPA applies is an open research question for Project 5.

The Regulatory Overlap Principle

A single patient action — "Can I request my medical records?" — can simultaneously activate HIPAA, GDPR (for EU residents), and CCPA (for California residents). "Can I delete my health data?" can activate HIPAA, GDPR, CCPA, SOX (if billing records), GLBA (if at a health insurer), and COPPA (if the patient is a minor). The answer to each question differs by regulation. ComplianceGPT currently handles one regulation at a time — handling overlap is the frontier.