Sometime back I blogged about the challenges of building recommendation engines. It is very difficult to come up with an algorithm that can predict what you may be interested in. If you look at your recommendations on Amazon.com, you will typically notice a pattern based on an author or particular subject. Good luck finding something that was recommended because you liked John Grisham and Nuclear Physics – it simply seems this type of intersection is not in their algorithm.
If you look at Netflix on the other hand, this is exactly what they do. Based on the genre, actors, etc. and how other people who have rated other movies the same as you, Netflix takes a guess at how much you will like the movie. And they simply don’t recommend it – they say ‘we think you’ll give this 3.5 stars.’ Pretty cool stuff.
Why do I bring this up now? Because today is the launch of Windows 7 and I had a flashaback to a visit I paid to Amazon.com a short time ago. I was presented with the recommendation shown below.
Why on earth I should consider Cake Mania because I looked at Windows 7 is beyond me.
And no, I didn’t consider it – in case you were wondering.
After rolling out McKNet Connections and integrating social and traditional search platforms, some of our users began seeing the message “Operation Aborted” in Internet Explorer 6 and 7. If they had “Friendly HTTP Errors” enabled, they would then see the friendly page for a 404 error. If not, they would remain on the search results page looking at a normal body of output.
This took several months to diagnose and fix because:
a) It was intermittent. Most of the people who reported it could not reliably reproduce the scenario every time.
b) Inspection of page elements being returned across the HTTP stream were identical whether the “operation aborted” message appeared or not.
c) We weren’t doing anything very fancy – just launching a bunch of AJAX HTTP calls to get metadata about the search results.
Finally, I had a breakthrough last Friday when I read Microsoft KB article #927917. It indicated a possible occurrence was because a child container HTML element tries to modify a parent container that was not yet closed. The solution Microsoft proposed was upgrading to IE 8. Back in reality-land, I had to come up with another option.
Upon inspecting the code, I noted that we were updating the innerHTML property of various elements as a result of several web service calls. To increase performance, we began triggering these calls as they were realized on the page. These calls were nested in various DIV containers and it dawned on me that perhaps some of our clients were getting responses back from the asynchronous call before the calling block’s DOM element was closed.
As a test, we removed the 10 calls that were taking place and found that users with the issue continued to experience it in Production, but not in this new test code. The next step was to build an array of calls and then trigger them once the DOM section was closed. Again, we tested this with our users and found that the full functionality had been restored and no errors were experience.
The lesson learned here was to defer AJAX calls until the DOM blocks they would be updating has completely loaded.
Some time back I started pondering the challenges of automating affinity in the enterprise – that is determining people you should know based on your digital footprint. Part of my exercise has had me looking into the recommendation engines that others have implemented and seeing what makes them tick.
When I first started to really look at the Amazon recommendation engine, noticed a pattern. The fiction books recommended to me – all seemed to be same authors I've already indicated interest in (either by buying or rating). No new authors were coming up. I thought this was odd – I certainly did not need to be recommended a book from Grisham, Clancy, or Ludlum. In exploring the non-fiction books, the recommendations better – but really seemed too topical. Just because I bought a book on corporate governance a few years ago during my MBA program studies does not mean that I am interested in it now. That situation is easily rectified by telling Amazon to ignore that purchase for recommendations, so I really won't gripe about it.
An interesting thing happened the other day though when I cranked up my Kindle. I started getting recommendations for fiction books from other authors. What was the difference? I purchased The Hitchhiker's Guide to the Galaxy on my Kindle. Apparently, Grisham / Clancy / etc. aren't good connectors or predictors. But buy something from Douglas Adams and whammo!, you get recommendations. So now I've uncovered many authors and books I may be interested in, and am sorely in need of some free time to discover them.
The unfortunate side effect to this discovery is that I no longer have an out based on my initial observations of Amazon. My guess is that when you only buy and rate the highly popular authors, the ranking algorithm becomes skewed toward those large pools and does not uncover the books/authors that may be equally good but less purchased. So, my investigation continues.