Case Study

Expert System with Multi-Level Logic for Generating Astrological Forecasts

Client’s Request: "To create an entertainment service that fully replicating the multi-layered reasoning logic of a professional astrologer, from calculating technical parameters to forming a coherent, meaningful conclusion."

Our Solution

We designed and implemented a complex expert system based on multi-layered algorithms rather than a language model. The system operates like a real astrologer:

Technical Layer: Analyzes the current celestial arrangement (positions of celestial bodies, aspects, houses) according to the strict rules of horary astrology, using Swiss Ephemeris data.

Semantic Layer: Interprets the technical data, assessing its strength, significance, and mutual influence within the context of the user's question.

Linguistic Layer: Generates the final report by dynamically selecting pre-defined phrases from an extensive database that precisely match the conclusions from the semantic layer.

All user interaction happens through an interactive WebSocket chat, where the system explains its analysis step-by-step, creating the effect of a consultation with a virtual expert.

A demo version of the service is available at: https://pocket-astrologer.app/

astrology app screenshot 1
astrology app screenshot 2
astrology app screenshot 2

Results Achieved

  • Recognition by the Professional Community: Astrologers use the service to verify their own conclusions, noting that the algorithmic analysis is often more accurate than human analysis, which is the highest mark of quality for the system.
  • Transparency and Justification: Unlike the "black box" of neural networks, every conclusion made by the system can be traced and explained at the level of astrological rules.
  • Unique Competitive Advantage: The created architecture is a proprietary know-how and has no analogues among standard chatbots powered by language models.
  • Ready Commercial Solution: The project included a full payment integration from the start, confirming its market readiness.

Technology Stack

Python Django MariaDB React Bootstrap

The project leverages a specialized technology stack designed for real-time, logic-heavy processing.

  • The Python/Django backend serves as the core framework, chosen for its robustness in implementing complex business logic and multi-layered decision-making algorithms that form the "expert" part of the system.
  • Django Channels was essential for adding WebSocket support, enabling the seamless, real-time, step-by-step communication in the interactive chat that mimics a live consultation.
  • The React + TypeScript frontend was crucial for managing the complex, dynamically changing state of the chat interface and ensuring type safety when interacting with the intricate data structures sent by the decision-making engine.
  • The entire application is deployed on a dedicated server. Nginx acts as a reverse proxy and WebSocket handler, while Cloudflare provides security, DDoS protection, and performance optimization for the public-facing demo.