Prepare the variant: either create a replica index with different ranking settings, or use customSearchParameters to test a search-time parameter difference on the same index.
Create the A/B test via the dashboard or POST to the /2/abtests endpoint with variants (each specifying index, trafficPercentage, and optionally customSearchParameters), plus a description and endAt date.
Instrument your frontend to pass userToken with every search request — A/B test assignment is user-stable so the same user always sees the same variant.
Monitor the test in the Algolia dashboard under A/B Tests; track conversion rate and click-through rate per variant. Let the test run until statistical significance is reached (Algolia shows a confidence indicator).
Stop the test via the API (POST /2/abtests/{id}/stop) and, if the variant wins, promote it by updating the primary index settings or making the replica the new primary.
Known gotchas
You can confirm which variant served a result by sending getRankingInfo:true in the query; the response will include an abTestVariantID field.
Testing base relevance settings (searchable attributes, custom ranking) requires a separate replica index — you cannot test those differences with customSearchParameters alone.
Ending an A/B test early for any reason voids statistical significance; plan the test duration before starting.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp