Goal-aware data management for retrieval and recommendations