Engineering AI that thinks clearly and acts responsibly