-
Notifications
You must be signed in to change notification settings - Fork 21
docs(abtests) v3 api #4394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Niamsy
wants to merge
14
commits into
main
Choose a base branch
from
docs/abtests/api-v3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
docs(abtests) v3 api #4394
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
97d79a3
docs(abtests) v3 api
Niamsy 21746ae
Update specs/abtesting-v3/common/schemas/Variant.yml
Niamsy 0504af7
Update specs/abtesting-v3/common/schemas/Variant.yml
Niamsy c2edc40
Update specs/abtesting-v3/common/schemas/Variant.yml
Niamsy e12b82c
Update specs/abtesting-v3/paths/abtests.yml
Niamsy 4083d74
Update specs/abtesting-v3/paths/scheduleABTest.yml
Niamsy c8c5ce3
Update specs/abtesting-v3/paths/estimate.yml
Niamsy e3a544e
fix(abtests) remove significance from abtest
Niamsy e6461d4
feat(abtests) move filterEffects in metadata + add description to pValue
Niamsy 24f8eef
feat(abtests) add metadata into metric
Niamsy c5d5d83
doc(abtests) add timeseries endpoint for v3 + add confidence interval…
Niamsy c8649c6
add confidence interval field descriptions
stevenMevans a901589
fix(abtests) traffic percentage min and max + add migratedAbTestID to…
Niamsy 261190f
feat(abtests) add error correction to get/list endpoint for v3
Niamsy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
# path | ||
ID: | ||
in: path | ||
name: id | ||
description: Unique A/B test identifier. | ||
required: true | ||
schema: | ||
$ref: "#/abTestID" | ||
|
||
# misc | ||
index: | ||
type: string | ||
description: Index name of the A/B test variant (case-sensitive). | ||
example: "delcourt_production" | ||
|
||
abTestID: | ||
type: integer | ||
description: Unique A/B test identifier. | ||
example: 224 | ||
|
||
abTestScheduleID: | ||
type: integer | ||
description: Unique scheduled A/B test identifier. | ||
example: 224 | ||
|
||
endAt: | ||
type: string | ||
description: End date and time of the A/B test, in RFC 3339 format. | ||
example: 2023-06-17T00:00:00Z | ||
|
||
createdAt: | ||
type: string | ||
description: Date and time when the A/B test was created, in RFC 3339 format. | ||
example: 2023-06-15T15:06:04.249906Z | ||
|
||
updatedAt: | ||
type: string | ||
description: Date and time when the A/B test was last updated, in RFC 3339 format. | ||
example: 2023-06-15T15:06:44.400601Z | ||
|
||
scheduledAt: | ||
type: string | ||
description: Date and time when the A/B test is scheduled to start, in RFC 3339 format. | ||
example: 2023-06-15T15:06:44.400601Z | ||
|
||
name: | ||
type: string | ||
description: A/B test name. | ||
example: Custom ranking sales rank test | ||
|
||
description: | ||
type: string | ||
description: Description for this variant. | ||
example: Current production index | ||
|
||
trafficPercentage: | ||
type: integer | ||
description: Percentage of search requests each variant receives. | ||
minimum: 1 | ||
maximum: 99 | ||
example: 60 | ||
|
||
currencies: | ||
type: object | ||
description: A/B test currencies. | ||
example: | ||
USD: | ||
currency: USD | ||
revenue: 120.0 | ||
mean: 53.7 | ||
standardDeviation: 12.3 | ||
EUR: | ||
currency: EUR | ||
revenue: 100.0 | ||
mean: 43.7 | ||
standardDeviation: 10.3 | ||
additionalProperties: | ||
$ref: "#/currency" | ||
x-additionalPropertiesName: currency code | ||
|
||
currency: | ||
type: object | ||
properties: | ||
currency: | ||
type: string | ||
description: Currency code. | ||
example: "USD" | ||
revenue: | ||
type: number | ||
format: double | ||
description: Revenue for this currency. | ||
example: 120.0 | ||
mean: | ||
type: number | ||
format: double | ||
description: Mean for this currency. | ||
example: 53.7 | ||
standardDeviation: | ||
type: number | ||
format: double | ||
description: Standard deviation for this currency. | ||
example: 12.3 | ||
|
||
filterEffects: | ||
type: object | ||
description: A/B test filter effects resulting from configuration settings. | ||
properties: | ||
outliers: | ||
title: outliersFilter | ||
type: object | ||
description: Outliers removed from the A/B test as a result of configuration settings. | ||
example: | ||
usersCount: 1 | ||
trackedSearchesCount: 237 | ||
properties: | ||
usersCount: | ||
type: integer | ||
description: Number of users removed from the A/B test. | ||
example: 1 | ||
trackedSearchesCount: | ||
type: integer | ||
description: Number of tracked searches removed from the A/B test. | ||
example: 237 | ||
emptySearch: | ||
title: emptySearchFilter | ||
type: object | ||
description: Empty searches removed from the A/B test as a result of configuration settings. | ||
example: | ||
usersCount: 1 | ||
trackedSearchesCount: 237 | ||
properties: | ||
usersCount: | ||
type: integer | ||
description: Number of users removed from the A/B test. | ||
example: 1 | ||
trackedSearchesCount: | ||
type: integer | ||
description: Number of tracked searches removed from the A/B test. | ||
example: 237 | ||
|
||
metric: | ||
type: object | ||
description: Defines a metric to be retrieved during an A/B test. | ||
properties: | ||
name: | ||
type: string | ||
description: Name of the metric. | ||
dimension: | ||
type: string | ||
description: Dimension of the metric, for example, in case of a revenue metric it could be USD, EUR... | ||
required: | ||
- name | ||
example: | ||
- name: revenue | ||
dimension: USD | ||
- name: conversionRate | ||
- name: clickThroughRate | ||
- name: trackedSearchCount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
ABTests: | ||
oneOf: | ||
- type: array | ||
description: A/B tests. | ||
items: | ||
$ref: "#/ABTest" | ||
- type: "null" | ||
description: No A/B tests are configured for this application. | ||
|
||
ABTest: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
Niamsy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
abTestID: | ||
$ref: "../parameters.yml#/abTestID" | ||
updatedAt: | ||
$ref: "../parameters.yml#/updatedAt" | ||
createdAt: | ||
$ref: "../parameters.yml#/createdAt" | ||
endAt: | ||
$ref: "../parameters.yml#/endAt" | ||
name: | ||
$ref: "../parameters.yml#/name" | ||
status: | ||
$ref: "#/Status" | ||
variants: | ||
$ref: "Variant.yml#/variants" | ||
configuration: | ||
$ref: "#/ABTestConfiguration" | ||
migratedAbTestID: | ||
$ref: "#/MigratedABTestId" | ||
required: | ||
- status | ||
- name | ||
- createdAt | ||
- endAt | ||
- updatedAt | ||
- abTestID | ||
- variants | ||
|
||
Status: | ||
type: string | ||
description: | | ||
A/B test status. | ||
- `active`. The A/B test is live and search traffic is split between the two variants. | ||
- `stopped`. You stopped the A/B test. The A/B test data is still available for analysis. | ||
- `expired`. The A/B test was automatically stopped after reaching its end date. | ||
- `failed`. Creating the A/B test failed. | ||
example: active | ||
enum: | ||
- active | ||
- stopped | ||
- expired | ||
- failed | ||
|
||
ABTestConfiguration: | ||
title: configuration | ||
type: object | ||
description: A/B test configuration. | ||
properties: | ||
outliers: | ||
$ref: "#/Outliers" | ||
emptySearch: | ||
$ref: "#/EmptySearch" | ||
minimumDetectableEffect: | ||
$ref: "#/MinimumDetectableEffect" | ||
|
||
Outliers: | ||
type: object | ||
description: Configuration for handling outliers. | ||
properties: | ||
exclude: | ||
type: boolean | ||
description: Whether to exclude outliers when calculating A/B test results. | ||
default: true | ||
|
||
EmptySearch: | ||
type: object | ||
description: Configuration for handling empty searches. | ||
properties: | ||
exclude: | ||
type: boolean | ||
description: Whether to exclude empty searches when calculating A/B test results. | ||
|
||
MinimumDetectableEffect: | ||
type: object | ||
description: Configuration for the smallest difference between test variants you want to detect. | ||
properties: | ||
size: | ||
type: number | ||
format: double | ||
minimum: 0 | ||
maximum: 1 | ||
description: | | ||
Smallest difference in an observable metric between variants. | ||
For example, to detect a 10% difference between variants, set this value to 0.1. | ||
metric: | ||
$ref: "#/EffectMetric" | ||
required: | ||
- size | ||
- metric | ||
|
||
EffectMetric: | ||
type: string | ||
description: Metric for which you want to detect the smallest relative difference. | ||
enum: | ||
- addToCartRate | ||
- clickThroughRate | ||
- conversionRate | ||
- purchaseRate | ||
|
||
MigratedABTestId: | ||
type: integer | ||
description: Unique migrated A/B test identifier. | ||
example: 224 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ABTestResponse: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
index: | ||
$ref: '../parameters.yml#/index' | ||
abTestID: | ||
$ref: '../parameters.yml#/abTestID' | ||
taskID: | ||
$ref: '../../../common/responses/common.yml#/taskID' | ||
required: | ||
- abTestID | ||
- index | ||
- taskID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
AddABTestsVariant: | ||
oneOf: | ||
- $ref: '#/abTestsVariant' | ||
- $ref: '#/abTestsVariantSearchParams' | ||
|
||
abTestsVariantSearchParams: | ||
allOf: | ||
- $ref: '#/abTestsVariant' | ||
- $ref: '#/customSearchParams' | ||
|
||
abTestsVariant: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
index: | ||
$ref: '../parameters.yml#/index' | ||
trafficPercentage: | ||
$ref: '../parameters.yml#/trafficPercentage' | ||
description: | ||
$ref: '../parameters.yml#/description' | ||
required: | ||
- index | ||
- trafficPercentage | ||
|
||
customSearchParams: | ||
type: object | ||
description: | | ||
Search parameters to add to the test variant. | ||
Only use this parameter if the two variants use the same index. | ||
example: {'typoTolerance': false, 'synonyms': false} | ||
additionalProperties: false | ||
properties: | ||
customSearchParameters: | ||
type: object | ||
required: | ||
- customSearchParameters | ||
x-discriminator-fields: | ||
- customSearchParameters |
18 changes: 18 additions & 0 deletions
18
specs/abtesting-v3/common/schemas/EstimateABTestResponse.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
EstimateABTestResponse: | ||
type: object | ||
properties: | ||
durationDays: | ||
type: integer | ||
format: int64 | ||
description: Estimated number of days needed to reach the sample sizes required for detecting the configured effect. This value is based on historical traffic. | ||
example: 21 | ||
sampleSizes: | ||
type: array | ||
description: | | ||
Sample size estimates for each variant. The first element is the control variant. | ||
Each element is the estimated number of searches required to achieve the desired statistical significance. | ||
items: | ||
type: integer | ||
format: int64 | ||
description: Number of tracked searches needed to be able to detect the configured effect for the control variant. | ||
example: 23415 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ScheduleABTestResponse: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
abTestScheduleID: | ||
$ref: '../parameters.yml#/abTestScheduleID' | ||
required: | ||
- abTestScheduleID |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will just represent the
nullable
attribute in the doc/clients, no descriptions are expected