AI Re-Ranking or recommend sorting on empty search

When a user opens the search page I show a list of items, I’m using an empty search to display all items in the index.

I would like that list to be sorted by algolia recommendations from insights, like user clicks or conversion events.

I thought dynamic re ranking had me covered, until I read this

By default, Algolia doesn’t dynamically re-rank empty queries. Setting a Browsing facet re-ranks empty queries that include a facetFilters for that attribute.

And “Algolia Recommend” only recommends based on another item.

So how can I show a recommended list of items when I open the search page?
For example show a list of popular items based on algolia insights.

@jariztia great question!

frequentlyBoughtTogether and relatedProducts both require an objectID to base the results on - so I agree they don’t fit the bill here.

Two models that may be of interest are the trendingItems [1] and trendingFacets [2] models. These two don’t require a specific objectID and will show overall what is trending with your data set. More information can be found here in our documentation.

If you did want to sort empty queries, you can also add popularity score per record and add a custom-ranking attribute to sort it based on the score. You could calculate the popularity by the number of clicks and conversions for that item. Not sure how many total records you have and if this is feasible or not - but figured I’d let you know regardless.

Pinging @chuck.meyer in case he has any other ideas. :slight_smile:

Happy to help further, let us know! Thanks!

I agree with @michael.king – If you’re collecting click and conversion events via Insights, then this is exactly what the trending models are designed for.

I would add a Trending carousel to your search page or landing page, rather than try to re-rank on empty queries. If you’re using an Autocomplete style interface you can even add trending items as a source right in your pop-up search UI.

You could also use category pages to drop users onto a page with re-ranked results within that category facet.

I’d avoid injecting an additional ranking attribute if you already have the data to get dynamic results using these other methods.

To

Thank you @michael.king and @chuck.meyer! I thought I had surfed all the documentation but never saw those trending item and trending facet functions, they look like a great fit for what we need, I would prefer to receive an array of the elements instead of letting algolia interact with my HTML tho. Anyway I will see how can I make it work.

About the popularity score, is something algolia can manage or an attribute I would have to calculate and attach to each element? The idea is to use the events to calculate this popularity.

Thanks again, Joaquin.

Credits to @michael.king for pointing in the right direction.
Trending items without the added UI: This way I can receive the list of recommended items and use them with our logic.
And there is multiple models of recommendations we can use: List of all the recommendation models