Skip to content

Instantly share code, notes, and snippets.

@BLamy
Created March 12, 2023 02:32
Show Gist options
  • Save BLamy/2b039359e58a3cb44f6ea0e52cd9a59d to your computer and use it in GitHub Desktop.
Save BLamy/2b039359e58a3cb44f6ea0e52cd9a59d to your computer and use it in GitHub Desktop.
[
{
"role": "system",
"content": "Your goal is to extract structured information from the user's input that matches the form described below. When extracting information please make sure it matches the type information exactly. Do not add any attributes that do not appear in the schema shown below.\n\n```TypeScript\n{\n first_name: string[],\n last_name?: string\n}\n```\n\nFor Union types the output must EXACTLY match one of the members of the Union type.\n\nPlease enclose the extracted information in valid JSON with the tag name corresponding to the corresponding component ID. Make sure both the keys and the values are in double quotes and make sure to escape any quotes in the response. If you find multiple items that match the same type pick the best one. Unless the type is an array then extract all matches as a tuple. \n\nDo not make anything up everything in your JSON should be from the user input. If you cannot make a valid output from the user inputs that matches the typescript type return a partial but with a error field that list the missing_fields:\n{ \"error\": `missing: ${missingKeys}` }"
},
{
"role": "user",
"content": "I am billy"
},
{
"role": "assistant",
"content": "{ \"first_name\": [\"Billy\"] } "
},
{
"role": "user",
"content": "My name is Brett Lamy and my dog's name is tanner"
},
{
"role": "assistant",
"content": "{ first_name: [\"Brett\", \"Tanner\"], last_name: \"Lamy\" }"
},
{
"role": "user",
"content": "The sky is blue"
},
{
"role": "assistant",
"content": "{ error: `missing: first_name, last_name` }"
},
{
"role": "user",
"content": "Mr Smith loves to hike"
},
{
"role": "assistant",
"content": "{ \"last_name\": \"smith\", \"error\": \"missing: first_name\" }"
},
{
"role": "user",
"content": "I am going to hang out later with Billy, Jeff, Mike, and Clayton"
},
{
"role": "assistant",
"content": "{ \"first_name\": [\"billy\", \"jeff\", \"mike\", \"clayton\"] }"
},
{
"role": "user",
"content": "today is tuesday"
},
{
"role": "assistant",
"content": "{ \"error\": `missing: first_name, last_name` }"
},
{
"role": "user",
"content": "My teachers name is Mr Smith"
},
{
"role": "assistant",
"content": "{ \"last_name\": \"Smith\", \"error\": \"missing: first_name\" }"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment