The standard representation of an astrological chart is a list of planets with floating-point longitudes. Ask most libraries for a chart and you get back something like a dictionary of planet names to degree values. That representation is correct but incomplete.
A chart is a network of relationships: planets in signs, signs ruling houses, planets aspecting each other, lords of houses placed in other houses. A practitioner reads these relationships, a dasha system navigates them and a yoga rule tests them. Flattening this network into a struct loses most of the semantically interesting structure before the application ever sees it.
The graph model
A ChartGraph draws on an ontology of 9 node types and 12 edge types. The node types are:
:ChartRoot node: metadata, ayanamsha, house system, epoch.
:PlanetAny graha: Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rahu, Ketu, plus Ascendant.
:SignOne of 12 rasis. Carries modality, element, direction, ruler.
:HouseOne of 12 bhavas. Carries cusp longitude, natural karakatwa.
:NakshatraOne of 27 lunar mansions. Carries lord, deity, shakti.
:PadaOne of 108 nakshatra quarters. Carries pada number, Navamsha sign, start longitude.
:PatternA multi-body geometric pattern: Grand Trine, T-Square, Yod, Grand Cross, Stellium.
:DashaPeriodA dasha period: mahadasha, antardasha, or deeper sub-period with start/end dates.
:FixedStarA notable fixed star within orb of a planet or cusp. Carries magnitude and signification.
The 12 edge types
Edges carry the relationships that practitioners reason about. Most of the interesting chart interpretation is a path traversal over these edges.
PlacedInOccupiesInNakshatraRulesDispositsAspectsCuspOfBelongsToPartOfPatternConjunctStarDashaLordContainsPeriodFour emitters
A ChartGraph is an in-memory structure. Getting it into a useful target is the job of the emitters.
use vedaksha::graph::*;
let graph = compute_chart_graph(jd, lat, lng, &ChartConfig::vedic());
// Neo4j / any Cypher-compatible graph DB
let cypher = graph.emit_cypher();
// SurrealDB
let surreal = graph.emit_surrealql();
// JSON-LD for semantic web / RAG pipelines
let jsonld = graph.emit_jsonld();
// Pre-chunked text for vector embedding
let chunks = graph.emit_embedding_text();Why this matters for AI agents
When an AI agent receives a flat list of planet-degree pairs, it has to reconstruct the chart's relational structure from scratch. The agent effectively re-implements a simplified version of the chart interpretation layer to answer a question like "which planets aspect the 7th house lord?" This is fragile, slow, and inaccurate.
With a property graph emitter, the agent can run a Cypher query:
MATCH (p:Planet)-[:Occupies]->(h:House {number: 7}})
MATCH (aspector:Planet)-[:ASPECTS]->(p)
RETURN aspector.name, aspector.sign, p.name
The graph model also enables multi-chart queries. Synastry (comparing two charts) is a join between two subgraphs. A transit lookup is an intersection between a natal graph and a transiting planet graph. These queries are awkward with flat arrays; they are natural with a graph schema.
Deterministic node IDs
Every node in the graph has a deterministic ID derived from its content rather than from a random UUID or a database sequence. A Planet node ID is a hash of the chart ID plus the planet name. The Chart node ID is derived from the Julian Day, coordinates, and configuration.
This means two identical chart computations produce identical node IDs, which means upserts are idempotent. Load the same chart twice into Neo4j and you get the same graph. This also allows safe merging of multiple charts into a single database without ID collisions.
Embedding text for RAG pipelines
The embedding text emitter generates pre-chunked natural language descriptions of each node and its immediate neighborhood. Each chunk is sized for a vector embedding: a semantically coherent fragment rather than the whole chart as one block of text. For example:
"Mars is placed in Scorpio in the 8th house at 14°22'. It is the lord of the 1st and 8th houses. Mars aspects the 2nd house (4th drishti), the 3rd house (7th drishti), and the Ascendant (8th drishti). Mars is in its own sign, giving it strength."
Every chunk includes the relevant node IDs so the vector store result can be linked back to the graph for follow-up queries. This enables a hybrid retrieval pattern: semantic search finds the relevant chart region, graph traversal answers the precise relational question.
A flat struct drops a chart's relationships to fit a simpler data model. A property graph keeps them, and the emitters, deterministic IDs and embedding chunks all follow from that choice.