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/use-your-data.md
+1-33Lines changed: 1 addition & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -383,40 +383,8 @@ You can send a streaming request using the `stream` parameter, allowing data to
383
383
384
384
#### Conversation history for better results
385
385
386
-
When you chat with a model, providing a history of the chat will help the model return higher quality results.
386
+
When you chat with a model, providing a history of the chat will help the model return higher quality results. You don't need to include the `context` property of the assistant messages in your API requests for better response quality. See [the API reference documentation](../references/on-your-data.md#examples) for examples.
387
387
388
-
```json
389
-
{
390
-
"dataSources": [
391
-
{
392
-
"type": "AzureCognitiveSearch",
393
-
"parameters": {
394
-
"endpoint": "'$AZURE_AI_SEARCH_ENDPOINT'",
395
-
"key": "'$AZURE_AI_SEARCH_API_KEY'",
396
-
"indexName": "'$AZURE_AI_SEARCH_INDEX'"
397
-
}
398
-
}
399
-
],
400
-
"messages": [
401
-
{
402
-
"role": "user",
403
-
"content": "What are the differences between Azure Machine Learning and Azure AI services?"
404
-
},
405
-
{
406
-
"role": "tool",
407
-
"content": "{\"citations\": [{\"content\": \"title: Azure AI services and Machine Learning\\ntitleSuffix: Azure AI services\\ndescription: Learn where Azure AI services fits in with other Azure offerings for machine learning.\\nAzure AI services and machine learning\\nAzure AI services provides machine learning capabilities to solve general problems such as...\\n \"articles\\\\cognitive-services\\\\cognitive-services-and-machine-learning.md\", \"url\": null, \"metadata\": {\"chunking\": \"orignal document size=1018. Scores=0.32200050354003906 and 1.2880020141601562.Org Highlight count=115.\"}, \"chunk_id\": \"0\"}], \"intent\": \"[\\\"What are the differences between Azure Machine Learning and Azure AI services?\\\"]\"}"
408
-
},
409
-
{
410
-
"role": "assistant",
411
-
"content": "\nAzure Machine Learning is a product and service tailored for data scientists to build, train, and deploy machine learning models [doc1]..."
412
-
},
413
-
{
414
-
"role": "user",
415
-
"content": "How do I use Azure machine learning?"
416
-
}
417
-
]
418
-
}
419
-
```
420
388
421
389
## Token usage estimation for Azure OpenAI On Your Data
@@ -48,7 +48,6 @@ The request body inherits the same schema of chat completions API request. This
48
48
49
49
|Name | Type | Required | Description |
50
50
|--- | --- | --- | --- |
51
-
|`messages`|[ChatMessage](#chat-message)[]| True | The array of messages to generate chat completions for, in the chat format. The [request chat message](#chat-message) has a `context` property, which is added for Azure OpenAI On Your Data.|
52
51
|`data_sources`|[DataSource](#data-source)[]| True | The configuration entries for Azure OpenAI On Your Data. There must be exactly one element in the array. If `data_sources` is not provided, the service uses chat completions model directly, and does not use Azure OpenAI On Your Data.|
53
52
54
53
## Response body
@@ -57,17 +56,17 @@ The response body inherits the same schema of chat completions API response. The
57
56
58
57
## Chat message
59
58
60
-
In both request and response, when the chat message `role` is `assistant`, the chat message schema inherits from the chat completions assistant chat message, and is extended with the property `context`.
59
+
The responseassistantmessage schema inherits from the chat completions assistant [chat message](../reference.md#chatmessage), and is extended with the property `context`.
61
60
62
61
|Name | Type | Required | Description |
63
62
|--- | --- | --- | --- |
64
-
|`context`|[Context](#context)| False | Represents the incremental steps performed by the Azure OpenAI On Your Data while processing the request, including the detected search intent and the retrieved documents. |
63
+
|`context`|[Context](#context)| False | Represents the incremental steps performed by the Azure OpenAI On Your Data while processing the request, including the retrieved documents. |
65
64
66
65
## Context
67
66
|Name | Type | Required | Description |
68
67
|--- | --- | --- | --- |
69
-
|`citations`|[Citation](#citation)[]| False | The data source retrieval result, used to generate the assistant message in the response.|
70
-
|`intent`| string | False | The detected intent from the chat history, used to pass to the next turn to carry over the context.|
68
+
|`citations`|[Citation](#citation)[]| False | The data source retrieval result, used to generate the assistant message in the response. Clients can render references from the citations. |
69
+
|`intent`| string | False | The detected intent from the chat history. Passing back the previous intent is no longer needed. Ignore this property. |
71
70
72
71
## Citation
73
72
@@ -91,7 +90,7 @@ This list shows the supported data sources.
91
90
92
91
## Examples
93
92
94
-
This example shows how to pass context with conversation history for better results.
93
+
This example shows how to pass conversation history for better results.
95
94
96
95
Prerequisites:
97
96
* Configure the role assignments from Azure OpenAI system assigned managed identity to Azure search service. Required roles: `Search Index Data Reader`, `Search Service Contributor`.
0 commit comments