All posts

/6 min/Moffat Munene

What AI actually is (a no-jargon primer)

Before you can use AI well you need a working mental model of what it is. This post unpacks the words "AI", "LLM", "model", "training", "inference", "agent", "RAG" and a few others, in plain language. Post 1 of the AI Foundations series.

  • #ai
  • #foundations
  • #glossary
  • #llm

If you have read more than two paragraphs about AI in the last year you have read at least four words being used to mean wildly different things. "AI" gets stretched to cover everything from a spam filter to a chatbot to a fully autonomous agent that books your flights. That is fine for marketing copy, but useless when you are trying to decide whether AI is the right tool for the job in front of you.

This series is about giving you a working mental model. Not a textbook. Not a hype reel. Just the parts you need so the rest of the field stops feeling like fog.

We start with the words.

AI, ML, LLM: what is what

Artificial Intelligence (AI) is the umbrella. It covers any system that does something a human would call "smart" without being explicitly programmed for that exact case. A chess engine is AI. Your phone unlocking on your face is AI. A stock spam filter is AI. Most of these are narrow: they do one thing.

Machine Learning (ML) is the most popular technique under the AI umbrella. Instead of writing rules ("if the email contains 'lottery' AND 'urgent', mark as spam"), you show the system thousands of labelled examples and let it learn the rules itself. The output of training is called a model : a file full of numbers that, when fed an input, produces an output.

Large Language Models (LLMs) are a specific kind of ML model. They were trained to predict the next word in a sequence, on basically the whole readable internet. Because so much human reasoning is encoded in text, models that get very good at predicting the next word turn out to also be useful for summarising, translating, drafting code, and answering questions. ChatGPT, Claude, Gemini, and Llama are all LLMs.

The mental shortcut: AI is the goal, ML is the technique, an LLM is one specific successful application of that technique.

Training vs inference

These two words come up constantly. They are not the same thing.

Training is the expensive process where a model is built. It eats huge amounts of data and compute. For the largest LLMs we are talking tens of millions of dollars in GPU time and weeks of running. You only do this once per model version.

Inference is what happens when you, the user, send a question and the model responds. The model is already trained. Inference is comparatively cheap : a few cents per request, milliseconds to seconds of latency.

Why this matters: when you "use AI" through ChatGPT or the OpenAI API, you are paying for inference, not training. The training already happened. This is also why the model's knowledge has a cutoff date : it knows what was in its training data, and nothing after. If you ask about events from last week, it will either guess or refuse.

Tokens, context window, and why models forget

Models do not see words. They see tokens : roughly 3 to 4 characters of text each. The word "engineering" is one token. The phrase "M-Pesa" is two. Numbers and code chunks tokenise differently from prose.

Every model has a context window : the maximum number of tokens it can hold in mind at once. A small model might have 8,000 tokens of context (about 6,000 words). A large modern model has 200,000 or more (a short book). Once you exceed it, the oldest content falls out of memory.

This is why a long conversation with an AI can feel like talking to a goldfish. It is not "forgetting" in any human sense. It is just that the message you sent five turns ago is no longer in the input being shown to the model.

What the model actually knows

An LLM has two kinds of knowledge:

  1. Parametric knowledge : everything it absorbed during training, baked into its parameters. This is wide, fuzzy, and often a bit out of date.
  2. Context knowledge : everything currently in its context window. This is narrow, sharp, and exactly what you put there.

When you paste a document and ask "what does this say", the model is using context knowledge. When you ask "explain how M-Pesa STK push works", it is reaching into parametric knowledge. The latter is faster but less reliable. The former is more reliable but you have to provide the source.

This distinction is the entire reason Retrieval-Augmented Generation (RAG) exists. RAG is a pattern where, before answering, the system fetches relevant documents from a private database (your company's wiki, the user's email, etc.) and pastes them into the context. The model then answers using context knowledge, grounded in your real data, not its possibly-outdated training data.

Agents: the next abstraction up

An agent is an LLM that has been given tools and a loop. Instead of just answering, it can:

  1. Read your request.
  2. Decide it needs to do something (search the web, run a script, query a database).
  3. Use the tool.
  4. Read the result.
  5. Either return an answer or repeat from step 2.

Cursor, Claude Code, and ChatGPT's "advanced data analysis" mode are all examples of agents. They can write a file, run a test, see the failure, and iterate. The user describes a goal; the agent figures out the steps.

Agents are powerful but failure modes get weirder. A model that hallucinates a fact is annoying. An agent that hallucinates and then runs rm based on the hallucination is dangerous. Most production agent systems wrap dangerous tools (writes, deletes, sending money) in approval gates for exactly this reason.

What AI is good at, and what it is not

Without going through a checklist of every use case, the rough heuristic:

AI is good when the task involves text-shaped reasoning, has many valid answers, fails gracefully when the answer is approximate, and a human can verify the output cheaply. Drafting an email, summarising a meeting, explaining code, generating boilerplate, brainstorming a list of ideas. All in this bucket.

AI is bad when the task requires exact numerical accuracy, has one correct answer that is hard to verify, or depends on information the model cannot have (yesterday's news, a private system's state, your specific company policy). "What is 17.5 percent of 4,238?" : do not ask an LLM. "Is this contract clause enforceable in Kenya?" : do not ask an LLM without a lawyer reviewing.

The art is recognising which side of that line your problem sits on. Most production AI work is half engineering, half deciding when not to use AI at all.

What we are doing in this series

The next post lays out the full roadmap: eight stops from "I have never used AI" to "I have shipped an AI feature to production". You can stop wherever it stops being useful for your job. Most people only need the first three.

After that we go deeper, one stop at a time, in posts you can read in any order once you have the map.

If you only remember one thing from this post, remember this: the model is not magic, it is a very competent next-word predictor that is sometimes asked to wear too many hats. Knowing the seams is half the battle.