Skip to content

Commit fe87132

Browse files
committed
Merge branch 'content-safety-updates' of https://github.com/PatrickFarley/azure-docs-pr into content-safety-updates
2 parents eeeed65 + 0e27c89 commit fe87132

File tree

1 file changed

+26
-47
lines changed

1 file changed

+26
-47
lines changed

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

Lines changed: 26 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -134,32 +134,21 @@ The parameters in the request body are defined in this table:
134134
| - `query` | (Optional) This represents the question in a QnA task. Character limit: 7,500. | String |
135135
| **text** | (Required) The LLM output text to be checked. Character limit: 7,500. | String |
136136
| **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`, the service uses Azure OpenAI resources to provide an explanation. Be careful: using reasoning increases the processing time and incurs extra fees.| Boolean |
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 |
138138

139139
### Interpret the API response
140140

141141
After you submit your request, you'll receive a JSON response reflecting the Groundedness analysis performed. Here’s what a typical output looks like:
142142

143143
```json
144144
{
145-
"ungrounded": true,
146-
"confidenceScore": 1,
147-
"ungroundedPercentage": 1,
148-
"ungroundedDetails": [
149-
{
150-
"text": "string",
151-
"offset": {
152-
"utf8": 0,
153-
"utf16": 0,
154-
"codePoint": 0
155-
},
156-
"length": {
157-
"utf8": 0,
158-
"utf16": 0,
159-
"codePoint": 0
160-
}
161-
}
162-
]
145+
"ungroundedDetected": true,
146+
"ungroundedPercentage": 1,
147+
"ungroundedDetails": [
148+
{
149+
"text": "12/hour."
150+
}
151+
]
163152
}
164153
```
165154

@@ -172,15 +161,6 @@ The JSON objects in the output are defined here:
172161
| **ungroundedPercentage** | Specifies the proportion of the text identified as ungrounded, expressed as a number between 0 and 1, where 0 indicates no ungrounded content and 1 indicates entirely ungrounded content.| Float |
173162
| **ungroundedDetails** | Provides insights into ungrounded content with specific examples and percentages.| Array |
174163
| -**`Text`** | The specific text that is ungrounded. | String |
175-
| -**`offset`** | An object describing the position of the ungrounded text in various encoding. | String |
176-
| - `offset > utf8` | The offset position of the ungrounded text in UTF-8 encoding. | Integer |
177-
| - `offset > utf16` | The offset position of the ungrounded text in UTF-16 encoding. | Integer |
178-
| - `offset > codePoint` | The offset position of the ungrounded text in terms of Unicode code points. |Integer |
179-
| -**`length`** | An object describing the length of the ungrounded text in various encoding. (utf8, utf16, codePoint), similar to the offset. | Object |
180-
| - `length > utf8` | The length of the ungrounded text in UTF-8 encoding. | Integer |
181-
| - `length > utf16` | The length of the ungrounded text in UTF-16 encoding. | Integer |
182-
| - `length > codePoint` | The length of the ungrounded text in terms of Unicode code points. |Integer |
183-
184164

185165
## Check groundedness with reasoning
186166

@@ -326,25 +306,24 @@ After you submit your request, you'll receive a JSON response reflecting the Gro
326306

327307
```json
328308
{
329-
"ungrounded": true,
330-
"confidenceScore": 1,
331-
"ungroundedPercentage": 1,
332-
"ungroundedDetails": [
333-
{
334-
"text": "string",
335-
"offset": {
336-
"utf8": 0,
337-
"utf16": 0,
338-
"codePoint": 0
339-
},
340-
"length": {
341-
"utf8": 0,
342-
"utf16": 0,
343-
"codePoint": 0
344-
},
345-
"reason": "string"
346-
}
347-
]
309+
"ungroundedDetected": true,
310+
"ungroundedPercentage": 1,
311+
"ungroundedDetails": [
312+
{
313+
"text": "12/hour.",
314+
"offset": {
315+
"utF8": 0,
316+
"utF16": 0,
317+
"codePoint": 0
318+
},
319+
"length": {
320+
"utF8": 8,
321+
"utF16": 8,
322+
"codePoint": 8
323+
},
324+
"reason": "None. The premise mentions a pay of \"10/hour\" but does not mention \"12/hour.\" It's neutral. "
325+
}
326+
]
348327
}
349328
```
350329

0 commit comments

Comments
 (0)