News for hackers. Stuff that matters.

Show HN: I made a state machine framework for guided conversations with LLMs

https://github.com/adlumal/GoalChain

It’s written in Python and I call it GoalChain. It lets you build a conversation flow graph that the user traverses. When there’s enough input it spits out a dictionary with the defined fields. Otherwise it will jump state to state as led by the user.

It was fun to write, and it’s surprisingly effective if you keep in mind you’re prompt-engineering every string and field name.

README.md has a mini-tutorial.

Would be cool to get some ideas for how to build it further and what improvements I could make.

( 3 comments | 6 points | on HN )
Re:Show HN: I made a state machine framework for guided conv... by sailorganymede on Sunday May 26, 2024 @04:14AM (#40480473)
I’m actually currently doing research into this to see how far LLMs can model state machines so this is totally up my alley! Thank you for sharing.
Re:Show HN: I made a state machine framework for guided conv... by VoVAllen on Sunday May 26, 2024 @04:54AM (#40480655)
Is it possible to be integrated with DSPy?
Re:Show HN: I made a state machine framework for guided conv... by OutOfHere on Sunday May 26, 2024 @01:40PM (#40483942)
I don't know why I need it.

I don't know why projects fail to demonstrate a basic example that shows: how to do the job without it, versus how to do the job with it, and let the user decide if it's worth the difference. If a project can't demonstrate such an example for comparison, then it has nothing.