serhii.net

In the middle of the desert you can say anything you want

04 Jan 2024

Notes in creating a tale motif ontology for my Masterarbeit

For the 231024-1704 Master thesis task CBT task of my 230928-1745 Masterarbeit draft, I’d like to create an ontology I can use to “seed” LMs to generate ungoogleable stories.

And it’s gonna be fascinating.

I don’t know what’s the difference between knowledge graph, ontology etc. at this point.

Basics

I want it to be highly abstract - I don’t care if it’s a forest, if it’s Cinderella etc., I want the relationships.

Let’s try. Cinderella is basically “Rags to riches”, so:

  • Character roles
    • Protagonist
      • Underprivileged protagonist (Cinderella)
    • Benefactor
  • Key plot points
    • Hardship
    • Opportunity
    • Transformation
    • Achievement
  • Thematic elements
    • Transformation
    • Reward?..

Or GPT3’s ideas from before:

"Entities": {
	"Thief": {"Characteristics": ["Cunning", "Resourceful"], "Role": "Protagonist"},
	"Fish": {"Characteristics": ["Valuable", "Symbolic"], "Role": "Object"},
	"Owner": {"Characteristics": ["Victimized", "Unaware"], "Role": "Antagonist"}
},
"Goals": {
	"Thief": "Steal Fish",
	"Owner": "Protect Property"
},
"Challenges": {
	"Thief": "Avoid Detection",
	"Owner": "Secure Property"
},
"Interactions": {
	("Thief", "Fish"): "Theft",
	("Thief", "Owner"): "Avoidance",
	("Owner", "Fish"): "Ownership"
},
"Outcomes": {
	"Immediate": "Successful Theft",
	"Long-term": "Loss of Trust"
},
"Moral Lessons": {
	"Actions Have Consequences",
	"Importance of Trust",
	"Greed Leads to Loss"
}
  • ENTITIES have a:
    • ROLE
      • Protagonist
    • CHARACTERISTICS
      • Poor

Awesome chats with ChatGPT

Here’s it generating an ontology based on the above graph: https://chat.openai.com/share/92ed18ce-88f9-4262-9dd9-f06a07d06acc

And more in UKR: https://chat.openai.com/share/846a5e85-353e-4bb5-adbe-6da7825c51ed

Tale ontology v0.0.1

In bold bits I’m not sure of. In decreasing order of abstraction, with the first two being the most generic ones and the latter ones more fitting for concrete stories.

  • KEY PLOT POINTS:
    • Hardship
    • Disruption
    • Opportunity
    • Transformation
    • Achievement
  • CHARACTER ROLES:
    • Description: most abstract roles for the characters
    • Values:
      • Protagonist
      • Antagonist
      • Object
      • Benefactor
      • Goal object
      • Ally
      • etc.
  • ENTITIES
    • Description:
      • can be characters, important objects, whatever
    • Attributes:
      • Characteristics:
        • … basically adjectives.
        • e.g. Resourceful, motivated, hungry
      • Role: CHARACTER ROLE
  • GOALS
    • Description: what drives the character/entity
    • Attributes:
      • Entity: ENTITY
      • Goal: main goal of entity in this context
    • Example:
      • Thief: steal fish
      • Owner: protect property
  • INTERACTIONS
    • Plaintext description of what’s up between pairs of ENTITIES
    • Example: (’thief’,‘fish’): theft
  • OUTCOMES
    • Attributes:
      • SHORT-TERM: plaintext description
      • LONG-TERM: plaintext description
    • Example: “loss of trust”
    • Optional
  • MORAL LESSONS:
    • Description: short plaintext description
    • Optional
    • examples:
      • “Actions Have Consequences”, “Importance of Trust”, “Greed Leads to Loss”

Remaining issues:

  • Can I generalize to remove “fish” and stuff? Maybe call it object?
  • Two versions of the ontology with different levels of abstractions?

Test 1:

Here’s ChatGPT applying that to Shrek: https://chat.openai.com/share/d96d4be6-d42f-4096-a18f-03f786b802c6

Modifying its answers:

“Using this ontology for abstract fairy tale description, please create a generalized graph structure for THE FIRST HARRY POTTER MOVIE. Focus on the overarching themes and character roles without specific names or unique settings. The graph should include key plot points, character roles, entities, goals, interactions, outcomes, and moral lessons, all described in a manner that is broadly applicable to similar stories.”

Revised Ontology for Abstract Fairy Tale Description

Character Roles
  • Protagonist: Central character facing a challenge.
  • Antagonist: Character or force opposing the protagonist.
  • Goal Object: The objective or person the protagonist seeks.
  • Ally: A supportive character aiding the protagonist.
Entities
  • Description: Characters or significant elements in the story.
  • Attributes:
    • Characteristics: Abstract adjectives describing the entity.
    • Role: One of the defined character roles.
Goals
  • Description: Motivations driving the entities.
  • Attributes:
    • Entity: Reference to an entity.
    • Objective: Abstract goal of the entity.
Interactions
  • Description: General interactions between pairs of entities.
  • Format: (‘Entity1’, ‘Entity2’): Type of interaction.
Outcomes
  • Short-term: Immediate result of the story’s climax.
  • Long-term: Lasting changes or lessons from the story.
Moral Lessons
  • Description: Universal themes or morals derived from the story.

Attempt 2

<

Tools

Nel mezzo del deserto posso dire tutto quello che voglio.