#Extract intents from a text

9 messages · Page 1 of 1 (latest)

halcyon seal
#

Hi all, is it possible to extract intents from a text using the APIs? I'm trying with openai.Completion.create with davinci but I get totally unrelated results. Am I using the wrong API?

I'm looking to get something like this from a text

{
"intents": [
{
"intent": "weather",
"weight": 0.9
},
{
"intent": "information_request",
"weight": 0.1
}
]
}

something like https://api.openai.com/v1/intents (this url does not work)

Note: I've moved the question from api-discussion channel

worthy warren
#

hey @halcyon seal did you found the answer for this question?

halcyon seal
#

nope 😦

#

it is possible to ask for intents in JSON format but you will get only generated content, not the "real" intents

worthy warren
#

hmmm ughh so basically you have to parse everything

sage saddle
#

Use a completion, use a prompt that provides the format to extract intents in and then provides the content

#

and then adjust the parameters like temperature and etc until it's reliable

halcyon seal
#

I have already done that but I do not feel it is reliable, the same prompt can produce different results with the same text. Also, the weights are nearly randomic.