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
+22-23Lines changed: 22 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Follow this guide to use Azure AI Content Safety Groundedness detection to check
26
26
27
27
## Check groundedness without reasoning
28
28
29
-
In the simple case without the _reasoning_ feature, the Groundedness detection API classifies the ungroundedness of the submitted content as `true` or `false` and provides a confidence score.
29
+
In the simple case without the _reasoning_ feature, the Groundedness detection API classifies the ungroundedness of the submitted content as `true` or `false`.
30
30
31
31
#### [cURL](#tab/curl)
32
32
@@ -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
@@ -157,18 +155,20 @@ The JSON objects in the output are defined here:
157
155
| Name | Description | Type |
158
156
| :------------------ | :----------- | ------- |
159
157
|**ungroundedDetected**| Indicates whether the text exhibits ungroundedness. | Boolean |
160
-
| **confidenceScore** | The confidence value of the _ungrounded_ designation. The score ranges from 0 to 1. | Float |
161
158
|**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 |
162
159
|**ungroundedDetails**| Provides insights into ungrounded content with specific examples and percentages.| Array |
163
-
| -**`Text`** | The specific text that is ungrounded. | String |
160
+
| -**`text`**| The specific text that is ungrounded. | String |
164
161
165
162
## Check groundedness with reasoning
166
163
167
164
The Groundedness detection API provides the option to include _reasoning_ in the API response. With reasoning enabled, the response includes a `"reasoning"` field that details specific instances and explanations for any detected ungroundedness. Be careful: using reasoning increases the processing time and incurs extra fees.
168
165
169
166
### Bring your own GPT deployment
170
167
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:
168
+
> [!TIP]
169
+
> 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.
170
+
171
+
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
172
173
173
1. Enable Managed Identity for Azure AI Content Safety.
174
174
@@ -188,7 +188,7 @@ In order to use your Azure OpenAI resource to enable the reasoning feature, use
188
188
189
189
### Make the API request
190
190
191
-
In your request to the Groundedness detection API, set the `"Reasoning"` body parameter to `true`, and provide the other needed parameters:
191
+
In your request to the Groundedness detection API, set the `"reasoning"` body parameter to `true`, and provide the other needed parameters:
192
192
193
193
```json
194
194
{
@@ -295,8 +295,8 @@ The parameters in the request body are defined in this table:
295
295
| **text** | (Required) The LLM output text to be checked. Character limit: 7,500. | String |
296
296
| **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
297
| **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|
298
+
| **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 |
299
+
| - `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
300
| - `azureOpenAIEndpoint `| Your endpoint URL for Azure OpenAI service. | String |
301
301
| - `azureOpenAIDeploymentName` | The name of the specific GPT deployment to use. | String|
302
302
@@ -332,10 +332,9 @@ The JSON objects in the output are defined here:
332
332
| Name | Description | Type |
333
333
| :------------------ | :----------- | ------- |
334
334
|**ungroundedDetected**| Indicates whether the text exhibits ungroundedness. | Boolean |
335
-
|**confidenceScore**| The confidence value of the _ungrounded_ designation. The score ranges from 0 to 1. | Float |
336
335
|**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 |
337
336
|**ungroundedDetails**| Provides insights into ungrounded content with specific examples and percentages.| Array |
338
-
| -**`Text`**| The specific text that is ungrounded. | String |
337
+
| -**`text`**| The specific text that is ungrounded. | String |
339
338
| -**`offset`**| An object describing the position of the ungrounded text in various encoding. | String |
340
339
| - `offset > utf8`| The offset position of the ungrounded text in UTF-8 encoding. | Integer |
341
340
| - `offset > utf16`| The offset position of the ungrounded text in UTF-16 encoding. | Integer |
@@ -344,7 +343,7 @@ The JSON objects in the output are defined here:
344
343
| - `length > utf8`| The length of the ungrounded text in UTF-8 encoding. | Integer |
345
344
| - `length > utf16`| The length of the ungrounded text in UTF-16 encoding. | Integer |
346
345
| - `length > codePoint`| The length of the ungrounded text in terms of Unicode code points. |Integer |
347
-
| -**`Reason`**| Offers explanations for detected ungroundedness. | String |
346
+
| -**`reason`**| Offers explanations for detected ungroundedness. | String |
Copy file name to clipboardExpand all lines: articles/ai-services/openai/concepts/use-your-data.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.service: azure-ai-openai
8
8
ms.topic: quickstart
9
9
author: aahill
10
10
ms.author: aahi
11
-
ms.date: 02/26/2024
11
+
ms.date: 04/08/2024
12
12
recommendations: false
13
13
ms.custom: references_regions
14
14
---
@@ -58,13 +58,19 @@ There's an [upload limit](../quotas-limits.md), and there are some caveats about
58
58
59
59
## Supported data sources
60
60
61
-
You need to connect to a data source to upload your data. When you want to use your data to chat with an Azure OpenAI model, your data is chunked in a search index so that relevant data can be found based on user queries. For some data sources such as uploading files from your local machine (preview) or data contained in a blob storage account (preview), Azure AI Search is used.
61
+
You need to connect to a data source to upload your data. When you want to use your data to chat with an Azure OpenAI model, your data is chunked in a search index so that relevant data can be found based on user queries.
62
62
63
-
When you choose the following data sources, your data is ingested into an Azure AI Search index.
63
+
The [Integrated Vector Database in Azure Cosmos DB for MongoDB](/azure/cosmos-db/mongodb/vcore/vector-search) natively supports integration with Azure OpenAI On Your Data.
64
+
65
+
For some data sources such as uploading files from your local machine (preview) or data contained in a blob storage account (preview), Azure AI Search is used. When you choose the following data sources, your data is ingested into an Azure AI Search index.
66
+
67
+
>[!TIP]
68
+
>If you use Azure Cosmos DB (except for its vCore-based API for MongoDB), you may be eligible for the [Azure AI Advantage offer](/azure/cosmos-db/ai-advantage), which provides the equivalent of up to $6,000 in Azure Cosmos DB throughput credits.
64
69
65
70
|Data source | Description |
66
71
|---------|---------|
67
72
|[Azure AI Search](/azure/search/search-what-is-azure-search)| Use an existing Azure AI Search index with Azure OpenAI On Your Data. |
73
+
|[Azure Cosmos DB](/azure/cosmos-db/introduction)| Azure Cosmos DB's API for Postgres and vCore-based API for MongoDB have natively integrated vector indexing and do not require Azure AI Search; however, its other APIs do require Azure AI Search for vector indexing. Azure Cosmos DB for NoSQL will offer a natively integrated vector database by mid-2024. |
68
74
|Upload files (preview) | Upload files from your local machine to be stored in an Azure Blob Storage database, and ingested into Azure AI Search. |
69
75
|URL/Web address (preview) | Web content from the URLs is stored in Azure Blob Storage. |
70
76
|Azure Blob Storage (preview) | Upload files from Azure Blob Storage to be ingested into an Azure AI Search index. |
@@ -133,15 +139,15 @@ If you want to implement additional value-based criteria for query execution, yo
# [Azure Cosmos DB for MongoDB vCore](#tab/mongo-db)
142
+
# [Vector Database in Azure Cosmos DB for MongoDB vCore](#tab/mongo-db)
137
143
138
144
### Prerequisites
139
145
*[Azure Cosmos DB for MongoDB vCore](/azure/cosmos-db/mongodb/vcore/introduction) account
140
146
* A deployed [embedding model](../concepts/understand-embeddings.md)
141
147
142
148
### Limitations
143
149
* Only Azure Cosmos DB for MongoDB vCore is supported.
144
-
* The search type is limited to [Azure Cosmos DB for MongoDB vCore vector search](/azure/cosmos-db/mongodb/vcore/vector-search) with an Azure OpenAI embedding model.
150
+
* The search type is limited to [Integrated Vector Database in Azure Cosmos DB for MongoDB vCore](/azure/cosmos-db/mongodb/vcore/vector-search) with an Azure OpenAI embedding model.
145
151
* This implementation works best on unstructured and spatial data.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/how-to/chatgpt.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,6 @@ ms.topic: how-to
10
10
ms.date: 04/05/2024
11
11
manager: nitinme
12
12
keywords: ChatGPT
13
-
zone_pivot_groups: openai-chat
14
13
---
15
14
16
15
# Learn how to work with the GPT-3.5-Turbo and GPT-4 models
@@ -19,5 +18,4 @@ The GPT-3.5-Turbo and GPT-4 models are language models that are optimized for co
19
18
20
19
This article walks you through getting started with the GPT-3.5-Turbo and GPT-4 models. It's important to use the techniques described here to get the best results. If you try to interact with the models the same way you did with the older model series, the models will often be verbose and provide less useful responses.
|`Azure OpenAI Requests`|HTTP|Count|Total number of calls made to the Azure OpenAI API over a period of time. Applies to PayGo, PTU, and PTU-managed SKUs.|`ApiName`, `ModelDeploymentName`,`ModelName`,`ModelVersion`, `OperationName`, `Region`, `StatusCode`, `StreamType`|
59
-
|`Generated Completion Tokens`| Usage | Sum | Number of generated tokens (output) from an OpenAI model. Applies to PayGo, PTU, and PTU-manged SKUs |`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`|
60
-
|`Processed FineTuned Training Hours`| Usage |Sum| Number of Training Hours Processed on an OpenAI FineTuned Model|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`|
61
-
|`Processed Inference Tokens`| Usage | Sum| Number of inference tokens processed by an OpenAI model. Calculated as prompt tokens (input) + generated tokens. Applies to PayGo, PTU, and PTU-manged SKUs.|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`|
62
-
|`Processed Prompt Tokens`| Usage | Sum | Total number of prompt tokens (input) processed on an OpenAI model. Applies to PayGo, PTU, and PTU-managed SKUs.|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`|
59
+
|`Generated Completion Tokens`| Usage | Sum | Number of generated tokens (output) from an Azure OpenAI model. Applies to PayGo, PTU, and PTU-manged SKUs |`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`|
60
+
|`Processed FineTuned Training Hours`| Usage |Sum| Number of training hours processed on an Azure OpenAI fine-tuned model.|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`|
61
+
|`Processed Inference Tokens`| Usage | Sum| Number of inference tokens processed by an Azure OpenAI model. Calculated as prompt tokens (input) + generated tokens. Applies to PayGo, PTU, and PTU-manged SKUs.|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`|
62
+
|`Processed Prompt Tokens`| Usage | Sum | Total number of prompt tokens (input) processed on an Azure OpenAI model. Applies to PayGo, PTU, and PTU-managed SKUs.|`ApiName`, `ModelDeploymentName`,`ModelName`, `Region`|
63
63
|`Provision-managed Utilization V2`| Usage | Average | Provision-managed utilization is the utilization percentage for a given provisioned-managed deployment. Calculated as (PTUs consumed/PTUs deployed)*100. When utilization is at or above 100%, calls are throttled and return a 429 error code. |`ModelDeploymentName`,`ModelName`,`ModelVersion`, `Region`, `StreamType`|
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/assistants-ai-studio.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ By default there are three panels: assistant setup, chat session, and Logs. **Sh
119
119
120
120
## Clean up resources
121
121
122
-
If you want to clean up and remove an OpenAI resource, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
122
+
If you want to clean up and remove an Azure OpenAI resource, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/assistants-csharp.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,7 @@ New messages can be created on the thread before re-running, which will see the
147
147
148
148
## Clean up resources
149
149
150
-
If you want to clean up and remove an OpenAI resource, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
150
+
If you want to clean up and remove an Azure OpenAI resource, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/assistants-python.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ To successfully make a call against the Azure OpenAI service, you'll need the fo
48
48
49
49
Go to your resource in the Azure portal. The **Keys and Endpoint** can be found in the **Resource Management** section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
50
50
51
-
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot of the overview blade for an OpenAI Resource in the Azure portal with the endpoint & access keys location circled in red." lightbox="../media/quickstarts/endpoint.png":::
51
+
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot of the overview blade for an Azure OpenAI resource in the Azure portal with the endpoint & access keys location circled in red." lightbox="../media/quickstarts/endpoint.png":::
52
52
53
53
Create and assign persistent environment variables for your key and endpoint.
54
54
@@ -205,7 +205,7 @@ It is important to remember that while code interpreter gives the model the capa
205
205
206
206
## Clean up resources
207
207
208
-
If you want to clean up and remove an OpenAI resource, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
208
+
If you want to clean up and remove an Azure OpenAI resource, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
0 commit comments