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
+35-33Lines changed: 35 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ This section walks through a sample request with cURL. Paste the command below i
45
45
"domain": "Generic",
46
46
"task": "QnA",
47
47
"qna": {
48
-
"query": "How much does she currently get paid per hour at the bank?"
48
+
"query": "How much does she currently get paid per hour at the bank?"
49
49
},
50
50
"text": "12/hour",
51
51
"groundingSources": [
@@ -108,11 +108,13 @@ To test a summarization task instead of a question answering (QnA) task, use the
108
108
109
109
```json
110
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
111
+
"domain": "Medical",
112
+
"task": "Summarization",
113
+
"text": "Ms Johnson has been in the hospital after experiencing a stroke.",
114
+
"groundingSources": [
115
+
"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
+
],
117
+
"reasoning": false
116
118
}
117
119
```
118
120
@@ -140,13 +142,13 @@ After you submit your request, you'll receive a JSON response reflecting the Gro
140
142
141
143
```json
142
144
{
143
-
"ungroundedDetected": true,
144
-
"ungroundedPercentage": 1,
145
-
"ungroundedDetails": [
146
-
{
147
-
"text": "12/hour."
148
-
}
149
-
]
145
+
"ungroundedDetected": true,
146
+
"ungroundedPercentage": 1,
147
+
"ungroundedDetails": [
148
+
{
149
+
"text": "12/hour."
150
+
}
151
+
]
150
152
}
151
153
```
152
154
@@ -176,7 +178,7 @@ In order to use your Azure OpenAI GPT4-Turbo (1106-preview) resource to enable t
176
178
In your request to the Groundedness detection API, set the `"reasoning"` body parameter to `true`, and provide the other needed parameters:
177
179
178
180
```json
179
-
{
181
+
{
180
182
"reasoning": true,
181
183
"llmResource": {
182
184
"resourceType": "AzureOpenAI",
@@ -203,7 +205,7 @@ This section walks through a sample request with cURL. Paste the command below i
203
205
"domain": "Generic",
204
206
"task": "QnA",
205
207
"qna": {
206
-
"query": "How much does she currently get paid per hour at the bank?"
208
+
"query": "How much does she currently get paid per hour at the bank?"
207
209
},
208
210
"text": "12/hour",
209
211
"groundingSources": [
@@ -291,24 +293,24 @@ After you submit your request, you'll receive a JSON response reflecting the Gro
291
293
292
294
```json
293
295
{
294
-
"ungroundedDetected": true,
295
-
"ungroundedPercentage": 1,
296
-
"ungroundedDetails": [
297
-
{
298
-
"text": "12/hour.",
299
-
"offset": {
300
-
"utf8": 0,
301
-
"utf16": 0,
302
-
"codePoint": 0
303
-
},
304
-
"length": {
305
-
"utf8": 8,
306
-
"utf16": 8,
307
-
"codePoint": 8
308
-
},
309
-
"reason": "None. The premise mentions a pay of \"10/hour\" but does not mention \"12/hour.\" It's neutral. "
310
-
}
311
-
]
296
+
"ungroundedDetected": true,
297
+
"ungroundedPercentage": 1,
298
+
"ungroundedDetails": [
299
+
{
300
+
"text": "12/hour.",
301
+
"offset": {
302
+
"utf8": 0,
303
+
"utf16": 0,
304
+
"codePoint": 0
305
+
},
306
+
"length": {
307
+
"utf8": 8,
308
+
"utf16": 8,
309
+
"codePoint": 8
310
+
},
311
+
"reason": "None. The premise mentions a pay of \"10/hour\" but does not mention \"12/hour.\" It's neutral. "
0 commit comments