Making Foundation Models More Reliable