LS
← All projects

01 / AI / NLP

Scenegraph.

An LLM pipeline that turns prose into dialogue direction using persistent character and relationship memory.

My work
Pipeline, memory, and evaluation
Built with
Python · FastAPI · JavaScript · LLMs
Scenegraph Bonds viewer showing curved, color-coded relationships between characters in The Pearl.
Character relationships at a selected point in the story.

Pipeline

  1. 01IngestText
  2. 02AttributeSpeaker + addressee
  3. 03Build memoryCharacters + relationships
  4. 04DirectContext + delivery
  5. 05RenderSSML + emphasis

Architecture

Text is segmented into scenes and attributed utterances. Python builds character and relationship memory in SQLite; a FastAPI backend and JavaScript viewer expose the pipeline’s state.

Memory

Character state and directed relationship notes are versioned by story position. Each line reads earlier state, with separate views for hidden and audience-known context. Memory is updated per scene and reused across dialogue.

Output & evaluation

The model produces delivery notes and word-level emphasis. A deterministic renderer converts them into SSML and TTS controls. An ablation harness removes, swaps, or rewrites memory to test its effect on generation; prompt audits and full outputs make runs inspectable.

Discuss Scenegraph
Next projectSGEN