IntroductionPain associated with temporomandibular dysfunction (TMD) is often confused with odontogenic pain, which is a challenge in endodontic diagnosis. Validated screening questionnaires can aid in the identification and differentiation of the source of pain. Therefore, this study aimed to develop a virtual assistant based on artificial intelligence using natural language processing techniques to automate the initial screening of patients with tooth pain. MethodsThe PAINe chatbot was developed in Python language using the PyCharm environment and the openai library to integrate the ChatGPT 4 API and the Streamlit library for interface construction. The validated TMD Pain Screener questionnaire and 1 question regarding the current pain intensity were integrated into the chatbot to perform the differential diagnosis of TMD in patients with tooth pain. The accuracy of the responses was evaluated in 50 random scenarios to compare the chatbot with the validated questionnaire. The kappa coefficient was calculated to assess the agreement level between the chatbot responses and the validated questionnaire. ResultsThe chatbot achieved an accuracy rate of 86% and a substantial level of agreement (κ = 0.70). Most responses were clear and provided adequate information about the diagnosis. ConclusionsThe implementation of a virtual assistant using natural language processing based on large language models for initial differential diagnosis screening of patients with tooth pain demonstrated substantial agreement between validated questionnaires and the chatbot. This approach emerges as a practical and efficient option for screening these patients.