Two years ago, a friend dragged me to a BaZi reading. The practitioner spent ten minutes doing hand calculations from my birth time, then said something uncomfortably specific about how I work better with mentors around than fighting alone.
That got me curious. So I did what any developer does: I tried to automate it.
My first attempt was the obvious one — I fed my birth date into a large language model and asked for a BaZi analysis. The output was confident, fluent, and wrong. Run it twice and you get two different charts. That's when I realized the core problem: BaZi chart calculation is deterministic math, and probability models are the wrong tool for it. Same input must produce the exact same output, every time.
So I rebuilt it as two separate layers.
Layer 1: a rule engine, not AI
The chart itself — converting your birth year, month, day, and hour into the Four Pillars of eight characters, then deriving Five Elements balance, Ten Gods relationships, and 10-year luck cycles — is pure calendar astronomy with fixed rules. Input determined, output determined. No judgment involved.
Sounds simple until you dig in. The month pillar switches exactly at solar terms, down to the minute. Birth time needs true solar time correction for your longitude. Different schools weight the hidden stems differently. Getting the calculation to zero-error quietly eliminates most attempts at this — and honestly, it was the longest stretch of if-else I've ever written.
Layer 2: AI as translator, not fortune teller
This is the part most "AI fortune telling" products get wrong. They let the model generate the analysis directly. I use it only for language translation.
Traditional BaZi speaks in thousands of classical verdicts. Nobody under forty understands them. "Shen Ruo Yong Yin" literally means "Weak Day Master, using the Resource star" — meaningless to normal people. But translated, it says: you grow faster in environments with mentorship and senior support. "Shi Shang Sheng Cai" becomes: your creativity and expression are your main income engine.
That translation layer is where the LLM finally earns its place. It needs to understand both the precise meaning of the traditional term and its mapping onto modern life situations. Get it right and users don't need to learn a single concept of Chinese metaphysics to read their own chart.
The hard part nobody warns you about: conflicting schools
BaZi is not one unified system. The Pattern school and the Strength-Weakness school can look at the exact same chart and reach opposite conclusions. This isn't a matter of one being wrong — it's a choice of framework.
An AI can't decide who's right, because there's no fact of the matter. I ended up making the school selection explicit and consistent instead of blending everything into a mushy average. Hard-won lesson: users notice the mush immediately.
How to test if any BaZi tool is real
Change the birth time and recalculate. If the analysis barely changes, it's template text dressed up as computation. If the reading follows the chart, there's a real engine underneath.
The thing I built lives at askingming.com — chart calculation runs on the rule engine described above, and the interpretation layer translates every traditional term into plain psychological language.
Being honest about the limits
The interpretation layer of BaZi has never been validated by controlled studies. Treat it as a pattern-recognition framework for self-exploration, not a crystal ball. It shows tendencies, not certainties — it will never tell you "you'll meet your spouse on a Tuesday in March."
And one thing AI still can't do: a practitioner with thirty years of life experience can pick up on things in conversation that no chart shows. AI has no lived experience. What it can do is systematize the existing rules so anyone can read them.
If you're curious how your own chart translates, try it free at askingming.com — enter your birth time and see whether the patterns resonate with your experience. I'd genuinely like to know if they do.
Top comments (1)
I really appreciate the choice to keep the rule engine and LLM separate. It is really easy to skip that sort of boundary when the model can “just do everything,” but it gives you something much easier to test and reason about.
I would say keep pushing that idea: whenever a result can be deterministic, let the code own it but let the model explain it.
This tends to make AI products a lot more trustworthy.