Detecting LLM-Generated Text with Performance Guarantees