Skip to content

Commit 43114b7

Browse files
committed
updating examples
1 parent 1d1b75a commit 43114b7

9 files changed

+20
-26
lines changed

articles/ai-services/openai/includes/use-your-data-dotnet.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var chatCompletionsOptions = new ChatCompletionsOptions()
3636
{
3737
Messages =
3838
{
39-
new ChatRequestUserMessage("What are the differences between Azure Machine Learning and Azure AI services?"),
39+
new ChatRequestUserMessage("What are my available health plans?"),
4040
},
4141
AzureExtensionsOptions = new AzureChatExtensionsOptions()
4242
{
@@ -94,7 +94,7 @@ dotnet run program.cs
9494
```output
9595
Answer from assistant:
9696
===
97-
Azure Machine Learning is a cloud-based service that provides tools and services to build, train, and deploy machine learning models. It offers a collaborative environment for data scientists, developers, and domain experts to work together on machine learning projects. Azure Machine Learning supports various programming languages, frameworks, and libraries, including Python, R, TensorFlow, and PyTorch [^1^].
97+
The available health plans in the Contoso Electronics plan and benefit packages are the Northwind Health Plus and Northwind Standard plans [^1^].
9898
===
9999
Context information (e.g. citations) from chat extensions:
100100
===
@@ -113,7 +113,7 @@ tool: {
113113
},
114114
...
115115
],
116-
"intent": "[\u0022What are the differences between Azure Machine Learning and Azure AI services?\u0022]"
116+
"intent": "[\u0022What are my available health plans?\u0022]"
117117
}
118118
===
119119
```
@@ -143,7 +143,7 @@ var chatCompletionsOptions = new ChatCompletionsOptions()
143143
DeploymentName = deploymentName,
144144
Messages =
145145
{
146-
new ChatRequestUserMessage("What are the differences between Azure Machine Learning and Azure AI services?"),
146+
new ChatRequestUserMessage("What are my available health plans?"),
147147
},
148148
AzureExtensionsOptions = new AzureChatExtensionsOptions()
149149
{

articles/ai-services/openai/includes/use-your-data-go.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ms.date: 03/07/2024
7676
7777
resp, err := client.GetChatCompletions(context.TODO(), azopenai.ChatCompletionsOptions{
7878
Messages: []azopenai.ChatRequestMessageClassification{
79-
&azopenai.ChatRequestUserMessage{Content: azopenai.NewChatRequestUserMessageContent("What are the differences between Azure Machine Learning and Azure AI services?")},
79+
&azopenai.ChatRequestUserMessage{Content: azopenai.NewChatRequestUserMessageContent("What are my available health plans?")},
8080
},
8181
MaxTokens: to.Ptr[int32](512),
8282
AzureExtensionsOptions: []azopenai.AzureChatExtensionConfigurationClassification{

articles/ai-services/openai/includes/use-your-data-javascript.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async function main(){
5151
const client = new OpenAIClient(endpoint, new AzureKeyCredential(azureApiKey));
5252

5353
const messages = [
54-
{ role: "user", content: "Tell me something interesting" },
54+
{ role: "user", content: "What are my available health plans?" },
5555
];
5656

5757
console.log(`Message: ${messages.map((m) => m.content).join("\n")}`);
@@ -102,8 +102,8 @@ node.exe ChatWithOwnData.js
102102
## Output
103103
104104
```output
105-
Message: Tell me something interesting
106-
Based on the retrieved document, an interesting fact is...
105+
Message: What are my available health plans?
106+
The available health plans in the Contoso Electronics plan and benefit packages are the Northwind Health Plus and Northwind Standard plans.
107107

108108
```
109109

articles/ai-services/openai/includes/use-your-data-powershell.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To trigger a response from the model, you should end with a user message indicat
4949
messages = @(
5050
@{
5151
role = 'user'
52-
content = 'How do you query REST using PowerShell'
52+
content = 'What are my available health plans?'
5353
}
5454
)
5555
} | convertto-json -depth 5
@@ -69,7 +69,7 @@ To trigger a response from the model, you should end with a user message indicat
6969
### Example output
7070

7171
```text
72-
To query a RESTful web service using PowerShell, you can use the `Invoke-RestMethod` cmdlet. This cmdlet sends HTTP and HTTPS requests to RESTful web services and processes the response based on the data type.
72+
The available health plans in the Contoso Electronics plan and benefit packages are the Northwind Health Plus and Northwind Standard plans.
7373
```
7474

7575
> [!IMPORTANT]

articles/ai-services/openai/includes/use-your-data-python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pip install python-dotenv
8686
setup_byod(aoai_deployment_id)
8787

8888
completion = openai.ChatCompletion.create(
89-
messages=[{"role": "user", "content": "What are the differences between Azure Machine Learning and Azure AI services?"}],
89+
messages=[{"role": "user", "content": "What are my available health plans?"}],
9090
deployment_id=os.environ.get("AZURE_OPENAI_DEPLOYMENT_ID"),
9191
dataSources=[ # camelCase is intentional, as this is the format the API expects
9292
{
@@ -126,7 +126,7 @@ completion = client.chat.completions.create(
126126
messages=[
127127
{
128128
"role": "user",
129-
"content": "How is Azure machine learning different than Azure OpenAI?",
129+
"content": "What are my available health plans?",
130130
},
131131
],
132132
extra_body={

articles/ai-services/openai/includes/use-your-data-rest.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYME
3939
"messages": [
4040
{
4141
"role": "user",
42-
"content": "Tell me an interesting fact"
42+
"content": "What are my available health plans?"
4343
}
4444
]
4545
}
@@ -60,7 +60,7 @@ curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYME
6060
"finish_reason": "stop",
6161
"message": {
6262
"role": "assistant",
63-
"content": "An interesting fact from the retrieved document is... [doc1].",
63+
"content": "The available health plans in the Contoso Electronics plan and benefit packages are the Northwind Health Plus and Northwind Standard plans. [doc1].",
6464
"end_turn": true,
6565
"context": {
6666
"citations": [
@@ -72,7 +72,7 @@ curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYME
7272
"chunk_id": "0"
7373
}
7474
],
75-
"intent": "[\"Interesting facts\"]"
75+
"intent": "[\"Available health plans\"]"
7676
}
7777
}
7878
}

articles/ai-services/openai/includes/use-your-data-spring.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ ai-custom-data-demo/
211211

212212
final var store = vectorStore(embeddingClient);
213213

214-
final String question = "What are the differences between Azure Machine Learning and Azure AI services?";
214+
final String question = "What are my available health plans?";
215215

216216
final var candidateDocs = store.similaritySearch(question);
217217

@@ -386,11 +386,7 @@ ai-custom-data-demo/
386386
Sending custom data prompt to AI service. One moment please...
387387
388388
Prompt created 1 generated response(s).
389-
Generated response from "assistant": Azure Machine Learning is a cloud-based service that allows users to build, deploy, and manage machine learning models. It provides a range of tools and capabilities for data scientists and developers to train models, automate the machine learning workflow, and deploy models as web services.
390-
391-
On the other hand, Azure AI services is a broader category that includes various services and technologies for artificial intelligence. It encompasses not only machine learning but also other AI capabilities such as natural language processing, computer vision, speech recognition, and more. Azure AI services provide pre-built AI models and APIs that developers can easily integrate into their applications.
392-
393-
In summary, Azure Machine Learning is specifically focused on machine learning model development and deployment, while Azure AI services offer a wider range of AI capabilities beyond just machine learning.
389+
Generated response from "assistant": The available health plans in the Contoso Electronics plan and benefit packages are the Northwind Health Plus and Northwind Standard plans.
394390
```
395391

396392
> [!div class="nextstepaction"]

articles/ai-services/openai/includes/use-your-data-studio.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ The **Advanced settings** on the left are [runtime parameters](../concepts/use-y
3131
- When **Limit responses to your data** is enabled, the model attempts to only rely on your documents for responses. This is set to true by default.
3232
:::image type="content" source="../media/quickstarts/studio-advanced-settings.png" alt-text="Screenshot of the advanced settings.":::
3333

34-
Send your first query. The chat models perform best in question and answer exercises. For example, "*What was the revenue last year?.*" or "*when was revenue reported?*".
34+
Send your first query. The chat models perform best in question and answer exercises. For example, "*What are my available health plans?*" or "*What is the health plus option?*".
3535

36-
Queries that require data analysis would probably fail, such as "*which product contributes most to the revenue?*". Queries that require information about all of your data will also likely fail, such as "*how many documents have I uploaded?*". Remember that the search engine looks for chunks having exact or similar terms, phrases, or construction to the query. And while the model might understand the question, if search results are chunks from the data set, it's not the right information to answer that kind of question.
36+
Queries that require data analysis would probably fail, such as "*Which health plan is most popular?*". Queries that require information about all of your data will also likely fail, such as "*How many documents have I uploaded?*". Remember that the search engine looks for chunks having exact or similar terms, phrases, or construction to the query. And while the model might understand the question, if search results are chunks from the data set, it's not the right information to answer that kind of question.
3737

3838
Chats are constrained by the number of documents (chunks) returned in the response (limited to 3-20 in Azure OpenAI Studio playground). As you can imagine, posing a question about "all of the titles" requires a full scan of the entire vector store.
3939

40-
<!--You can experiment with the configuration settings such as temperature and pre-response text to improve the performance of your task. You can read more about each parameter in the [REST API](../reference.md).-->
41-
4240
[!INCLUDE [deploy-web-app](deploy-web-app.md)]
4341

articles/ai-services/openai/use-your-data-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ In this quickstart you can use your own data with Azure OpenAI models. Using Azu
5555

5656
- Be sure that you are assigned at least the [Cognitive Services Contributor](./how-to/role-based-access-control.md#cognitive-services-contributor) role for the Azure OpenAI resource.
5757

58-
- Download the example dataset from [GitHub](https://github.com/Azure-Samples/azure-search-sample-data/tree/main/famous-speeches-pdf).
58+
- Download the example dataset from [GitHub](https://github.com/Azure-Samples/cognitive-services-sample-data-files/blob/master/openai/contoso_benefits_document_example.pdf).
5959

6060
::: zone pivot="programming-language-javascript"
6161

0 commit comments

Comments
 (0)