Dev.to AI 🤖 Ai 👁 0 📖 2 min read

Why LLMs Hallucinate Lunar Calendar & I Ching Calculations (And Our Open-Source 2027 Deterministic Dataset)

If you have ever asked an LLM to compute a traditional East Asian calendar boundary—or convert six I Ching three-coin tosses (6, 7, 8, 9) into a primary and relating hexagram—you have probably seen it silently invent a d

If you have ever asked an LLM to compute a traditional East Asian calendar boundary—or convert six I Ching three-coin tosses (6, 7, 8, 9) into a primary and relating hexagram—you have probably seen it silently invent a date, flip a yin/yang line, or mix up two completely different new-year cutoffs.

That happens because LLMs predict probable tokens rather than executing astronomical ephemerides or deterministic bit-flip tables.

A Concrete 2027 Edge Case: Feb 4 vs. Feb 6

In 2027 (Ding Wei / 丁未年), the two traditional Chinese year boundaries fall two days apart:

  1. Solar Li Chun (立春): 2027-02-04T01:46:18Z (09:46 UTC+8) — used by Four Pillars (BaZi / 八字) annual stem-branch calculations and solar-term calendars.
  2. Lunar New Year (農曆正月初一 / 春節): 2027-02-06 (verified against Hong Kong Observatory tables) — used by folk Chinese Zodiac conventions (with the lunar year running through 2028-01-25).

For anyone born on February 4 or 5—or any developer building a 2027 calendar/zodiac tool—failing to explicitly separate these two boundaries produces conflicting answers across websites.

Separating Deterministic Computation from AI Reflection

While building YiInsight, we enforced a strict architectural boundary:

  • Deterministic calculation runs locally without an LLM: lunar/solar boundaries, late-Zi (23:00–00:00 晚子時) day-pillar switches, and 6/7/8/9 coin-to-hexagram bit transformations are computed deterministically and covered by unit tests.
  • Optional AI interpretation comes strictly after: the model receives verified structural outputs and classical source context instead of guessing the math.

Open-Source Reference Data & Free Web Calculators

We published a small MIT-licensed JSON reference dataset on GitHub with the verified 2027 solar/lunar boundaries and the exact 6 / 7 / 8 / 9 three-coin line mapping table:

If you are building calendar converters, multilingual cultural tools, or LLM apps where deterministic state should never be hallucinated, feel free to reuse the JSON tables or open an issue on the repo!

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.