Evaluating LLMs in Traditional Chinese Divination Systems: Chart Generation and Pitfall Avoidance Guide
This article explores the evaluation and engineering practices for using Large Language Models (LLMs) in traditional Chinese divination systems, such as BaZi and Zi Wei Dou Shu. It highlights the risks of relying on LLMs for deterministic calendar conversions and rule-based charting, and introduces a structured evaluation framework with fixed inputs and a five-dimensional scoring system. The article also covers common error modes across four major divination systems, provides pseudocode for evaluation execution, and recommends a hybrid architecture combining rule engines with LLMs to ensure accuracy and reliability.
1. Problem Definition: Why Divination Scenarios Need Specialized Evaluation
Traditional Chinese divination systems are not simple natural language generation tasks; they are composite systems involving “calendar conversion + rule-based chart generation + interpretation generation.” Taking BaZi (Four Pillars of Destiny) as an example, the conversion of Heavenly Stems and Earthly Branches, solar term boundaries, destiny cycle start times, major luck cycles, and Ten Gods patterns all have explicit deterministic rules. Zi Wei Dou Shu (Purple Star Astrology) involves star placement, palaces, transformations, and decennial cycles. Mei Hua Yi Shu (Plum Blossom Numerology) involves hexagram casting methods, body/use generation and overcoming, and interconnected/changed hexagrams. Liu Yao (Six Lines Divination) involves Najia (adding stems to lines), line assignments, six relatives, moving and changing lines, empty lines, and month-breaking rules. While LLMs excel at language organization and contextual explanation, they carry inherent risks in deterministic calculation, rule version consistency, and reproducibility.
Common risks include: generating fluent explanations based on incorrect charts, resulting in an output that “sounds professional”; rule drift or misjudging Ten Gods across multiple calls with the same input; mixing rules from different divination systems; and making overly absolute conclusions for scenarios like career or health. Therefore, LLM evaluation in divination scenarios cannot merely check if the answer “looks right.” It must be decomposed into a verifiable chart layer, an auditable logic layer, and an evaluable interpretation layer.
2. Evaluation Design: Fixed Inputs and Five-Dimensional Scoring
To ensure reproducibility, evaluations should unify input samples, query templates, and inference configurations. For instance, use a fixed technical sample like “1990-05-15 10:00” and a standardized query: “Analyze my career prospects this year using [Divination System].” On the inference side, fix the model version, temperature, and maximum output length; disable internet access and external tool calls; and use a fixed system prompt to eliminate random factors. Boundary cases, such as those occurring at midnight, around solar terms, or during leap months, should have dedicated test sets.
It is recommended to adopt a five-dimensional scoring system:
| Dimension | Focus | Validation Method |
|---|---|---|
| Chart Accuracy | Whether stems/branches, solar terms, major cycles, star placements, and hexagram assembly match golden standards | Rule engine item-by-item comparison |
| Logic Rigor | Whether the derivation chain is complete and rule references are self-consistent | Manual spot check + consistency judgment |
| Interpretation Applicability | Whether the output can be mapped to workplace, education, and collaboration scenarios | Scenario-based scoring |
| Error Rate | Proportion of factual errors, rule errors, and self-contradictions | Error classification statistics |
| Scenario Fit | Relevance to questions regarding career, study, and cooperation | Double-blind review |
Execution should include dynamic retesting (multiple calls for the same input to observe chart and conclusion stability), perturbation testing (paraphrasing queries to see if the core chart remains consistent), and boundary testing (solar term transitions, leap months, true solar time, midnight day changes). A system with high single-pass accuracy but obvious drift in retests should not be considered qualified.
3. Four Major Divination Systems and Common Error Modes
3.1 BaZi (Four Pillars of Destiny): Chart Accuracy is the Core Threshold
BaZi demands the highest precision in calendar conversion and mathematical calculation. Evaluation focuses include: whether the year pillar changes at Lichun (Start of Spring), whether the month pillar changes at solar terms, daily pillar calculation, hourly pillar calculation, day master strength, Ten Gods patterns, and the timing of major luck cycles. Common error modes include: deviations in destiny cycle start times; solar term boundary judgment errors; Ten Gods misjudgments (e.g., confusing Eating God with Hurting Officer); inconsistencies between single-pass and retest results; and citing incorrect patterns while still providing complete advice.
From an engineering perspective, avoid letting the LLM directly perform calendar conversions. A more robust approach is to have a deterministic charting service generate a structured chart, with the LLM responsible only for interpretation and scenario mapping based on the provided chart. Chart generation results should retain intermediate fields—such as solar term timestamps, destiny cycle start age, major cycle lists, and Ten Gods tables—to facilitate manual debugging and retesting.
3.2 Zi Wei Dou Shu (Purple Star Astrology): Versioning Star Placement and Transformation Rules
Zi Wei evaluation focuses on lunar calendar conversion, palace star placement, transformation rules, and decennial cycles. Common issues include: inconsistent leap month handling, non-unified midnight day-change rules, uncorrected true solar time, mixed transformation rule versions, and incorrect palace-star mappings. Because different schools of Zi Wei Dou Shu use different rules, the system must clearly specify the rule version and annotate the output accordingly. Otherwise, it risks producing “comprehensive interpretations but unverifiable charts.”
3.3 Mei Hua Yi Shu (Plum Blossom Numerology): Casting Reproducibility is Priority
Mei Hua Yi Shu emphasizes casting methods and body/use generation and overcoming. During evaluation, fix the casting method (e.g., time-based or number-based casting) and record random seeds or input parameters. Common errors include: non-reproducible casting results; misjudging the relationships between body, use, interconnected, and changed hexagrams; and overly generalized interpretations lacking relevance to the queried matter. The key to avoiding pitfalls is to make the casting process structured and recordable, ensuring the interpretation layer revolves solely around the generated hexagram.
3.4 Liu Yao (Six Lines Divination): Assembly Rules Must Be Guaranteed by a Rule Library
Liu Yao involves Najia, line assignments, six relatives, moving lines, changed lines, hidden spirits, empty lines, and month-breaking rules. Common errors include: assembly rule displacement; incomplete derivation of moving/changed line relationships; chaotic six relative selection; and ignoring the influences of the month builder and day commander. Evaluation should use golden standard hexagram cases for item-by-item comparison and classify errors statistically. For highly rule-bound scenarios like Liu Yao, a hybrid architecture of “rule library assembly + LLM interpretation” is strongly recommended.
4. Evaluation Execution: Pseudocode and Scoring Flow
cases = load_cases() # Contains normal, boundary, and retest samplesfor c in cases:for i in range(N):prompt = build_prompt(c.input, c.question, system_prompt)resp = model.generate(prompt, temperature=0, tools=off)out = parse_structured_output(resp)paipan_score = rule_engine.validate(out.paipan, c.expected_paipan)logic_score = judge_consistency(out.paipan, out.interpretation)scene_score = human_or_judge_score(out.interpretation, c.scene)error_flags = classify_errors(out, c.expected_paipan)stability = variance(paipan_score, logic_score, scene_score)report(c, mean(scores), stability, error_flags)
Scoring should ideally utilize “machine validation + manual spot-checking.” Machine validation ensures consistency between chart fields and rules, while humans judge whether the interpretation is practically applicable and free of absolute assertions. For interpretations generated by the LLM, require structured output fields, such as “chart basis, derivation steps, scenario advice, uncertainty notes,” to enable auditing.
5. Engineering Implementation: Hybrid Architecture and Pitfall Checklist
The recommended architecture is: Input parsing -> Deterministic charting service -> Rule validation -> LLM interpretation -> Structured output -> Disclaimer and manual correction. The charting layer uses a rule engine to ensure determinism; the interpretation layer uses a general LLM to enhance readability; the validation layer performs consistency checks on chart fields and interpretation references.
{"input": {"birth": "1990-05-15T10:00", "timezone": "Asia/Shanghai"},"paipan": {"method": "bazi", "chart": {}, "rule_version": "v1"},"interpretation": {"dimension": "career","claims": [],"confidence": "medium"},"warnings": ["For technical evaluation only, does not constitute a basis for real-world decisions"]}
Pitfall Checklist:
- Do not let the LLM handle deterministic tasks like calendar conversion, destiny cycle calculation, or star/hexagram assembly.
- Fix inference parameters, disable internet access and external tools to ensure comparable retests.
- Establish boundary test sets for solar terms, leap months, midnight hours, and true solar time.
- Chart generation results must be structured, verifiable, and annotated with rule versions.
- Establish dynamic retesting mechanisms to monitor drift in fields like Ten Gods, transformations, and moving lines.
- Differentiate “chart facts,” “rule derivations,” and “scenario advice” in the output to avoid mixing them.
- Restrict absolute assertions for sensitive scenarios like career, health, and finance, and include uncertainty notes.
- Build a manual correction loop where error cases are fed back into the test set.
- Minimize privacy: Data like birth dates should be desensitized during storage, used with authorization, and deletable.
- Compliance reminders: Divination interpretations are for cultural/entertainment or technical evaluation purposes only and do not replace real-world decision-making.
6. Conclusion
The core of evaluating LLMs in divination scenarios is not comparing who “sounds the best,” but rather who can reliably produce verifiable charts, auditable derivations, and applicable interpretations under fixed inputs. Enterprises or developers integrating such capabilities should prioritize a hybrid approach of “rule engine + general LLM.” This uses deterministic calculation to secure the foundation and language models to enhance the interpretation experience, managing risks through structured output, retesting mechanisms, and manual correction loops. Only by turning evaluation into a reproducible, verifiable, and correctable engineering process can one avoid the typical trap of “fluent explanations paired with unreliable charts.”
