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!

