Query and Prompt Classification