I have a GPT function defined as below; which contains a list of job/income source for user query:
[
{
“name”: “income_source”,
“description”: “For when a user describes what they do for a living or how they earn their income”,
“parameters”: {
“type”: “object”,
“properties”: {
“main_source”: {“type”: “string”,“enum”: [
"Growing of wet rice farming",
"Growing of dry rice farming",
"Growing of maize",
"Growing of soya beans",
"Growing of mung beans (green, black and red)",
"Growing of peas",
"Growing of peanuts",
"Growing of sacha inchi",
"Growing of sesame",
"Growing of cocoa",
"Growing of tea"]
```,
"description": "What user does for a living or what they do for work, and must ONLY match one or more options from this argument's list of enum options provided"}
}
}
}
]
Usage scenario:
Message to user: "Please describe in more detail what you do for a living"
User enters : "I work in a farm cultivating rice".
GPT in this case always return the 1st enum value matching rice, ie. wet rice farming --- when they system message below expects multiple possible option: ["Growing of wet rice farming", "Growing of dry rice farming"].
SYSTEM MESSAGE:
"...Whenever the "income_source" function is matched, if users' message does not confidently match any of the options in the function's parameter "main_source" list, then it is mandatory that you search & return a list of possible close-match options that appear in the "main_source" enum paramter list.
Example below:
User says:"rice",
You return matched options: ["Growing of dry rice farming","Growing of wet rice farming"]...."
Any clues for solution on this please?
P.S. prompt/solution works fine for others, eg. "We cultivate cocoa in our business", will match the expected *Growing of cocoa* value.