Set Up an Experiment using a Query ProfilePreferred method
Perform the tasks needed to set up an experiment. This topic describes how to set up an experiment using a query profile that references the experiment.
For the alternative approach of using an Experiment stage in the primary query pipeline, see Configure an Experiment stage. If you choose to use the Experiment stage, skip this article. |
Before you begin
Before you set up an experiment, you must already have:
-
A search app. The key aspect of the search app for experiments is that the search app identifies users in some way. A user ID might be associated with users persistently (this is best) or only for the current session. Searches and subsequent actions by anonymous users are not sent through an experiment.
-
A Fusion app. The Fusion app provides the search functionality you want to provide. Below, you will modify the app to include an experiment.
-
Data for users to search. The app should have data that users can search and search results that users can interact with. Typically, users will search a single dataset in the sense that different users are not given search results from different datasets. But in an experiment, different experiment variants can use data in different collections.
-
Results for users to interact with. Experiment metrics depend on users interacting with search results, for example, clicking on them. A search app uses signals to report the interactions to Fusion.
-
A plan for the experiment. This plan includes which control and variants to compare, the projected traffic, sample sizes, experiment duration, metrics, and decision criteria.
Basically, you need a working system in some environment on which you want to perform experiments, and a plan for experiment variants and for deciding which results are best.
1. Create query pipelines
The primary approach for experiment variants is to have multiple query pipelines. You must create additional query pipelines as needed before creating the experiment.
You can also vary the collection that is searched and query parameters, which you do when creating the experiment. In fact, if that is all you are varying, you can define an experiment that uses a single query pipeline. (And you can skip this section.) |
You will need the following pipelines:
-
Pipeline for the control variant. The first variant in an experiment is the control. The A/B/n experiment metrics compare the control variant pairwise with the other variants. The control variant should probably use the default query pipeline. Here, we assume that is the case.
You could modify the configuration of the default query pipeline (which the control variant will use) before the experiment. However, doing so has two disadvantages. First, pairwise comparisons in the experiment will not be against the status quo. Second, Fusion AI will not have a baseline of historical signal data to compare against (that comparison lets an experiment reach higher confidence numbers more quickly). -
Pipelines for other variants. Other variants in an experiment can use other query pipelines, each with different stages and/or that are configured differently. These are "how you might do things differently."
None of these pipelines will include Experiment stages. For the alternative approach of using an Experiment stage in the primary query pipeline, see Use an Experiment stage.
Create and configure the additional query pipelines you need for non-control variants. Repeat these steps for each pipeline.
-
Navigate to Querying > Query Pipelines.
-
Click Add.
-
Enter a Pipeline ID (arbitrary name) for the pipeline, and then click Save.
-
Modify the pipeline as desired, for example, by adding, configuring, and reordering stages.
-
Click Save.
2. Create the query profile and the experiment
In the Fusion UI, you can use either of these equivalent approaches to set up an experiment:
-
Create the experiment in the Query Profiles UI. Choose an existing query profile or create a new one. Then create the experiment in the Querying > Query Profiles UI.
-
Create the experiment in the Experiments UI. Create an experiment in the Analytics > Experiments UI, and then reference the experiment in the Querying > Query Profiles UI.
Option A: Create the experiment in the Query Profiles UI
-
Choose or create a query profile. Choose an existing query profile (for example, the default query profile) or create a new query profile for the experiment.
How to choose an existing query profile:-
Navigate to Querying > Query Profiles.
-
In the left pane, click the query profile you want to use.
-
Verify that the pipeline, search handler, collection ID, and parameters are correct.
-
(Optional) Click New params and specify URL parameters to add to all queries for this query profile.
How to create a new query profile:-
Navigate to Querying > Query Profiles.
-
Click New.
-
Enter a Query Profile ID (an arbitrary name for the query profile).
-
Choose a pipeline and a collection.
-
(Optional) Click New params and specify URL parameters to add to all queries for this query profile.
-
-
Enable experimentation and specify experiment details in the query profile:
-
Click the checkbox in front of Enable experimentation.
-
Specify the percent of traffic to include in the experiment.
-
Click the , and then click Add Experiment.
-
Enter an arbitrary ID (name) for the experiment.
-
Verify that the unique ID parameter is correct. It is the parameter that uniquely identifies each user. The default is
userId
. Correct the parameter if necessary, for example by specifying the session ID field instead. -
Choose the base collection for signals. Signals resulting from requests that flow through the experiment are stored in the
_signals
collection associated with this collection. -
(Optional) Enter a description for the experiment.
-
(Optional in Fusion 4.2+) To use a multi-armed bandit, select Automatically Adjust Weights Between Variants.
-
Add variants. Click Add Variant to add each non-control variant in your experiment.
-
For each variant:
-
Enter an arbitrary name. For the first variant, which is the control, Fusion uses the name
control
. You can change that name if you wish. -
Click Specify what varies and specify what varies. Items you select are visible in the variant UI and have a green check mark in the dropdown menu. You can vary the query pipeline, query parameters (URL parameters to add to the query), and/or the collection.
-
(For query parameters) Click New params. In the dialog box, specify the Parameter Name, Parameter Value, and Update Policy for each parameter (append, default, remove, or replace).
-
-
Add metrics. For each metric:
-
Click Add Metric and select the type of metric.
-
Fill in information for the metric.
-
Click Save to save the experiment.
Option B: Create the experiment in the Experiments UI
You can create the experiment first and reference it from a query profile.
-
Create an experiment. The experiment defines variants and metrics, as well as the user ID parameter and the base collection for signals:
-
Navigate to Analytics > Experiments.
-
Click New.
-
Enter an arbitrary ID (name) for the experiment.
-
Verify that the unique ID parameter is correct. It is the parameter that uniquely identifies each user. The default is
userId
. Correct the parameter if necessary, for example by specifying the session ID field instead. -
Choose the base collection for signals. Signals resulting from requests that flow through the experiment are stored in the
_signals
collection associated with this collection. -
(Optional) Enter a description for the experiment.
-
(Optional in Fusion 4.2+) To use a multi-armed bandit, select Automatically Adjust Weights Between Variants.
-
Add variants. Click Add Variant to add each non-control variant in your experiment.
-
For each variant:
-
Enter an arbitrary name. For the first variant, which is the control, Fusion uses the name
control
. You can change that name if you wish. -
Click Specify what varies and specify what varies. Items you select are visible in the variant UI and have a green check mark in the dropdown menu. You can vary the query pipeline, query parameters (URL parameters to add to the query), and/or the collection.
-
(For query parameters) Click New params. In the dialog box, specify the Parameter Name, Parameter Value, and Update Policy for each parameter (append, default, remove, or replace).
-
-
Add metrics. For each metric:
-
Click Add Metric and select the type of metric.
-
Fill in information for the metric.
-
Click Save to save the experiment.
-
Reference the experiment from the query profile. Open the query profile you want to use for the experiment.
-
Navigate to Querying > Query Profiles.
-
Click the query profile you want to use for the experiment.
-
(Optional) If necessary, modify the query profile ID, default pipeline, and/or the search handler. These modifications are not related to experiments and are probably not required.
-
(Optional) Click New params and specify URL parameters to add to all queries for this query profile.
-
Click the checkbox in front of Enable experimentation.
-
Specify the percent of traffic to include in the experiment.
-
Click the , and then click the experiment name.
-
Click Save to save the query profile.
-
Next step
You have set up the experiment. Alternatively, you will set it up using an Experiment stage. If you chose to use this article for setting up your experiment, you can skip the next article.