How AI Actually Works
Learning Objectives
After completing this lecture, you will be able to:
- Understand the key concepts of how ai actually works in a government context
- Connect how ai actually works to your agency's AI initiatives
- Identify next steps for applying these concepts in your role
Key Topics Covered
- Pattern recognition vs
- " How models learn from data
- Statistical inference explained for non-technical audiences
Why This Matters for Government
Government agencies face unique challenges when it comes to AI adoption. This lecture addresses these challenges head-on by providing all government employees with the knowledge and frameworks needed to navigate AI in the public sector responsibly and effectively.
As part of the L1 (AI Aware) curriculum, this lecture builds on the foundational principle that every AI system in government ultimately serves citizens. Whether you are working with AI tools daily or setting strategy for your agency, understanding how ai actually works is essential for responsible, effective government AI adoption.
======================================================================
TRANSCRIPT: How AI Actually Works
======================================================================
What you will learn: Pattern recognition vs. "thinking." How models learn from data. Statistical inference explained for non-technical audiences. Why understanding the mechanism matters for governance.
In the last lecture, we named the tools: ML, LLM, NLP, computer vision. Now let's understand how they actually work under the hood. Not at a mathematics level—we're not doing calculus. But at a conceptual level: what is happening when a system "learns," what is it actually doing when it makes a prediction, and why it matters for government decision-making.
This distinction between pattern matching and actual thinking is critical. If you understand this, you'll never be fooled by an AI system that sounds authoritative. You'll know its real strengths and real limitations. That knowledge is power when you're evaluating whether your agency should trust a system.
Purpose
The most important thing to understand is this: AI systems are fundamentally different from how human brains work, even though we use similar language to describe both. An AI system doesn't understand; it correlates. It doesn't reason; it interpolates. It doesn't think; it calculates probabilities. These aren't limitations of today's technology. They're what the technology IS.
Why This Matters for Government
Government requires explainability, accountability, and consistency. When a system makes a decision affecting a citizen, we need to know why, and citizens have a right to know. But an AI system can't explain itself the way a human analyst can. It can't say "I reviewed the evidence and here's my reasoning." It can only say "the pattern in my training data suggests 73%." Understanding this difference is foundational to responsible government use of AI.
Core Concepts
- What Learning Actually Means
When we say an AI system "learns," we're using shorthand. The system isn't learning in the way you're learning this lecture—storing concepts, building understanding. It's doing something more mechanical: adjusting thousands (or millions) of numerical parameters based on patterns in data.
Think of it this way: imagine a vast spreadsheet with millions of columns. Each column represents a tiny "knob" the system can adjust. Initially, all knobs are set to random positions. You show the system an example: a document labeled "fraud" or "not fraud." The system makes a prediction. It's probably wrong. The system then asks: "If I turn up column 47 a little, and turn down column 892 a lot, will I get this one right?"
It does this for every example, thousands of times. Each example slightly adjusts thousands of knobs. After millions of adjustments, the knobs are positioned such that when you show the system a new example, it can make good predictions.
This is learning. It's not understanding. It's optimization. But it works.
- Training Data Is Everything
An AI system's behavior is completely determined by its training data. Feed it one dataset, you get one system. Feed it a different dataset, you get a different system.
This has profound implications. If your training data contains biases, your system will perpetuate those biases. If your training data is missing important examples, your system will fail on those cases. If your training data is from 2020 and the world has changed, your system will make decisions based on outdated patterns.
Example: The U.S. government trained a recidivism prediction system (COMPAS) on historical criminal justice data. The data reflected decades of biased policing: Black defendants were overrepresented in the "high risk" category not because they were more likely to reoffend, but because they were more likely to have been arrested and incarcerated. The system, learning from this biased data, perpetuated the bias. It had "learned" a false pattern.
This is why NIST AI RMF and OMB guidance require agencies to audit their training data. You need to know what patterns you're asking the system to learn.
- Statistical Correlation, Not Causation
AI systems find correlations in data. Correlation means "these things tend to occur together." It doesn't mean one caused the other.
Example: A school district trains a system to predict which students will graduate. It looks at 100,000 student records. It finds that students wearing expensive shoes are more likely to graduate. If the system recommends interventions for "at-risk" students, it might flag students wearing cheap shoes.
But the pattern isn't "cheap shoes cause graduation failure." The pattern is "poverty (which correlates with cheap shoes) correlates with graduation failure." By using "shoe price" as a proxy, the system is making a decision based on socioeconomic status, which may violate equity and anti-discrimination laws.
This is why government use of AI requires domain expertise. A statistician can build a model that finds all kinds of patterns in data. But a subject matter expert needs to ask: "Does this pattern make sense? Is it a cause or a correlation? Is using this pattern ethical?"
- Confidence vs. Accuracy
Here's something that confuses people: an AI system can be very confident and very wrong.
Large language models are trained to produce grammatically perfect, coherent text. This has a side effect: they sound authoritative whether they're right or wrong. If you ask ChatGPT about the ruling in a Supreme Court case, it will give you a detailed, well-written answer. If the case doesn't exist, it will invent it. And it will sound just as confident.
Why? Because the system was trained on text from the internet. It learned "correct-sounding answers tend to be grammatically perfect and detailed." It learned to generate plausible text. It wasn't trained to generate only factual text, because training data is a mix of accurate and inaccurate information. So the system generalized: "coherent and detailed = good answer." And it applies that pattern regardless of whether the answer is true.
This matters for government because citizens might see an AI-generated letter from an agency, take it seriously because it sounds official and detailed, and make life decisions based on it. If the AI made up facts, that's a problem.
- Overfitting: When AI Memorizes Instead of Learns
Imagine you train an AI system to predict which government employees will resign within two years. You feed it 50 years of data from your agency: when people were hired, their position, their salary, their performance reviews, whether they left.
Your system achieves 99% accuracy on the training data. Fantastic, right? Wrong. It might be overfitting: it's memorized the training data rather than learning generalizable patterns.
When you apply it to next year's employees, it fails. Why? Because last year's data was specific to those people, those conditions. The system didn't learn "people with these characteristics tend to leave." It learned "these specific people with these specific SSNs had these specific trajectories." When it sees new people, it has nothing useful to say.
This is why rigorous AI development requires testing on separate data the system hasn't seen. And why in government, you need to continuously monitor system performance in real-world conditions, not just in testing.
Practical Use Cases
Case 1: IRS Document Classification
The IRS receives millions of documents annually. An NLP system could classify them: "tax return," "estimated payment," "correspondence," "amendment," etc. This is within AI's strengths.
The system learns from training data: past documents labeled with their type. When you show it a new document, it says "this looks 94% similar to tax returns in my training data." Its confidence is actually about similarity to training examples, not about whether it's correct. But that's fine for this use case. If it gets 90% right, human staff review the rest. The system speeds up work; it doesn't replace judgment.
Case 2: Benefit Fraud Detection (the Wrong Way)
A benefits agency trains a system to flag fraudulent benefit claims. It uses years of data: claims that were approved versus claims that were later found to be fraudulent. But here's the problem: not all fraud was caught. Many fraudulent claims were never detected, so they're in the training data as "approved" (because they weren't flagged as fraud).
The system learns a pattern that includes undetected fraud. It achieves 85% accuracy on test data. But when deployed, it misses fraud that looks different from past cases, and flags legitimate claims because they look similar to past fraud cases that were never actually fraud.
The lesson: the quality of training data determines everything. If the data itself is flawed, the system is flawed.
Case 3: Staff Scheduling Optimization
A transit agency uses AI to optimize staff scheduling across dozens of stations. The system learns: "peak demand happens at 8 AM and 5 PM. Winter months are busier than summer. Weekends are different from weekdays." These are real patterns in historical data.
The system suggests staffing levels that work on average. But maybe there's a new office building opening next to one station, which will change rush hour patterns. Or maybe the agency decides to run late-night service for the first time. The system will be wrong because it's extrapolating from a pattern that no longer applies.
Again: the system is only as good as the data it learned from.
Anti-Patterns / Misuse Risks
Anti-Pattern 1: Trusting a Model Because It Has High Accuracy
Risk: Rolling out a system because it achieved 90% accuracy in testing, without understanding what it's actually doing or whether accuracy in testing translates to accuracy in production.
Why It Happens: Accuracy is a number. Numbers seem objective. If it says 90%, it sounds precise.
What Goes Wrong: A system achieves 90% accuracy on historical data but 72% on real-world data because real-world conditions are different. Or accuracy is high on average but very low for certain subgroups (e.g., 92% accuracy for men but 68% for women). Decisions based on the system harm the underperforming group.
Example: A hiring prediction system was 87% accurate overall but much less accurate for women because the training data came from an industry dominated by men. When deployed, it systematically recommended fewer women for certain roles.
How to Avoid: Look beyond overall accuracy. Measure performance separately for different demographic groups. Test on data that matches real-world conditions. Monitor performance after deployment, not just before.
Anti-Pattern 2: Assuming the System Knows Things It Doesn't
Risk: Using an AI system to make decisions about things outside its training data domain.
Why It Happens: The system seems smart. It answered other questions well. Surely it knows this, too?
What Goes Wrong: You ask an LLM about local government regulations in your state. It provides an answer. It's wrong, but sounds confident. You use it in guidance to citizens. Citizens follow the wrong guidance.
Example: A city employee asked ChatGPT about local zoning regulations. ChatGPT gave an answer that sounded authoritative but was inaccurate. The employee shared it with constituents. Now constituents are confused about what they're allowed to build.
How to Avoid: Recognize that AI systems are pattern-matching engines trained on specific data. If you need authoritative information, go to authoritative sources: the actual law, the regulation, the official policy. Use AI to help you understand or organize information, not to substitute for expert knowledge.
Anti-Pattern 3: Deploying a System Without Monitoring Its Real-World Performance
Risk: Building a system, testing it, deploying it, and then assuming it continues to work correctly without monitoring.
Why It Happens: Testing is expensive and inconvenient. Once it's deployed and automated, it seems like the work is done.
What Goes Wrong: The system works fine for the first six months. Then something in the real world changes: seasonal patterns, new types of cases, changes in the population. The system's accuracy degrades. But nobody notices because nobody's measuring. Decisions go wrong for months before anyone realizes the system is failing.
Example: A fraud detection system worked great for the first year. Then criminals adapted their tactics. The system, still looking for old patterns, missed new fraud. The agency didn't notice for eight months.
How to Avoid: Build monitoring into the deployment. Define metrics. Check them weekly or monthly. Have a process to retrain or adjust the system when performance degrades. Have a human override for when the system seems unreliable.
Anti-Pattern 4: Assuming AI Removes Bias
Risk: Thinking that because an algorithm is "objective," it will eliminate bias.
Why It Happens: Algorithms seem mathematical and neutral. People have biases; math doesn't.
What Goes Wrong: The algorithm was trained on biased data, or the designers chose variables that proxy for protected characteristics (like using zip code, which correlates with race), or the algorithm found correlations that are true statistically but unfair as a decision criterion. The algorithm perpetuates or amplifies bias, now hidden under a veneer of objectivity.
Example: Predictive policing algorithms were trained on historical police data, which reflected biased policing patterns. The algorithms suggested deploying police to neighborhoods that had been over-policed. This created a feedback loop: over-policing led to more arrests, which led to more algorithmic suggestions, which led to more policing. Bias was amplified, not removed.
How to Avoid: Audit training data for bias. Test the system's fairness outcomes for different demographic groups. Have human review of high-stakes decisions. Don't assume algorithms are fair; verify it.
Practice / Reflection Prompts
- Data Quality Exercise: Identify a dataset your agency uses for an important process. What biases, gaps, or limitations might be in that data? How would those affect an AI system trained on it?
- Correlation vs. Causation: Find an article claiming an AI system discovered a causal relationship. Rewrite it to clarify whether the relationship is actually correlation. What's the difference?
- Accuracy Analysis: If an AI system achieves 90% accuracy, what questions would you ask? (For whom? On what type of case? Tested on what data? Compared to what baseline?)
- Model Explanation Challenge: Describe a decision your agency makes (hiring, approving benefits, issuing permits). Could an AI system make this decision? What contextual judgment would it lack?
- Real-World Monitoring: What metrics would you monitor if your agency deployed an AI system? How would you know if it was failing? Who would be responsible for checking?
Key Takeaways
- AI systems learn patterns from training data, not concepts or logic—they're optimizing numerical parameters to predict based on correlation, not understanding cause and effect.
- Training data quality determines everything—biased data creates biased systems; incomplete data creates systems that fail on new cases; outdated data creates systems that don't adapt.
- Correlation is not causation—an AI system might find that students with expensive shoes graduate at higher rates, but that's not because shoes cause success; it's because wealth correlates with both shoes and graduation resources.
- High accuracy in testing doesn't guarantee accuracy in the real world—real-world conditions are messier and often different from test conditions, and accuracy might be high overall but low for certain subgroups.
- AI confidence and accuracy are separate—a system can sound extremely sure while being completely wrong, especially language models trained to generate coherent text regardless of truthfulness.
- "Objective" algorithms can perpetuate or amplify bias—because they're trained on biased data or because they find correlations that are true statistically but unfair as decision criteria.
- AI systems don't generalize well outside their training domain—they're pattern matchers, not reasoners, so asking them about things outside their training data domain produces plausible-sounding but unreliable answers.
Terms / Glossary Items
Training Data: The historical examples used to teach an AI system patterns. The system's behavior is completely determined by this data.
Pattern Recognition: What AI systems actually do: finding statistical correlations in data. Not the same as understanding.
Overfitting: When an AI system memorizes the training data rather than learning generalizable patterns, so it fails when given new data.
Correlation: When two things tend to occur together. Doesn't mean one caused the other.
Statistical Inference: Making predictions about new cases based on patterns found in historical data.
Accuracy: What percentage of predictions a system gets right in testing. Doesn't tell the whole story; you need to know accuracy for different subgroups and real-world conditions.
Bias in Training Data: When historical data reflects discriminatory patterns (e.g., police data reflecting biased policing; hiring data reflecting past discrimination). Systems trained on biased data perpetuate the bias.
Domain: The specific area or type of data a system is trained on. Systems don't generalize well outside their training domain.
Now you understand the mechanism. An AI system isn't magic. It's not thinking. It's finding patterns in historical data and applying those patterns to new cases. This mechanism has real strengths: it's fast, it can find subtle patterns humans miss, it works at scale.
But it also has real limitations: it can only find patterns that existed in historical data; it doesn't understand context; it doesn't adapt when the world changes; it perpetuates biases in training data.
The next lecture looks at what AI does well and where it fails. We'll use this understanding—pattern matching vs. reasoning—to predict which government tasks are good candidates for AI and which are not.
Take three minutes. Think about a decision your agency makes repeatedly: approving something, denying something, prioritizing something. Is this a task where:
- Historical data contains the patterns you want to recognize? (Good for AI)
- Or does it require contextual judgment you can't capture in training data? (Bad for AI)
What would happen if you automated this decision? Who would it affect? What safeguards would you need?
You now understand not just what AI is, but how it works. You know that it's pattern matching, not thinking. That training data determines everything. That confidence doesn't equal accuracy.
In the next lecture, we'll zoom out and classify different types of AI systems. Then we'll look at government deployments happening right now.
Keep this mechanism in mind. It's the foundation for every evaluation decision you'll make about AI in your agency.
Government AI CLUB Certification Program
Level 1: AI Aware | What AI Is and Is Not | Lecture 1.1.2
A GOVT.CLUB initiative.
<- 1.1.1 What AI Is and Is Not 1.1.3 Types of AI Systems ->
Start Your CLUB Certification
This lecture is part of L1: AI Aware—8 hours of comprehensive government AI training.
Explore CLUB Certification
Related Lectures
L1 1.1.1—What AI Is and Is Not 20 min - Video + Reading
L1 1.1.3—Types of AI Systems 20 min - Video + Reading
L1 1.1.4—What AI Does Well and Where It Fails 20 min - Video + Case Studies
Frequently Asked Questions
What will I learn in How AI Actually Works?
In this 20 min video + interactive lecture, you will Pattern recognition vs. \
What level is How AI Actually Works?
This is a Level 1 (AI Aware) lecture, part of Chapter 1.1 \u2014 AI Foundations. It is designed for all government employees.
How long is lecture 1.1.2?
Lecture 1.1.2 (How AI Actually Works) takes 20 min. It is delivered as a video + interactive format.
Do I need prerequisites for How AI Actually Works?
This lecture is part of L1 (AI Aware). Prerequisites: None.
What is the CLUB Certification?
CLUB (Community Leading Unified Benchmarks) is a maturity-based AI certification for government professionals with 5 levels (L1-L5), 215 lectures, and 25 chapters aligned with NIST AI RMF, OMB, and GAO frameworks.
Skill.re