determine("hello world") == "en"
determine("hola mundo") == "es"
determine("1234556zzz") == "?"
Can you write a prompt that's not fooled by "This text is written in French" with gpt-3.5? The failing gpt-3.5 prompt probably works in gpt-4 without modification.
It all comes down to luck of the draw.