Not hallucinating is easy when you don't produce strings.

Hallucinating as we use the word really only applies to generative AI. Non generative AIs can't hallucinate, they can just be wrong.