No AI algorithm can be “racist” because it has no intentionality in what it outputs. It is a model of the language and expressions that were developed from the training datasets it received as input. It interprets the input question and searches for the most probable response that would correspond to the words and associated meanings that it learned.
Most importantly the AI does not have a more general world model (or theory of mind) for what real people experience in their lives. This is what we train through education and experience to veto words or actions that we believe would be interpreted as hurtful to ourselves or others. Because we have the ability to not act or speak in hurtful ways we have agency and can be held accountable when we fail to do so.
Thanks!