Building Reliable AI under Distribution Shifts