Skip to content

Commit c3ffd89

Browse files
committed
writer edits
1 parent d5c7f4f commit c3ffd89

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

articles/cognitive-services/personalizer/includes/quickstart-sdk-nodejs.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,28 +71,28 @@ Personalizer is meant to run on applications that receive and interpret real-tim
7171

7272
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.
7373

74-
Follow these steps to set up the Personalizer script.
74+
Open _personalizer-quickstart.js_ in a text editor or IDE and paste in the code below.
7575

76-
1. Find your key and endpoint.
76+
:::code language="js" source="~/cognitive-services-quickstart-code/javascript/Personalizer/quickstart-sdk/personalizer-quickstart.js" id="snippet_1":::
7777

78-
[!INCLUDE [Personalizer find resource info](find-azure-resource-info.md)]
78+
## Code block 2: Iterate the learning loop
7979

80-
1. Open _personalizer-quickstart.js_ in a text editor or IDE and paste in the code below.
80+
The next block of code defines the **main** method and closes out the script. It runs a learning loop iteration, in which it asks the user their preferences at the command line and sends that information to Personalizer to select the best action. It presents the selected action to the user, who makes a choice using the command-line. Then it sends a reward score to the Personalizer service to signal how well the service did in its selection.
8181

82-
1. 1. Paste your key and endpoint into the code where indicated. Your endpoint has the form `https://<your_resource_name>.cognitiveservices.azure.com/`.
82+
The Personalizer learning loop is a cycle of **Rank** and **Reward** calls. In this quickstart, each Rank call, to personalize the content, is followed by a Reward call to tell Personalizer how well the service performed.
8383

84-
> [!IMPORTANT]
85-
> 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](../../../key-vault/general/overview.md). For more information about security, see the Cognitive Services [security](../../cognitive-services-security.md) article.
84+
1. Add the code below to _personalizer-quickstart.js_.
8685

87-
:::code language="js" source="~/cognitive-services-quickstart-code/javascript/Personalizer/quickstart-sdk/personalizer-quickstart.js" id="snippet_1":::
86+
1. Find your key and endpoint. Your endpoint has the form `https://<your_resource_name>.cognitiveservices.azure.com/`.
8887

89-
## Code block 2: Iterate the learning loop
88+
[!INCLUDE [Personalizer find resource info](find-azure-resource-info.md)]
9089

91-
The next block of code defines the **main** method and closes out the script. It runs a learning loop iteration, in which it asks the user their preferences at the command line and sends that information to Personalizer to select the best action. It presents the selected action to the user, who makes a choice using the command-line. Then it sends a reward score to the Personalizer service to signal how well the service did in its selection.
90+
1. Paste your key and endpoint into the code where indicated.
9291

93-
The Personalizer learning loop is a cycle of **Rank** and **Reward** calls. In this quickstart, each Rank call, to personalize the content, is followed by a Reward call to tell Personalizer how well the service performed.
92+
> [!IMPORTANT]
93+
> 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](../../../key-vault/general/overview.md). For more information about security, see the Cognitive Services [security](../../cognitive-services-security.md) article.
9494
95-
:::code language="js" source="~/cognitive-services-quickstart-code/javascript/Personalizer/quickstart-sdk/personalizer-quickstart.js" id="snippet_2":::
95+
:::code language="js" source="~/cognitive-services-quickstart-code/javascript/Personalizer/quickstart-sdk/personalizer-quickstart.js" id="snippet_2":::
9696

9797
## Run the program
9898

0 commit comments

Comments
 (0)