A drop-down menu on the online application asks applicants about their sexual orientation, then later asks if applicants are transgender.

While the question may seem invasive, Goldman insists it's part of a plan to promote diversity in the hiring process.

The company started tracking LGBT applicants a year ago. It asks applicants to self-identify, then removes that data from the resume and interview process, only to return to it after the hires have been made. The goal is to "keep ourselves accountable" and ensure the company is hiring an appropriate percentage of the LGBT community, chief diversity officer Anilu Vazquez-Ubarri said.

It is a competitive market. If we don't do that outreach, it is possible that we have left the best candidate on the table.

Anilu Vazquez-Ubarri

No other banks surveyed by Fortune ask about applicants' sexuality, though HSBC allows applicants to list the gender-neutral honorific "Mx" instead of "Mr.," "Ms.," or "Mrs."

There is this unconscious bias happening ... Where women and LGBT are first to be hired, they are also first to be fired.

Clair Farley

But some LGBT advocates like Clair Farley of the LGBT Center advertise applicants not to reveal their sexuality until the job offer has been made. That can make litigation easier if the company ultimately rescinds the offer.