Skip to content
We now build for Pharma & Life Sciences
ByteFlow Technologies
Case 07 · Consumer AI

AI Jyotish — A Hindi Astrology Assistant That Cannot Invent a Date

Open AI Jyotish on SugamPuja
4,200 · 0 fail
Chart checks vs independent ephemeris
0
Invented dates in evaluated answers
9 / 9
Guardrail prompts refused
80.5% → 27.5%
Mangal dosh flagged (5,000 charts)
16 → 8
Answers naming a puja
Client

SugamPuja · Own Product

Industry: Consumer AI

Year: 2026

Challenge

Astrology chatbots fail in one predictable way: the language model makes up planetary positions, dates and remedies, and then sells a puja or a gemstone on the back of them. We wanted a Hindi assistant whose every date and remedy could be traced to a computed chart, and that would refuse the questions it should never answer.

Approach

Split the work. A deterministic Jyotish engine computes the chart, dashas, ashtakavarga and remedy tables; Claude Opus 5.5 only reasons over those facts and writes the answer. Then we tested the engine against an independent ephemeris and ran a 68-answer evaluation before every release.

Outcome

4,200 chart checks against an independent library with zero failures. Zero invented dates and zero invented remedies across the evaluation set. The same evaluation caught our own rules over-detecting doshas; after the fix, answers that name a puja fell from 16 to 8.

Most AI astrology products put a language model in front of the user and let it talk. That works until someone asks "when will my job change?" and the model answers with a month it made up, a planetary position that is not in the chart, and a remedy that happens to be for sale.

We built AI Jyotish for SugamPuja with one rule: the model is not allowed to know anything the engine did not compute.

Two layers, one job each

LayerWhat it doesWhy
Jyotish engine (TypeScript)Computes the chart, 3-level Vimshottari dasha, divisional charts, ashtakavarga, dosh checks and the remedy tableMaths has to be exact and repeatable. A model is neither
Claude Opus 5.5Reads the computed facts for the question asked and writes the answer in Hindi or EnglishReasoning across many factors and explaining it plainly is what the model is good at
GuardrailsHard refusals and banned certainty words, enforced in the prompt and checked in evaluationSome questions should never be answered, however they are phrased

The model receives chart facts and topic facts as data, plus a trimmed conversation history. It cannot see a planetary longitude the engine did not hand it, so it has nothing to invent from.

Testing the maths separately from the AI

Before trusting a single answer, we tested the engine on its own:

  • Own suite: 28 of 28 tests pass.
  • Independent cross-check: 200 random charts from 1950 to 2025, across 12 places including daylight-saving cities, compared against a separate astronomy library that shares no code with our ephemeris. 4,200 checks, 0 failures. The worst gap was 42 arc-seconds on a planet and under one day on a dasha boundary.
  • Published charts: well-known public birth charts reproduce the documented lagna, nakshatra and dasha periods.

Evaluating the answers

A harness replays the production chat path: 68 answers across 5 charts, covering career, marriage, money, multi-turn follow-ups, unknown birth times and edge cases.

CheckResult
Dates in answers vs computed windows0 invented
Remedies (mantra, daan, conduct)0 invented; every line traced to the engine's remedy table
Same question in a fresh thread3 of 3 gave identical windows
Unknown birth timeSays so every time and reads from the Moon chart instead
Guardrail prompts (health, death, gambling, court cases, guarantees, prompt injection and more)9 of 9 refused

The finding that mattered most was our own bug

The evaluation's sharpest result was not about the model. Our dosh rules were too broad: run across 5,000 random charts, 95.7% of people were told they had at least one dosh, and 80.5% a Mangal dosh. Every marriage answer could then point to a puja.

That is exactly the fear-driven pattern users complain about in this category, and it was coming from our code, not from Claude. We moved Mangal dosh to the lagna as the primary check with the Moon as secondary, added the classical cancellations, and narrowed Pitru dosh to its standard conditions. A cancelled dosh no longer triggers any puja suggestion. Gemstones are now advised only for a planet that is benefic for that chart.

BeforeAfter
Mangal dosh flagged (5,000 charts)80.5%27.5%
Pitru dosh flagged53.7%29.2%
Evaluated answers naming a puja168

Cost and speed

Each answer averages about ₹4.4 with a cold prompt cache. We later moved the cache marker to the newest message, so repeated tool rounds inside one answer stop re-paying for the whole thread, and switched the answer to streaming so users see text as it is written instead of waiting on a spinner.

What we would tell a client

The model was never the hard part. The hard part was deciding what the model is allowed to know, building the layer that computes it, and running an evaluation honest enough to catch your own mistakes before users do. That is the same pattern we use for any business assistant: facts from your systems, reasoning from Claude, and a test set that runs before every release.

Ready When You Are

Start Your Transformation

One 45-minute discovery call. We walk you through scope, timeline, and pricing — no boilerplate.