Azure AI Personalizer

Azure AI Personalizer is a cloud-based service that enables developers to build applications that learn from user interactions to deliver the most relevant content or actions in real-time.

Introduction

Personalizer uses reinforcement learning to continuously adapt and improve the personalization experience. It allows your application to request ranked actions for a given context and then receive feedback on which action was the most rewarding. This feedback loop helps Personalizer understand user preferences and optimize future recommendations.

How it Works

The Personalizer service operates through a cycle of learning and action:

  1. Context and Actions: When your application needs to make a personalized decision, it sends a learning loop request to Personalizer. This request includes the current context (information about the user, the situation, device, etc.) and a set of possible actions that could be taken.
  2. Action Ranking: Personalizer analyzes the context and its learned model to determine the optimal order (ranking) of the provided actions. It sends this ranked list back to your application.
  3. Application Decision: Your application chooses the top-ranked action (or another action based on its own logic) and presents it to the user.
  4. Reward Feedback: After the user interacts with the chosen action, your application sends a reward feedback to Personalizer. This feedback indicates how successful the chosen action was in that specific context (e.g., a click, a purchase, a time spent viewing).
  5. Model Update: Personalizer uses the reward feedback to update its internal reinforcement learning model, improving its ability to rank actions for similar contexts in the future.

Key Concepts

Quickstart

Get started with Azure AI Personalizer in a few simple steps:

  1. Create a Personalizer Resource: Provision an Azure AI Personalizer resource in the Azure portal.
  2. Install the SDK: Use your preferred language's package manager to install the Azure SDK for Personalizer (e.g., pip install azure-ai-personalizer for Python).
  3. Make your First Learning Loop Request: Write code to send a context and actions to the Personalizer API and receive ranked results.
  4. Send Reward Feedback: Implement logic to send reward signals back to Personalizer after user interactions.

API Reference

Learning Loop API

POST /v1.2/rank

Description: Submits a context and actions, and returns a ranked list of actions.

Request Body:

{
    "actions": [
        {
            "id": "action_id_1",
            "features": [
                { "feature_name": "user_preference", "value": "sports" },
                { "feature_name": "article_category", "value": "technology" }
            ]
        },
        {
            "id": "action_id_2",
            "features": [
                { "feature_name": "user_preference", "value": "finance" },
                { "feature_name": "article_category", "value": "technology" }
            ]
        }
    ],
    "contextFeatures": [
        { "feature_name": "device", "value": "mobile" },
        { "feature_name": "time_of_day", "value": "evening" }
    ],
    "eventId": "unique_event_id"
}

Response Body:

{
    "rewardActions": [
        {
            "id": "action_id_1",
            "features": [...]
        },
        {
            "id": "action_id_2",
            "features": [...]
        }
    ],
    "ranking": [
        {"id": "action_id_1"},
        {"id": "action_id_2"}
    ],
    "rewardServicesConfig": {...}
}

Reward API

POST /v1.2/rewards

Description: Submits reward feedback for a given event.

Request Body:

{
    "reward": 0.7,
    "eventId": "unique_event_id",
    "rewardValue": "click"
}

Tutorials

Explore our comprehensive tutorials to learn how to implement Personalizer in various scenarios:

Learn More: For detailed information on features, best practices, and advanced configurations, please refer to the official Azure AI Personalizer documentation.