Report an Incident
    AI Foundations · Executive Briefing

    How Does AI Work? A Plain-English Guide to 20 Core Concepts

    A complete foundation for executives, security leaders, IT decision-makers, and compliance teams. Twenty concepts that explain how modern AI systems are built, trained, and operated, written in plain English with the implications for business and security made clear.

    20 min read Beginner to Intermediate
    4
    Sections
    20
    Concepts
    Plain
    English
    Business
    Leaders
    Introduction

    Why Understanding How AI Works Matters

    Artificial intelligence has moved from research labs into core enterprise workflows in a very short period of time. For most organizations, the practical question is no longer whether to engage with AI, but how to do so in a manner that is informed, governed, and defensible.

    This page presents 20 foundational concepts that explain how modern AI systems are built, trained, and operated. The material is intentionally non-technical where possible, and is intended to give business and security stakeholders a shared vocabulary for discussing AI capabilities and limitations.

    Several concepts have direct implications for cybersecurity, data protection, and regulatory compliance. Those implications are noted where relevant.

    This page is organized into four parts. Read straight through, or jump to the section that matches what you need.

    Part 1

    How AI Actually Works

    This section covers the foundational mechanics shared by nearly every modern AI system. Understanding these five concepts is enough to follow most conversations about how AI models are built and what they can do.

    Concept 1

    Neural Networks

    A neural network is the underlying structure of every modern AI model. It consists of layers of interconnected processing units, often described as neurons. Data enters through an input layer, passes through one or more hidden layers, and exits as a prediction or output.

    Each connection between neurons carries a numerical weight that determines how much influence one neuron has on the next. Training a model means systematically adjusting billions of these weights until the network produces accurate outputs across a wide range of inputs.

    The concept is simple, but it becomes powerful at scale. Large modern models contain hundreds of billions to over one trillion parameters, all derived from this same fundamental architecture of layered neurons with adjustable connections.

    Concept 2

    Tokenization

    Before an AI model processes text, the text is broken into smaller units called tokens. Tokens are not always full words. The word "playing" may become "play" and "ing," while a product name such as "ChatGPT" may become "Chat," "G," and "PT."

    A fixed vocabulary of complete words would be impractically large because of new terms, typos, mixed languages, and domain-specific jargon. Tokens function as reusable building blocks, allowing the model to interpret unfamiliar words by decomposing them into familiar pieces.

    As a general guideline, one token is approximately three-quarters of a word. One thousand tokens is roughly equivalent to 750 words of English text. This conversion matters when estimating costs, latency, and capacity for AI workloads.

    Concept 3

    Embeddings

    After tokenization, each token is converted into a numerical vector known as an embedding. An embedding encodes the meaning of a token as a position in a high-dimensional space.

    Semantically related tokens occupy nearby positions in this space. For example, "doctor" and "nurse" are located close to one another, while "doctor" and "pizza" are located far apart. Classic demonstrations show that arithmetic on embeddings reflects meaning, such as the relationship "king" minus "man" plus "woman" producing a vector near "queen."

    The model does not understand language in the human sense. It operates on distance and direction in embedding space. Embeddings are the foundation of semantic search, recommendation systems, and retrieval-based AI applications.

    Concept 4

    Attention

    Words derive meaning from context. The token "Apple" refers to a fruit in the sentence "I ate an apple," but to a corporation in the sentence "I bought Apple stock." Embeddings alone cannot make this distinction.

    Attention is the mechanism that allows each token in a sequence to consider every other token and weigh which are most relevant to its interpretation. In the sentence "She bought shares in Apple," the token "Apple" places high attention weight on "shares" and "bought," leading the model to interpret it as a company rather than a fruit.

    Prior architectures processed text sequentially, which constrained both speed and contextual understanding. Attention allows a model to consider an entire sequence simultaneously. This single innovation enabled the rapid progress observed in AI capabilities over the past several years.

    Concept 5

    Transformers

    The transformer is the architecture that underlies nearly every prominent AI model in production today. It was introduced in 2017 by researchers at Google in a paper titled "Attention Is All You Need."

    The transformer processes text in parallel rather than sequentially, applying attention across many stacked layers. Text is converted to tokens, then to embeddings, then refined through successive layers of attention. Early layers learn grammar and basic structure. Middle layers capture relationships between words. Deeper layers handle more complex reasoning patterns.

    This architecture significantly accelerated training and improved output quality. Notable models built on transformer foundations include the GPT family, Claude, Gemini, Llama, and Mistral. A working understanding of the transformer is sufficient to follow most current discussions of modern AI.

    Part 2

    How Large Language Models Work

    This section explains what happens when you interact with a large language model. The five concepts cover model construction, memory limits, output variability, factual reliability, and the importance of prompt design.

    Concept 6

    Large Language Models (LLMs)

    A large language model, commonly abbreviated as LLM, is a transformer-based model trained on very large volumes of text. Training data typically includes books, websites, source code, encyclopedias, forums, and other publicly available material, often totaling trillions of tokens.

    The training objective is to predict the next token in a sequence. Although this task appears modest, repeating it across trillions of examples produces models that exhibit a wide range of capabilities, including grammar, reasoning, code generation, translation, and mathematical problem-solving. These capabilities emerge from scale rather than from explicit instruction.

    The term "large" reflects parameter counts in the hundreds of billions and training costs measured in millions of dollars. ChatGPT, Claude, and Gemini are all examples of large language models.

    Concept 7

    What Is a Context Window?

    Every AI model has a finite working memory known as the context window. The context window defines the maximum number of tokens the model can consider at one time, including the user prompt, the model response, and prior conversation history.

    Context windows have grown substantially. Early versions of GPT supported approximately 4,000 tokens. GPT-4 supports 128,000. Claude 3.5 supports 200,000. Gemini 1.5 Pro supports up to 1 million tokens.

    A larger context window does not guarantee perfect recall. Models tend to give more weight to information near the beginning and end of the context, while information placed in the middle is often underweighted. This phenomenon is known as the "lost in the middle" problem and explains why a model may appear to forget content that was clearly provided earlier in a long input.

    Concept 8

    Temperature

    When a language model generates text, it does not always select the single most probable next token. The degree of randomness in token selection is controlled by a parameter called temperature.

    A temperature of zero produces deterministic, conservative output. A temperature near one produces more varied and creative output. Higher temperature values can produce incoherent results.

    Lower temperature settings are appropriate for tasks that demand precision, such as code generation, factual summarization, and structured extraction. Higher temperature settings are appropriate for tasks that benefit from variety, such as brainstorming, creative writing, and ideation. Most consumer applications set this parameter automatically, but understanding it helps explain variability in model output.

    Concept 9

    Hallucination

    Large language models are capable of producing confident, well-formed responses that are factually incorrect. This behavior is referred to as hallucination.

    An LLM does not retrieve verified information. It generates the next token based on patterns observed during training. If a fabricated statement matches the statistical pattern of what might plausibly come next, the model may produce it. This is true regardless of whether the underlying fact is real.

    Common hallucinations include nonexistent citations, fabricated software functions, and incorrect historical claims presented as fact. Mitigations include independent verification of outputs and the use of retrieval-augmented generation, which is covered later on this page. From a governance perspective, hallucination is one of the most significant risks associated with deploying LLMs into workflows that involve regulated information or material business decisions.

    Concept 10

    Prompt Engineering

    The structure and content of a prompt materially affect the quality of a model response. The same model can produce substantially different output depending on how a question is framed.

    Effective prompts typically share several characteristics. They provide context about the user and the task. They assign a role to the model. They include examples of the desired output format. They specify constraints such as length, structure, or tone. They decompose complex requests into discrete steps.

    Prompt engineering is best understood as a form of clear written communication rather than as a technical specialty. It is the primary mechanism by which users interact with and direct large language models. For a deeper guide, see our Prompt Engineering Guide.

    Part 3

    How AI Models Improve

    This section explains how foundation models are adapted into specialized, deployable products. The five concepts cover the techniques used to customize, align, and optimize models for production use.

    Concept 11

    Transfer Learning

    Training a large model from scratch requires extensive data, substantial compute resources, and significant time. Most organizations do not train foundation models. Instead, they apply transfer learning, in which a model trained on a broad general task is adapted to a more specific task.

    The analogy is instructive. A person who can ride a bicycle learns to operate a motorcycle more quickly than someone with no prior experience, because the existing skills transfer. In AI, foundation models provide general language and reasoning capability that subsequent training can specialize.

    This pattern is dominant in commercial AI. Large providers train foundation models, and downstream organizations adapt them. The result is faster deployment and significantly lower cost.

    Concept 12

    Fine-Tuning

    Fine-tuning is the practical mechanism for transfer learning. A pretrained model is exposed to a smaller, focused dataset and its parameters are further adjusted to perform well on a specific domain or task.

    Examples include medical models fine-tuned on clinical documentation, legal models fine-tuned on contract language, and coding models fine-tuned on source code repositories. The result is a model with improved performance for the targeted use case.

    Traditional fine-tuning updates large numbers of parameters and therefore requires meaningful infrastructure. Lighter-weight alternatives, such as Low-Rank Adaptation, have made fine-tuning accessible to a wider range of organizations.

    Concept 13

    Reinforcement Learning from Human Feedback (RLHF)

    Reinforcement Learning from Human Feedback, abbreviated as RLHF, is a training technique that aligns model behavior with human preferences. It is the primary reason that modern AI assistants feel helpful, safe, and conversational rather than merely fluent.

    The process involves presenting a prompt to the model, collecting multiple candidate responses, having human reviewers rank those responses, and then training the model to favor the kinds of responses that humans prefer. Repeated across many examples, this process instills preferences for clarity, helpfulness, honesty, and safety.

    Without RLHF, a large language model is still a capable text generator, but it is less reliable as an assistant and significantly more difficult to govern.

    Concept 14

    Low-Rank Adaptation (LoRA)

    Low-Rank Adaptation, commonly abbreviated as LoRA, is an efficient alternative to traditional fine-tuning. Rather than updating all of a model's parameters, LoRA freezes the base model and introduces a small number of additional trainable layers.

    The underlying insight is that most of the changes required for fine-tuning are relatively small and can be captured by these smaller adapter layers. This dramatically reduces the compute and storage requirements.

    LoRA has made fine-tuning feasible on consumer-grade hardware. It also allows organizations to maintain a single base model and swap in different adapters for different use cases, which has practical implications for cost management and deployment architecture.

    Concept 15

    Quantization

    Quantization reduces the numerical precision used to store model weights. A weight that requires 32 bits in full precision can often be reduced to 4 bits with limited loss of quality, producing a model that is approximately eight times smaller.

    This compression makes it possible to run capable models on commodity hardware, including laptops and mobile devices. Without quantization, larger models would remain confined to specialized data center environments.

    Quantization carries practical implications for both cost reduction and data residency. Organizations with strict data handling requirements may find that locally hosted, quantized models offer a viable alternative to cloud-based inference for certain use cases.

    Part 4

    How Real AI Systems Are Built

    This section covers the architectural patterns used to build production AI systems. The five concepts address how AI products combine language models with retrieval, search, autonomous action, structured reasoning, and image generation.

    Concept 16

    Retrieval-Augmented Generation (RAG)

    Retrieval-Augmented Generation, abbreviated as RAG, is an architectural pattern that addresses the hallucination problem by grounding model responses in retrieved source material.

    When a user submits a question, the system first searches a knowledge base for relevant documents. Those documents are then provided to the model as context, and the model generates a response that draws on the retrieved information rather than on memorized training data.

    The closed-book versus open-book analogy is useful. Without RAG, the model answers from memory. With RAG, the model consults verified sources. RAG also allows organizations to update model behavior simply by updating the underlying documents, without retraining. Most production AI systems used in regulated industries rely on some form of retrieval to manage accuracy and traceability.

    Concept 17

    Vector Databases

    Retrieval-augmented systems require the ability to search large document collections by meaning rather than by exact keyword match. Vector databases provide this capability.

    Each document is converted to an embedding and stored in the database. When a query arrives, it is also converted to an embedding, and the database returns documents whose embeddings are closest to the query embedding in vector space. This allows a query about "heart disease treatment" to return documents about "cardiac care protocols" even when there is no exact word overlap.

    Common vector databases include Pinecone, Qdrant, Weaviate, and the pgvector extension for PostgreSQL. Vector search is what enables AI systems to operate over the meaning of content rather than its literal text.

    Concept 18

    AI Agents

    An AI agent extends a language model with the ability to take actions and pursue goals. Whereas a conventional model responds to a single message, an agent operates in a continuous loop of thinking, acting, observing results, and adjusting its approach.

    A coding agent assigned a defect might read the issue description, examine relevant source files, formulate a hypothesis, propose a code change, execute the test suite, evaluate the results, and iterate until the issue is resolved. The model functions as the reasoning component, while tools provide the means to interact with external systems.

    Common tools available to agents include web search, code execution, file system access, API calls, scheduling systems, and databases. Agents transform AI from a question-answering interface into a workflow participant. From a security perspective, agents introduce significant new considerations related to authorization, auditability, and least privilege, which warrant deliberate governance before deployment.

    Concept 19

    Chain of Thought

    Chain-of-thought prompting is a technique that improves the accuracy of model output on complex problems by directing the model to reason explicitly through intermediate steps before producing a final answer.

    For mathematical, logical, or multi-step questions, prompting a model to provide its reasoning produces more reliable results than asking only for the final answer. Phrases such as "think step by step" or "reason through this carefully" are sufficient to elicit this behavior in most modern models.

    The technique reflects a broader principle. Providing a model with structured space to work through a problem typically yields better results than demanding an immediate response.

    Concept 20

    Diffusion Models

    Diffusion models are the architecture behind most modern AI image generation systems. The training process is counterintuitive. The model does not learn to draw. It learns to remove noise.

    During training, the model is shown real images that have been progressively corrupted with random noise. It is taught to reverse this corruption step by step. During generation, the model begins with pure random noise and progressively refines it into an image, guided by a text prompt.

    The name reflects the underlying mathematical concept, in which particles diffuse randomly through a medium. The model learns to reverse this diffusion. The same architecture also underpins video generation systems such as Sora and Runway, and is being applied to audio, three-dimensional content, and the design of novel molecules for pharmaceutical research.

    Summary

    The 20 AI Concepts at a Glance

    How AI Works

    • 1. Neural Networks
    • 2. Tokenization
    • 3. Embeddings
    • 4. Attention
    • 5. Transformers

    How LLMs Work

    • 6. Large Language Models (LLMs)
    • 7. What Is a Context Window?
    • 8. Temperature
    • 9. Hallucination
    • 10. Prompt Engineering

    How Models Improve

    • 11. Transfer Learning
    • 12. Fine-Tuning
    • 13. Reinforcement Learning from Human Feedback (RLHF)
    • 14. Low-Rank Adaptation (LoRA)
    • 15. Quantization

    How Real Systems Are Built

    • 16. Retrieval-Augmented Generation (RAG)
    • 17. Vector Databases
    • 18. AI Agents
    • 19. Chain of Thought
    • 20. Diffusion Models
    Next Steps

    Where to Go From Here

    Now that you have a working mental model of how AI works, the next step is putting it into practice.

    Want Help Rolling Out AI Across Your Organization?

    Defensible's AI Readiness Assessment evaluates how your team is using AI today, where the risks live, and where AI can actually deliver business value. Practical, fast, and grounded in security best practices.

    Defensible's broader AI advisory practice combines policy development, risk assessment, technical safeguards, and ongoing monitoring to support both productivity objectives and compliance requirements. Engagements are aligned to NIST AI RMF, NIST CSF, SOC 2, and other applicable frameworks.