For my GPT, I have an action where I call an endpoint. the API takes a series of optional query parameters used for filtering. For one of the parameters, the value is an array of specific strings defined in an enum within the schema.
However, the GPT action is ignoring this validation, and hallucinating values based on what I pass in the description.
Using the API below, the action is passing an array of values such as [“random_control_trial”], [“RCT”] etc instead of the valid [‘rct’].
Here is a modified, simplified version of my schema as an example. I am confident that the full schema is valid and correct.
{
...
"paths": {
"/search": {
"get": {
"description": "An endpoint that can be called to ask a question of research papers",
"operationId": "search_papers",
"parameters": [
...
{
"description": "List of study types to include in the search, such as random control trials, meta analyses, systematic reviews, obvservational studies, case reports, etc. ...",
"in": "query",
"name": "study_types",
"required": false,
"schema": {
"default": [],
"description": "List of study types to include in the search, such as random control trials, meta analyses, systematic reviews, obvservational studies, case reports, etc. ...",
"items": {
"$ref": "#/components/schemas/StudyTypeKewordEnum"
},
"type": "array"
}
},
...
],
...
}
}
},
"components": {
"schemas": {
...
"StudyTypeKeywordEnum": {
"description": "All possible study types strings saved to search index documents.",
"enum": [
"literature review",
"systematic review",
"case report",
"meta-analysis",
"rct",
...
],
"title": "StudyTypeKeywordEnum"
},
...
},
...
}
}
Any ideas?