Hydrating 2,268 Prompt Slots with Haiku
April 1, 2026
Astro Persona has 2,268 prompt slots — one for every combination of planet, zodiac sign, house, and aspect type that the system needs to describe. Each slot is a short astrological voice description: what it sounds like when a chart has Saturn in Scorpio in the 8th house, or Venus in Gemini in the 3rd. These are the building blocks the persona assembler combines at runtime.
Generating 2,268 distinct pieces of content by hand isn't viable. Doing it with a single large API call that sends 2,268 prompts simultaneously runs into Cloudflare Worker body size limits — I hit that wall during testing when a batch of 2,101 slots produced an HTML 500 instead of a JSON response. The fix was smaller batches with configurable size and inter-batch delay.
The hydration tool is a five-tab HTML dashboard that runs against the live Worker API. The Auto-Hydrate tab runs batches autonomously: configurable batch size (default 15), configurable delay between batches (default 1,200ms), pause/resume controls, and real-time cost estimation using Haiku's pricing model with prompt cache awareness. The cached prefix — the shared astrological knowledge system prompt — amortizes across every call in the batch. At scale, cache hits drive effective input costs close to zero.
By the time this was done, all 2,268 slots were filled. Total Haiku cost was well under what I'd budgeted. The prompt cache design decision — putting the entire astrological knowledge base in a shared prefix rather than regenerating it per call — turned out to be the most economically significant engineering choice in the whole system.
The lesson: if you're making many API calls with shared context, structured prompt caching is worth the design investment. The savings aren't marginal.