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/openai/concepts/content-filter.md
+52-14Lines changed: 52 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,13 +43,15 @@ Text and image models support Drugs as an additional classification. This catego
43
43
| Sexual | Sexual describes language related to anatomical organs and genitals, romantic relationships and sexual acts, acts portrayed in erotic or affectionate terms, including those portrayed as an assault or a forced sexual violent act against one’s will. <br><br> This includes but is not limited to:<ul><li>Vulgar content</li><li>Prostitution</li><li>Nudity and Pornography</li><li>Abuse</li><li>Child exploitation, child abuse, child grooming</li></ul> |
44
44
| Violence | Violence describes language related to physical actions intended to hurt, injure, damage, or kill someone or something; describes weapons, guns and related entities. <br><br>This includes, but isn't limited to: <ul><li>Weapons</li><li>Bullying and intimidation</li><li>Terrorist and violent extremism</li><li>Stalking</li></ul> |
45
45
| Self-Harm | Self-harm describes language related to physical actions intended to purposely hurt, injure, damage one’s body or kill oneself. <br><br> This includes, but isn't limited to: <ul><li>Eating Disorders</li><li>Bullying and intimidation</li></ul> |
46
-
| Protected Material for Text<sup>*</sup> | Protected material text describes known text content (for example, song lyrics, articles, recipes, and selected web content) that can be outputted by large language models.
46
+
| Protected Material for Text<sup>1</sup> | Protected material text describes known text content (for example, song lyrics, articles, recipes, and selected web content) that can be outputted by large language models.
47
47
| Protected Material for Code | Protected material code describes source code that matches a set of source code from public repositories, which can be outputted by large language models without proper citation of source repositories.
48
48
|User Prompt Attacks |User prompt attacks are User Prompts designed to provoke the Generative AI model into exhibiting behaviors it was trained to avoid or to break the rules set in the System Message. Such attacks can vary from intricate roleplay to subtle subversion of the safety objective. |
49
49
|Indirect Attacks |Indirect Attacks, also referred to as Indirect Prompt Attacks or Cross-Domain Prompt Injection Attacks, are a potential vulnerability where third parties place malicious instructions inside of documents that the Generative AI system can access and process. Requires [document embedding and formatting](#embedding-documents-in-your-prompt). |
50
+
| Groundedness<sup>2</sup> | Groundedness detection flags whether the text responses of large language models (LLMs) are grounded in the source materials provided by the users. Ungrounded material refers to instances where the LLMs produce information that is non-factual or inaccurate from what was present in the source materials. Requires [document embedding and formatting](#embedding-documents-in-your-prompt). |
50
51
51
-
<sup>*</sup> If you're an owner of text material and want to submit text content for protection, [file a request](https://aka.ms/protectedmaterialsform).
52
+
<sup>1</sup> If you're an owner of text material and want to submit text content for protection, [file a request](https://aka.ms/protectedmaterialsform).
52
53
54
+
<sup>2</sup> Not available in non-streaming scenarios; only available for streaming scenarios. The following regions support Groundedness Detection: Central US, East US, France Central, and Canada East
@@ -328,24 +330,27 @@ When annotations are enabled as shown in the code snippets below, the following
328
330
|indirect attacks|detected (true or false), </br>filtered (true or false)|
329
331
|protected material text|detected (true or false), </br>filtered (true or false)|
330
332
|protected material code|detected (true or false), </br>filtered (true or false), </br>Example citation of public GitHub repository where code snippet was found, </br>The license of the repository|
333
+
|Groundedness | detected (true or false)</br>filtered (true or false) </br>details (`completion_end_offset`, `completion_start_offset`) |
331
334
332
335
When displaying code in your application, we strongly recommend that the application also displays the example citation from the annotations. Compliance with the cited license may also be required for Customer Copyright Commitment coverage.
333
336
334
337
See the following table for the annotation availability in each API version:
| Prompt Shield for user prompt attacks|✅ |✅ |✅ |✅ |
343
-
|Prompt Shield for indirect attacks|| ✅ |||
344
-
|Protected material text|✅ |✅ |✅ |✅ |
345
-
|Protected material code|✅ |✅ |✅ |✅ |
346
-
|Profanity blocklist|✅ |✅ |✅ |✅ |
347
-
|Custom blocklist|| ✅ |✅ |✅ |
348
-
341
+
| Hate | ✅|✅ |✅ |✅ |✅ |
342
+
| Violence | ✅|✅ |✅ |✅ |✅ |
343
+
| Sexual |✅ |✅|✅ |✅ |✅ |
344
+
| Self-harm |✅|✅|✅ |✅ |✅ |
345
+
| Prompt Shield for user prompt attacks|✅|✅|✅ |✅ |✅ |
346
+
|Prompt Shield for indirect attacks||| ✅ |||
347
+
|Protected material text|✅|✅ |✅ |✅ |✅ |
348
+
|Protected material code|✅|✅ |✅ |✅ |✅ |
349
+
|Profanity blocklist|✅|✅ |✅ |✅ |✅ |
350
+
|Custom blocklist|✅|| ✅ |✅ |✅ |
351
+
|Groundedness<sup>1</sup>|✅|||||
352
+
353
+
<sup>1</sup> Not available in non-streaming scenarios; only available for streaming scenarios. The following regions support Groundedness Detection: Central US, East US, France Central, and Canada East
For details on the inference RESTAPI endpoints for Azure OpenAI and how to create Chat and Completions, follow [Azure OpenAI Service RESTAPI reference guidance](../reference.md). Annotations are returned for all scenarios when using any preview API version starting from `2023-06-01-preview`, as well as the GAAPI version `2024-02-01`.
712
717
718
+
### Groundedness
719
+
720
+
#### Annotate only
721
+
722
+
Returns offsets referencing the ungrounded completion content.
723
+
724
+
```json
725
+
{
726
+
"ungrounded_material": {
727
+
"details": [
728
+
{
729
+
"completion_end_offset": 127,
730
+
"completion_start_offset": 27
731
+
}
732
+
],
733
+
"detected": true,
734
+
"filtered": false
735
+
}
736
+
}
737
+
```
738
+
739
+
#### Annotate and filter
740
+
741
+
Blocks completion content when ungrounded completion content was detected.
742
+
743
+
```json
744
+
{ "ungrounded_material": {
745
+
"detected": true,
746
+
"filtered": true
747
+
}
748
+
}
749
+
```
750
+
713
751
### Example scenario: An input prompt containing content that is classified at a filtered category and severity level is sent to the completions API
0 commit comments