Testing Large Language Models for Traditional Chinese Fortune-Telling: Benchmarks and Pitfalls to Avoid

    This article examines the real capability boundaries of large language models (LLMs) in traditional Chinese fortune-telling, where conversational fluency does not equal accurate chart calculation. It breaks down error sources across four systems—BaZi, Zi Wei Dou Shu, Plum Blossom Numerology, and Liu Yao—then proposes a four-dimension evaluation framework, a decoupled architecture that separates deterministic computation from language generation, and a practical checklist of pitfalls. Readers will learn how to turn "feeling accurate" into measurable, regression-testable acceptance criteria.

    1. Background: Why “Being Conversational” Does Not Equal “Casting a Chart”

    Handing traditional fortune-telling to a large language model is initially attractive because of natural-language interaction: a user describes their birth details and request in a single casual sentence, and the model returns a structured chart with an interpretation. In practice, however, the problems surface quickly—this kind of task actually forces two different capabilities together:

    1. Deterministic computation: sexagenary year counting, month determination by solar terms, true solar time correction, placement of the twelve palaces and stars in Zi Wei Dou Shu, hexagram construction and selection of the “useful god” in Liu Yao. These are algorithmic processes with a single correct answer.
    2. Probabilistic language ability: translating the Ten Gods relationships, star combinations, and hexagram line positions into life-scenario advice the user can understand.

    The strength of an LLM lies in the second category; its weakness is the first. Two typical defects in the original test material map exactly to these two boundaries: one is high accuracy at the chart-casting level but with dynamic fluctuation (a repeated test on the same input at an interval produced a Ten Gods misjudgment, such as the Eating God being judged as the Hurting Officer); the other is a vivid, accessible interpretation, but with a start-of-luck timing deviation of one to two years, and even a low-level error where the birth year does not match the luck-cycle table.

    The conclusion is direct: do not treat fortune-telling as a single question-and-answer exchange, but as a calculation pipeline with validation.

    2. Error Sources Across Four Scenarios

    2.1 BaZi: Calendar and Time Are the Root of Error

    The BaZi casting chain is “Gregorian/lunar input → month determined by solar terms → four pillars of sexagenary stems and branches → day master strength and Ten Gods → start of luck and luck cycles.” Errors concentrate in the first three steps:

    • Improper handling of the solar-term transition moment, causing the entire month pillar to be off by one month;
    • No longitude time-difference and equation-of-time correction between true solar time and clock time, causing the boundary hour (the day change at the Zi hour) judgment to waver;
    • When the start of luck is calculated with the approximate “three days equal one year” rule without taking the precise seasonal moment, an accumulated deviation of more than a year results.

    Most Ten Gods misjudgments (Eating God/Hurting Officer, Proper Officer/Seven Killings) are not because the model “does not understand,” but because the four pillars themselves are wrong, or the yin-yang same/different rules were not explicitly constrained in the context.

    2.2 Zi Wei Dou Shu: The Highest Rule Density

    The star-placement system of Zi Wei depends on the lunar month, day, and hour, with many rule branches and large lookup tables. Common problems are leap-month handling, the day change at the Zi hour, and inconsistent positioning of the life palace and body palace, causing the entire chart’s stars to shift. This scenario is the least friendly to a model’s “memory-based inference,” so the algorithm must be externalized.

    2.3 Plum Blossom Numerology: Casting Randomness Breaks Reproducibility

    Both time-based and number-based casting depend on input normalization. If the model “fills in” numbers or time on its own, the same question yields different results across two runs, and users will directly judge it as untrustworthy. The key point: the casting input must be fixed by the caller and written to logs.

    2.4 Liu Yao: Hexagram Construction and the Useful God Are the Dividing Line

    Liu Yao requires assigning the earthly branches to lines, attaching the Six Relatives, setting the self and counterpart positions, and identifying moving lines and the transformed hexagram. Common model errors are attaching the Six Relatives incorrectly and missing moving lines. Such errors have no flaw in the language and are the hardest for ordinary users to detect, so structured self-checking is essential.

    3. Four-Dimension Evaluation Metrics: Turning “Feels Accurate” into Something Measurable

    It is advisable to build a fixed golden test set (covering boundary samples such as solar-term transitions, leap months, day changes at the Zi hour, and north-south longitude differences) and score it along four dimensions:

    Dimension Definition Reference Judgment Method
    Chart-casting accuracy Four pillars/chart/hexagram match the authoritative algorithm result field by field Field-level diff, requiring 100%
    Calendar robustness Accuracy on boundary samples (solar terms, leap months, day changes) Boundary subset counted separately
    Interpretation groundedness Whether terminology is translated into concrete scenarios, with no empty clichés Human double-blind scoring
    Result stability Output consistency rate across repeated calls with the same input Repeated N times at a fixed temperature and compared

    Key engineering constraint: chart-casting accuracy must be a hard gate, and interpretation quality is not allowed to compensate for it. The “high on a single run, drifting on re-test” phenomenon in the original test shows that a single sample is not enough for acceptance; stability must be an independent metric.

    4. Reference Architecture: Decoupling Computation from Generation

    The recommended approach splits the pipeline into four layers, with the model handling only what it is good at:

    1. User natural-language input
    2. ↓
    3. [1] Semantic parsing layer (model): extract birth date, time, location, request → structured JSON
    4. ↓
    5. [2] Deterministic computation layer (code/algorithm library): solar terms, sexagenary stems and branches, star placement, hexagram construction → chart JSON
    6. ↓
    7. [3] Validation layer: field completeness + rule self-check + regression against the golden set
    8. ↓
    9. [4] Interpretation generation layer (model): generate scenario-based interpretation based only on the chart JSON

    Sample output of the parsing layer:

    1. {
    2. "calendar": "solar",
    3. "birth_date": "1990-03-21",
    4. "birth_time": "23:40",
    5. "longitude": 116.4,
    6. "need": "career",
    7. "system": "bazi"
    8. }

    Sample input constraint for the interpretation layer (pseudocode):

    1. def build_prompt(chart: dict, user_need: str) -> str:
    2. assert chart["pillars_valid"] is True # forbid interpretation if chart casting failed
    3. facts = format_facts(chart) # feed only structured facts, not raw birth details
    4. return f"Interpret only based on the following chart facts; do not add or modify any stems, branches, stars, or lines:\n{facts}\nRequest: {user_need}"

    The benefit is that chart-casting errors are intercepted at the third layer and never flow into the generation layer, where they could be “rationalized” into a seemingly self-consistent but wrong passage.

    5. Pitfall Checklist (High-Frequency Issues from Testing)

    1. Do not let the model compute the calendar itself: any stems, branches, stars, or lines must come from the algorithm layer; the model must not do mental arithmetic.
    2. Cross-validate the start of luck against the luck-cycle table: assert consistency between the start-of-luck year, the four pillars, and the seasonal moment; report an error on mismatch instead of outputting.
    3. Temperature parameter and repeated sampling: use a low temperature in the generation layer, and during acceptance compare repeated calls with the same input to identify “re-test drift.”
    4. Allow human correction and write it back immediately: correction results should be written into the test-case library to form a regression set, rather than a one-off verbal fix.
    5. Prioritize boundary samples: tilt test resources toward solar-term transitions, leap months, and day changes at the Zi hour; these are error amplifiers.
    6. Observability: log the structured input, chart JSON, validation conclusions, and final text across the full pipeline, making it easy to locate whether the error is in parsing, computation, or wording.
    7. Compliance and expectation management: clearly label the content as being for traditional-culture entertainment, not constituting professional advice such as medical, investment, or legal advice.

    6. Deployment Recommendations

    In engineering terms, the algorithm layer can be containerized and packaged as an independent service, with input and output fixed by a JSON Schema; full-pipeline logs and metrics can be connected to a logging service and monitoring alerts, with threshold alerts set for the chart-validation failure rate and the re-test consistency rate; the golden test set and user-correction samples can be placed in object storage for version management, with each algorithm or prompt change triggering a regression. If you use Baidu AI Cloud’s relevant general capabilities, you can combine them by the categories above, keeping the computation layer and the generation layer independently replaceable and independently evaluable.

    7. Conclusion

    The real capability boundary of a large language model for fortune-telling is “strong at interpretation, weak at computation, and stability needs verification.” The viable engineering answer is decoupling: let code handle deterministic chart casting, let the model handle scenario-based expression, and use four-dimension metrics and a golden test set to turn “accurate or not” into a regression-testable acceptance item. With this method, chart-casting accuracy can achieve field-level correctness, interpretation quality can be continuously refined by human evaluation, and re-test drift can be discovered before launch rather than left for users to stumble into.