What is AI
Complete foundations course covering AI concepts from basics to advanced applications. Hands-on chapters with labs, quizzes, and Ollama experiments.
After this course, you'll be able to:
Who this is for
- โAnyone who can use ChatGPT or a local model but cannot explain why it behaves the way it does
- โCareer changers who need the vocabulary before an ML-adjacent role makes sense
- โTeachers, analysts, founders and managers who have to make decisions about AI and are tired of guessing
- โDevelopers who skipped the theory, shipped an LLM feature, and now cannot debug it
- โNot for you if you already write training loops or read papers for a living โ start at the deep learning material instead
What you need first
- ยทNo maths beyond secondary school. Where calculus and linear algebra appear, they are introduced from the ground up
- ยทNo programming required to follow the concepts; basic Python helps for the lab chapters
- ยทA machine that can install a desktop application. A GPU is useful but not required for the smallest models
- ยทPatience with the idea that a correct explanation is longer than a slogan
What the Word "AI" Is Actually Pointing At
Artificial intelligence is not one technology. The label has been attached to at least three unrelated families of software over the past seventy years, and most public confusion comes from people arguing across those families without noticing they are doing it.
The first family is symbolic AI. A human writes the rules, and the machine searches over states, applies logic, and reports a conclusion. Chess engines of the 1990s, expert systems, and the routing logic in a lot of enterprise software all sit here. Nothing is learned. The intelligence, such as it is, was typed in by a person.
The second family is statistical machine learning. Instead of writing rules, you collect examples with known answers and fit a function that maps inputs to outputs. Linear and logistic regression, decision trees and gradient-boosted ensembles, support vector machines, k-means clustering, principal component analysis. This family remains in heavy production use at banks, insurers and retailers, because the data is tabular, the models are auditable, and they train quickly on ordinary hardware.
The third family is deep learning, where a network of simple units learns its own internal representation of the data rather than being handed features chosen by an engineer. Everything the general public now calls AI โ image generators, speech recognition, large language models โ is in this family.
There is also a definitional trap worth naming early. The observation usually attributed to Larry Tesler is that AI is whatever has not been done yet: once a capability becomes reliable, people stop calling it AI and start calling it spell check, or search, or spam filtering. That is why the field can simultaneously feel like it is advancing at an alarming rate and like nothing has been solved. Both impressions are artifacts of a moving definition.
The practical consequence for a beginner is that "learn AI" is not a coherent goal until you decide which family you mean. A foundations course has to walk all three, because the vocabulary is shared, the failure modes are not, and choosing the wrong family for a problem is one of the most expensive mistakes a team can make. Fitting a transformer to a thousand rows of tabular sales data is not a sophisticated choice. It is usually a worse choice than a decision tree that a domain expert can read.
The Three Distinctions That Unstick Most Beginners
Most people who feel stuck on AI are not missing maths. They are missing three distinctions, and once those land, a large amount of otherwise baffling behavior becomes predictable.
Training and inference are different activities
Training is the process that produces a set of numbers โ the weights. It happens once, costs a great deal, and requires very different hardware from what you use afterward. Inference is what happens when you type a prompt: the weights are frozen, the model does arithmetic, text comes out. The model is not learning from your conversation. When people say "I taught it to do X in the chat", they mean they put instructions in the context window, which is discarded when the session ends. Actually changing the weights is fine-tuning, and it is a separate operation with its own dataset, cost and risks.
Knowledge in the weights is not the same as knowledge in the context
A model has two sources of information. Whatever was compressed into its parameters during training, which it cannot cite, update or verify, and whatever you put in front of it right now. These behave completely differently. Parametric knowledge is fluent, fast and confidently wrong at the edges. Context knowledge is accurate to whatever you pasted and disappears when the window fills. Retrieval-augmented generation exists entirely to move facts from the first category into the second, and understanding why that helps is the difference between using a model and engineering with one.
Capability and reliability are separate axes
A model that solves a task nine times out of ten is not ninety percent of a product. It is a demo. Most of the engineering work in real AI systems is not making the model smarter; it is constraining the output format, checking the result, catching the failure and deciding what happens next. Beginners consistently overestimate how much of a system is the model and underestimate how much is plumbing around it.
Hold these three apart and the rest of the field stops feeling arbitrary. Conflate them and you will keep being surprised.
How a Language Model Turns Your Sentence Into an Answer
The mechanical description of a language model is short, and it is worth learning properly because every strange behavior you have noticed follows from it.
Your text is first split into tokens โ chunks that are usually somewhere between a character and a word, chosen by an algorithm that was fit to a training corpus. This is why models are oddly bad at counting letters in a word and why some languages consume far more of the context budget than English for the same meaning. The model does not see letters. It sees token identifiers.
Each token is then mapped to a vector, an embedding, which places it in a high-dimensional space where proximity encodes something like relatedness. Those vectors flow through a stack of transformer blocks. Inside each block, the attention mechanism lets every position look at every other position and decide how much to weigh it. This is the idea introduced in the 2017 paper "Attention Is All You Need" by researchers at Google, and it is the reason the architecture parallelizes so well on GPUs: unlike a recurrent network, positions do not have to be processed one after another.
Multiple attention heads run in parallel, each free to specialize โ one may track syntactic agreement, another may follow a referent across a long passage. Nobody assigns those roles; they emerge from training. At the end of the stack, the model produces a score for every token in its vocabulary, which is turned into a probability distribution over what comes next.
Then comes the part beginners rarely see: sampling. The model does not output the answer. It outputs a distribution, and a decoding strategy picks from it. Temperature flattens or sharpens that distribution; top-k and top-p truncate its tail. This is why the same prompt gives different answers, why lowering temperature makes a model more repetitive rather than more correct, and why "the model made that up" is a slightly misleading description of hallucination. The model produced a plausible continuation, which is exactly what it was trained to do. Nothing in that pipeline checks whether the continuation corresponds to reality.
Once the next token is chosen it is appended to the input and the whole process repeats. That autoregressive loop explains generation speed, why long outputs cost more than long inputs, and why a model that has drifted off course early rarely recovers on its own.
The Ways Machines Learn, and What Each One Costs
There are three classical learning paradigms and one modern pipeline that stitches them together.
Supervised learning uses labeled examples: input, correct answer, repeat. It is the most reliable paradigm and the most expensive, because somebody has to produce the labels. Supervised projects fail at the labeling stage far more often than at the modeling stage โ inconsistent labels put a hard ceiling on accuracy that no architecture change will lift.
Unsupervised learning finds structure without labels: clustering customers, reducing dimensionality, detecting anomalies. It is cheap on data and hard to evaluate, because there is no ground truth to score against. Two clusterings can both be defensible and lead to opposite business decisions.
Reinforcement learning learns from a reward signal rather than from answers. An agent acts, the environment responds, and the policy is nudged toward actions that scored well. It is powerful where you can simulate the environment and brutal where you cannot, because it needs a great many trials and it will happily exploit any flaw in your reward definition rather than solve the problem you meant.
Modern language models use all three in sequence. Pretraining is self-supervised: the corpus provides its own labels because the next token is always known. Supervised fine-tuning then shows the model examples of the behavior you want, in the format you want. Finally, preference optimization โ the family that includes reinforcement learning from human feedback, along with newer direct-preference variants โ shapes the model using comparisons between candidate outputs rather than a single correct answer.
That last stage is the one that turned a text predictor into something that answers questions and refuses harmful requests. It is also the least understood by users, and it explains behaviors that look like personality: the hedging, the structured lists, the apology reflex. Those are not properties of transformers. They are properties of what the preference data rewarded.
The trade-off running through all of it: the further you move from labeled examples toward preferences and rewards, the cheaper the supervision and the harder it becomes to say exactly what you optimized for.
Why Running a Model on Your Own Machine Teaches More Than an API
You can learn a lot from a hosted chat interface, but it hides the variables that matter. An API call has no visible model size, no quantization format, no context limit you can feel, no memory ceiling. Everything is smoothed over. That is excellent for shipping and poor for understanding.
Pulling a model onto your own hardware forces the trade-offs into the open. You immediately confront parameter count, which sets how much memory the weights occupy. You confront quantization, the practice of storing weights at reduced numeric precision so that a model that would not otherwise fit does fit, at some cost to output quality that varies by model and by task. You confront context length, because you can set it, and setting it too high will exhaust memory in front of you rather than silently degrade somewhere else. You confront the difference between a model held in GPU memory and one spilling into system RAM, because the speed difference is impossible to miss.
None of these concepts are hard. They are simply invisible until you own the machine. The same is true of latency: time to first token and tokens per second are separate quantities with separate causes, and you cannot develop intuition for either from a chat box.
There is an honest counterpoint. Local models are generally smaller than the frontier hosted ones, and for the hardest reasoning tasks the gap is real. The sensible position is not local-versus-cloud tribalism but knowing which jobs are size-limited and which are not. Summarization, classification, extraction, drafting and most retrieval-grounded work are frequently well served by a model that runs on consumer hardware. Long-horizon reasoning and specialist code generation often are not.
Privacy is the other axis. If the data cannot leave the building for legal reasons โ patient records, legal discovery, unreleased financials โ then the question of which model is marginally better is secondary to the question of which models can run where the data already is.
The Failure Modes, the Bias Problem, and the Rules Now Arriving
Any honest foundations course spends real time on what these systems get wrong, because the failure modes are structural rather than incidental.
Hallucination is not a bug that will be patched. A generative model produces plausible continuations; plausibility and truth diverge, particularly on specifics such as citations, statutes, dates and figures. Grounding the model in retrieved documents reduces the problem substantially but does not eliminate it, because the model can still misread or over-extend the source. The engineering answer is verification, not trust.
Bias is more subtle than the usual examples suggest. A model reflects the statistical regularities of its training data, including regularities that encode historical discrimination. But bias also enters through problem framing, through the choice of proxy variable, through who was available to label the data, and through the deployment context. This matters because fairness is not one metric. Demographic parity, equal opportunity and calibration are different, defensible definitions, and there are well-known results showing you cannot generally satisfy all of them at once. Choosing among them is a policy decision wearing a technical costume, and it should be made explicitly rather than defaulted into.
Environmental cost is a real consideration and one where the public discussion is unusually noisy. Training a frontier model consumes substantial energy; so does serving it at scale, which over a model's lifetime can dominate the training cost. The useful skill is knowing which lever you actually control โ model size, quantization, batching, caching, and whether you needed a generative model for that step at all.
On regulation, the landscape stopped being hypothetical. The European Union's AI Act takes a risk-tiered approach, imposing obligations that scale with the application's potential for harm and placing separate duties on general-purpose model providers. The United States National Institute of Standards and Technology publishes an AI Risk Management Framework that many organizations have adopted voluntarily as an internal structure. Sector rules โ health privacy, financial advice, employment screening โ frequently bind before any AI-specific statute does. If you are deploying anything that touches a protected decision, the compliance question is not a footnote you handle later.
How to Tell You Are Ready to Go Deeper
Foundations material has a natural exit point, and recognizing it saves months.
You are ready to move on when you can do the following without reaching for a search engine: explain why a model gave two different answers to the same prompt; predict roughly what will happen if you double the context length on a memory-limited machine; say why a retrieval system might return the wrong passage and what you would change first; describe the difference between fine-tuning and prompting in terms of where the information lives; and look at a proposed AI feature and identify which part is the model and which part is ordinary software.
If those are comfortable, the branches ahead diverge sharply and the choice matters more than the order.
The engineering branch is retrieval systems, evaluation harnesses, tool-calling agents, and the operational work of keeping a model-backed service healthy. It rewards software instincts and pays quickly. You do not need much mathematics to be effective here, and you do need discipline about testing things that are non-deterministic.
The modeling branch is linear algebra, calculus, optimization, and building networks rather than calling them. It is slower to pay off and it is what lets you read a paper and know whether the result is interesting. Skip it and you will always be downstream of somebody else's judgment about which model to use.
The applied branch is domain depth: healthcare, law, education, small business operations. This is where most of the actual value gets created, and it is the branch most often skipped by technical people who then wonder why their pilot never reached production. Knowing what a clinician or a paralegal does all day is not softer knowledge than knowing what a transformer block does. It is frequently the constraint.
A reasonable plan picks one branch, goes deep enough to ship something real, and only then widens. The failure pattern is sampling all three at the introductory level for a year and finishing with vocabulary rather than capability.
Common questions
Do I need to be good at maths to start learning AI?
Not to start. You can understand tokenization, attention, training versus inference, context windows and the main failure modes with no calculus at all, and that understanding is enough to use and evaluate these systems competently. Mathematics becomes necessary when you want to modify architectures, read research, or diagnose a training run rather than a serving problem. Learning it later, with a concrete reason, is generally easier than learning it first with no anchor.
Is artificial intelligence the same thing as machine learning?
No. Machine learning is one approach to building AI systems โ the one where behavior is fit from data rather than specified by rules. Artificial intelligence is the older, broader label that also covers symbolic and search-based methods that learn nothing. Deep learning is in turn a subset of machine learning. The nesting matters in practice because a classical model is often the correct engineering answer for tabular business data, and calling everything AI obscures that option.
Do I need a GPU to learn this material?
No, though it changes what you can try. Small quantized models run on ordinary laptop CPUs, slowly but well enough to see how the pieces fit together, and every conceptual chapter works without any hardware at all. A GPU with reasonable memory makes larger models and fine-tuning experiments practical. Renting cloud GPU time by the hour is a sensible middle path for occasional heavy work rather than buying hardware before you know what you need it for.
Should I learn to use AI tools or learn how AI works?
Both, but they solve different problems. Tool fluency makes you productive within weeks and depreciates as interfaces change. Understanding the mechanism is what lets you diagnose a bad output, choose between fine-tuning and retrieval, estimate whether something is even feasible, and stay useful when the current generation of tools is replaced. Tools are the short game; the mechanism is the part that transfers.
Is a foundations course still relevant when models change every few months?
The model names churn far faster than the concepts. Tokenization, embeddings, attention, the training-then-alignment pipeline, context limits, sampling, quantization and the standard failure modes have been stable across several generations of releases. What dates quickly is any specific benchmark ranking or hardware recommendation, which is why those belong in continuously updated reference material rather than in a course syllabus.
What can I actually build after finishing foundations?
Realistically: a working local model setup you understand and can tune, a retrieval system over your own documents, a small classifier trained on your own labeled data, and a simple agent that calls tools. More importantly, you can read a proposal for an AI feature and say whether it is plausible, what data it would need, and where it would break. That judgment is what employers and clients are usually paying for.
Related reading
What Is Local AI
The companion primer on running models on your own hardware instead of through an API.
Install Your First Local AI
The practical setup walkthrough for the first hands-on chapters.
Context Windows Explained
Why models forget, and what the context limit really governs.
Quantization Explained
How reduced numeric precision lets larger models fit on smaller machines.
Local AI vs ChatGPT
An honest comparison of where hosted frontier models still win.
Model Recommender
Pick a first model to run based on the hardware you already have.
Full syllabus
Types Of AI And Common Myths
Your First Local AI Conversation
AI Learning Journey
Three Ways AI Learns
Training In Practice
Attention Mechanism
Multi Head Attention And Context
How GPT Generates Text
Understanding Model Sizes
Choosing And Running Models
Tokenization Basics
Embeddings And Token Impact
Neurons Layers And Depth
Training Networks And Types
Dataset Strategy And Sources
Dataset Formats Code And Practice
Training Loop And Hyperparameters
Training Code And Ollama Export
Fine Tuning
Local Vs Cloud
Real World AI
Your AI Journey
Appendices
Prompt Engineering Fundamentals
Getting Started With Ollama
Understanding AI Bias
Measuring Fairness And Building Fair AI
AI Environmental Impact Understanding
AI Environmental Impact Reducing
AI Laws And Regulations
Visual Aids And Diagrams
Interactive Exercises Labs
Interactive Exercises Projects And LocalAI
Real World Case Studies
Practical Tools Platforms
Practical Tools Prompts Pricing
Community Online Groups
Community Books Courses Plan
AI 2025 Models Hardware
AI 2025 Jobs Tools Future
Learning Paths Summaries
Learning Paths FAQ Glossary
Dataset Creation Basics
Dataset Creation Practice
AI Limitations
RLHF How AI Became Helpful
AI Safety Spotting Protecting
AI Safety Deepfakes Checklist
Making Money Services Pricing
Making Money Examples Scaling
Technical Prerequisites Setup
Technical Prerequisites Troubleshooting
Healthcare AI Overview And HIPAA
Healthcare AI Clinical Applications
Healthcare AI Implementation And Local
Education AI Lesson Planning
Education AI Assessment And Personalization
Education AI Implementation And Local
Small Business AI Customer Service
Small Business AI Marketing And Sales
Small Business AI Operations And Local
Creator AI YouTube
Creator AI Podcasts And Blogs
Creator AI Social And Monetization
Legal AI Contracts
Legal AI Research And Drafting
Legal AI Ethics And Local
AI For Real Estate
AI For Finance Accounting
AI Ecommerce Products Pricing Service
AI Ecommerce Marketing Cases
Marketing Agency AI Production
Marketing Agency AI Reporting And Pricing
AI For Software Developers
Dataset Versioning And Labeling
Dataset Leakage And Splits
Dataset Augmentation And Documentation
Beginner Foundations AI And Models
Beginner Foundations Training And Overfitting
Beginner Foundations Metrics Loss Optimizers
Beginner Foundations Features And Pipeline
Classical ML Linear Models
Classical ML Tree Models
Classical ML SVM Clustering PCA
RAG Embeddings And Vector Databases
RAG Pipeline And Advanced
RAG Production Patterns
RAG Evaluation And Optimization
MLOps Tracking And Versioning
MLOps Docker Containerization
MLOps Kubernetes And CICD
MLOps Monitoring And AB Testing
MLOps Feature Stores And Best Practices
Tools Decision Framework And LLM Comparison
Tools OSS VS SAAS And Comparisons
Tools ADRs And Quick Reference
Math Vectors And Matrices
Math Calculus And Backpropagation
Math Probability And Statistics
Multimodal AI Primer
System Design Online Offline Streaming
System Design Serving And Scaling
System Design Caching And Checklist
Project Image Classifier Setup
Project Image Classifier Data
Project Image Classifier Models
Project Image Classifier Training
Project Image Classifier API
Project Image Classifier Deploy
Project NLP Setup And Data
Project NLP Models
Project NLP Training And API
Project RAG Configuration
Project RAG Document Loaders
Project RAG Chunking
Project RAG Embeddings
Project RAG Vector Stores
Project RAG Retrieval
Project RAG LLM And Memory
Project RAG Chain And Pipeline
Project RAG API And UI
Project RAG Evaluation And Deployment
AI Agents Conceptual Primer
Project Agent Core
Project Agent Tools
Project Agent ReAct And Plan
Project Agent MultiAgent And Safety
Project Agent API And Examples
Project Production Setup
Project Production MLflow Training
Project Production Serving
Project Production Monitoring
Project Production Docker K8s CICD
Project Production AB Testing And Examples
Interview ML Fundamentals Part1
Interview ML Fundamentals Part2
Interview Deep Learning
Interview Statistics
Interview System Design
Interview Coding Challenges
Interview Behavioral Cheatsheets StudyPlan
Unlock all 142 chapters
Plus 24 other courses โ 419 more chapters included.