What are some best practices for describing to the Assistant the different choices in an enum, so that it can determine which value the user wants without having to make a literal match?
For example, I have a function, and the parameter choices are custom terms that are specific to some use case.
{
"name": "load_box",
"description": "Load the box with a special thing.",
"parameters": {
"type": "object",
"required": [ "thing" ],
"properties": {
"thing": {
"type": "string",
"description": "The special thing to load into the box",
"enum": [
"foozle",
"bartingus",
"gherp",
"krenket"
]
}
}
}
}
Now I want to empower the Assistant to make choices based on descriptions of those terms. I don’t see support in the JSON schema for describing them. I tried file_search, uploading this text file:
This document describes special things that can be loaded in a box.
• A foozle is a round red squishy thing.
• A bartingus is a square green squishy thing.
• A gherp is a round blue hard thing.
• A krenket is a square yellow hard vegetable.
It didn’t really work. For example, “load the box with a blue thing” would result in it picking one of the choices arbitrarily then attaching the adjective - e.g. “I loaded the box with a blue foozle”.
In one test, I asked it a question that triggered retrieval, and once the choice descriptions were in the chat history, it started working. That suggests that one workaround would be to add a hidden message to the history with the descriptions, but that doesn’t seem practical since it would fall out of the context window.
One time I was it actually do retrieval first, then it ran the function call, which makes me thing that describing things through retrieval perhaps isn’t the best approach.