11 ms·
Show HN: I built an app to generate story relationships using Mermaidjs
- ozim 1y agoI was thinking JIRA stories, well corporate dev dirty mind.
- error2go 1y agoWas thinking the same. Could be a very useful tool to discover non obvious relationships between items in a large backlog
- infogulch 1y agoYou know Alice who wants to delete her account, and Bob who wants to change his password? Maybe the reason why they want to take account actions all of a sudden is because they're in the middle of a breakup and they're having trouble deciding how to divide their assets. We always take entities in our "user stories" as faceless actors with only enough depth to motivate basic actions in our app. What if we've been missing the real story all along, all these users are characters living out a grand Shakespearean drama, and we've been too blind to see it? ... Wow this is great, I can really appreciate the rich dynamic between Alice and Bob and Eve with this detailed backstory that links their lives. But it is getting to be a bit much to understand all the relationships now; it would be really helpful to have some way to track and visualize the relationships between all of these users / characters, what do I do?
- knowitnone 1y agoThis is handy. When I read, sometimes I have to go back and figure out who a character is so this is definitely right up my alley.
- herol3oy 1y agoThat was exactly what I struggled with—and still do!
- WillAdams 1y agoHow do typos get fixed? The entry for _The Book of Jhereg_ has "Morio" which is not found in the text (conflation of Morollan and Mario?)
- eterps 1y agoThe system prompt can be found here: https://github.com/herol3oy/austen/blob/main/src/server/routes/v1/getMermaidSyntax.ts https://github.com/herol3oy/austen/blob/main/src/server/rout... It would be more interesting if the graph could be generated by sourcing an arbitrary epub file into a RAG and have it figure out character relations without reading the whole book. I wouldn't be surprised if it all could be done with a script using aichat[1] and rendering the diagram using graphviz. [1] https://github.com/sigoden/aichat https://github.com/sigoden/aichat
- herol3oy 1y agoOh, this is a great idea. I'd love to try it and maybe I could add this feature to the current one! Thank you.
- curtisszmania 1y ago[dead]
- skeptrune 1y agoI tried "The Wise Man's Fear" and the results were not so great[1]. It got a good number of the characters, but only showed them being related to Kvothe. Harry potter worked better'ish, but still not great[2]. My primary interest would be using these relational graphs to generate better structured summaries of stories in a structured JSON object for improved search/recommendations. - [1]https://austen.pages.dev/ecbc2d49-c10d-4e49-ac68-0d37a819b526 https://austen.pages.dev/ecbc2d49-c10d-4e49-ac68-0d37a819b52... - [2]https://austen.pages.dev/ace16c1d-c74e-4737-a98d-5401047a1cdb https://austen.pages.dev/ace16c1d-c74e-4737-a98d-5401047a1cd...
- tshaddox 1y agoThe thought of The Kingkiller Chronicle hasn't crossed my mind in many years, and now I have renewed sadness that the story will never be finished. :'(
- WorldMaker 1y agoPat Rothfuss is still working on it, last I heard.
- DavidPiper 1y agoThis is one of those sentences whose meaning subtly changes depending on which word you put the emphasis on :-)
- michaelbrave 1y agoI choose to put the emphasis on 'is'
- napoleongl 1y agoWild that I was daydreaming earlier today about generating some diagrams with mermaid to show the plot and characters over the lifetime of a tv series!
- herol3oy 1y agoThis is a neat idea! My first try will be "The Sopranos".
- kacesensitive 1y agoI did Dungeon Crawler Carl - hilariously wrong graph TD A[Carl] -->|Pet| B[Princess Donut] A -->|Enemy| C[Mordecai] A -->|Allies| D[Ellie] A -->|Allies| E[Katia] A -->|Enemy| F[The System] B -->|Rival| G[Bea] D -->|Friend| E E -->|Friend| A
- arkensaw 1y agoi'm suffering some frequency illusion right now because I only heard about Dungeon Crawler Carl for the first time, literally yesterday and today here it is in a comment
- kacesensitive 1y agoIt's by far my favorite series. Def pick it up if you have time!
- kinow 1y agoMine too. I was disappointed I was going to be left with nothing exciting to read after The Wandering Inn, but this series is amazing. +1 on the suggestion!
- kinow 1y agoI am reading it right now and thought what would be the outcome of doing the same! Bea being Donut's rival… sounds interesting. Depending how you interpret it, it's not entirely wrong? Carl being enemy of Mordecai looks really wrong though. As for Carl being an enemy of the System (I assume the AI), that's also debatable. And if the friend of a friend rule applied here, I think Carl would be a friend of Ellie too, since Carl is a friend of Katia, and Ellie is a friend of Katia too. And they are all allies. Weird.
- MarcelOlsz 1y agohttps://gitdiagram.com/ https://gitdiagram.com/ does something similar.
- wduquette 1y agoAre story relationship diagrams of this kind a common thing that the OP's tool produces automatically, or did he devise both the tool and the diagram?
- memhole 1y agoFor anyone vibe checking the results: https://novelchallenge.github.io/ https://novelchallenge.github.io/ At best you’re looking at 60% or so accuracy
- skeptrune 1y agoActually incredibly good benchmark site, thanks for sharing!
- aardvark179 1y agoTried Book of the New Sun. Apparently Terminus Est (a sword) is Severian’s companion, and it completely fails to mention Dorcas. Oh well.
- aardvark179 1y agoThen tried Little, Big by John Crowley and the relationships were probably wrong. I mean, Sylvia might be related to George Mouse, but probably should not have a family connection to Daily Alice.
- herol3oy 1y agoHi, I created the app. I appreciate all of your comments. I know some may find the result of a book not concise or accurate. One issue was that I couldn't afford the price of a better LM service. At first, I tried a free tier of Gemini, but its results were disappointing. Later, I switched to DeepSeek and got better results.
- scryers_bloom 1y agoIt's impressive you're able to have decent results from free tiers and open source models.
- blancotech 1y agoNice idea but the results weren't comprehensive for the book I tested. I find that chatgpt with web search enabled does a better job with the simple prompt "Create a relationship diagram for the characters in <BOOK TITLE> using mermaidjs. Include the relationships between people."
- hofo 1y agoDorothy is the “enemy” of the Wizard?
- IncreasePosts 1y agoIt would be neat if this could handle spoilers. Imagine a friend becomes an enemy 75% of the way through the book. Would there be some way to say "What are the character relationships - I'm on chapter 7 right now"?
- maxwellg 1y agoNeat! Putting in reference books gives you a nice overview of the book's contents. Fun to think of database transactions as a character with relationships. https://austen.pages.dev/c2276990-1f2a-40e6-bd26-0cabb55d7132 https://austen.pages.dev/c2276990-1f2a-40e6-bd26-0cabb55d713...
- kretaceous 1y agoI tried Circe. It said Circe --Daughter--> Helios. So I thought oh it's supposed to be "Circe is Helios' daughter" but then it had Circe --Brother--> Aeetes and Circe --Mentor-->Hermes.
- banku_brougham 1y agoYup those Greek gods were nothing but drama and problems.
- febed 1y agoLLMs make it really trivial to work with MermaidJS. Just yesterday I used it to sketch out some business logic. Seeing the whole flowchart like that helped me catch some corner cases.
- aitchnyu 1y agoWhich cheap LLMs are good for Mermaid, and to sketch graphs from code? I had to switch between the cheap LLMs and "tutor" them a bit to edit Mermaid in a Markdown file, although Claude seems perfect.
- iddan 1y agocould be cool to have pride and prejudice in the examples in the main page
- herol3oy 1y agoFair point. I’ll add it.
- rmnclmnt 1y agoJust tried with « Time out of joint » from Philip K Dick, and it got it right… but only the first half of the story! Guess, there is no spoiler then
- aitchnyu 1y agoI tried One Hundred Years of Solitude, which has a family tree before main text. Wish the app mentioned the 17 illegitimate sons, all with same name Aureliano.
- atoav 1y agoHow does that deal with the important fact that a lot of stories are about relationships changing over time? A enemy can become a friend and vice versa.
- mmoustafa 1y agoCool idea, but from my tests it seems like the LLM needs more grounding since it misses lots of characters. Maybe a list of the actual characters in the story? I had the same problem with https://timelines.0xmmo.co https://timelines.0xmmo.co where I had to ground it in Wikipedia articles.
- herol3oy 1y agoI love the timeline! Are we limited to search for some keywords? I tried some countries but couldn’t find them in the results!
- 01115944268 1y ago[flagged]