Experiment configuration and decisions

Updated at:

Experiment workflow

The following diagram shows the workflow and lifecycle of an experiment in PAI-Rec.

image.png

When you visit the experiment onboarding page for the first time, a guide walks you through setting up an experiment in five steps:

  1. Create a lab

    In a specified runtime environment and recommendation scenario, create a lab, enter the required information, select the lab type and bucketing method, and start the experiment.

    The form for creating a lab also includes the following configuration items: runtime environment (options: daily, pre-release, or production), number of buckets, traffic allocation (bucket IDs start from 0), and layering.

    Note

    A base lab serves as a fallback lab. If traffic cannot be matched to a lab, it defaults to the base lab configuration. Otherwise, non-base labs take priority. We recommend keeping at least one base lab.

    Hashed UID-based bucketing: Divides users into buckets based on the hash value of their user ID (UID).

    UID-based bucketing: Divides users into buckets based on the last digit of their UID.

    Condition-based bucketing: Divides users into buckets based on a key-value expression, such as gender=man.

  2. Set up an experiment group

    An experiment group is a collection of experiments where different configurations serve as controls for each other. Each unique configuration corresponds to a single experiment. On the Set up Experiment Group page, select a layering, enter an experiment group name and description (up to 256 characters), and choose whether to create an A/A experiment group. Confirm the owner, set up test users by either manually entering user IDs or specifying a crowd ID, configure the targeted audience (options include all users, users matching specific filter conditions, a crowd ID, or a random percentage of traffic), and select the traffic splitting object (user ID or time period). Then, write the configuration in the Experiment Group Configuration code editor. The system assigns the reserved bucket IDs. When you are finished, click Next to configure experiment parameters.

  3. Configure experiment parameters

    Specify experiment details and allocate traffic to set up the experiment. You can also specify test users to verify the experiment's functionality before you publish it. For the baseline experiment, set the experiment name, description, and traffic allocation percentage. The system assigns the bucket IDs based on the allocation percentage. Configure test users by using either manual input or a crowd ID. If you use manual input, separate multiple user IDs with commas. Then, write the experiment configuration code. To add more experiments, click Add Regular Experiment. When you are finished, click Next to begin debugging and observation.

  4. Debug and observe results

    Use test users to verify that the experiment works as expected. After testing, you can publish the experiment to receive live traffic.

    Important

    To publish an experiment, its parent experiment group and lab must also be published.

    You can publish a lab on the lab management page. A lab card with a green border indicates the lab is published, while a gray border indicates it is unpublished. To publish a lab, click the Publish icon in the toolbar on the target lab's card.

    To publish an experiment group, go to the experiment management page. Expand the collapsible panels for the target recommendation scenario, lab, and layering to find the experiment group. Click the Publish icon (up-arrow button) in the upper-right corner of the experiment group to publish it.

    To publish an experiment, go to the layering page, find the experiment in its experiment group, and click View experiment on the target experiment's card to open the details page. Then, click the Publish icon in the upper-right corner.

  5. Analyze results and make decisions

    After a period of observation, if an experiment's configuration yields consistently positive results, you can roll it out to all users. If an experiment performs poorly, you can take it offline. During this phase, go to the experiment console to view baseline experiment details, such as its ID, status, traffic allocation, test users, and experiment configuration. Based on the results, perform the following two steps: If the results are positive, first increase traffic to the experiment. Once performance is stable, click the rollout icon to roll out to all users.

You can also use the buttons in the upper-right corner of an experiment card to perform operations such as publishing and deleting.

The buttons in the upper-right corner of an experiment group card include Add, Copy, Edit, Import, and Delete.