AI Basics A–Z
26 AI terms explained simply, one letter at a time. Short, plain-English guides to the words you keep hearing about AI, from algorithm to zero-shot, each with pictures and real examples. Read them in order or jump to any letter.
How language models work, and how to build real things with them. One idea per topic, each with its article, video and quiz together.
A series walks you through one subject in order, part by part. Every part is also a topic on the map below, so you can read any of them on its own.
26 AI terms explained simply, one letter at a time. Short, plain-English guides to the words you keep hearing about AI, from algorithm to zero-shot, each with pictures and real examples. Read them in order or jump to any letter.
Run a real language model on your own computer, then talk to it four ways: the command line, the desktop app, the REST API, and code in Python and Java. Every part also stands on its own.








The engine behind ChatGPT, Claude and Gemini does one surprisingly simple thing, billions of times over. Here is what it is, how it learns, and why it sometimes gets things wrong.
An AI model can't read letters. It reads numbers. Here is how your text becomes tokens, how tokens become embeddings, and how embeddings differ from a model's weights.
ChatGPT runs on someone else's computer. With a free tool called Ollama, a real language model can run on yours, privately, offline and with no bill per question. Here is what that means and how to start.
The model is the movie. Ollama is the player. Here is what Ollama really is, why everything talks to localhost:11434, and what happens inside when you ask it a question.
Every message you send to a chat model carries a role. System sets the rules, user asks, assistant answers. Here is what each one does, who writes it, and why the model's own old answers have to go back in.
Not every chatbot is AI, and the AI ones don't remember you the way you might think. Here is how chatbots went from fixed menus to ChatGPT, and what really happens when you hit send.
Training a large model from scratch costs a fortune. Fine-tuning takes a model that already knows a lot and teaches it one job well. Here is how it works, what LoRA is, and when you should use prompting or RAG instead.
Most AI used to sort and predict. Generative AI creates something new. Here is what generative AI is, how it makes text and pictures, a short history, and what to watch out for.
An AI chatbot can invent a court case, a policy or a statistic, and say it with total confidence. Here is why that happens, two real cases where it cost people money, and what you can do about it.
Training is how an AI model learns. Inference is every time you actually use it. Here is what happens during inference, why it decides how fast and how expensive AI is, and where it runs.
AI chatbots are trained to refuse harmful requests. A jailbreak is an attempt to talk them out of it. Here is how jailbreaks work at a high level, how they differ from prompt injection, and how AI companies defend against them.
Every AI model learned from data collected up to a certain date, and it knows little or nothing after that. Here is what a knowledge cutoff is, why it exists, why models are often unsure of their own, and how to work around it.
A prompt is whatever you give an AI to work with. Small changes to it can turn a vague answer into a great one. Here is what a prompt is, what a good one contains, simple techniques that work, and the mistakes to avoid.
An AI model is billions of numbers. Store each number with less precision and the model shrinks to a fraction of its size, often with little loss in quality. Here is how quantization works, what Q4 and Q8 mean, and the trade-offs.
An LLM doesn't know your company's documents, and it can't see anything after its cutoff. RAG fixes that by looking up the right information first, then answering from it. Here is how RAG works, step by step, and where it goes wrong.
Everything an AI model learned is stored as numbers called weights, or parameters. Here is what weights are, how training sets them, why models are described as "8B" or "70B", and what "open weights" means.
Zero-shot means an AI handles a task it was never shown examples of. The term has two meanings, one from classic machine learning and one from prompting chatbots. Here are both, with examples, plus one-shot and few-shot.
Do you know? An AI agent is just a while loop.
Want to build your own AI agent in Java, but don't know where to start?
Episodes 1 to 3 were all about the LLM.
You already use AI many times a day. Here is what it really is, how a computer can learn without anyone writing the rules, and how today's chatbots and AI agents fit in.
Every AI system runs on algorithms, but an algorithm is not the same as the AI. Here is what an algorithm really is, how a learning algorithm differs from a model, and where you meet them every day.
Machine learning is how most of today's AI is built. Instead of writing rules, you show a computer examples and let it find the pattern. Here is how it works, the main types, and where you already use it.
Neural networks power face unlock, translation and every modern chatbot. Despite the name, they are layers of simple maths, not artificial brains. Here is how a neural network works, how it learns, and the main kinds.
AI doesn't have opinions, yet it can still treat people unfairly. Here is where AI bias comes from, two real cases that made headlines, and what builders do to reduce it.
An AI model is only as good as the examples it learns from. Here is what a dataset is, what labels are, why data is split into training, validation and test sets, and what makes data good or bad.
A model can score 100% in practice and still fail the real test. That's overfitting. Here is what it is, how to spot it, how it differs from underfitting, and the common ways to prevent it.
Show a computer thousands of examples with the right answers, and it learns to answer new ones by itself. That's supervised learning, the most common kind of machine learning. Here is how it works, its two main types, and its limits.
Most of the world's data has no labels. Unsupervised learning finds patterns in it anyway, such as groups of similar customers or unusual transactions. Here is how it works, the main techniques, and its limits.
When an AI turns down a loan or flags a medical scan, people deserve to know why. Explainable AI is the set of methods that show what drove a decision. Here is why it matters, how the main techniques work, and their limits.
Python trains the models. But most AI work today is building the app around a model, and that is the kind of work Java has done well for decades. Here is an honest map of who does what.
From the Java notebook
Step-by-step Python code that calls Ollama's /api/chat. First we prove the model remembers nothing between requests. Then we build a terminal chatbot that remembers, and see why the assistant's answers and the context window matter.
Plain Java, no AI framework. We call Ollama's /api/chat with HttpClient and Jackson, prove the model remembers nothing between requests, then build a terminal chatbot that remembers, and see why the assistant role and the context window matter.
The HTTP call from part 3, now done the Spring way. Set up Spring AI 2.0 with a local model, talk to it with ChatClient, use prompt templates, get Java records back, stream, remember the conversation, and switch providers without changing code.
From the Java notebook
Everyone says AI means Python. That is true for training models, and even there Python is only the remote control. But most developers will never train a model. They will build apps around one, and that is backend work in whatever language your backend already speaks.
Every Ollama command you need, explained in plain English with real examples. Install and check, download and run, manage models, build a custom model with a Modelfile, call the REST API, and publish.
No terminal needed. The Ollama app gives you a chat window with a model picker, and a one-click launcher that plugs coding agents like Claude Code and GitHub Copilot CLI into your local or cloud models.
Every Ollama app, command and library talks to the same REST API. Here are its two main endpoints side by side, tested in curl and Postman, plus what stream and think really do when you set them to true or false.
Most of us learned RAG as "embeddings + a vector database." But AI coding agents like Claude Code don't use a vector database.
Install OpenCode on Windows, macOS or Linux, connect a model, make it ask before it acts, and finish your first real task from plan to review. Every step is written for OpenCode 2, with a command cheat sheet at the end.
You don't need a gaming PC to run a free, private coding agent. How to set up OpenCode and Ollama together on an 8, 16 or 32 GB laptop, which small models actually work, the settings that make or break them, and an honest look at what they can and can't do.
Claude Code is a company cab. OpenCode is your own car. LangChain is the workshop where you build your own vehicle. And the AI model is the driver in all three. Here is what each one is for, how they differ, and which problem each one solves.
Ollama runs AI models on your computer. OpenCode is the coding agent that uses a model to work on your project. They are not rivals, they are two halves of one setup. Here is what each does, how they talk, and how to connect them in minutes.
OpenCode is a free coding agent that reads your project, edits files and runs commands, using almost any AI model you choose. Here is what it is, how it works, how to install it, and when to pick it over Claude Code or Copilot.
A coding agent is an AI that works on your project directly. It reads your files, writes code, runs your tests and fixes its own errors. Here is how it works in plain English, real examples, the ready-made agents you can use today (Claude Code, Copilot, Codex, Devin and more), and the open-source tools like OpenCode and JCode for building your own.
jcode does the same job as Claude Code, but it is free, open source, works with almost any model, and is built so light that you can run 10 or 20 agents on one laptop. Here is what it is, the problem it solves, why it is faster, and how to install and use it, with Java and Python examples.
A coding agent is an AI that works on your project directly. It reads your files, writes code, runs your tests and fixes its own errors. Here is how it works in plain English, real examples, the ready-made agents you can use today (Claude Code, Copilot, Codex, Devin and more), and the open-source tools like OpenCode and JCode for building your own.
jcode does the same job as Claude Code, but it is free, open source, works with almost any model, and is built so light that you can run 10 or 20 agents on one laptop. Here is what it is, the problem it solves, why it is faster, and how to install and use it, with Java and Python examples.
Chatbots write answers for people to read. But when your code needs an answer, it doesn't want a paragraph, it wants a value it can put in an if-statement, and it wants it fast. Jev, from TypeSafe AI, is built for exactly that. Here is what it is, what "System One" means, and why it is so much faster and cheaper.
Everything you do with Jev comes down to four kinds of question. Pick one option. Place it on a scale. Is this true? Where is it in the image? Here is what each one asks, exactly what comes back, how to read the numbers, and the mistakes TypeSafe's own docs warn about.
Fast, smart, easy, generalized, cheap. For years you could pick two or three: a general LLM is smart but slow and pricey, a fine-tuned classifier is fast but needs labels, training and upkeep. Here is how Jev, TypeSafe's System One model, compares with both, with real numbers from TypeSafe's docs, and where each one still wins.
You've read what Jev is. Now let's run it. This hands-on guide takes you from an empty folder to a working support-ticket triage script: getting an API key (and why you need credits first), installing the SDK, asking your first question, and letting your code act on Jev's confidence.
Search "cheap phone" and find "budget mobile", even though the words don't match. Embeddings make that possible. Here is what they are, how similarity works, and where they power the apps you use.
A normal database finds exact matches. A vector database finds things that mean something similar, even with different words. Here is what a vector database is, how it searches millions of items fast, and when you actually need one.
Python lets you write types, and modern code does. But Python itself never checks them when your program runs. Here is the type hint syntax mapped to Java, how to get compiler-like checking with mypy or pyright, and why AI libraries turn hints into real behaviour.
From the Java notebook
@app.get("/health") looks exactly like Spring's @GetMapping. It isn't the same thing. A Java annotation is metadata a framework reads later; a Python decorator is a function that runs right away and wraps or registers yours. Here is how they work, and how to read the ones you'll meet.
From the Java notebook
LLM calls are slow and mostly waiting. Python's async lets one thread wait on many of them at once, pausing at every await. Here is how async def, await and asyncio.gather compare with CompletableFuture and virtual threads, and the rules that keep async code from freezing.
From the Java notebook
MCP is one standard plug that lets any AI app use any tool. We start with the problem it solves, draw the host, client and server, then open the plug to see the RPC and JSON-RPC inside, and follow one tool call end to end.
A complete MCP setup is a host, a client and a server. We build the server and the client in plain Java with the MCP Java SDK, talk over STDIO, and see the only three spots you change for your own tools.
YOLO stands for You Only Look Once. It's a family of AI models that find and label objects in an image in a single pass, fast enough for live video. Here is how it works, why it was a breakthrough, and where it's used.