You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/content-safety/quickstart-groundedness.md
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,19 +104,17 @@ Create a new Python file named _quickstart.py_. Open the new file in your prefer
104
104
105
105
---
106
106
107
-
> [!TIP]
108
-
> To test a summarization task instead of a question answering (QnA) task, use the following sample JSON body:
109
-
>
110
-
>```json
111
-
> {
112
-
>"Domain": "Medical",
113
-
>"Task": "Summarization",
114
-
>"Text": "Ms Johnson has been in the hospital after experiencing a stroke.",
115
-
>"GroundingSources": ["Our patient, Ms. Johnson, presented with persistent fatigue, unexplained weight loss, and frequent night sweats. After a series of tests, she was diagnosed with Hodgkin’s lymphoma, a type of cancer that affects the lymphatic system. The diagnosis was confirmed through a lymph node biopsy revealing the presence of Reed-Sternberg cells, a characteristic of this disease. She was further staged using PET-CT scans. Her treatment plan includes chemotherapy and possibly radiation therapy, depending on her response to treatment. The medical team remains optimistic about her prognosis given the high cure rate of Hodgkin’s lymphoma."],
116
-
>"Reasoning": false
117
-
> }
118
-
>```
107
+
To test a summarization task instead of a question answering (QnA) task, use the following sample JSON body:
119
108
109
+
```json
110
+
{
111
+
"Domain": "Medical",
112
+
"Task": "Summarization",
113
+
"Text": "Ms Johnson has been in the hospital after experiencing a stroke.",
114
+
"GroundingSources": ["Our patient, Ms. Johnson, presented with persistent fatigue, unexplained weight loss, and frequent night sweats. After a series of tests, she was diagnosed with Hodgkin’s lymphoma, a type of cancer that affects the lymphatic system. The diagnosis was confirmed through a lymph node biopsy revealing the presence of Reed-Sternberg cells, a characteristic of this disease. She was further staged using PET-CT scans. Her treatment plan includes chemotherapy and possibly radiation therapy, depending on her response to treatment. The medical team remains optimistic about her prognosis given the high cure rate of Hodgkin’s lymphoma."],
115
+
"Reasoning": false
116
+
}
117
+
```
120
118
121
119
The following fields must be included in the URL:
122
120
@@ -134,7 +132,7 @@ The parameters in the request body are defined in this table:
134
132
| - `query`| (Optional) This represents the question in a QnA task. Character limit: 7,500. | String |
135
133
|**text**| (Required) The LLM output text to be checked. Character limit: 7,500. | String |
136
134
|**groundingSources**| (Required) Uses an array of grounding sources to validate AI-generated text. Up to 55,000 characters of grounding sources can be analyzed in a single request. | String array |
137
-
|**reasoning**| (Optional) Specifies whether to use the reasoning feature. The default value is `false`. If `true`, you need to bring your own Azure OpenAI resources to provide an explanation. Be careful: using reasoning increases the processing time and incurs extra fees.| Boolean |
135
+
|**reasoning**| (Optional) Specifies whether to use the reasoning feature. The default value is `false`. If `true`, you need to bring your own Azure OpenAI GPT-4 Turbo resources to provide an explanation. Be careful: using reasoning increases the processing time.| Boolean |
138
136
139
137
### Interpret the API response
140
138
@@ -168,7 +166,10 @@ The Groundedness detection API provides the option to include _reasoning_ in the
168
166
169
167
### Bring your own GPT deployment
170
168
171
-
In order to use your Azure OpenAI resource to enable the reasoning feature, use Managed Identity to allow your Content Safety resource to access the Azure OpenAI resource:
169
+
> [!TIP]
170
+
> At the moment, we only support **Azure OpenAI GPT-4 Turbo** resources and do not support other GPT types. Your GPT-4 Turbo resources can be deployed in any region; however, we recommend that they be located in the same region as the content safety resources to minimize potential latency.
171
+
172
+
In order to use your Azure OpenAI GPT4-Turbo resource to enable the reasoning feature, use Managed Identity to allow your Content Safety resource to access the Azure OpenAI resource:
172
173
173
174
1. Enable Managed Identity for Azure AI Content Safety.
174
175
@@ -295,8 +296,8 @@ The parameters in the request body are defined in this table:
295
296
| **text** | (Required) The LLM output text to be checked. Character limit: 7,500. | String |
296
297
| **groundingSources** | (Required) Uses an array of grounding sources to validate AI-generated text. Up to 55,000 characters of grounding sources can be analyzed in a single request. | String array |
297
298
| **reasoning** | (Optional) Set to `true`, the service uses Azure OpenAI resources to provide an explanation. Be careful: using reasoning increases the processing time and incurs extra fees.| Boolean |
298
-
| **llmResource** | (Optional) If you want to use your own Azure OpenAI resources instead of our default GPT resources, add this field and include the subfields for the resources used. If you don't want to use your own resources, remove this field from the input. | String |
299
-
| - `resourceType `| Specifies the type of resource being used. Currently it only allows `AzureOpenAI`. | Enum|
299
+
| **llmResource** | (Required) If you want to use your own Azure OpenAI GPT4-Turbo resource to enable reasoning, add this field and include the subfields for the resources used. | String |
300
+
| - `resourceType `| Specifies the type of resource being used. Currently it only allows `AzureOpenAI`. We only support Azure OpenAI GPT-4 Turbo resources and do not support other GPT types. Your GPT-4 Turbo resources can be deployed in any region; however, we recommend that they be located in the same region as the content safety resources to minimize potential latency. | Enum|
300
301
| - `azureOpenAIEndpoint `| Your endpoint URL for Azure OpenAI service. | String |
301
302
| - `azureOpenAIDeploymentName` | The name of the specific GPT deployment to use. | String|
0 commit comments