Wednesday, September 23, 2026

Parashar21 - The Equinox Edition

Parashar21 reached a milestone today, with a version that has reached the limits of its current architecture.

The Rashi and Navamsha charts and the Vimshottari Dasha sequences are now being generated correctly — until, of course, an error is found. Gochar and Ashtakavarga are also being calculated, but for the moment I am leaving them outside the analysis and interpretation engine.

The NotebookLM-based interpretation engine now works with two clean text corpora, from Braha and Harihar Majumdar. Unless NotebookLM upgrades its underlying LLM, there is little more that I can do at that end. The interpretations are reasonable, and any further improvement will probably come from experimenting with better prompts.

At this stage, neither the computational engine nor the corpus can be meaningfully improved without changing the architecture itself. So this seems like a good place to stop.

And so, on the day of the Autumn Equinox, I offer this labour of love at the feet of Goddess Saraswati, with the hope that, with her grace, it may make its own small contribution to the advancement of this ancient science of Hindu India.

The complete software and user manuals are freely available from the GitHub repository.

Wednesday, August 12, 2026

How to Build an AI Astrologer

 


Can an LLM-based AI provide astrological advice and guidance? Given the fact that LLM platforms like ChatGPT and Claude, along with their agentic AI extensions, have been demonstrating mind-bending performance in complex, cognitive tasks, the question is no more academic. If they can perform complex logical analysis of science and mathematics problems, astrology should be easy. Not quite. There are certain challenges. 

Having looked at the issue of using computers to perform, or at least assist with, astrological predictions for over 20 years, the problem is fascinating. We know that the computational aspect -- calculating positions, etc., -- is completely deterministic and hence algorithmic. This can be done with conventional programming. However, the next part, the interpretation of horoscopes is extremely tricky because there are literally thousands and thousands of conditional situations -- programmatically referred to as IF-THEN-ELSE clauses -- that are difficult to enumerate let alone evaluate. Compounding this complexity is the fact that different authors offer different, and sometimes contradictory suggestions. That is where traditional programming -- deterministic and algorithmic -- breaks down. 

And this is where probabilistic, or rather statistical -- techniques used by LLMs to generate responses based on statistical patterns learned from massive text corpora,  become useful. But there are challenges.

First, how do you “feed” the horoscope to an LLM? You could of course scan a copy of the horoscope chart and upload it to the LLM and ask it to analyse it as an astrologer? Would it give an answer? Of course it will because an LLM will usually attempt an answer even when uncertain; in a sense, it never says “I don't know!”  This leads to the second problem. How accurate will this answer be? LLMs are notorious for hallucinating, or generating plausible sounding answers that are completely incorrect. Of course, a good astrologer would be able to spot errors but a non-astrologer, who would be the obvious user of this process, would never know whether to trust the answer or not. 

This has always been the weakness of traditional computer astrology. Creating the chart is deterministic, programmatically do-able and verifiable. Interpreting it is difficult and highly error prone. To overcome this we offer a hybrid approach. 

A vanilla LLM, like ChatGPT or Claude works on a training corpus consisting of millions of text documents. Based on these, it generates answers using statistical techniques coded into neural network “models”. These are black boxes and we cannot determine, or explain, the path from a question to the eventual answer. Retrieval Augmented Generation ( RAG) is a technique that is used to force an LLM to base its answers on a set of known text fragments and this is what we will use in our model.

Unlike conventional chat-based LLMs, Google's NotebookLM is a specialised (and still free) research assistant built around a very different architecture. Originally designed as a tool to assist research scholars, it expects that the user will first upload a set of documents -- in PDF, text etc -- into the Notebook. These documents are encoded as vectors and stored in a specialised vector database. When a question is asked, the most relevant fragments are retrieved and supplied to the transformer-based LLM as context. The LLM  primarily bases its answers on the uploaded sources. This provides a good guard against hallucinations.

But how exactly do we feed a horoscope to an LLM? Just supplying the locations of the planets is not good enough. Grahas reside in rashis but both grahas and rashis have a second meaning. Rashis have to be converted to houses ( or bhavs or ghars) based on their radial distance from either the Lagna (Ascendent) or from the Moon. Then each rashi has a Lord and both grahas and the lords view or aspect each other depending on whether radial distance between them is three, seven, nine rashis. Then there are conjuncts where lords or grahas are co-located in the same house or rashi. Finally there are specific combinations of grahas/lords in rashis/houses -- and there are literally hundreds of them -- which offer specific insights. Grahas and lords can be benefic or malefic and can be located in rashis that are hostile, helpful or indifferent. While all this may sound extremely complicated -- and believe me it is -- nevertheless this is rule-based. Given the date, time and location of a native's birth, all this can be calculated as per the logical rules that have been handed down from the dawn of history in classical texts like Brihat Parashara Hora Shastra and others.

Given that all of this is algorithmic, why burden an LLM with performing these calculations and arriving at  a probabilistic answer that is difficult to verify? Faced with this problem we define the following architecture .

Parashar21 is a Python-based tool that uses the Swiss Ephemeris astronomical software -- one of the most widely used high-precision astronomical ephemerides -- to generate the complex horoscope -- complete with grahas, rashis, lords, aspects and conjuncts. The Parashar 21 software was originally developed to create a human-readable MS-Word document that shows all this, both graphically -- in the North Indian, South Indian and also Bengali / East Indian style -- as well as with text descriptions. It also lists the Vimosottari Mahadasha/Antardasha periods for 120  years. This software has been under development for the past ten years and has been tested on many people and is almost certainly correct.  The output or report generation part of this software has now been modified to generate the same information as a structured text that any LLM -- including NotebookLM -- can understand.


The next task is to find authoritative texts in PDF format. This is not easy but not too difficult either. The internet in general and the Scribd platform in particular is a rich source of such PDF files and I could download many such including a scanned -- but 95% readable -- Hindi translation of the Brihat Parashar Hora Shastra. The two other texts that were used were Harihar Majumdar’s The Hindu Science of the Future and James Braha’s Ancient Hindu Astrology for Western Astrologers. Since I have physical copies of both books, I had no qualms about using the PDF version. However one can use BV Raman’s books, or any other book that they trust, as well.

The third and last piece of the task is to write the prompt. This has to be done carefully because the prompt must (a) specify that ONLY the sources supplied and nothing else on the internet is to be used (b) make sure that every observation or conclusion cites specific chapters, sections, or excerpted passages and finally ( c) define what should the output consist of and how it should be structured. One can build the prompt oneself, but it is easier to get another, possibly vanilla, LLM to build the prompt. We used ChatGPT to build the prompt that was used in NotebookLM and the results were quite good.

So how good are the results?  I would say that based on interpretations of known people, the results were quite good. No less than what would be expected from a reasonable astrologer and certainly far better than what I had received from a few astrology web sites that charge money. But of course it is always better for  you to check it out.

So how can you use my software and architecture to create a DIY astrology platform ?

The core Parasha21 software is available as free and open source in my GitHub repository. Unfortunately this is not a GUI based tool where  you can insert your details and the results will come pouring out. Sorry, I do not have the patience to build user friendly software, like say, Junior Jyotish. What we have is the full code available as a Google Colab python IPython notebook. While no Python programming is required, one would have to know how to access a Parashar21 GitHub repository (https://github.com/prithwis/parashar21), locate the correct Colab Notebook (currently P21_51_Chart2LLM.ipynb ), open it in Google Colab ( by pressing the little blue button), edit one line of code to replace the birth details of President APJ Abdul Kalam ( kept for demo purposes) with your own and then execute all the cells of the Notebook. This will generate two txt files, Chart.TXT and Dasha.TXT along with two human-readable Word documents -- remnants from the legacy implementation. These two files exist in the Google Colab Virtual Machine and have to be downloaded to your local laptop. Specifically, 

1. Open the Colab Notebook

2. Update the birth details line

3. Run the entire notebook

4. Open the left sidebar folder icon to download 'Chart.TXT' and 'Dasha.TXT'

Once again, let me reiterate that while there is no Python coding required, one would need a basic familiarity with a Python development environment. If  you do not have this familiarity, you could either take the help of a friend, who knows all this,  or better purchase “Structured Thinking with Python”, my textbook (available at https://store.pothi.com/book/prithwis-mukerjee-structured-thinking-python/)  for first year MBA students who join Praxis with no prior programming experience!.

Astrology is considered a pseudo-science in mainstream academia because its predictions are not repeatable, falsifiable or verifiable by traditional experimental techniques. Stripped of jargon, what this means is that we cannot understand or explain how this damn thing could works.  It is said that astrology is not explainable. However as I have written elsewhere [ see Astrology - an application of Data Science :  https://www.linkedin.com/pulse/astrology-an-application-data-science-prithwis-mukerjee/ ] , astrology is not about explaining causation but to identify correlations. This is no different from any neural-network-based artificial intelligence platform. Moreover, the fear of an inexplicable “spooky action at a distance” where a remote planet can influence a human on earth can be related to, in an indirect sense, to the concept of quantum entanglement. [  see Astrology as Quantum Entanglement :  https://www.linkedin.com/pulse/astrology-quantum-entanglement-prithwis-mukerjee/ ]  But anyway, this article is not to defend or justify astrology. If you have read so far, it means that you like it and believe in its potential.

Go ahead and check out how this dual-engine platform combines algorithms and neural networks to replicate a decent astrologer. All you need to try it is a Google Gmail ID -- nothing to install, and no code to write. With just a little curiosity and the patience to walk through a few steps, you can get started. Visit my GitHub repository today to launch your journey, now!

Friday, August 11, 2023

Major Update : AshtakVarga Points

 A whole new section on AshtakVarga Points has been added along with a major reorganisation and rationalisation of the code. Two new notebooks have been created that supersede most of the other notebooks.

  • P21_45_10_MultiChart_Analysis - This is the core project where we take the date, time and place of birth of a large number of people, cast their horoscopes, store these in a MongoDB database and retrieve some of them based on the presence of certain patterns ( or Yogs)
  • P21_45_09_Single_AshtakVarga_Gochar - This is an auxiliary, but more interesting project that focusses on the analysis of a single native in terms of Rashi horoscope, Navamsa, Aspects, Conjuncts, Exaltations, Debilitations, Vimsottari Dasha and Ashtakvarga points

Saturday, September 24, 2022

Major Updates

 Significant updates made to the Parashar21 software. Now we are in a position to spot and retrieve charts with specific patterns including some known Yogs. See the Github repository for more information.



Saturday, January 22, 2022

Migration to MongoDB

 The Parashar21 system has now been migrated to MongoDB and the results are very interesting.  We are now able to store horoscope charts as JSON objects in a MongoDB database and these objects can be accessed by values in the various fields.

For example, a query like this :

{"$and": [{"exaltG.Ju": {"$eq": true}}, {"GAspectedBy2.La": {"$in": ["Sa"]}}, {"GConjunctsG2.Su": {"$in": ["Me"]}}, {"GrahaBhava.Mo": {"$eq": 1}}, {"LordBhav.4": {"$eq": 5}}]}

which means retrieve charts that have

  1. Exalted Graha Jupiter and
  2. Lagna aspected by Saturn and
  3. Sun conjunct Mercury and
  4. Moon in 1st Bhav and
  5. Lord of 4th Bhav is in 5th Bhav

will retrieve the following TWO charts



A manual check will reveal that these charts do indeed meet the five conditions specified!
The programs for casting, storing and retrieving these charts are available in Github . A detailed paper explaining the logic behind is available at ResearchGate





Saturday, January 8, 2022

New Year, New Resolutions

 Parashar21 has come out of dormancy again with two new initiatives.

  1.  First, we are migrating to a MongoDB platform so that we can search for charts with greater elegance
  2. Second, we are migrating all our codes to Github so that it is easy for people to use.
Jai Parashar

Sunday, February 2, 2020

Horoscopes of 1100 Doctors

My Parashar21 python application was recently put to a good use in the search for common patterns in the horoscopes of similar people. My good friend Raghuram Hebbar, who is one of the inspirations and champions for this pattern matching approach, has some ideas on what is common to the horoscopes of doctors. If this is established, it would lead to a whole new perspective on astrology.

The first challenge in this case, is to get horoscopes of a large number of people who share similar characteristics. After a lot of effort, we located the Astro-Databank Wiki that contains the birth details of nearly 60,000 people along with -- and this is most crucial -- their profession and brief biodata. Unfortunately, the charts available in this database are based on the Western system of astrology and hence of little value to Indian astrologers.

So we have done the arduous task of taking only the date, time and place of birth data along with timezone adjustments from this database and generating the corresponding Rashi, Navamsa and Dasamsa charts as per Indian astrology, using the pythonic version of our chart casting software Parashar21.

Out of this 60,000 horoscopes, only about 40,000 are reliable as per the Rodden Rating of accuracy of birthtime. From these 40,000 we have taken birth details of about 1100 people whose vocation has been identified as 'Medicine' in the database. The actual charts of these doctors are now available in the public domain. If you have an interest in such matters, please download this file from this link.

Saturday, August 3, 2019

Parashar21 : pyswisseph

The fortuitous location of a python package pyswisseph  that implements ver 2.0 of the Swiss Ephmeris software means that the earlier way of running an executable file and then collecting the results is no more required. Now it is  possible to call the Swiss Ephemeris functions directly from Python code running in Jupyter notebook located on Google Colab. A skeletal demo of this approach is given in this demo notebook.

Based on this technology, two new programs or notebooks have been created. The first one casts the horoscope and stores it as a .py21 text file on the Colab VM -- which can then be saved either in Google-Drive or on local, desktop machine. The second program reads the data from the horoscope (.py21) file and does a Position-Aspect-Conjunction (PAC of KN Rao ) analysis and presents the data as MS Doc file with the horoscope chart embedded in it! Nice isn't it!

This is a work in progress but the Aug 3, 2019 version of these two program ( or Google Colab notebooks) is available as follows : (1) Parashar 21 - Cast V3  (2) Parashar21 - PAC V3.

Google Colab is the easiest way to run python programs without having to install anything on your machine. All  you need is Google Chrome browser and a GMail account. To learn about how to use Google Colab please Google for tutorials. Its extremely easy to use.

Tuesday, September 4, 2018

Parashar21 in Python

Have decided to resurrect Parashar21 on a new platform that would facilitate the automation of the search for patterns in a horoscope. From user-friendly MS-Excel, I am in the process of migrating to Python3 and instead of running on desktop this will run on the Google Colab platform. To see how to use this free, yet immensely powerful platform you may read this guide.

These are early days. The foundational application that converts Birth Date/Time/Location to planetary longitudes has been reintegrated with the Swiss Ephemeris. The positional ( and retrograde) information is being used in the second, analysis program. If you are comfortable with Colab and know Python you may take a look at the two notebooks here. Hopefully in the next few weeks we will have the full functionality of the original Excel app. [ Update - 11 Nov 18 - here are the latest files ]

The current version of the Swiss Ephemeris program is 2.07 while the Excel application, uses version 1.67. This introduces approximate 2 degree difference in the fast moving Lagna (Ascendant) position.

Wednesday, January 16, 2013

Another bug fix !

There was a typo error in the Nakshatra calculation formulae. This has been fixed in the Jan 2013 update. In the process recreated the server based programs and database on x10hosting.com Hope this free service lasts for some time.

Sunday, December 18, 2011

Serious Bug Fix !

While the project is dormant, I do get requests to cast horoscope charts for friends and in the course of doing so I discovered a mathematical error that would have led to erroneous Vimsottari Dasha calculation in some cases.
If you had hit the problem you would have known about it right away since the screen would be full of obvious trash -- so if you have not had problems so far, you would be safe. But that does not mean you would not hit the error condition in the future, so suggest that you download the correct version right now from this link : P21-SmartChartBeta-v04-Nov2011
Jai Parashar

Friday, September 2, 2011

Project is currently dormant !

The Parashar21 project is currently in cold storage ! However this website is a record of some exciting things that we had done together and hence I have left it as it is.

The final version of the standalone Excel based horoscope casting software is available by following the link on the left panel. The second image from the top. Other versions referred to in this blog are obsolete and have been preserved for historical nostalgia.

There is a wiki based user manual for using the standalone software and you access it by following the link on the left panel.

The programs to store and retrieve horoscope charts are also available but I do not have a free website to host the MySQL database anymore to store the data. Nor do I have sufficient number of horoscope charts to make any meaningful analysis even though I believe that my algorithm will work ! Hence the upload and retrieval part of the Excel spreadsheet will not work any more. ( Believe me, they used to work beautifully)

Someday, we shall revive this software but till then this is all that I can offer the reader.

Jai Parashar

Friday, April 3, 2009

Parashar21 : Two Milestones on the Web

Two major milestones were achieved today.

First : the Parashar21 data can now be stored and retrieved from a web based mySQL database hosted at on Surge8.

Until we get the web based MySQL available to the general public, you can check out the SQL generated in the SmartChart by downloading SQLITE [ a self-contained, serverless, zero-configuration, transactional SQL database engine ] and using it on your machine.

Second : We have created a Social Network for Parashar21 on the NING platform. You may please visit and join the network if you are interested in research into Astrology patterns.

Jai Parashar.

Tuesday, March 31, 2009

Parashar21 : Version 6.205 now available


The current version of Parashar21 has some significant enhancements
  1. We now calculate Vimsottari Dashas, Antardashas and Pratyantardashas
  2. Lahiri Ayanamsha is now calculated dynamically
  3. The pattern trapper seems to be working but this needs enhancement
  4. The chart and the PAC matrix are now in the same sheet ... see image above
Download this version from boxnet.

Please help me find bugs and report them through the KontactR button

Saturday, March 21, 2009

SmartChart v5 : Vernal Equinox Version

Version 5 of the SmartChart in now available for download with some major enhancements.
  1. There is an inbuilt Ephemeris program that calculates planetary positions based on birth date, birth time and birth longitude.
  2. The macros have been modified so that they are compatible with earlier versions of Excel
The Ephemeris program has been obtained from Astrodienst and is based on the famous Swiss Ephemeris that is available free of cost as long as any software that is developed with it is not sold at a price. For more details, please lookup their website.

SmartChart v5 needs the files to be downloaded and co-located in the same directory as the SmartChart excel file.

ftp://ftp.astro.com/pub/swisseph/programs/ : swetest.exe
ftp://ftp.astro.com/pub/swisseph/ephemeris_files/ : seas_18.se1, semo_18.se1, sepl_18.se1

The longitudes calculated through SmartChart v5 are accurate to within 1 min when compared to the values calculated by the free Junior Jyotish program.

Monday, January 26, 2009

SmartChart updated : The Eclipse Version

Version 3 of the SmartChart is now available for download with the following additional features :
  1. All cells are now generated automatically once the user feeds in (a) the longitudes of the Ascendent (Lagna) and the other planets and (b) information about planets being retrograde or not -- this information should be available from any standard Ephemeris software like Junior Jyotish.
  2. The graphic horoscope chart is also generated in the South Indian, East Indian ( Bengali) and quasi North Indian format. Getting Excel to generate horoscope charts using only formulae is quite a feat. Programmers could appreciate this.
  3. There is a facility to have multiple charts ( as different sheets) in the same workbook. This will hopefully help curb the proliferation of Excel sheets in your machine.
  4. Macro-driven forms that look more sleek have been introduced to enhance the user experience -- however much more needs to be done in this area.
The following features have been retained from the earlier version
  1. SQL to create the base Kode tables and populate them with correct data -- can be generated automatically
  2. SQL to insert new charts into the MySQL database -- can be generated automatically
  3. SQL to retrieve charts that meet certain conditions -- can be generated automatically

This version is being referred to as the Eclipse Version since it has been uploaded during the Solar Eclipse in Calcutta that is happening right now.

Jai Parashar.

Sunday, January 18, 2009

Using Sparse Matrices to Store Horoscope Charts

Storage and retrieval of horoscope charts in a relational database is a challenge. Yet it is imperative that we should be able to search for and retrieve charts that have things in common. This paper on Usage of Sparse Matrices to Store Horoscope Charts explains the strategy that we can follow.

I have also created a Excel based tool that allows one to capture data for a Horoscope and then generate the SQL statements required to insert and retrieve the data from a relational database.

Parashar21 : Parashar in the Twentyfirst Century


An attempt to codify the astrological wisdom of Parashar in the light of current developments in the world of digital computers.