Testing Large Language Models on Traditional Chinese Fortune-Telling: Evaluation Framework and Pitfalls to Avoid
This article examines why traditional Chinese fortune-telling systems make a demanding testbed for large language models, and how to evaluate them reliably. It breaks the assessment into four layers—deterministic chart calculation, pattern classification, output stability across repeated requests, and grounded interpretation—and explains why mixing them distorts conclusions. A reusable test design with structured scoring and a stability metric is provided, along with the key engineering practice of separating deterministic computation from generative output. Common failure modes, such as terminology confusion, misaligned luck-cycle tables, overconfident claims, and style-accuracy tradeoffs, are paired with practical mitigation strategies. The article closes with guidance on building a closed evaluation-regression-monitoring loop using general cloud components.
1. Background: Why Fortune-Telling Became a Stress Test for LLMs
Traditional Chinese fortune-telling systems (Bazi, Zi Wei Dou Shu, Plum Blossom Numerology, and Liu Yao) are essentially rule-dense, symbol-heavy, and strongly order-dependent inference systems. They exhibit three characteristics that happen to target the weak spots of current large language models:
- Conflict between deterministic computation and probabilistic generation: Chart casting relies on deterministic algorithms such as sexagenary calendar conversion, solar-term transition timestamps, and the age at which a luck cycle begins, while model output is probabilistic sampling and inherently variable.
- Large and easily confused symbol system: Terms covering the Ten Gods, patterns, symbolic stars, and palaces include many concepts that look or sound similar but differ in meaning, so models are easily pulled toward “nearest neighbors” in semantic space.
- Interpretation must connect to real-world common sense: A good reading maps abstract symbols onto modern contexts such as careers, education, and marriage, which requires world knowledge rather than memorization.
Treating fortune-telling as an evaluation task therefore measures three things: calculation accuracy, symbol discrimination precision, and semantic grounding. These must be measured separately; combining them inevitably distorts the conclusions.
2. Evaluation Framework: Four Dimensions
2.1 Chart Calculation Layer ( objectively verifiable)
Given a birth date, time, and gender, the output is the four pillars, month command, hidden stems, Ten Gods, and the luck-cycle sequence. This layer has a single correct answer and is suitable for automated regression testing. Common failure points include pillar assignment on solar-term transition days, handling of the Zi hour crossing midnight, and rounding errors in the three-days-to-one-year conversion used to calculate the starting age of a luck cycle.
2.2 Pattern Classification Layer (semi-structured)
Day-master strength, whether it commands the month, exposed stems, and pattern categorization are cases where “rules are inferable but phrasing varies.” This requires a set of standard answers that allows synonymous wording, while core conclusions (for example, a water day master that commands the month and is strong, or a Ten God exposed as a stem forming a pattern) must be matched.
2.3 Dynamic Stability Layer (most often overlooked)
When the same input is requested repeatedly at intervals, are the conclusions consistent? A common observation in testing is that single-run accuracy is high, but on retesting the Ten Gods show nearest-neighbor misclassification (for example, judging Eating God as Hurting Officer). Such errors do not show up in average scores, yet they directly destroy user trust.
2.4 Interpretation Grounding Layer (subjective but rubric-able)
Does the output translate abstract relationships into perceivable life scenarios, avoid empty platitudes, and stay consistent with the real constraints the user provides (industry, age, region)?
3. Reusable Test Design (Illustrative)
Do not try a few prompts and draw conclusions from intuition. Build a fixed case set with structured scoring:
# Illustrative: minimal skeleton for fortune-telling evaluationcases = load_cases("cases.jsonl") # each entry contains input, gold pillars, gold pattern labelsdef run_once(model, prompt, case, seed=0):return model.generate(prompt, temperature=0.0, seed=seed)def score(structured, gold):return {"calendar_ok": structured["pillars"] == gold["pillars"],"pattern_hit": structured["pattern"] in gold["pattern_alias"],"shishen_ok": structured["shishen"] == gold["shishen"],}# Stability: sample the same input multiple times and measure the inconsistency ratedef stability(model, prompt, case, n=5):outs = [run_once(model, prompt, case) for _ in range(n)]return 1 - len({o["shishen"] for o in outs}) / n
Key engineering practice: separate deterministic computation from generation. Steps such as calendar conversion, starting age of the luck cycle, and hidden stems of the month command should be handled by code or a deterministic service, leaving the model responsible only for symbol interpretation and scenario mapping. This single measure eliminates most of the low-level errors seen in testing.
4. Common Pitfalls and Mitigation Strategies
- Pitfall 1: Nearest-neighbor terminology misclassification. Combinations within the Ten Gods system that share the same polarity and element are easily confused. Mitigation: require the model in the prompt to output its reasoning first (position of exposed stems, dominant qi of the month command) and then the conclusion, forming an auditable chain.
- Pitfall 2: Misaligned starting-age and annual tables. This shows up as a luck-cycle sequence inconsistent with the birth year. Mitigation: inject the precomputed luck table via a template and forbid the model from calculating the numbers itself.
- Pitfall 3: Overpromising interpretations. Statements about health, investment, and marriage need constraint boundaries; output should be “tendency descriptions plus actionable advice,” avoiding absolute assertions.
- Pitfall 4: Coupling of style and accuracy. Colloquial interpretation often comes at the cost of terminology precision. A dual-channel approach is recommended: a calculation channel preserves precision, an interpretation channel preserves readability, and a final consistency check reconciles them.
User input → deterministic chart service → structured chart (JSON)├→ precision channel: pattern/Ten Gods classification + rationale└→ interpretation channel: scenario-based text→ consistency check → output
5. Engineering Implementation
To build this capability in your own application, a closed loop can be assembled from general cloud components: a container platform hosts the inference service, a message queue smooths traffic spikes and supports asynchronous batch evaluation, object storage holds case sets and regression reports, and logging plus monitoring with alerting track stability metrics and drift trends. Baidu AI Cloud offers general-purpose capabilities across this “evaluation-regression-monitoring” chain, but the specific selection should still be assessed against business scale and compliance requirements.
6. Conclusion
The real difficulty of fortune-telling Q&A lies not in “sounding plausible” but in calculating accurately, classifying stably, and interpreting clearly. Layering deterministic computation above generative interpretation, quantifying accuracy and stability with a fixed case set, and constraining symbol discrimination with a rationale chain are what turn this high-rule-density scenario into a reliable product capability rather than a one-off demo.
