Better prompt logic for dangerous functions