AI preparing logic