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-custom-categories.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -276,6 +276,8 @@ print(result)
276
276
277
277
Remember to replace the placeholders below with your actual values for the API key, endpoint, and specific content (category name, definition, and so on). These examples help you to manage the customized categories in your account.
Copy file name to clipboardExpand all lines: articles/ai-services/personalizer/includes/quickstart-sdk-csharp.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ ms.date: 01/19/2024
17
17
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
18
18
* The current version of [.NET Core](https://dotnet.microsoft.com/download/dotnet-core).
19
19
* Once you have your Azure subscription, <ahref="https://portal.azure.com/#create/Microsoft.CognitiveServicesPersonalizer"title="Create a Personalizer resource"target="_blank">create a Personalizer resource </a> in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
20
-
* You'll need the key and endpoint from the resource you create to connect your application to the Personalizer API. You'll paste your key and endpoint into the code below later in the quickstart.
20
+
* You need the key and endpoint from the resource you create to connect your application to the Personalizer API. You paste your key and endpoint into the code below later in the quickstart.
21
21
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
Personalizer is meant to run on applications that receive and interpret real-time data. In this quickstart, you'll use sample code to generate imaginary customer actions on a grocery website. The following code block defines three key methods: **GetActions**, **GetContext** and **GetRewardScore**.
69
+
Personalizer is meant to run on applications that receive and interpret real-time data. In this quickstart, you use sample code to generate imaginary customer actions on a grocery website. The following code block defines three key methods: **GetActions**, **GetContext** and **GetRewardScore**.
70
70
71
71
-**GetActions** returns a list of the choices that the grocery website needs to rank. In this example, the actions are meal products. Each action choice has details (features) that may affect user behavior later on. Actions are used as input for the Rank API
72
72
@@ -90,8 +90,7 @@ Personalizer is meant to run on applications that receive and interpret real-tim
90
90
91
91
1. Paste your key and endpoint into the code where indicated. Your endpoint has the form `https://<your_resource_name>.cognitiveservices.azure.com/`.
92
92
93
-
> [!IMPORTANT]
94
-
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](/azure/key-vault/general/overview). See the Azure AI services [security](../../security-features.md) article for more information.
@@ -110,7 +109,7 @@ Run the application with the dotnet `dotnet run` command from your application d
110
109
dotnet run
111
110
```
112
111
113
-
On the first iteration, Personalizer will recommend a random action, because it hasn't done any training yet. You can optionally run more iterations. After about 10 minutes, the service will start to show improvements in its recommendations.
112
+
On the first iteration, Personalizer recommends a random action, because it hasn't done any training yet. You can optionally run more iterations. After about 10 minutes, the service will start to show improvements in its recommendations.
114
113
115
114

Copy file name to clipboardExpand all lines: articles/ai-services/personalizer/includes/quickstart-sdk-nodejs.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,10 +87,9 @@ The Personalizer learning loop is a cycle of **Rank** and **Reward** calls. In t
87
87
88
88
1. Paste your key and endpoint into the code where indicated.
89
89
90
-
> [!IMPORTANT]
91
-
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](/azure/key-vault/general/overview). For more information about security, see the Azure AI services [security](../../security-features.md) article.
Copy file name to clipboardExpand all lines: articles/ai-services/personalizer/includes/quickstart-sdk-python.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ ms.date: 01/19/2024
17
17
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
18
18
*[Python 3.x](https://www.python.org/)
19
19
* Once your Azure subscription is set up, <ahref="https://portal.azure.com/#create/Microsoft.CognitiveServicesPersonalizer"title="Create a Personalizer resource"target="_blank">create a Personalizer resource </a> in the Azure portal and obtain your key and endpoint. After it deploys, select **Go to resource**.
20
-
* You'll need the key and endpoint from the created resource to connect your application to the Personalizer API, which you'll paste into the quick-start code below.
20
+
* You need the key and endpoint from the created resource to connect your application to the Personalizer API, which you paste into the quick-start code below.
21
21
* You can use the free pricing tier (`F0`) to try the service, then upgrade to a paid tier for production at a later time.
Personalizer is meant to run on applications that receive and interpret real-time data. For the purpose of this quickstart, you'll use sample code to generate imaginary customer actions on a grocery website. The following code block defines three key functions: **get_actions**, **get_context** and **get_reward_score**.
43
+
Personalizer is meant to run on applications that receive and interpret real-time data. In this quickstart, you use sample code to generate imaginary customer actions on a grocery website. The following code block defines three key functions: **get_actions**, **get_context** and **get_reward_score**.
44
44
45
45
46
46
-**get_actions** returns a list of the choices that the grocery website needs to rank. In this example, the actions are meal products. Each action choice has details (features) that may affect user behavior later on. Actions are used as input for the Rank API
47
47
48
48
-**get_context** returns a simulated customer visit. It selects randomized details (context features) like which customer is present and what time of day the visit is taking place. In general, a context represents the current state of your application, system, environment, or user. The context object is used as input for the Rank API.
49
49
50
-
The context features in this quickstart are simplistic. However, in a real production system, designing your [features](../concepts-features.md) and [evaluating their effectiveness](../how-to-feature-evaluation.md) is very important. Refer to the linked documentation for guidance.
50
+
The context features in this quickstart are simplistic. However, in a real production system, designing your [features](../concepts-features.md) and [evaluating their effectiveness](../how-to-feature-evaluation.md) is important. Refer to the linked documentation for guidance.
51
51
52
-
-**get_reward_score** returns a score between zero and one that represents the success of a customer interaction. It uses simple logic to determine how different contexts will respond to different action choices. For example, a certain user will always give a 1.0 for vegetarian and vegan products, and a 0.0 for other products. In a real scenario, Personalizer will learn user preferences from the data sent in Rank and Reward API calls. You won't define these explicitly as in the example code.
52
+
-**get_reward_score** returns a score between zero and one that represents the success of a customer interaction. It uses simple logic to determine how different contexts respond to different action choices. For example, a certain user will always give a 1.0 for vegetarian and vegan products, and a 0.0 for other products. In a real scenario, Personalizer will learn user preferences from the data sent in Rank and Reward API calls. You won't define these explicitly as in the example code.
53
53
54
54
In a real production system, the [reward score](../concept-rewards.md) should be designed to align with your business objectives and KPIs. Determining how to calculate the reward metric may require some experimentation.
55
55
@@ -65,8 +65,7 @@ Follow these steps to set up the Personalizer script.
65
65
66
66
1. Paste your key and endpoint into the code where indicated. Your endpoint has the form `https://<your_resource_name>.cognitiveservices.azure.com/`.
67
67
68
-
> [!IMPORTANT]
69
-
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure method to store and access your credentials like [Azure Key Vault](/azure/key-vault/general/overview). For more information, see the Azure AI services [security](../../security-features.md).
@@ -88,7 +87,7 @@ Once all the above code is included in your Python file, you can run it from you
88
87
python personalizer-quickstart.py
89
88
```
90
89
91
-
On the first iteration, Personalizer will recommend a random action, because it hasn't done any training yet. You can optionally run more iterations. After about 10 minutes, the service will start to show improvements in its recommendations.
90
+
On the first iteration, Personalizer recommends a random action, because it hasn't done any training yet. You can optionally run more iterations. After about 10 minutes, the service will start to show improvements in its recommendations.
92
91
93
92

0 commit comments