AI algorithms for content optimization