Scientists Develop New Algorithm to Spot AI 'Hallucinations'