← back to work

CinemaLive

Yarns

Pull a thread. Fall through the movies. A cosmos of cinema you travel by thread — where every connection, even an interpretive one, is a sourced, cited, traversable edge instead of confident fiction.

The problem

Ask an AI for movie connections and it will lie to you beautifully.

The web is full of "how is The Matrix connected to Dune?" — and the answers are confident, fluent, and frequently invented. A model with no ground truth will assert a shared actor that doesn't exist, a thematic parallel it can't support, a release date it half-remembers. The connections sound exactly as authoritative whether they're real or hallucinated, and you have no way to tell which is which.

That's fine for a party trick and useless for anything you'd want to trust. The thing missing isn't fluency — models have plenty. It's a footnote: a way to see where a claim came from and decide for yourself whether it holds.

The solution

Every thread carries a citation.

Yarns is a sourced knowledge graph of cinema wearing a navigable cosmos. Thirty-two cinematic universes orbit as spinning poster-globes; pick one and the rest collapse away while your world blooms — its films circling a glowing sun, its shows on an inner ring, the franchise logo burning at the center. Pull a thread and a ship flies you along the copper line to the next world. Every film and series opens to an original, in-voice write-up: a real synopsis, the crucial scene, grounded production trivia, where it streams right now, and the threads that tie it to everything else.

The point isn't trivia a model made up. Every connection — even an interpretive one — is a sourced, cited, traversable edge. When a card says Neo embodies The Chosen One, a role walked elsewhere by Paul Atreides, Anakin Skywalker, and John Connor, that's an interpretation edge carrying a rationale, a confidence score, and an encyclopedic citation — worn honestly as "a reading," never dressed up as fact. Anyone can ask an AI for parallels and get confident fiction; Yarns hands one back with a footnote.

It runs on the same spine as the rest of this workshop: facts in code, judgment in the model. This is retrieval-augmented generation grounded in a knowledge graph — GraphRAG, where the "retrieval" is graph traversal over a Kuzu graph database rather than a fuzzy vector search, so every fact handed to the model is exact and citable. Graph traversal, the read-only safety gate, and the lineage trace are pure Python and authoritative. The model is reserved for the two things code can't do — turning a question into a precise graph query (Cypher), and turning a cited payload into prose.

Anatomy

See exactly where the line falls.

Five system diagrams trace how a question becomes a cited answer — the core loop, the read-only safety gate that refuses any query that could write, the sourced-edge model that won't let an interpretation pose as a fact, the voice content generated once and stored so the live app needs no model, and the graph itself. Drawn in one visual language: blue is deterministic code, amber is Claude, coral is refused.

Under the hood

What's actually running.

32Cinematic universes
327Films & series
7,238Actors & characters
0Models at runtime

Sourced edges — no citation, no thread

Two kinds of connection live in the graph. Fact edges — shared actor, sequel-of, same director — are structural and verifiable. Interpretation edges — a shared archetype, an echoed arc — are the interesting ones, and the dangerous ones, because a model will happily invent them. So each interpretation edge must carry a rationale, a confidence score, and a citation, and it's shown to you as "a reading · 82%," never as fact. The rule is simple: no source, no edge. That single constraint is the whole difference between a knowledge graph and a hallucination with good posture.

The read-only safety gate — LLM guardrails

This is the guardrail layer around the model: when the optional "ask" feature turns a question into a graph query, that query is never trusted on faith. A pure-Python validator runs first: it blanks string literals, checks for smuggled comments, scans for any forbidden write token, rejects multi-statement payloads, and verifies every label against the real schema. Anything that could modify the graph is refused before it touches the database — the model proposes a query, deterministic code decides whether it's allowed to run. The adversarial battery that proves it (block-these, allow-those) is CI-blocking and must pass 100%.

Generated once, stored forever

Every synopsis, saga, crucial scene, fun fact, actor bio, and character card is generated once, offline, grounded in the committed corpus, and stored as compressed bundles in the repo. The deployed app reads them straight from disk — it needs no model at runtime. A film card opens with zero network calls and zero token spend. The only place a model lights up live is the optional natural-language "ask," and only when a key is present, capped at three asks per visitor per day. Determinism isn't just a reliability choice here; it's what makes the thing free to run and instant to open.

Actor & character cards

The rabbit holes are where the graph earns its name. Click an actor to see every face they've worn across the entire cosmos; click a character for a sourced bio and their thread through the films. The layer now spans every universe: 3,280 actors and 3,958 characters are first-class nodes — 1,385 in the MCU alone — and more than 3,000 of them carry pre-generated, sourced prose: the bio, the powers, the personality, the arc across their world. Those cards are committed bundles read straight off disk, so falling down a rabbit hole costs zero network calls and zero tokens. The graph was always there; the cards are the doors into it.

The myth underneath

Beneath the franchises runs a tapestry of archetypes — The Chosen One, The Mentor, The Fall — and the arc echoes that rhyme across unrelated universes. Twenty archetypes, the embodiment edges that bind characters to them, and a handful of arc echoes turn "these are different movies" into "these are the same story told again." Every one of those bindings is an interpretation edge, so it's sourced and worn as a reading — the mythology is offered, never asserted.

The cosmos is the front door

The interface isn't a page that describes the app — it is the app. A vanilla-JS canvas renders the orbiting universes with no game engine and no three.js: flick to spin, grab to park, pick a world and a black-hole collapse blooms it open; film-to-film jumps fly a ship along the thread so you travel rather than cut. One law governs everything — click anything and everything else gracefully vanishes, so attention always has a single focus. Persona lenses (Wander · Catch me up · Did you know · Everything) re-weight every card to how you like to read.

The graph engine

The data lives in Kuzu, an embedded graph database opened read-only at serve time and rebuilt from human-editable seed YAML at boot. Universes, films, series, actors, characters, archetypes, and the interpretation layer are all first-class nodes and edges, so a question like "who connects these two worlds" is a graph traversal, not a guess. Editing the cosmos means editing YAML and rebuilding — diffable, reviewable, version-controlled.

Stack

Python 3.12
GraphRAG · graph-grounded retrieval-augmented generation
Kuzu graph database · read-only at serve · Cypher
LLM guardrails · pure-Python read-only query validator
Claude Opus · prompt caching · offline generation
FastAPI backend · vanilla-JS canvas cosmos
Live TMDB streaming providers
pytest · CI-blocking safety battery · Docker on Hugging Face

Status

Live on Hugging Face.

The cosmos is up, and it's complete: 32 cinematic universes, 327 films and series, the sourced interpretation layer, the read-only safety gate, the myth tapestry, and a finished people layer — 3,280 actors and 3,958 characters as first-class nodes, over 3,000 of them carrying pre-generated, sourced prose. All of it sits behind a CI-blocking safety battery and serves from committed voice content, so the live app needs no model to open a card. Built over five focused days. The natural-language "ask" is live where a key is present. Go pull a thread.