-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change variable reference in ShortPoem to $input to connect to prior step #3
base: main
Are you sure you want to change the base?
Conversation
…eric (bad) limerick instead of valentines day poem
@@ -1,2 +1,2 @@ | |||
Generate a short funny poem or limerick to explain the given event. Be creative and be funny. Let your imagination run wild. | |||
Event:{{$topic}} | |||
Event:{{$input}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not match the definition in config.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you like me to close this request, change the config.json, and PR again?
The config definition doesn't seem important to achieving desired behavior though...
Look at the output of the cell with the original prompt with {{$topic}}
:
✅ Step 1 used function `Summarize`
✅ Step 2 used function `ShortPoem`
✅ Step 3 used function `Translate`
Longform trace:
Step: 0
Description: Summarize given text or any text document
Function: LiterateFriend.Summarize
Input vars: {'input': "Tomorrow is Valentine's day. I need to come up with a love poem. Translate the poem to German."}
Output vars: ['SUMMARY']
Output:
Valentine's day tomorrow. Need love poem. Translate to German.
Step: 1
Description: Turn a scenario into a short and entertaining poem.
Function: LiterateFriend.ShortPoem
Input vars: {'input': '', 'topic': '$SUMMARY'}
Output vars: ['POEM']
Output:
There once was a man named Bill
Who loved to climb up a hill
But one day he slipped
And his pants they ripped
Now he's known as the hillbilly still
Step: 2
Description: Translate the input into a language of your choice
Function: LiterateFriend.Translate
Input vars: {'input': '$POEM', 'language': 'German'}
Output vars: ['RESULT__LOVE_POEM']
Output:
Es war einmal ein Mann namens Bill,
Der gerne auf einen Hügel kletterte.
Aber eines Tages rutschte er aus,
Und seine Hose zerriss.
Jetzt ist er immer noch als Hillbilly bekannt.
Notice that the poem is not a love poem at all ("There once was a man named Bill..."): the ShortPoem skill doesn't make use of the Summarize skill outputs.
If we just change the variable in the ShortPoem prompt to {{$input}}
, we get desired behavior, even without changing config.json
.
✅ Step 1 used function `Summarize`
✅ Step 2 used function `ShortPoem`
✅ Step 3 used function `Translate`
Longform trace:
Step: 0
Description: Summarize given text or any text document
Function: LiterateFriend.Summarize
Input vars: {'input': "Tomorrow is Valentine's day. I need to come up with a love poem. Translate the poem to German."}
Output vars: ['SUMMARY']
Output:
Tomorrow is Valentine's day and I need to write a love poem, which I will then translate to German.
Step: 1
Description: Turn a scenario into a short and entertaining poem.
Function: LiterateFriend.ShortPoem
Input vars: {'input': '', 'topic': '$SUMMARY'}
Output vars: ['POEM']
Output:
Roses are red, violets are blue,
I need to write a love poem, it's true.
But my German skills are quite lacking,
So this could end up quite cracking.
Ich liebe dich, my dear Valentine,
I hope this translation is just fine.
But if it's not
Step: 2
Description: Translate the input into a language of your choice
Function: LiterateFriend.Translate
Input vars: {'input': '$POEM', 'language': 'German'}
Output vars: ['RESULT__LOVE_POEM']
Output:
Rosen sind rot, Veilchen sind blau,
Ich muss ein Liebesgedicht schreiben, das ist wahr.
Aber meine Deutschkenntnisse sind ziemlich mangelhaft,
Also könnte das hier ziemlich schlecht enden.
Ich liebe dich, meine liebe Valentine,
Ich hoffe, diese Übersetzung ist in Ordnung.
Aber wenn nicht...
...otherwise the planner drops the context and returns a generic poem (often a bad limerick) instead of valentine's day poem