You're talking about non-deterministic algorithms, who yes are often associated with AI but existed way before LLM's