How AI Models Make Decisions
Every time an AI model picks a word, classifies an image, or rejects a request, it runs millions of mathematical operations in milliseconds. It doesn't guess, it doesn't rely on intuition, and it doesn't "think" the way a human does. It operates on probabilities learned from data. Understanding that mechanism isn't a minor technical detail — it's the foundation for building AI products that are reliable, predictable, and useful.
The Core of the Process: Probability Over Possibilities
The central question any modern AI model answers isn't "What is the correct answer?" — it's "What is the most likely option given this context?"
That distinction changes everything.
A language model like GPT-4 or Claude 3.5 doesn't store pre-built answers. Instead, it holds billions of numerical parameters (weights) that, combined with the input text, produce a probability distribution across every possible word in the vocabulary. The word with the highest probability — or a sample drawn from the most probable options — becomes the next generated token.
Concrete example: if the input is "The capital of France is", the model assigns a probability of ~99% to "Paris," ~0.3% to "Lyon," ~0.1% to "Berlin," and so on. The system selects based on that distribution. This is exactly why models can "hallucinate": if the training data contained incorrect patterns at high frequency, the model reproduces them with confidence.
How Those Weights Are Formed: Training
Weights aren't programmed manually. They're learned by iterating over massive volumes of data through a process called backpropagation:
- The model makes a prediction.
- That prediction is compared to the expected answer (loss function).
- The error is propagated backward through the neural network.
- The weights are nudged by a small fraction to reduce that error.
- This repeats billions of times.
GPT-4 was trained on approximately 13 trillion tokens. Each weight adjustment is tiny — on the order of 0.001 — but accumulated at massive scale, they produce a model capable of reasoning, translating, and generating code.
The Role of RLHF in Decision-Making
Modern language models aren't trained on text alone: they go through an additional stage called Reinforcement Learning from Human Feedback (RLHF). Human evaluators rate different model responses, and those ratings guide a fine-tuning process that aligns the model's behavior with human preferences — being more helpful, safer, and less harmful.
This is why ChatGPT refuses to generate certain content: it isn't an explicit code rule. It's a weight pattern that makes that refusal more probable than the harmful response.
How AI Makes Decisions in Real Time
When a model receives a prompt in production, the process unfolds across several layers:
1. Input Tokenization
The text is broken into tokens (word fragments or characters). "Intelligence" may be 1 or 2 tokens depending on the model. Each token has a unique numeric ID.
2. Positional Encoding and Embeddings
Each token is transformed into a high-dimensional vector (embedding) that captures its semantic meaning. Its position in the sequence is also encoded, because order matters.
3. Attention
The multi-head attention mechanism allows each token to "observe" every other token in the context and weigh how much each one should influence its representation. This is where the model understands that in "the bank where I sat down", the word "bank" refers to a bench, not a financial institution.
4. Transformation Layers
The sequence passes through dozens of transformation layers (GPT-4 has ~96 layers). Each layer refines the representation until the model has enough context to produce an output.
5. Decoding and Sampling
The model generates a probability distribution over the vocabulary and selects the next token. Parameters like temperature (0 = deterministic, 1 = creative) and top-p control how conservative or exploratory that selection is.
Decisions in AI Agents: Beyond Text Completion
A language model that only generates text is one piece of the puzzle. An AI agent makes more complex decisions because it can:
- Call tools (APIs, databases, search engines).
- Plan across multiple steps using frameworks like ReAct or Chain-of-Thought.
- Evaluate its own responses before sending them.
- Retrieve external context through RAG (Retrieval-Augmented Generation).
Example: A Customer Service Agent
An agent managing returns doesn't just generate text. When a user says "I want to return my order #4521", the agent:
- Identifies the intent (return) with high probability.
- Calls the order system API to verify the order.
- Evaluates whether it meets the return policy (logic + data).
- Generates a personalized response and, if applicable, executes the return.
- Logs the interaction in the CRM.
Each step involves a probabilistic model decision combined with deterministic logic from the surrounding system. The architecture matters just as much as the model.
Real Limitations of the Decision-Making Process
Understanding how AI makes decisions also means knowing its limits:
- Knowledge cutoff date: models don't update their knowledge in real time (unless they have search tools).
- Hallucinations: the model can generate incorrect facts with high confidence because linguistic coherence and factual accuracy are separate objectives.
- Prompt sensitivity: small changes in phrasing can produce very different responses, because context shifts the probability distribution.
- Finite context window: models can only "see" a limited number of tokens at a time (128K in GPT-4o, for example). Anything outside that window doesn't exist for the model.
- No persistent memory by default: every conversation starts from scratch unless explicit memory is implemented in the architecture.
These limitations aren't bugs to be fixed in the next release — they're structural consequences of the current design. A team building software on top of AI needs to design around them.
Why This Matters for Product Builders
Understanding how a model makes decisions changes how you design an AI product:
- Prompt engineering isn't magic: it's context engineering. Giving the model the right context in the right format measurably improves the quality of its decisions.
- Validation is still the system's responsibility: the model produces probabilities; the system decides what to do with them. A fraud classifier with 94% accuracy still needs an exception-handling flow.
- Fine-tuning changes baseline behavior: adjusting a model with your own data redirects its weights toward your company's specific domain, producing more accurate decisions in that context.
- Agent architecture defines the quality ceiling: a great model with a poor architecture delivers worse results than an average model that's well orchestrated.
At Catalizadora, we build AI-native software where these architecture decisions are defined from day one. In our Core program (12 weeks), clients finish with their own AI system — source code included, no recurring licenses. This isn't about wiring a chatbot to an API: it's about designing how the model will make decisions inside a real product.
Summary: The Five Variables That Govern Every Decision
| Variable | What It Controls |
|---|---|
| Model weights | Knowledge and biases learned during training |
| Context (prompt) | What information is available at decision time |
| Temperature / top-p | How much variability is allowed in the selection |
| Available tools | Whether the agent can query external data or execute actions |
| System architecture | How the model is orchestrated within the product |
None of these variables are fixed. All of them are design decisions.
What Comes Next: Building on Solid Foundations
Understanding how AI makes decisions is the first step. The second is designing systems where those decisions are auditable, improvable, and aligned with business objectives.
If you're evaluating how to integrate AI into a product or process, don't start with the model — start with the decision flow you want to automate, the data you have, and the consequences of an error.
Want to see how we apply these principles in real projects? Read the Catalizadora manifesto and learn how we think about AI-native software → /manifiesto