By default, when both Personalization and Dynamic Re-Ranking (DRR) are enabled, the engine does not apply them concurrently. Instead, it applies:
- Personalization for users with enough data to personalize the search
- DRR for users without enough data to personalize the search (such as first-time users).
This means if the userToken sent with the request has an existing profile with affinities that match at least one hit on the first page of results, Personalization will take precedence, otherwise, DRR will be applied.
You can find our full documentation on how Personalization fits into Algolia's relevancy strategy here.
How does this impact results?
While the above can mean users see personalized results over "popular" products, its important to take into consideration that personalization only takes into account the past 90 days of users' activity meaning only recent user interactions are considered.
If there has been no activity within the 90 day period, or if products returned do not match a user's profile, results will be re-ranked by DRR instead.
We've found that users prefer to see personalized results based on their previous search or buying patterns when possible, rather than simply "popular" items.
Personalization with DRR
If you wish to enable Dynamic Re-Ranking even when Personalization affects the first page of results, set allowReRankingOnPersonalization to true at query time. This will mean:
- Dynamic Re-Ranking pins promoted hits first
- Personalization reorders the remaining hits (the unpinned hits)
If Dynamic Re-Ranking promotes 100 hits, Personalization can only reorder hits starting at position 101.
Note that if distinct > 1, DRR is not applied, even when allowReRankingOnPersonalization=true. To apply DRR, set distinct to 0 or 1.
You can use the getRankingInfo search parameter to retrieve additional ranking details for each search result. When enabled, Algolia includes a _rankingInfo object in every hit, providing information about how the result was ranked, including any impact from Personalization.
To enable this, set getRankingInfo to true in your search request. Then, review the _rankingInfo.personalization object in the response. If the initialPosition value differs from newPosition, Personalization changed the result's position in the ranking.
How to test their relative impact
If you wish to test the impact of personalization vs DRR, you could run an A/B test where:
- DRR and personalization is enabled on both indices
- One variant has a
personalizationImpactof0(to mimicenablePersonalization:false) - Set the other variant with
personalizationImpactgreater than 0