Architecture · Updated June 2026

An Astrology AI That Doesn't Make Things Up

The facts are computed by code. The model only phrases them. Then a validator checks the result against the real chart.

The problem with AI astrology

Large language models are fluent, confident — and perfectly capable of inventing a planetary position, a wrong house lord, or a dasha period that does not exist. In most domains a small slip is forgivable. In astrology, a wrong fact is the whole answer being wrong, and a confident model will state it as if it were certain. That is hallucination, and it is the single biggest reason developers distrust AI astrology.

Vedika's design starts from a blunt premise: a language model should never be the source of an astronomical fact. It should only put already-correct facts into readable language.

The core idea: computation and language are separate jobs

Vedika splits every answer into two stages that never blur together:

  • Computation (deterministic, code): planetary longitudes, house placements, lordships, aspects, yogas, dasha and bhukti periods, panchang elements — all produced by code from the XALEN Ephemeris engine. Given the same birth data, the result is always identical and always reproducible.
  • Language (the model's only job): take those computed facts and explain them in natural language, in the user's chosen language and tone.

Because the model is handed the facts rather than asked to recall them, the most dangerous class of error — a fabricated position — is structurally impossible in the part of the system where it would matter.

The four-layer accuracy pipeline

On top of that separation, every AI answer passes through four reinforcing layers:

Layer 1

Chart summary

The full computed chart (positions, houses, strengths, yogas, dashas) is assembled by code into a structured, factual summary. This is the ground truth for everything that follows.

Layer 2

Grounded instructions

The model is instructed to answer only from the computed chart, to avoid stating any astronomical fact not present in the summary, and to flag uncertainty rather than guess.

Layer 3

Mandatory facts

Key computed facts are injected as non-negotiable anchors, so the model cannot quietly drop or alter them while phrasing the answer.

Layer 4

Post-generation validator

After the model writes its reply, a validator compares the text against the computed chart and corrects drift — a wrong sign, a misstated lord, a contradicted placement. The computed chart always wins over the model's wording.

The effect is that the model operates inside a fence it cannot climb: constrained going in, and checked coming out.

A source of truth you can audit

The reason this works is that the bottom of the stack is verifiable. Vedika's positions come from XALEN Ephemeris, Vedika's own astronomical engine, open-sourced under Apache-2.0 (crates.io/xalen, PyPI xalen, npm @xalen/wasm, ~2,200 tests). It is validated against the public JPL DE440 reference ephemeris and the industry-standard swetest tool, and no chart in a reproducible JPL DE440 benchmark deviated beyond 0.1°.

That is an astronomical-precision statement — about where the planets are — not a claim that any interpretation is "correct." But it matters enormously: because the engine is open source, you can reproduce any position Vedika returns and confirm the math for yourself. Most astrology APIs resell a closed third-party ephemeris that cannot be independently audited.

Classical references must be real

Hallucination isn't only about numbers. An astrology AI can also invent a citation — attributing a claim to a classical text that never said it. Vedika holds a strict rule on this: when an answer references a classical source, that reference must trace to an actual book used in formal Jyotish, KP or Western study, not a paraphrase, a blog summary, or the model's training-data recollection. If a claim cannot be sourced honestly, it is not presented as if it could be.

What this means for you as a developer

  • The numbers in a Vedika answer are reproducible against an open-source engine.
  • The natural-language layer is constrained to those numbers, then re-checked.
  • You get conversational answers (via POST /api/v1/astrology/query) without inheriting a chatbot's tendency to invent astronomy.
  • You can offer users a trustworthy astrology assistant without building the grounding pipeline yourself.

Verify it yourself

Try the AI query endpoint in the free sandbox and reproduce the chart math against the open-source engine.