Using AI and machine learning to monitor transactions