This is one of the things that freaked me out the most in William Gibson's The Peripheral, the AI called the Aunties. They go back through all historical records for people (things like social media and ones only the police and government have access to) and make judgements and predictions about them. It turns the fight for privacy and against unchecked police power into a much more difficult battle across time since the AI can process so much more data than a human.