🌟 AI Jyotish Guru — AstroHack Submission
AI-powered Vedic Astrology chatbot that merges ancient Jyotish wisdom with modern Generative AI to give Indians personalized, empathetic life guidance.
⸻
💡 Inspiration
Astrology is deeply woven into Indian culture—guiding decisions in marriage, education, finance, and spirituality. However: • Access to reliable astrologers is inconsistent • Most online apps are generic, not contextual • People want empathetic, non-judgmental guidance • Traditional astrology lacks modern interpretation
We wanted to solve this by combining precise Vedic calculations with the emotional intelligence of modern LLMs to create a trustworthy AI astrology assistant—one that respects tradition while offering clarity, guidance, and emotional support.
⸻
🎯 What It Does
AI Jyotish Guru generates personalized astrological insights using:
✨ 1. Accurate Birth Chart Calculation • Computes Lagna, Nakshatra, Tithi • Calculates all Graha positions (Sun to Ketu) • Generates divisional charts (future roadmap)
✨ 2. AI-Powered Interpretation • GPT-4o Mini gives contextual, empathetic, grounded guidance • Covers career, marriage, finance, health, spirituality, and education • Uses only real chart data—no hallucinations or generic predictions
✨ 3. Real-time Astrology Chatbot • Ask unlimited questions • AI remembers context • Provides advice tailored to Indian culture
✨ 4. Modern, Responsive UI • Clean React frontend • Mobile-friendly • Smooth chat experience
⸻
🏗️ How We Built It
Backend • FastAPI (Python) for REST API • Swiss Ephemeris (PySwissEph) for astronomical calculations • TimezoneFinder + Geopy for accurate Panchang & birth time localization • GPT-4o Mini for intelligent interpretation • Pydantic for schema validation
Frontend • React 18 • Axios for API calls • React Toastify for notifications • Custom CSS for polished UI
Architecture Flow 1. User enters birth details 2. Backend calculates horoscope 3. Contextualized chart data sent to GPT-4o Mini 4. AI generates emotional, culturally relevant insights 5. Frontend displays conversational response
⸻
🧗 Challenges We Ran Into
✔️ Precise Astrology Calculations
Mapping Swiss Ephemeris outputs to traditional Indian chart formats was hard.
✔️ Ensuring Grounded LLM Responses
LLMs tend to hallucinate. We had to: • Constrain responses strictly to computed chart data • Build a curated system prompt • Add validation layers
✔️ Timezones & DOB Accuracy
Birthplace → timezone mapping was tricky and required robust checks.
✔️ Cost Optimization
We tested multiple models before realizing GPT-4o Mini gives: • 80% cost savings • Same conversational quality
✔️ Cultural Sensitivity
Astrology is emotional. AI must be: • Respectful • Empathetic • Avoid deterministic or absolute predictions
⸻
🏆 Accomplishments We’re Proud Of • 📌 Built a fully functional Vedic horoscope engine • 📌 Integrated LLM interpretations grounded in chart data • 📌 Designed a real-time chat Experience • 📌 Optimized cost to <1 paisa per interaction • 📌 Delivered an app that feels human, warm, and culturally aware • 📌 Achieved lightning-fast computation with <1s response time
⸻
📚 What We Learned
🌙 Astrology + AI = Delicate Balance • Must avoid fortune-telling • Must encourage empowerment, not fear • AI needs strict grounding to astrological rules
⚙️ Technical Learnings • Mastery of Swiss Ephemeris • Fine-tuned system prompts for chart-based reasoning • Importance of token optimization
👥 User Experience Matters • Users want emotional tone, not robotic analytics • Responses must be simple, friendly, and contextual
⸻
🚀 What’s Next for Astro AI
🌐 1. Multi-language Support • Hindi • Tamil • Bengali • Telugu • Kannada
🔮 2. Kundli Matching (Compatibility Module)
For marriage analysis with Ashta-Koota scoring.
🧿 3. Dasha & Transit Predictions
With real-time planetary transit API.
📱 4. Mobile App (Flutter)
For wider reach across India.
🤝 5. Personalized Life Roadmaps
AI-based 6-month & 12-month guidance reports.
🔍 6. Voice-enabled Jyotish Guru
Hinglish voice queries like: “Mera career kaisa rahega next year?”
⸻
Built With
- and
- axios
- custom-css
- fastapi-(python)
- geopy
- gpt-4o-mini
- openai
- react-18
- swiss-ephemeris
- timezonefinder
Log in or sign up for Devpost to join the conversation.