I was watching a video which introduced me to Kurt Vonnegut shapes of stories. Kurt Vonnegut believed that all stories have simples shapes. He proposed that stories can be categorized into basic shapes based on their emotional arcs. Below are eight example shapes he discussed in his work.
Man in Hole:
- The protagonist starts in a comfortable situation, encounters a problem (falls into a “hole”), and eventually emerges better off than before.
- Example: In many detective novels, the main character faces a challenging case (the hole) and, through solving it, gains greater insight or personal growth.
Boy Meets Girl:
- A character experiences something wonderful (e.g., love or a new opportunity), loses it, but ultimately regains it, leading to a happy ending.
- Example: Romantic comedies often follow this pattern, where two individuals meet, face obstacles that separate them, and then reunite.
Cinderella:
- The protagonist’s life improves over time, faces a significant setback, but then experiences a dramatic rise to a better state than initially.
- Example: The classic “Cinderella” fairy tale, where the main character goes from rags to riches, encapsulates this arc.
From Bad to Worse:
- The protagonist starts in a bad situation, and events continue to deteriorate without improvement.
- Example: George Orwell’s “1984” depicts a character trapped in a dystopian society where conditions progressively worsen.
Which Way Is Up?:
- The narrative is ambiguous, with events fluctuating between good and bad fortunes, leaving the audience uncertain about the protagonist’s ultimate fate.
- Example: Stories with open-ended conclusions or unreliable narrators, such as “The Catcher in the Rye,” can fit this pattern.
Creation Story:
- The narrative begins with a stable situation, descends into chaos, and then resolves back into stability.
- Example: Many mythological tales, like the story of Pandora’s box, start with order, introduce chaos, and then establish a new order.
Old Testament:
- The protagonist receives incremental blessings or rewards over time, without significant downturns.
- Example: The biblical story of Job, who faces numerous trials but eventually receives abundant blessings, reflects this structure.
New Testament:
- The protagonist sacrifices or endures suffering, leading to a significant reward or transformation for themselves or others.
- Example: The story of Jesus Christ, who sacrifices himself and brings salvation to others, exemplifies this arc.
I thought of building a web tool using Claude 3.7 Sonnet that can uses an LLM to generate such shapes.
You can access the tool here https://tools.o14.ai/story-shape.html. You have to enter the story text and provide your OpenAI API key. It is a client side only tool so API key is never sent to our servers.

Below is the result of The Lady with the Dog story – https://www.libraryofshortstories.com/onlinereader/the-lady-with-the-dog.

The above application was generated by Claude 3.7 Sonnet (Extended Thinking) using the below prompt.
Create a client-side web application using HTML, JavaScript, and a charting library (such as Chart.js or D3.js). The application should allow a user to input a story in a textarea. Upon submission, it should analyze the emotional trajectory of the story and visualize it as a chart.
### Functionality Requirements:
1. Input:
- A textarea where users can paste a story.
- A button to generate the story's shape chart.
2. Processing:
- Analyze the sentiment of different segments of the story.
- Divide the story into key moments and assign them a "fortune" score (positive for good fortune, negative for ill fortune).
- Smooth the curve to match Vonnegut's storytelling shapes (e.g., Hamlet, Man in Hole, Cinderella).
3. Output:
- A line chart that plots the emotional trajectory of the story.
- The X-axis should represent the progress of the story from Beginning to End.
- The Y-axis should represent Good Fortune (positive values) and Ill Fortune (negative values).
- Example story shapes to consider:
- Hamlet: Flat with misfortune dominating.
- Man in Hole: Starts well, dips, then rises again.
- Cinderella: Gradual rise with a steep positive ending.
4. Technical Implementation:
- Use HTML/CSS/Tailwind for layout.
- Use JavaScript for processing text and handling user interactions.
- Use Chart.js or D3.js to render the graph.
- Implement basic sentiment analysis using OpenAI LLM
- Ensure the UI is simple and responsive.
### Few-Shot Examples (From Vonnegut's Shapes of Stories):
- Hamlet: Mostly flat, ending in tragedy.
- Man in Hole: Drops to misfortune and recovers.
- Cinderella: Gradually rises, then soars.
It still blows my mind that you can go from a video screenshot to a running application in less than 30mins.
Discover more from Shekhar Gulati
Subscribe to get the latest posts sent to your email.