•KRAS variants were associated with poor treatment outcomes in patients with biliary tract cancer. Here, KRAS is linked to biliary tract cancer.