It's Not a Function — A Statistical Account of Why AI Doesn't Repeat Itself

Three SSL renewals across three sites yielded three different procedural recipes from the same model. Why this isn't a bug but a property of the architecture — examined through probability, information theory, and the numerics of GPU matmuls.

Three sampled trajectories diverging from a shared origin on a coordinate grid — visualising how identical LLM inputs sample different outputs from one distribution.

I host three small sites. Earlier this week, all three SSL certificates needed renewing within the same hour, and I did what one does in 2026: I opened three tabs of the same model, pasted the same one-line description of the task — "renew the SSL on this Hostinger-backed Nginx VPS, here are the credentials" — and let three independent sessions go to work.

Three sessions. One model. Identical prompts. Three completely different procedural flows.

The first session insisted I run certbot --nginx interactively on the box and then walked me through an eight-step verification dance. The second session generated a CSR locally, asked me to paste the certificate body back into the chat, and proposed I drop it into /etc/ssl/certs/somecert.cert. The third session — same model, same week — used acme.sh, named the file somecert.pem, and configured a cron job for auto-renewal that the other two never mentioned. All three jobs ended in working HTTPS. None of the three paths agreed on anything else: not the tool, not the file extension, not even who was doing what.

If your first instinct is "the AI is unreliable," you have the wrong mental model. The AI is doing exactly what it was built to do. The model your instinct came from — that the same input should yield the same output — is borrowed from classical software, and it does not survive contact with the actual mathematical object you are talking to.

This article is about what that object actually is.

It is not a bug. It is the architecture. Asking an LLM to repeat itself is asking a probability distribution to behave like a function.


§1 — Definition: The Function That Wasn't

In undergraduate mathematics, a function $f : X \to Y$ is a relation that assigns to each $x \in X$ exactly one $y \in Y$. Single-valued. Deterministic. The same input maps to the same output, every time, by definition.

When you wrote your first line of code — print("hello") — and got hello back, every time, you were operating inside this paradigm. Forty years of software engineering culture (testing, CI, "if it worked yesterday it will work today") rests on it. Bugs, in classical software, are deviations from this single-valuedness; they are violations of the function contract.

A modern LLM is not a function in this sense. It is a conditional probability distribution over output sequences:

$$y \sim p_\theta(y \mid x), \quad y = (y_1, y_2, \ldots, y_n), \; y_t \in \mathcal{V}$$

where $\mathcal{V}$ is the vocabulary, $\theta$ are the model parameters (weights), and the symbol $\sim$ denotes that $y$ is drawn from the distribution, not equal to it. What you receive when you "call the model" is not $p_\theta$ itself. It is a single sample. A draw. One realisation of a random variable whose entropy

$$H(Y \mid X = x) = -\sum_{y} p_\theta(y \mid x) \log p_\theta(y \mid x)$$

is, in any non-trivial case, strictly positive.

The model does not return an answer. It returns a sample. The distinction is the entire article.

The SSL story is, in this light, banal. Three samples from $p_\theta(\cdot \mid \text{"renew SSL on Nginx VPS"})$ landed at three different but high-probability points of a high-entropy posterior. They had to. The posterior contains every plausible procedural flow weighted by training-set frequency and reinforcement-learning preference; sampling picks one each time.

You do not have a contract with $f$. You have a contract with $p$.


§2 — The Distribution

To sharpen the picture, expand the joint probability autoregressively:

$$p_\theta(y_1, y_2, \ldots, y_n \mid x) = \prod_{t=1}^{n} p_\theta(y_t \mid x, y_{

At each timestep $t$, the model emits a logit vector $z_t \in \mathbb{R}^{|\mathcal{V}|}$ (the pre-softmax activations of the final linear layer), which is converted into a categorical distribution via the temperature-scaled softmax:

$$p_\theta(y_t = v \mid x, y_{

The decoding algorithm then samples — or in some special cases picks the argmax of — this distribution to produce $y_t$. The chosen token is appended, the model conditions on it, the next $z_{t+1}$ is computed, and the loop runs to completion.

Two structural facts follow.

Fact 1: The output is a trajectory, not a point. Each generation is a path through a tree where every node is a probability simplex over $\mathcal{V}$. The tree has branching factor $|\mathcal{V}| \approx 10^5$. Two trajectories that diverge at $t=3$ may rejoin in semantic content but never in literal token sequence — the cardinality of the leaf set is, for any non-trivial $n$, astronomical.

Fact 2: Divergence compounds. Suppose two runs produce identical tokens for the first $k$ steps. The probability that they continue to agree at step $k+1$ is $\sum_v p(v)^2$ — the Rényi entropy exponential, which for a typical mid-stream distribution is well below $1$. Disagreement at any single step rewrites the conditioning context for every step that follows. This is, in dynamical-systems terminology, sensitive dependence on initial conditions: a one-token perturbation in early position will, with very high probability, produce a globally different trajectory.

The model has not "made a different choice." It has walked a different path through the same forest. Both paths were always there.

From theory to product.

Build with the math, not against it.

Live, instructor-led cohorts on AI engineering, Python for AI, and LLM APIs — including the production engineering needed to ship reliable systems on top of stochastic models.

Flagship Course

AI Engineering

₹49,999

One-time payment  ·  No subscription

  • Live instructor-led sessions
  • 8 hands-on projects
  • Lifetime access to recordings
  • Certificate of completion
  • Private Discord community
VIEW COURSE →

Capsule Course

Python for AI

₹14,999

One-time payment  ·  No subscription

  • Live instructor-led sessions
  • 7 hands-on projects
  • Lifetime access to recordings
  • Certificate of completion
  • Private Discord community
VIEW COURSE →

Capsule Course

LLM APIs

₹14,999

One-time payment  ·  No subscription

  • Live instructor-led sessions
  • 15 hands-on projects
  • Lifetime access to recordings
  • Certificate of completion
  • Private Discord community
VIEW COURSE →
● LIVE COHORTS● CERTIFICATE OF COMPLETION● PRIVATE DISCORD COMMUNITY● 1-ON-1 MENTORING

Disclaimer

This article uses standard notation from probability theory, information theory, numerical analysis, and the deep-learning literature. Where conventions differ across communities, I have chosen the most common form and named it explicitly. The math is simplified for narrative — production transformer architectures contain layer normalisation, residual connections, attention-with-causal-masking, and many more sources of compounded numerical error than fit in a single essay.

Statements about specific commercial systems' use of MoE routing, speculative decoding, and serving heterogeneity are based on publicly available technical reports, model cards, and architecture papers. Implementations evolve; specific claims should be checked against the relevant provider's current documentation before being relied upon for procurement or compliance decisions.

Nothing in this article is investment, legal, security, or operational advice. Examples — including the SSL renewal anecdote — are illustrative; do not generalise from a single workflow to a recommendation about your own production systems without independent review.

The author writes about AI engineering and adjacent topics; views expressed are personal and reflect the state of the field at the time of writing. The mathematics, however, is older and less likely to date.