Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
After the deployment is added successfully, you can query the deployment for intent and entities predictions from your utterance based on the model you assigned to the deployment. You can query the deployment programmatically Prediction API or through the Client libraries (Azure SDK).
You can use Language Studio to submit an utterance, get predictions and visualize the results.
To test your model from Language Studio
Select Testing deployments from the left side menu.
Select the model you want to test. You can only test models that are assigned to deployments.
From deployment name dropdown, select your deployment name.
In the text box, enter an utterance to test.
From the top menu, select Run the test.
After you run the test, you should see the response of the model in the result. You can view the results in entities cards view, or view it in JSON format.
First you will need to get your resource key and endpoint:
Go to your resource overview page in the Azure portal. From the menu on the left side, select Keys and Endpoint. You will use the endpoint and key for API requests.
Create a POST request using the following URL, headers, and JSON body to start testing an orchestration workflow model.
{ENDPOINT}/language/:analyze-conversations?api-version={API-VERSION}
Placeholder | Value | Example |
---|---|---|
{ENDPOINT} |
The endpoint for authenticating your API request. | https://<your-custom-subdomain>.cognitiveservices.azure.cn |
{API-VERSION} |
The version of the API you are calling. | 2023-04-01 |
Use the following header to authenticate your request.
Key | Value |
---|---|
Ocp-Apim-Subscription-Key |
The key to your resource. Used for authenticating your API requests. |
{
"kind": "Conversation",
"analysisInput": {
"conversationItem": {
"text": "Text1",
"participantId": "1",
"id": "1"
}
},
"parameters": {
"projectName": "{PROJECT-NAME}",
"deploymentName": "{DEPLOYMENT-NAME}",
"directTarget": "qnaProject",
"targetProjectParameters": {
"qnaProject": {
"targetProjectKind": "QuestionAnswering",
"callingOptions": {
"context": {
"previousUserQuery": "Meet Surface Pro 4",
"previousQnaId": 4
},
"top": 1,
"question": "App Service overview"
}
}
}
}
}
Once you send the request, you will get the following response for the prediction!
{
"kind": "ConversationResult",
"result": {
"query": "App Service overview",
"prediction": {
"projectKind": "Orchestration",
"topIntent": "qnaTargetApp",
"intents": {
"qnaTargetApp": {
"targetProjectKind": "QuestionAnswering",
"confidenceScore": 1,
"result": {
"answers": [
{
"questions": [
"App Service overview"
],
"answer": "The compute resources you use are determined by the *App Service plan* that you run your apps on.",
"confidenceScore": 0.7384000000000001,
"id": 1,
"source": "https://learn.microsoft.com/azure/app-service/overview",
"metadata": {},
"dialog": {
"isContextOnly": false,
"prompts": []
}
}
]
}
}
}
}
}
}