Show HN: We made an open-source personalization engine
https://github.com/metarank/metarank
Hey, HN! You probably know that the ordering of products on Amazon, posts in FB, and search results in Google is personalized for each visitor, as it directly affects conversion, click rate and engagement. But not everyone can afford to hire an army of PhDs to squeeze every penny out of the ranking, and not everyone agrees on the current (im)balance between privacy and profits.So we built Metarank, an open-source and privacy-focused personalization engine. It can rerank in real-time any type of content, using only the data you allow, and optimize metrics you define.
We made a lot of proprietary DIY services for personalization in e-commerce in our past careers and heard so many complaints from other companies also struggling to implement personalization. It’s often considered "too risky" to spend 6+ months on an in-house moonshot project to reinvent the wheel without an experienced team and no existing open-source tools. Like other people in the industry, we were tired of building everything from the bottom up each time we approached personalization - it should be easy not only for Amazon to do such magical ML tricks, but for everyone else.
A small demo of the tool with personalized recommendations: https://demo.metarank.ai
A blog post on how this demo was made: https://medium.com/metarank/personalizing-recommendations-wi...
The project itself: https://github.com/metarank/metarank
* Parse User-Agent field, make a GeoIP lookup
* Count number of clicks over different items on multiple time windows, like 1-2-3-4 weeks
* Conversion and CTR rates
* Basic customer profiling, like “you clicked on a red item in the past, and this item is also red”
There is just a LambdaMART with xgboost inside, no rocket science. It won’t replace an in-house highly-focused solution, but building everything from scratch may take a ton of time. With Metarank you can quickly hack a good enough solution in a day, hopefully :)
The training dataset is not that huge (see https://github.com/metarank/ranklens/ for details, it's open-source), so we do a full retraining directly on the node right after the deployment, and it takes around 1 minute to finish. We also run the same process inside the CI: https://github.com/metarank/metarank/blob/master/run_e2e.sh
There is an option to run this thing in a distributed mode:
* training is done using a separate batch job running on Apache Flink (and on k8s using flink's integration)
* feature updates are done in a separate streaming Flink job, writing everything in Redis
* The API fetches latest feature values from Redis and runs the ML model.
The dev-mode I've mentioned earlier is when all these three things are bundled together in a single process to make it easier to play with the tool. But we didn't spent much time testing distributed setup, as this thing is still a hobby side-project and we're limited in time spent developing it.
So you can just download the jar file from releases page and run ./run_e2e.sh <jar file> in the checked-out repository, it should do the job.
Layman here: is this why I keep seeing ads for things I've already bought?
I'm afraid I'm skeptical.
Content ranking in small, well defined contexts is not hard to do and doesn't require an ML approach – rules based systems are often easier to specify, easier for both creators and users to understand, and easier to make conform to business rules.
When ML does need to be introduced, when the scale or complexity is large enough that a rules-based approach will be infeasible or worse, having a generic implementation is unlikely to return useful results. So much of the work of optimising an ML approach is engineering features out of the data that make sense and that don't introduce bias.
It's that last point that's really important because if you do the wrong feature engineering, then the bias introduced effectively means you're back to building a rules-based system, just one that has a bunch of inaccuracy built in, and where you don't understand what rules you've specified, or even that you have specified them.
I'm not an expert here, but I've worked on basic recommender systems for products, and worked with people who were far more knowledgeable about this, all of whom seemed to have a low opinion of generic systems.
When use case demands it, domain relevant feature engineering is where the value is. A generic approach is unlikely to add any value
This domain is currently on the MetaMask domain warning list. This means that based on information available to us, MetaMask believes this domain could currently compromise your security and, as an added safety feature, MetaMask has restricted access to the site. To override this, please read the rest of this warning for instructions on how to continue at your own risk.
But, in saying that - what kind of filter is MetaMask using to just blatantly wipe out domains like this? Kind of on the fence on how I feel about it.
Metarank and Metamask have the distance of 3. I've made a ticket some time ago in their github repo (https://github.com/MetaMask/eth-phishing-detect/issues/6855), but it seems that it was lost in thousands of similar tickets.
We're still considering building plugins to easier integrate with existing search technologies and will keep an open eye on the demand for this.
On the demo page, nothing is happening when I try clicking on any of the buttons. I'm in a browser with no adblocking or jsblocking. Is this just the hug of death, or am I holding it wrong?
However it seems to work in incognito.
EDIT: If you're using Metamask, I think that's the reason. After disabling it the demo worked. Also, when visiting metarank.ai from Github, I'm getting a warning containing:
Screenshot: https://i.ibb.co/bHWTdtM/image.pngWe're looking at what we can do to revive it
I usually dislike personalized content, I prefer search results that accurately match my query I and find it distracting to see suggestions or uncommon ordering (to the point that I search for Netflix movies via an external website to avoid going through their UI).
However our stats and a\b test results show that personalization improves overall store conversion, ctr and other important metrics in ecommerce. And seeing how it's applied everywhere now (you social netwroks, ads, etc), the majority of users are engaging better with it.
Some sites opt to include a 'disable personalization' option, that might do the trick for some of the users
So many questions of the form "this thing annoys me, how do I fix it" are answered by "These other people are making money annoying you, and they like it."
I logged into the container as root and ran "apt-get update && apt-get install libgomp1" and then training worked, but it'd be nice to be able to view/tweak your existing Dockerfile if/when needed. Thanks, cool project!
As for the Dockerfile, it's built via sbt at the moment, but we will look at adding it to the repo as well.
Partly, because there is a settings icon overlay. Maybe I’m missing something on mobile.
Also, it drove me nuts that I couldn’t like only the first matrix film.
The tool might be useful for larger companies as well, as it can give a head start for the machine learning engineers as they won't need to build the tools from scratch
* you have a very short window to adapt your store, as the visitor will never come back in the future.
* even if you have zero past knowledge about a new visitor, there is still something to compare with other similar visitors: are they from mobile? Is it ios or android? Are they US? Is it a holiday now? Did they come from google search or facebook ad?
* this knowledge is ephemeral and makes sense only within their current session. But a visitor can still do a couple of interactions like browsing different collections of items or clicking on search results, and it can also be taken into account.
But compared to Amazon and Google, it's you who define which features should be used for the ranking and how long they are stored (see the "ttl" option on all feature extractors in our docs for details).
For example, here is https://github.com/metarank/metarank/blob/master/src/test/re... the config of features used in the movie recommendations demo - in a most privacy-sensitive setup you can just drop all the "interacted_with" extractors and will get zero private data stored for each visitor.
Rather than an offline model, why not use an online, continuously relearning model like a Multi-Armed Bandit to do the re-ranking?
All of this is configurable, of course, so you can adjust the behaviour to your use case
It's a bit uneasing to hit the landing page and find a typo in "personalizaton made easy."
And it's not a framework, so you don't really need to write/read any Scala to play with it.
b) It is one of the few languages that lets you use the same code for frontend (Scala.js), backend (Scala) and desktop (Scala Native).
c) FP and the strong type system when used intelligently can make your code simpler, cleaner and safer.
d) Libraries such as ZIO (zio.dev) make robust concurrency a breeze. Not yet seen any other language/library except for Erlang come close.