Hello,
I trying to extract data from documents and classify them according to
pre-defined categories.
Generally speaking this works okay'ish. The main issue is that the GPT introduces categories on its own, which I don't want. As far as I can understand, it is not something I can solve by modifying the prompt. E.g. here's
an example of someone with the same issue.
However, this should be solvable by
using a structured output with enum looking something like this:
{
"type": "object",
"properties": {
"category": {
"type": "string",
"enum": [
"Technology",
"Finance",
"Health",
"Education",
"Entertainment",
"Science",
"Politics",
"Sports"
],
"description": "The category assigned to the document. Must be one of the predefined values."
}
},
"required": ["category"]
}
The issue is that I get an
'Arrays of primitive types are not supported' error.
Does anyone know if there any workaround for this I want to use AI Builder? Or is the only way to use a model via Azure?