Skip to content

Commit 8d48b7f

Browse files
authored
Update quickstart-groundedness.md
1 parent 999f6ef commit 8d48b7f

File tree

1 file changed

+35
-33
lines changed

1 file changed

+35
-33
lines changed

articles/ai-services/content-safety/quickstart-groundedness.md

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This section walks through a sample request with cURL. Paste the command below i
4545
"domain": "Generic",
4646
"task": "QnA",
4747
"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?"
4949
},
5050
"text": "12/hour",
5151
"groundingSources": [
@@ -108,11 +108,13 @@ To test a summarization task instead of a question answering (QnA) task, use the
108108
109109
```json
110110
{
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
116118
}
117119
```
118120

@@ -140,13 +142,13 @@ After you submit your request, you'll receive a JSON response reflecting the Gro
140142

141143
```json
142144
{
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+
]
150152
}
151153
```
152154

@@ -176,7 +178,7 @@ In order to use your Azure OpenAI GPT4-Turbo (1106-preview) resource to enable t
176178
In your request to the Groundedness detection API, set the `"reasoning"` body parameter to `true`, and provide the other needed parameters:
177179

178180
```json
179-
{
181+
{
180182
"reasoning": true,
181183
"llmResource": {
182184
"resourceType": "AzureOpenAI",
@@ -203,7 +205,7 @@ This section walks through a sample request with cURL. Paste the command below i
203205
"domain": "Generic",
204206
"task": "QnA",
205207
"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?"
207209
},
208210
"text": "12/hour",
209211
"groundingSources": [
@@ -291,24 +293,24 @@ After you submit your request, you'll receive a JSON response reflecting the Gro
291293

292294
```json
293295
{
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. "
312+
}
313+
]
312314
}
313315
```
314316

0 commit comments

Comments
 (0)