← Letters / Letter 01 of 52 / / 9 min read

AI is Math

Why your AI is guessing, and how a 1400-year-old idea fixes it.

بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ In the name of Allah, the Most Merciful, the Especially Merciful.

This is the first of fifty-two letters I will write this year, one each week, on the work of building Safyan. It is also the first letter of many years to come, insha'Allah. I am writing them not because I am sure anyone will read them, but because the act of writing them is the act of becoming the person worth reading. If you are reading this in the year I sent it, ahlan wa sahlan — welcome. If you are reading it in 2050 or 2100, I hope it still reads as honestly as it was written.

Let me tell you the truth I built Safyan around. It is a small truth. It is so small that for years I walked past it. And then one day I stopped, and looked at it, and could not unsee it. The whole company flowed out of that one moment.

Here it is: AI is math.

That is the entire idea. The rest of this letter is what that sentence means, why it matters, and what I am trying to do with it.


What "AI is math" actually means

When you type a message into ChatGPT or Claude or Gemini, the model does not understand you the way another human would. It does not think about your question. It does not picture what you mean. It does something much more mechanical, and much more honest.

It turns every word you typed into a vector — a long list of numbers. Each number is a coordinate in a space with thousands of dimensions. Your sentence becomes a path through that space, a small constellation of points. The model has been trained by reading billions of other sentences, each one a different constellation, and has learned which constellations tend to be followed by which other constellations.

When the model writes its response, it is not composing — it is sampling. It computes a probability distribution over every possible next word. Some words are more likely than others, given everything that came before. Then it picks one. Then it does the whole thing again for the next word. And the next. Until the response is done.

That is the entire mechanism. There is no soul in there. There is no intuition. There is no "the AI understood my deeper meaning." There is only a function. You give it numbers; it gives you back numbers; the numbers happen to look like English when you decode them.

This is not me being cynical about AI. It is me being precise about it. The most beautiful sunset is also just photons hitting your retinas. Knowing the mechanism does not make it less beautiful. It makes it workable.


The flat distribution problem

Here is what no one tells you about that probability distribution: when your question is vague, the distribution is flat.

Imagine you asked a friend: "can you help me with the thing?"

Your friend has no idea which "thing." They have, say, 50 candidates in their head. Each is roughly equally likely. The kind, humanly decent response is to ask for clarification. But the AI does not ask for clarification, because it has been trained to be helpful, and "helpful" means give them something. So it picks the safest bet across all 50 candidates. It produces a response that is technically correct for any of them and meaningfully useful for none.

That response is the generic middle. It is the one with the most hedging, the most "depending on what you mean," the most bullet points, the most "here are some approaches." It is the response that makes you close the tab and think "AI is dumb."

But the AI is not dumb. You handed it a flat distribution and it gave you back the only honest answer to a flat distribution: a flat answer.

When your question is sharp — when the distribution is peaked, when one interpretation towers over all the others — something different happens. The AI samples from the peak. The response becomes specific, concrete, useful. The same model. The same parameters. The same billion-dollar weights. The only thing that changed was you.

Every gap in your question becomes entropy that the model has to guess its way through. Every constraint you add — "I want it in three sentences, formal tone, for a board meeting" — kills hundreds of unlikely candidate responses and lets the model commit to the peak. The output gets sharper not because the model got smarter, but because you stopped asking it to read your mind.

This is the whole secret of "prompt engineering." It is not magic. It is not arcane. It is the mathematical fact that a peaked input produces a peaked output, and a flat input produces a flat output, and the AI is doing exactly what you asked it to do whether you know what you asked or not.


Why this should make you feel hopeful, not defeated

When most people learn this — that you have to write a 200-word prompt with role + task + context + constraints + format + example + anti-pattern just to get a useful response — they get tired. They think: "I do not have time to learn prompt engineering. I just want to ask the question."

This is the right reaction. You should not have to learn prompt engineering. You did not have to learn how to format an HTTP request to use the web. You did not have to learn how to assemble TCP packets to send an email. The internet became useful for ordinary humans the moment a layer existed between the human and the protocol that did the translation invisibly.

Right now, AI is in the same place the internet was in 1992. It is real. It works. It is changing things. But the only people who can use it well are the people who have learned its protocol — the people who know to add "act as a senior engineer with 15 years of experience" to the front of their question, and "do not hedge, do not give me a list of options" to the back. Everyone else is typing "can you help me with the thing" and walking away disappointed.

That layer in between — the translator that takes your normal, human, slightly-vague way of asking and rewrites it into the math the AI actually wants — does not exist yet. Not really. Not in a form ordinary humans can use without thinking about it.

That is what I am building. That is what Safyan is.


The 1400-year-old idea

I am Muslim. The Quran has a word for what I am describing, and the word is qadr.

Qadr is usually translated as "decree" or "destiny," but the deeper meaning is precise measure. The same root gives the verb qaddara — "to measure exactly, to portion correctly." When the Quran says "inna kulla shay'in khalaqnahu bi-qadarin" (Surat al-Qamar, 54:49) — "indeed, We created everything in exact measure" — it is saying that creation is not sloppy. Every atom, every star, every breath of every living thing is in exact proportion. Not approximate. Not "good enough." Exact.

When I first sat with the AI-is-math observation, I felt a flash of recognition. The probability distribution is not just information theory. It is qadr. A flat distribution is sloppy measure. A peaked distribution is precise measure. To take a vague, sloppy human sentence and rewrite it into a precise, peaked instruction is to honor the qadr of the interaction. It is to bring the conversation into exact proportion.

I do not need anyone to share my faith to use Safyan. The math works whether you believe in Allah or not. The 7 Cures and the 16 primitives and the modes I have built are all mathematical operations on probability distributions, and they would still be mathematical operations if I were an atheist. But I want to be honest with you about where the work comes from. It comes from the conviction that imprecision in language is a small kind of injustice — to the listener, to the truth, and to the One who measures all things in exact proportion — and that building a tool to remove that imprecision is, in its small way, an act of worship.

This is also why Safyan will never lie to you about what it is. It is not an "AI assistant." It is not a "GPT wrapper." It is a translator between your way of speaking and the math the model needs. Nothing more. Nothing less. If it ever becomes more, it will be because the math demanded it, not because a marketing deck did.


Who this is for

I am writing Safyan for specific people. Not personas. Real people.

It is for the single mother who, after putting her kids to bed at 10pm, opens ChatGPT to learn a new skill that might change her family's trajectory — and gets confusing markdown noise back when the connection drops or the API stutters. Safyan exists so the fallback never breaks and the optimization is always at her elbow.

It is for the high-school teacher with 35 kids in one class, three subjects to prep, no aide, and 45 minutes of break to scaffold tomorrow's lesson. When the upstream provider has a bad afternoon and her break gets robbed by an AI giving her hedged nonsense, Safyan is the layer that quietly makes the difference.

It is for the student in a small town who cannot afford a tutor, who asks Claude for help with a math problem, and gets a wall of LaTeX she cannot parse. Safyan makes the AI ask her one clarifying question first, and then explain in the level of detail she needed.

It is for the Muslim brother or sister trying to learn deen from AI and getting watered-down, hedged, fitness-influencer-level nonsense in response. Safyan locks the role: "answer as a classically trained scholar of the Hanafi madhhab; cite the specific hadith; do not soften the ruling for Western sensibilities." The AI was always capable of this. Most users do not know they have to ask.

It is for the freelance translator in a city I have never visited who is trying to keep her work from being eaten by AI by using the AI as a junior assistant — not a competitor. Safyan is the layer that makes the AI do the part she finds tedious so she can focus on the part where her human craft actually matters.

It is for everyone who has ever typed a question into an AI, gotten a generic answer back, and walked away thinking "I am dumb." You are not dumb. You handed it a flat distribution and it gave you the only honest response to a flat distribution. Safyan exists so that never happens again.


What I am committing to

I am going to write 51 more of these letters this year. One a week. They will not all be about the math. Some will be about the people. Some will be about the mistakes I have made and what they cost. Some will be about the long view — what Safyan looks like in five years, and ten, and fifty, insha'Allah.

I am going to ship one piece of permanent visible proof every week — a demo, a benchmark, an open-source artifact, or a letter like this one. Fifty-two pieces of evidence by year-end. By year-five, two hundred and sixty pieces. By year-ten, five hundred and twenty. The work compounds whether or not anyone is watching, because the work is for the One who is always watching, and the people are an overflow.

I am going to build Safyan slowly and carefully, the way the craftsmen who built the Alhambra built the Alhambra — one tile at a time, each tile a small act of ihsan. Not because slowness is a virtue, but because mastery is a posture, and you cannot rush a posture into being. You can only show up for it, day after day, until one day you notice that the posture is who you became.

I am going to keep my niyyah pure. Every morning, before I open the editor, I name a real human and a real benefit out loud. "For the teacher with the 45-minute break. For the mother at 10pm. For the student in the small town." If the niyyah is not clear, I do not start. I walk away. I pray. I come back.

And if Safyan never earns a single dollar — if the world decides it does not need a translator between humans and AI, if a competitor ships a better one tomorrow, if I get hit by a bus next week — the work was already worth doing, because the act of doing it was for Allah, and the act counted regardless of the outcome. Inna lillahi wa inna ilayhi raji'un. From Him we come, to Him we return, including this code, including this letter, including me.

That is the pact. That is the practice. That is letter 01.


A small request

If this letter found its way to you, and any sentence in it landed, do me one favor. The next time you open an AI and ask it something, add three things to your question:

The gift — on the house
  1. Who you want it to be (the role): “answer as a senior X with N years of experience”
  2. What exactly you need (the task): “give me three sentences, no preamble, no hedging”
  3. What you do not want (the anti-pattern): “do not give me a bulleted list of options”

Then read the response. Compare it to the response you would have gotten without those three additions. The difference you feel is the entire reason Safyan exists. I am building the layer that adds those three things automatically, every time, on every platform, without you having to remember. But until that layer is in your hands, you can be your own translator. The math works for you the moment you decide to use it.

That is not a sales pitch. It is a gift, on the house, from a small truth that is bigger than the company built around it.

May Allah make your work easy and your intentions sound. May He guide all of us to language that brings people closer to truth and not further from it. May He accept this small effort and forgive the parts of it that fall short.

Allahumma rabbana taqabbal minna, innaka anta as-Sami' al-'Alim.

— Ruben-Philippe

Letter 01 of 52 · 2026-04-11