The [::-1] in the function you provided is called an index, built out as [starting index : ending index : step]

Usually, it is used to split lists or strings into lists of strings or lists of lists. Leaving one of these blank tells python to use it's default value.
The default values for starting index and ending index are the start and end of the string, and for step it's 1.
Since python traverses lists and strings from left to right, a step of 1 means it'll read the string that way, setting it to -1 basically just reverses the direction in which python would usually read the string, and store it backwards!
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence