BaZi · Blog

AI Chart Calculation: Rule-Based Conversion to Four Pillars

Deep Oracle Practitioner Desk · 2026-09-19 · 6 min read

AI排盘 refers to a computational pipeline in which a natal chart is produced by deterministic calendrical conversion, after which a language model may be used to turn the chart into readable interpretation. The term combines the Chinese word for charting a horoscope, 排盘, with the prefix AI. In this setting, AI does not mean that the chart itself is generated probabilistically; the chart is produced by rules. The language model enters only at the stage of exposition and arrangement.

排盘这件事为什么是确定性的

排盘 is best understood as a set of calendrical conversions. The procedure takes a Gregorian date and clock time and converts them into four pairs of cyclical characters: one pair for the year, one for the month, one for the day, and one for the hour. These are the four pillars, expressed in 干支 notation. Each step of this conversion has a fixed rule. Given the same input, the same output is produced. There is no sampling step, no temperature setting, and no variation across runs. The engine does not infer the chart; it computes it.

This determinism matters because the four pillars are the substrate for every later reading in this system. If the underlying conversion were unstable, then the same birth data could yield different pillars at different times, and any subsequent reading would rest on an unfixed base. Instead, the calendrical layer is closed. The rules may differ between schools in minor technical respects, but within the engine they are fixed. That is what allows the rest of the pipeline to be checked.

引擎负责的六项输出

The engine in this system is responsible for six categories of output. First, it produces the four pillars: the year, month, day, and hour 干支. Second, it calculates the distribution of the five phases, or 五行, across the chart. Third, it derives the hidden stems within the earthly branches, known as 地支藏干. Fourth, it annotates the ten gods, or 十神, that arise from the relation between the day master and the other stems. Fifth, it identifies the interactions among the earthly branches: punishment, clash, combination, and harm, collectively referred to as 刑冲合害. Sixth, it generates the sequence of major luck periods and annual influences, known as 大运 and 流年.

These six outputs form the complete machine-generated portion of the chart. They are not interpretive prose. They are structured data: characters, labels, categories, and sequences. All of them can be reproduced exactly from the same birth data. The language model does not contribute to any of these six items. Its role begins only after this structured output exists.

语言模型负责的两项工作

The language model has a limited role in this pipeline. It is responsible for two things. The first is to render technical terms into readable sentences. A chart may contain a set of 十神 labels or a list of branch interactions, but those labels are not yet an explanation. The model converts them into connected prose that a reader can follow. The second task is to arrange multiple conclusions into an ordered piece of text. A chart can contain many observations at once, and the model organizes them so that one point follows another rather than appearing as an undifferentiated list.

The model does not perform the calendrical conversion. It does not compute hidden stems. It does not determine 大运. It does not decide whether two branches clash or combine. Those tasks belong to the engine. The model only explains and sequences what the engine has already produced.

中间那一层谁来对账

Between the engine and the final text there is a reconciliation layer. This layer is not a separate software component with a formal name; it is a checking step that can be performed by an editor, a validator, or even a second pass by the language model under instruction. The principle is simple: every 干支 character and every 十神 label that appears in the written interpretation should be traceable to the same character or label in the engine output.

If the model writes that the year pillar is 甲子, then the engine output should contain 甲子 as the year pillar. If the model says that the day master is 丙, then the engine output should show 丙 as the day stem. If the model says that two branches form a 六合 pair, then that pair should appear in the engine’s list of combinations. The reconciliation layer exists to catch any mismatch between the prose and the structured chart.

两者搭配时的失败点

The most common failure point in this combination is that the model, while interpreting the chart, quietly reconstructs the four pillars itself. Instead of reading the pillars from the engine output, it runs its own conversion or fills in a plausible set of pillars, then writes its interpretation on top of that self-generated result. The prose may remain fluent, and the terminology may remain correct in form, but the chart underneath has been replaced.

This happens because the model is capable of producing 干支 text even when it is not given the engine output explicitly. If the prompt contains only the birth date and time, the model may attempt to perform the conversion internally. It may then produce a chart that differs from the engine’s chart. The interpretation is then internally consistent with the model’s own pillars, but inconsistent with the engine’s pillars. The reader may not notice the discrepancy unless the two are placed side by side.

The safeguard is to include the full chart in the prompt and to instruct the model not to recompute it. The complete chart means the four pillars, the five-phase distribution, the hidden stems, the 十神 labels, the branch interactions, and the 大运 and 流年 sequences as produced by the engine. When these are pasted into the prompt, the model has no need to reconstruct anything. The instruction not to recompute the pillars reinforces that boundary. If the model nevertheless produces a different pillar, the mismatch becomes visible in the reconciliation step.

Deterministic calculation is valuable not because it is more intelligent than a probabilistic model, but because it can be checked. A language model may produce a fluent and plausible reading, but fluency is not the same as fidelity to the chart. The engine’s output can be audited item by item. Any character can be compared with the source. Any label can be verified against the structured list. This is the reason for keeping the computational layer separate from the interpretive layer. The interpretation may vary in style, but the chart itself remains fixed and recheckable.

AI Chart Calculation: Rule-Based Conversion to Four Pillars