BACKGROUND AND OBJECTIVE: Autoimmune encephalitis (AE) is an immune-mediated disease. Some patients experience persistent cognitive deficits despite receiving immunotherapy. We aimed to develop a prediction model for long-term cognitive outcomes in patients with AE. METHOD: In this multicenter cohort study, a total of 341 patients with AE were enrolled from February 2014 to July 2023. Cognitive impairment was identified using the telephone Mini-Mental State Examination (t-MMSE). Six machine learning (ML) algorithms were used to assess the risk of developing cognitive impairment. RESULTS: The median age of the patients with AE was 30.0 years (23.0-48.25), and 48.90 % (129/264) were female in the training cohort.77 (29.2 %) patients were identified with cognitive impairment after a median follow-up of 49 months. Among 16 features, the following six features were finally selected to develop the model: Cognitive Reserve Questionnaire (CRQ), Clinical Assessment Scale for Autoimmune Encephalitis (CASE), status epilepticus (SE), age, MRI abnormalities, and delayed immunotherapy. Compared to other ML models, the random forest (RF) model demonstrated superior performance with an AUC of 0.90. The accuracy, sensitivity, and specificity in the testing cohort were 0.87, 0.79, and 0.90, respectively. CONCLUSION: The RF model based on CRQ, CASE scores, SE, age, MRI abnormalities and delayed immunotherapy demonstrates superior predictive performance and shows promise in predicting the risk of long-term cognitive outcomes in patients with AE in clinical settings.