<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Victor Machiavelli</title>
    <description>The latest articles on DEV Community by Victor Machiavelli (@victor_machiavelli_df3cb6).</description>
    <link>https://dev.to/victor_machiavelli_df3cb6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4234732%2F248bc6b3-3c40-4bad-9018-749de05e7a71.jpg</url>
      <title>DEV Community: Victor Machiavelli</title>
      <link>https://dev.to/victor_machiavelli_df3cb6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/victor_machiavelli_df3cb6"/>
    <language>en</language>
    <item>
      <title>How I stopped an AI astrologer from making things up: ephemeris facts, book grounding and a fact-checker</title>
      <dc:creator>Victor Machiavelli</dc:creator>
      <pubDate>Tue, 10 Nov 2026 08:12:47 +0000</pubDate>
      <link>https://dev.to/victor_machiavelli_df3cb6/how-i-stopped-an-ai-astrologer-from-making-things-up-ephemeris-facts-book-grounding-and-a-c0h</link>
      <guid>https://dev.to/victor_machiavelli_df3cb6/how-i-stopped-an-ai-astrologer-from-making-things-up-ephemeris-facts-book-grounding-and-a-c0h</guid>
      <description>&lt;p&gt;I'm a solo founder building &lt;a href="https://astralread.com/en" rel="noopener noreferrer"&gt;AstralRead&lt;/a&gt;, an AI astrologer. You enter your birth date, time and place; it computes the chart and an LLM writes the reading, then you can ask follow-up questions in a chat.&lt;/p&gt;

&lt;p&gt;The first version had one big problem, and it's the same problem every "LLM + domain" product has: &lt;strong&gt;the model confidently invented things&lt;/strong&gt;. Not vague horoscope fluff — concrete, checkable errors. "Your Mars squares your Moon" when there is no such aspect. "Venus in your 7th house" when it sits in the 6th. A retrograde that ended two months ago. To a person who knows their chart, one such sentence kills trust in the whole reading.&lt;/p&gt;

&lt;p&gt;Here's what fixed it, in the order it mattered.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The model never computes anything
&lt;/h2&gt;

&lt;p&gt;Astrology is, under the hood, astronomy plus a lookup table. Planet positions, house cusps and aspects are deterministic — so the LLM should never be asked to produce them.&lt;/p&gt;

&lt;p&gt;Every chart is computed with the &lt;strong&gt;Swiss Ephemeris&lt;/strong&gt; (the same engine professional astrology software uses): longitudes, signs, houses (Placidus by default), angles, and every aspect with its exact orb. Transits are computed day by day, so "when does this start and end" comes from the ephemeris, not from the model's memory of 2023.&lt;/p&gt;

&lt;p&gt;The model receives this as a compact fact sheet, e.g.:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sun 6°45' Sagittarius, house 5
Mars square Saturn, orb 1.2°, TIGHT
Lilith in Leo, house 12
Transit: Saturn conjunct natal Moon, exact 2026-12-03 (window 11-18 … 12-21)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;…and the instruction is to interpret &lt;em&gt;these&lt;/em&gt; facts, nothing else. That alone removed most invented aspects — but not all. Models still "remember" a classic aspect pattern and slip it in.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. A fact-checker that reads the answer back
&lt;/h2&gt;

&lt;p&gt;After generation, a separate pass parses the reading and checks every astrological claim against the computed chart:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;every "X in sign Y" / "X in house N" — does it match the chart?&lt;/li&gt;
&lt;li&gt;every aspect named — does it exist, with this aspect type?&lt;/li&gt;
&lt;li&gt;every date — is it inside the computed transit window?&lt;/li&gt;
&lt;li&gt;house rulers — e.g. both the traditional and modern ruler for Scorpio, Aquarius and Pisces are accepted, anything else is not.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A claim that fails is either cut (if the sentence is decorative) or sent back to the model with a targeted correction ("Mars–Moon square does not exist in this chart; the Moon's tightest aspect is a trine to Jupiter, 0.8°"). Regex + a small parser does most of this; it doesn't need another LLM.&lt;/p&gt;

&lt;p&gt;This is the part I'd recommend to anyone building a domain assistant: &lt;strong&gt;compute facts deterministically, then verify the prose against them&lt;/strong&gt;. The model is the writer, not the source.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Grounding in books, not in "the internet"
&lt;/h2&gt;

&lt;p&gt;Generic astrology text online is a soup of contradictions. I wanted the interpretations to come from a defined canon: classic textbooks (Sergey Vronsky's 12 volumes, Howard Sasportas' &lt;em&gt;The Twelve Houses&lt;/em&gt;, Robert Hand's &lt;em&gt;Planets in Transit&lt;/em&gt; and others), retold, not quoted.&lt;/p&gt;

&lt;p&gt;Retrieval is boring and that's fine: chapters are cut by their actual headings ("Lilith in Leo", "Mars in the 12th house"), so the model gets the exact section for this placement rather than a semantic-search neighbour. Two guards run on the output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;no verbatim quotes&lt;/strong&gt; — a run of ~7 words from a source fails the check (retell, don't copy);&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tone&lt;/strong&gt; — old books are often fatalistic ("weak will", "fatal", "complete dependence"). Those verdicts get softened into psychology, never repeated.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Splitting the reading into sections
&lt;/h2&gt;

&lt;p&gt;A full natal reading is long. One giant prompt produced shallow coverage: the model spent its attention on the Sun and Moon and skimmed the rest. Splitting the reading into sections (personality, love, career, the Moon's nodes, Lilith, Chiron…) — each with its own fact block and book material — made every planet and every tight aspect actually show up, and let the sections run in parallel.&lt;/p&gt;

&lt;p&gt;Speed went from 1–2 minutes to ~10–16 seconds per reading once I moved the main model (an open-weights Qwen) to fast inference hardware with a fallback chain of other models behind it. The fallbacks matter more than they sound: providers rename, rate-limit or retire models without much warning.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Writing for AI search, not just Google
&lt;/h2&gt;

&lt;p&gt;The second half of the project is a knowledge base: ~5,000 pages like &lt;a href="https://astralread.com/en/natal/sun-in-leo-12th-house" rel="noopener noreferrer"&gt;Sun in Leo in the 12th house&lt;/a&gt; — each written from the same books and the same guards, with an answer-first definition, FAQ and the sources.&lt;/p&gt;

&lt;p&gt;Every page has a clean Markdown twin (append &lt;code&gt;.md&lt;/code&gt;: &lt;a href="https://astralread.com/en/natal/sun-in-leo-12th-house.md" rel="noopener noreferrer"&gt;example&lt;/a&gt;), there's an &lt;a href="https://astralread.com/llms.txt" rel="noopener noreferrer"&gt;llms.txt&lt;/a&gt;, and new pages are pushed via IndexNow. A surprise for me: Bing's new AI Performance report shows Copilot already citing these pages around a thousand times in three months — while Google is still slowly deciding whether to index them. If you build content today, look at Bing Webmaster Tools; it's where the AI citations show up first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd do again
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Never let the LLM produce a fact you can compute.&lt;/li&gt;
&lt;li&gt;Read the answer back and check it — cheaply, with code.&lt;/li&gt;
&lt;li&gt;Ground in a small, named canon and forbid verbatim copying.&lt;/li&gt;
&lt;li&gt;Split long generations into sections with their own context.&lt;/li&gt;
&lt;li&gt;Keep a fallback chain of models; assume your favourite one disappears.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to see how it behaves on a real chart, &lt;a href="https://astralread.com/en" rel="noopener noreferrer"&gt;build yours here&lt;/a&gt; — it's free. I'm happy to answer questions about the fact-checker or the ephemeris side in the comments.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>python</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Making a Roblox game with my daughter where the events come from the real sky</title>
      <dc:creator>Victor Machiavelli</dc:creator>
      <pubDate>Mon, 09 Nov 2026 08:41:35 +0000</pubDate>
      <link>https://dev.to/victor_machiavelli_df3cb6/making-a-roblox-game-with-my-daughter-where-the-events-come-from-the-real-sky-105</link>
      <guid>https://dev.to/victor_machiavelli_df3cb6/making-a-roblox-game-with-my-daughter-where-the-events-come-from-the-real-sky-105</guid>
      <description>&lt;p&gt;My daughter is 11. She knows a bit of JavaScript, loves pets, and asks a lot of questions about the stars. So this autumn we made a Roblox game together: &lt;strong&gt;Hatch a Star: Real Sky Pets&lt;/strong&gt;. It opens on Friday, 13 November 2026.&lt;/p&gt;

&lt;p&gt;She is the co-designer: she names pets, picks colors, and says "no, that's boring". I write the code. Here is what we built and a few things I learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: the sky above your head
&lt;/h2&gt;

&lt;p&gt;The biggest pet games on Roblox are about grinding numbers or stealing eggs from other players. We wanted the opposite: a game about the real sky. If a kid sees a meteor in the game on 17 November, they can go outside that night and maybe see a real one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you do in the game
&lt;/h2&gt;

&lt;p&gt;You land on your own floating island in the Milky Way. Eggs appear around the islands; you carry them home to your nest and hatch them. Every pet is a constellation: when an egg hatches, the constellation draws itself with lines in the sky, lights up, and the pet steps out of the stars. A lion cub for Leo, a fluffy ram for Aries, and so on.&lt;/p&gt;

&lt;p&gt;Pets follow you and bring coins. Planet fairies (Mercury, Venus, Mars, Jupiter, Saturn and the rest) give you abilities. There are boss fights, mini-games, a house to decorate, and a Star Atlas with new worlds.&lt;/p&gt;

&lt;h2&gt;
  
  
  The real-sky part
&lt;/h2&gt;

&lt;p&gt;This is the part I'm proudest of.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Night sky.&lt;/strong&gt; At night the stars stand where they really are right now, for a mid-northern latitude. Tap one and you get its name and a short fact. Find a constellation and it stays lit for you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your own star.&lt;/strong&gt; Every player gets a real star from the Hipparcos catalog, forever. The game tells you where to look for it tonight.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Meteor showers.&lt;/strong&gt; The Leonids (peak 17 November) and the Geminids (13–14 December) are real events in the game. Eggs rain from the sky on all servers at the same time, with a shared counter for the whole world.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Worlds open on the calendar.&lt;/strong&gt; Rings of Saturn on 21 November, the Orion Nebula on 28 November, the Pleiades on 5 December, Andromeda on 19 December, the Event Horizon on 26 December. The Atlas shows an honest countdown.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How the sky works in code
&lt;/h2&gt;

&lt;p&gt;Roblox runs many servers at once, and they all have to agree on what is happening in the sky. They must not call the internet for it. So the sky is a plain table in a config file: every event has a UTC time, computed ahead of time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Leonids2026"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Leonids"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;peak&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1794916800&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="c1"&gt;-- 2026-11-17 12:00 UTC&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every server reads &lt;code&gt;os.time()&lt;/code&gt; (which is UTC) and checks the table, so all servers switch at the same second. The Moon phase comes from a small formula as a fallback, so the game never shows a full Moon on a new-Moon night.&lt;/p&gt;

&lt;p&gt;Everything a kid might want to change (pet names, egg odds, prices, dates, colors) lives in Config files with short comments. In January my daughter will re-theme the game herself, and she should not need to touch the logic for that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fair to kids
&lt;/h2&gt;

&lt;p&gt;The game is free. There are some optional purchases, but we decided early:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No paid random items.&lt;/strong&gt; Eggs are hatched only with coins you earn by playing, and every egg shows its odds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No stealing from other players.&lt;/strong&gt; Instead, players near each other carry eggs faster together, and some eggs open only when two friends hatch them together (twin stars like Castor and Pollux).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No fake countdowns&lt;/strong&gt; and no pop-ups you didn't tap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The leaderboard counts kindness&lt;/strong&gt; (stars given to friends, helping new players), not spending.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tools
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Rojo and Luau, files in git, server-authoritative logic, ProfileStore for saves with a migration for every schema change.&lt;/li&gt;
&lt;li&gt;Roblox Studio's built-in MCP server let my coding assistant run play tests, read the console and take screenshots, which helped a lot.&lt;/li&gt;
&lt;li&gt;3D models are partly generated with Roblox MeshGen and the art with AI image tools, then picked and tuned by hand. My daughter vetoed many of them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kids notice everything in the first minute.&lt;/strong&gt; We rebuilt the first 60 seconds many times: you fall through the clouds, a fairy catches you, and the first egg flies in as a meteor right in front of you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phones first.&lt;/strong&gt; Most players are on phones, so every button is big, and the sky glow had to be toned down (the Sun was a white spot when you flew up to it).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real dates make a deadline you can't move.&lt;/strong&gt; The Leonids will not wait for us.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Come and look at the sky with us
&lt;/h2&gt;

&lt;p&gt;Hatch a Star: Real Sky Pets opens on Friday, 13 November 2026. I'll add the link here on launch day. On 17 November, come to the Leonids night, in the game and, if the sky is clear, outside.&lt;/p&gt;

&lt;p&gt;Questions and feedback are very welcome in the comments.&lt;/p&gt;

</description>
      <category>roblox</category>
      <category>gamedev</category>
      <category>lua</category>
      <category>astronomy</category>
    </item>
  </channel>
</rss>
