This paper proposes an automatic labeling function (LF) generation method to solve the difficulties of data labeling process for learning natural language understanding (NLU) platform of software engineering (SE) chatbot. In order to solve the time and resource consumption problems of existing manual labeling method, we present an approach to automatically generate LF by extracting patterns from existing labeled user queries. Experimental results using four SE datasets show that the generated LF achieves up to 85.3% AUC score and up to 27.2% NLU performance improvement. In addition, we confirmed that the number of generated LF affects the labeling performance. This study enables efficient data labeling in the SE chatbot development process, allowing developers to focus on developing core functions.