A common source of anxiety regarding AI is the feeling that it is “magical” or “human-like.” When you interact with tools like ChatGPT, it feels conversational, and asking the same question twice yields different results. But these tools are not magic, they are mathematical systems, and at a very high level they operate like the functions you learned in high school algebra.
To review from high school, a linear function takes an input, applies a set of rules to that input, and produces an output.
If we have our function, f(x) = x + 2
If we pass in 1, we receive 3
If we pass in 3, we receive 5
and so on…
We can also write a function that takes in text and modifies it.
If we have a function, f(text) = text + ” AI isn’t too scary”
If we pass in “Don’t worry”, the output will be “Don’t worry AI isn’t too scary”
If we pass in “Hey kids!”, the output will be “Hey kids! AI isn’t too scary”
If we pass in nonsense like “jkldsfakladjsfs” the output will be “jkldsfakladjsfs AI isn’t too scary”.
Let’s talk about how this applies to one example of AI technology, a Large Language Model (LLM). We can think of an LLM as a much larger, mind-boggling complex function. It takes in a sequence of text as an input and outputs different text.
Let’s say we build a really simple LLM that completes sentences about cats. For now, let’s assume that the LLM always chooses the most likely next word. If we pass in “The cat..”, then it returns “The cat sat”. If you pass in “The cat…” again, under absolutely identical execution conditions*, it would still return “The cat sat”. Just like we know when we input the number 10 to our addition function above, we’ll always receive 12 as output, passing “The cat…” into our very simple LLM would always result in “The cat sat” as output.
So why then don’t we observe the same output to a repeated prompt in ChatGPT?
First of all, ChatGPT is not an LLM. It is a software application that wraps around an LLM. It intercepts your input before passing it to the LLM and adds an enormous amount of other information to it.
The ChatGPT program can pass in hundreds of other inputs that affect the outcome, using values and extra inputs that change by the second. For example, it could pass back text you submitted on a previous exchange as a way to simulate conversational memory (“context”), other documents, timestamps, and what the randomness of the response should be. Let’s say you typed in “Why do I have purple spots on your arm and it’s itchy?”
What you think you submitted to the LLM:
“Why do I have purple spots on my arm and it’s itchy?”
What actually got submitted:
“The user asked ‘Why do I have purple spots on my arm and it’s itchy?’ This appears to be a medical question. Respond in a concerned tone, be sure to include medical boilerplate warning that this is not a medical service. Known facts about user: 40; male?; disposition: nervous-attachment, hypochondriac; address: 1038 Grizzly Bear St, Berkeley; known medical: might have visited a proctologist on 6/18/2026; In a previous submission, the user asked questions about where to hike in Berkeley.”
LLMs also have a “temperature” setting which is another knob that ChatGPT can adjust without your knowledge. (An actual LLM “function” can accept more than one input. Instead of simply f(x), now we have f(x,y)). Temperature is a setting that controls the randomness of an LLM’s response. When we pass “The cat…” into our LLM, it actually surfaces multiple possible next words: for example, “sat,” the most commonly used word, or “napped,” which it considers less likely. The LLM is designed to “roll the dice” to select the next word, and the weight of the dice is controlled by the temperature. If the temperature is set to 0, the dice are loaded completely with the most likely word–the most conservative choice (in the earlier example I had quietly assumed temperature was 0). On the other hand, as you crank the temperature above 0, the dice become increasingly fair across all options: the possibility of a more unconventional or creative response increases.
If we strip ChatGPT entirely out of the picture, get down to the naked LLM, and set the LLM’s temperature to 0, then we can expect a given input to result in the same output..with a caveat that I hinted at above*. An LLM’s output for any given input is predictable so long as the “environment” running the LLM’s logic stays identical between executions, which, currently, is practically impossible in order to make these programs possible. At a high level, in a computer, math operations are bundled together in variable patterns depending on the other requests/traffic the computer is simultaneously responding to. For known reasons, this results in slight variations in the calculated values. As you can imagine, tiny variations to the output of intermediary math calculations compound throughout the running of the enormously large LLM function. Back to high school: if you’re solving a large problem on your math test, one difference in your arithmetic at the beginning of the problem changes all of your subsequent calculations.
So is AI magical, unpredictable, all-knowing? In this essay we examined LLMs, one category of AI technology, and our assessment is NO. They’re designed to incorporate randomness, but that’s a setting, “temperature,” we can control. Similarly, another source of variation is caused by known mechanisms: the computer bundles math operations in variable ways depending on traffic resulting in slightly different outputs, another factor we could theoretically control. And finally, and probably most importantly, we have untangled ChatGPT from LLMs: ChatGPT is a useful app that wraps an LLM to facilitate the illusion of continuous human interaction, but is not an LLM itself.
Leave a Reply