A General Method for Detecting Information Generated by Large Language Models