Skip to content

LPGCast

LPGCast reads short texts — messages, tickets, notes — and writes what they state as a labeled property graph, typed by a GraFlo schema you govern.

Each text gets one model call, checked against the schema. What fails a check is corrected at most twice, then quarantined, never guessed. Every vertex, edge and property keeps the quote it was read from.

It is for teams that already have a schema and want text to land in it.

uv add lpgcast

Quick start How a cast works

A short text becomes typed vertices and edges of a governed schema; each one points back at the quote it was read from. A short text Person Machine Sensor OPERATES MOUNTED_ON power 37.5 Typed by the schema

Early development

LPGCast is on PyPI (pip install lpgcast) and its API may still change; see Installation.

What it does

One call, checked

The model sees only the slice of the schema the text is about, and replies in a flat format of vertices, edges and quotes. Types, relations, properties, values, identities and quotes are checked; a reply that fails gets a typed correction, at most twice.

Identities, not guesses

A vertex is written only when the text states its identity. An entity the text merely refers to is looked up by its key, never created again. Writing a cast twice leaves a database that upserts unchanged.

Grounded and replayable

Every assertion carries its source, character span and quote. Replies are cached by request, so a replay makes no request and reproduces the graph byte for byte.