I just tried a similar thing in GPT-4. It understands what to do impeccably:
PS: I was curious if it could figure out that that gratitude one wanted a datapoint value of 2 so I tried that one in a fresh session. It can:
PROMPT:
Please convert natural language inputs about progress on Beeminder goals into properly formatted JSON for sending to Beeminder. (Please only respond with valid JSON.)
Goal list:
- “pushups”: total number of pushups
- “gratitude”: distinct things I’ve expressed gratitude for
- “weight”: my weight in kilograms
- “weighins”: number of times I’ve stepped on the scale
Examples:
INPUT: “I just did five push-ups”
OUTPUT: {“goal”: “pushups”, “value”: 5, “comment”: “I just did five pushups”, “reasoning”: “User said they completed 5 pushups”}INPUT: “Woohoo! I’m down to 99kg”
OUTPUT: { “goal”: “weight”, “value”: 99, “comment”: “Woohoo! I’m down to 99kg”, “reasoning”: “User reported their weight as 99kg” }New input: “I’m really thankful that I get to go to a baseball game tomorrow and that Tony sent me a letter”
GPT-4 RESPONSE:
{
“goal”: “gratitude”,
“value”: 2,
“comment”: “I’m really thankful that I get to go to a baseball game tomorrow and that Tony sent me a letter”,
“reasoning”: “User expressed gratitude for two distinct things: going to a baseball game and receiving a letter from Tony”
}