Learning the AI behind Amazon

How does Amazon improve its customer service? It uses an AI to learn user preferences (by tracking purchases) and generate recommendations. This is an AI that learns over time. And now Amazon is making one of its algorithms available for programmers and other businesses to use.