Creative Narrative:  

NLP    Human   AI

 Lynn Cherny

Ph.D. (Linguistics), alt-academic

@arnicas.bsky.social

arnicas.substack.com

 

TIP: Press space to go thru all slides in order

Terminology

  • NLP =  "Natural Language Processing," often done by computational linguists
  • Procedural generation (or "procgen") = rule-based, often combinatoric, not assumed to be AI (and increasingly assumed not to be)
  • Hallucination = "making stuff up," in the context of an AI model, which may or may not be true
  • Narrative = 

Table of Contents

  • Inspirations / Background
  • Creative Narrative Structures
  • Reading Better AI Toys
  • Creative Projects with Books
  • "Regenderizer" (hard-core NLP creativite effort)
  • Semantic Search (creatively)
  • LLMs
  • Simulated Agents
  • Data to Story
  • Wrapup/More refs

Inspirations

Fandom & Fanfic

Fan fiction uses fiction to respond to fiction... the insights about the work get expressed not through nonfictional argumentation but rather through the construction of new stories"

Henry Jenkins

Fan "Remix"

 

  • adding to the material (the missing next ep. or scene)

  • deleting from -- the relationships that seems more boring/normative, the dull characters...

  • queering things ("slash")

Oulipo: "Ouvroir de littérature potentielle"

"the seeking of new structures and patterns which may be used by writers in any way they enjoy"

"Emergent Narrative"

Emergent narrative refers to stories that arise (or are found) from player interactions with a game's systems, rather than being pre-designed/written

System features supporting it:

  • Complex system rules that can't be entirely understood, with randomness
  • Strong "player" role in the system
  • Community - people to tell the story to (a story is a thing worth telling)

 

Story sifting, also known as story recognition, has been identified as one of the major design challenges currently facing interactive emergent narrative"

Max Kreminski, Felt

currently in Midjourney's Story Lab

Dwarf Fortress Emergent Narrative

Dwarves that were sufficiently unhappy could throw a tantrum. The problem was that after the first tantrum, the resulting bad events caused unhappiness levels to rise among all those affected, leading to further tantrums, and the eventual fall of the fortress.

Tarn Adams

Creative Narrative Structures

super briefly ...

(2016 link)

Studies of Fiction Corpora

Experimental Reading/Narrative UIs:  Penrose  (link)

CYOA Books

"Storylets" and Other Game Structural Tricks

"branch and gate" (link)

Authors' Own Sketches...

Reading Made Easier

Light experiments that took a couple hours max, but punch big for me

French Book Teaching Helper

With Memory

This could be a good text annotation/labeling tool for research :)

"PLOTTO"

Creative Projects with Books

...using NLP

Illustrate any Gutenberg Book, on demand

Lexica's search api - https://lexica.art/

It needs to be fast -- Ideally a local model, but I used 2 apis for my demo:

Replicate -- https://replicate.com/explore

spaCy for noun phrase extraction and ordering + random choice

What if ebooks came out with trained LoRA illustration models, via paid artists' work?

Jane Austen

"Regenderizer"

a hardcore NLP creative effort (in progress forever)

this was a fan work of collage

It is a truth universally acknowledged, that a single man in possession of a good fortune must be in want of a wife.

However little known the feelings or views of such a man may be on his first entering a neighbourhood, this truth is so well fixed in the minds of the surrounding families, that he is considered as the rightful property of some one or other of their daughters.

“My dear Mr. Bennet,” said his lady to him one day, “have you heard that Netherfield Park is let at last?”

Mr. Bennet replied that he had not.
[Mrs. Bennet]

cataphor, anaphor, bridging

Jane A is very tricky -- and so is this problem

NLP Work

  • A lib from David Bamman at UC Berkeley, BookNLP -- for labeling coreference and gender (with a small LSTM at the time)
  • Adapted David's hand labeling-in-the-terminal-tool (faster than a web ui!) for longer workflows
  • Using it, corrected coref preds for the entire book, plus adding terms I wanted to modify gender-wise. It took me a year.
  • Wrote horrible code of lookup tables and heuristics
  • ... It ran for some cherry picked characters hand-coded in a notebook

 

 

I have not revisited it with LLMs / cleanup, but did start a web ui...

Also, collectives with gender: the daughters, Kitty & Lizzy, soldiers, etc.

 

Not to mention social, dress, and het/norm assumptions all over

You have a lot of referring expressions to customize if you want to change their identity

"If I can but see one of my sons happily settled at Netherfield," said Mr. Bennet to his wife, "and all the others equally well married, I shall have nothing to wish for."

Her character was decided. She was the proudest, most disagreeable woman in the world, and everybody hoped that she would never come there again.

Semantic Search

 

Lots of creative mileage from embeddings!

Fairy Tale Embedding Game

  • Gutenberg Books fairy tales, split up by sentence
  • NLP: ran a classifier to find more descriptive sentences (a BERT model)
  • a very very light-weight embedding db of descriptive lines from fairy tales.

Cluster map of the embedded lines

Using

Ian Johnson's

Latent Scope

I have bought a lot of map art assets

Filling in the map...

(WIP)

NaNoGenMo 2024

"National Novel Generation Month"

  • Top 100 Most Popular Gutenberg Books → filtered down to English, no dupes, no porn (87)
  • Embed with a small fast model
  • Load into ChromaDB
  • Start from "Once upon a time, in a land far away"... get most similar sentence, repeat, and end with "They lived happily every after."

https://github.com/arnicas/nanogenmo_embed_top100

"Once upon a time..."

<closest match text>

.

"They lived happily ever after."

<interpolate between>

.

.

It was a dry cold night, and the wind blew keenly, and the frost was white and hard.

Dickens, Great Expectations

 

Though it was a warm pleasant sort of a night now yet wonderfully cool for the season considering, for sunshine after storm.

Joyce, Ulysses

It was a bright Sunday morning of early summer, promising heat, but with a fresh breeze blowing.

Joyce, Dubliners

In the sunshine the air was warm, and that warmth was particularly pleasant with the invigorating freshness of the morning frost still in the air.

 Tolstoy, War and Peace

The sun had been shining brightly all day on the roof of my attic, and the room was warm.

Dickens, Great Expectations

"It was night and chilly."

"It was sunny and hot."

VAE Poems - Interpolating

From a talk of mine in 2019 (inspired by some work of Allison Parrish's while she was in residence at Runway)

Structured LLMs

Structuring the Crazy/Fun

Discourse Structure Guides

Tracery, Kate Compton

S   NP VP

NP  Det (AP) N

VP  V (PP)

V → ['ran', 'walked']

Origin: ["#NP# #VP#"]

NP: ["#N.s#", "#Adj# #N.s#"]

VP: ["#V#", "#V# #PP#"]

V: [ "ran", "walked"]

PP: ["in the Danish rain"] (or use more grammar rules to build)

CFG:

Tracery:

FYI, how I met Kate

Teaching data vis, showing kids how to make a map, hook up APIs (flickr) and Tracery bios of rat sightings in NYC

a project inspired by a trip to venice and some directions I was given...

"Directions in Venice"

Nanogenmo years ago...

Functions:

Call Custom trained GPT-2 (on historical texts and guidebooks about Venice) sometimes

Call Flickr for photos of Venice

 

(the repo)

GPT2 is still the most charming babbler!

"Agents" (in the sim sense)

Data to Story

My Dwarf2Text (Was Mediocre)

Turning Dwarf Fortress generated characters (XML db) into text bios, using Tracery and pre-LLM table-to-text rules.

Thruni Glazedspooned was a human. Thruni Glazedspooned was killed by Nocpur Haleflew The Snarling Simplicity (a killer of unknown race) in the uncapped Lancedsneaks (cruelly struck down) in year 111. He was no good at anything useful. He was a member in the The Confederations Of Duty, an organization of humans. He was related to 3 others. He lived for 6 years."

Facts, events, without narrative.

Claude, "Given this paragraph of dry facts, can you rewrite it to make it a good story? Obey the facts, but focus on telling it better."

The streets of Lancedsneaks had always been dangerous, but none could have predicted the tragedy that would unfold there in the year 111. Young Thruni Glazedspooned, barely six years old, walked those uncapped paths despite the warnings of his three family members. Like many children born into the human organization known as The Confederations of Duty, he was still searching for his place in the world, his talents yet undiscovered.

Some would later say he was "no good at anything useful," but they never saw how his eyes lit up when he told stories to his younger cousins, or how he would spend hours watching the craftspeople at work, dreaming of the day he might find his own calling. But those dreams would remain forever unfulfilled.

On that fateful day, the shadows of Lancedsneaks held a deadly secret. Nocpur Haleflew, a mysterious figure known only by whispers and the chilling epithet "The Snarling Simplicity," struck with cruel precision. Young Thruni never stood a chance. The streets that had witnessed his daily wanderings now bore witness to his final moments.

His death sent ripples through The Confederations of Duty, a stark reminder of the dangers that lurked in their world. Though Thruni's life was brief, lasting only six turns of the seasons, his story would be remembered as a cautionary tale in the uncapped streets of Lancedsneaks, where shadows sometimes hide creatures like The Snarling Simplicity, waiting to cut short the lives of those who dare to dream.

Games lie between stories and toys on a scale of manipulability. Stories do not permit the audience any opportunity to control the sequence of facts presented. Games allow the player to manipulate some of the facts of the fantasy, but the rules governing the fantasy remain fixed. Toys are much looser; the toy user is free to manipulate it in any manner that strikes his fancy. The storyteller has direct creative control over his audience’s experience; the game designer has indirect control; the toymaker has almost none.

- Chris Crawford, The Art of Computer Game Design

story

game

toy

STORY

GAME / dynamic / goal-directed

TOY  / dynamic / emergent goal

BOOK / static / goal-directed

Wrapup: What can we learn today...

What do you want/need as a creative, from NLP and AI?

As an NLP person, what are some toys that could be built from your work, that might open up new areas of thought?

In conclusion...

 

Bluesky: @arnicas.bsky.social

Mastodon: @arnicas.mstdn.social

 

arnicas.substack.com is on topic.

 

a few more reference links follow...

 

 

 

My newsletter tracks a lot of related news (games, procgen, AI creativity, folklore, weirdness, NLP):  arnicas.substack.com

A few more link refs related...

Old Junk

"One of our favorite unanticipated uses for NotebookLM has been RPG players and DMs using it for games."

book(s)       game

What can creative app builders learn from NLP?

Possibilities

  • Data sets  -- books, labeled data, plot summaries, ...
  • Data extraction tricks -- BookNLP, entities, 
  • Tools & Techniques for improving narrative output
  • Research methods: 
    • Doing search on prior art
    • How to evaluate output
    • How to pick the right model (benchmarks exist)
    • How to train a model for a particular task

What can NLP practitioners learn from creative designers, games, etc?

  • Reasoning environments, or gyms
  • Goals and challenges -- Chess, Go, etc. Some of the first AI targets.
  • Game corpora -- game contents + player data (as cultural artifacts)
  • Productization of theory:
    • Branching narrative choices
    • Hierarchical narrative
    • Character (or player) modeling
    • Dialogue comprehension
    • Deixis/reference in 3d worlds
  • New research agendas defined by practice: 
    • What makes something fun or interesting?
    • What's good (enough) generative writing?
    • What do writers (book or game) need?