16 Essential AI Concepts Every Developer Should Know
The vocabulary of modern AI has expanded fast enough that keeping up can feel like a full-time job. This article breaks down 16 foundational concepts, from how LLMs represent language internally to how agents use tools to take action in the world. The concepts build on each other, so they're presented in order from the most fundamental to the most applied.
1. Large Language Models (LLMs)
A Large Language Model is a next-token prediction system trained on a large corpus of text and code. Given a sequence of tokens, it calculates the probability distribution over what comes next and samples from that distribution. Repeating this process produces coherent multi-sentence output.
A critical architectural fact: LLMs are stateless. They have no persistent memory between API calls. When a chatbot appears to remember earlier conversation turns, the application is re-sending the entire conversation history with every new request. The model isn't remembering; it's re-reading.
2. Tokens
LLMs don't process characters or words. They process tokens: sub-word units that correspond to common character sequences in the training data.
Common words like "the" often become a single token. Rare or long words like "unbelievable" may split into multiple tokens ("un-", "believ-", "-able"). Each token maps to a unique integer ID, and that integer is what the model actually operates on. In English, a token corresponds to roughly three-quarters of a word on average. API pricing, context window limits, and generation speed are all measured in tokens.
3. Weights and parameters
The model's knowledge lives in billions of numerical values called weights or parameters. These are the numbers that get adjusted during training. A simple house-price predictor might have one weight (price per square foot). An LLM has billions of weights organized into layers. When training is complete, the weights are frozen. Using the trained model to generate output is called inference.
4. The Transformer architecture
The Transformer is the neural network architecture introduced in the 2017 paper "Attention Is All You Need" (Vaswani et al., Google Brain). The "T" in GPT stands for Transformer. Its key innovation is the attention mechanism: a way for the model to weigh the relevance of every other token in the input when processing any given token.
This is how the model handles context. The word "bank" in "river bank" attends to different surrounding tokens than "bank" in "put money in the bank." Each Transformer layer performs two operations: multi-head self-attention (which tokens matter for this token?) followed by a feed-forward network that transforms each token's representation independently.
5. Context window
The context window is the maximum number of tokens the model can process in a single call, including both input and output. It's a hard limit set at training time. A 200,000-token context window can hold roughly 150,000 words, enough for a long novel or a large codebase. Once you exceed the limit, older content falls out of the model's view.
The context window is where the LLM's statefulness illusion comes from: the application stuffs the full conversation history into the context on every turn, making the model appear to remember.
6. Training and pre-training
Pre-training is the initial, large-scale training phase where the model learns from a massive text corpus, typically hundreds of billions to trillions of tokens scraped from the internet, books, and code repositories. The process exposes the model to enough examples that it learns grammar, facts, reasoning patterns, and coding conventions.
Pre-training is computationally expensive: GPT-4-scale runs cost tens to hundreds of millions of dollars and take weeks on thousands of GPUs. The result is a base model with broad but unfocused knowledge.
7. Backpropagation
Backpropagation is the algorithm that adjusts weights during training. The model makes a prediction, the prediction is compared to the correct answer using a loss function (a measure of how wrong the prediction was), and the error is propagated backward through the network to calculate how much each weight contributed to the mistake. Each weight is then nudged in the direction that reduces the error.
This process runs across billions of examples. Over many training steps the weights converge toward values that make good predictions on most of the training data. The name "backpropagation" refers to the backward pass through the network layers that calculates the gradient (direction and magnitude of each weight adjustment).
8. Fine-tuning
Fine-tuning starts from a pre-trained base model and continues training on a smaller, curated dataset to adapt the model's behavior for a specific purpose. Where pre-training teaches broad knowledge, fine-tuning teaches how to apply it.
The pre-trained base model knows a lot but will respond to "explain how to write a Python function" as a raw text completion. A fine-tuned instruction model has learned to interpret that as a request and respond helpfully. Fine-tuning on task-specific data can also make a smaller model outperform a much larger base model on that specific task.
9. Reinforcement Learning from Human Feedback (RLHF)
RLHF is the technique used to align model behavior with human preferences. After pre-training and initial supervised fine-tuning, human raters compare pairs of model responses and label which one is better. Those preferences train a reward model: a separate neural network that scores outputs. The main model is then trained using reinforcement learning to maximize the reward model's score.
RLHF is how raw pre-trained models become assistants that are helpful, harmless, and honest. Without it, a base model would be as likely to continue "How do I make a bomb?" with instructions as with a refusal, because its training objective was text completion, not safety.
10. LoRA (Low-Rank Adaptation)
Fine-tuning a full 70B-parameter model requires updating all 70 billion weights, which demands enormous GPU memory and compute. LoRA is a technique that makes fine-tuning practical by injecting small trainable matrices (adapters) into the model's layers while keeping the original pre-trained weights frozen.
During fine-tuning, only the adapter matrices are updated. They're orders of magnitude smaller than the full weight matrices: a LoRA adapter for a 7B model might be 50MB while the full model is 14GB. At inference time, the adapter's output is added to the frozen layer's output. The result is a fine-tuned model at a fraction of the storage and compute cost. LoRA adapters can be swapped in and out at runtime, allowing a single base model to serve many fine-tuned variants.
11. Quantization
A weight stored as a 32-bit float takes 4 bytes. A weight stored as a 4-bit integer takes half a byte. Quantization converts model weights from high-precision floating-point numbers to lower-precision formats, reducing model size and memory requirements at the cost of some accuracy.
A 7B model at full 32-bit precision needs 28GB of RAM. At 4-bit quantization, the same model fits in 3.5GB, well within the range of a consumer GPU or even a MacBook with 16GB unified memory. Quantization is what makes local LLM inference on consumer hardware practical. The accuracy loss from 4-bit quantization is small enough to be negligible for most use cases; 2-bit quantization starts to degrade output quality more noticeably.
12. Embeddings
An embedding is a vector, a list of numbers, that represents a piece of text as a point in high-dimensional space. An embedding model converts text into these vectors in a way that preserves semantic relationships: texts with similar meaning produce vectors that are close together; texts with different meaning produce vectors that are far apart.
"Apple" and "orange" would have similar vectors. "Apple" and "combustion engine" would not. This property makes embeddings the foundation of semantic search, where you search by meaning rather than by exact keyword match.
13. Vector databases
A vector database stores embeddings and supports fast similarity search. Given a query embedding, the database finds the stored embeddings that are most similar (nearest in vector space) and returns the corresponding text chunks. This is the retrieval half of RAG.
Dedicated vector databases like Pinecone, Weaviate, and Qdrant are optimized for this operation. PostgreSQL with the pgvector extension handles it at smaller scales. The core operation is approximate nearest-neighbor search: finding the most similar vectors from millions of candidates in milliseconds.
14. RAG (Retrieval-Augmented Generation)
RAG is an architecture pattern that gives an LLM access to external knowledge at inference time. The workflow:
- The user asks a question
- The application converts the question to an embedding and searches the vector database for similar text chunks
- The retrieved chunks are inserted into the prompt as context
- The LLM generates a response grounded in the retrieved content
RAG is the standard solution when you need a model to answer questions about private documents, internal knowledge bases, or content from after its training cutoff. Without RAG, the model can only answer from what it learned during training. With RAG, it answers from retrieved documents and can cite its sources.
15. Tool calling (function calling)
An LLM can only produce text. Tool calling is the mechanism that lets it act on the world. The developer defines a set of available functions with typed parameters and descriptions. The model can examine a user's request and, instead of producing a text response, output a JSON object specifying which function to call and what arguments to pass.
The application executes the function, gets the result, and sends the result back to the model. The model then generates a final response informed by the actual function output. This is how LLMs search the web, query databases, send emails, and control software.
16. Agents
An agent combines an LLM with a tool-calling loop to accomplish multi-step tasks autonomously. The agent receives a high-level goal, decides on the next step, executes a tool call, observes the result, and repeats until the task is complete.
A software agent tasked with "fix the failing login test" might: grep the codebase for relevant files, read the failing test, read the implementation, make a targeted edit, run the tests, observe the result, and iterate. None of those intermediate steps require user input.
More complex systems chain multiple agents together, with a supervisor agent delegating subtasks to specialist agents and aggregating results. The capability ceiling of agentic systems is still being explored, but tasks that previously required human judgment at each step are increasingly being handled by well-designed agent loops.
How they connect
Every concept in this list builds on the ones before it. LLMs process tokens according to Transformer architectures whose weights were learned through backpropagation during pre-training. Fine-tuning and RLHF shape their behavior. LoRA and quantization make them practical to run at scale. Embeddings and vector databases give them external memory via RAG. Tool calling gives them the ability to act. And agents orchestrate all of it in a loop.
Understanding these 16 concepts gives you enough of the underlying model to reason about what any given AI system is doing, where it can fail, and how to design around those failure modes.