Improve AI to check diff