## 1 Introduction  
The Universal Decimal Classification (UDC) system has long served as a cornerstone for organizing and retrieving information in libraries, archives, and digital repositories worldwide. By assigning hierarchical numeric codes to subjects, UDC enables precise indexing and effective subject-based searching across diverse domains. However, manual UDC assignment remains labour-intensive and prone to inconsistency, particularly as the volume and interdisciplinarity of digital content continue to grow. In response to this challenge, the emergence of large language models (LLMs) and conversational AI systems offers a promising avenue for automating classification tasks. Leveraging their deep linguistic understanding and ability to generate contextually appropriate outputs, these models may function as UDC code recommenders, reducing manual classification time while maintaining classification quality.  
Over the past few years, LLM-based systems such as OpenAI's ChatGPT, Google's Gemini, and Anthropic's Claude have demonstrated remarkable capabilities in tasks rang ing from text summarization to code generation. Their pre-training on vast textual corpora equips them with nuanced semantic representations, making them well-suited to map document content to standardized classification schemes. Simultaneously, a growing ecosystem of open-weight models, such as those from Meta, Google and DeepSeek, has made advanced language technology more accessible for research and domain-specific adaptation. These developments raise key questions: Can LLM-based systems accurately recommend UDC codes? How do proprietary and open-weight models compare in terms of precision, consistency, and usability for classification support?  
Prior work on automated classification has largely focused on machine learning approaches tailored to specific classification systems (e.g., Dewey Decimal Classification (DDC) and Library of Congress Classification (LCC)), often employing feature engineering or supervised classifiers. In recent years, neural-network-based classifiers have shown improved performance but typically require substantial labeled training data and often lack the flexibility to handle out-of-domain documents. In contrast, LLM-based recommenders can, in principle, perform zero- or few-shot classification by leveraging their pretrained knowledge and natural language understanding [1,2]. Yet systematic evaluations of such models for UDC recommendation are scarce, and comparative analyses of proprietary versus open-weight LLMs in this context remain underexplored.  
In this study, we evaluate a variety of 17 proprietary and open-weight language models--accessed through various interfaces including conversational platforms and API endpoints--as UDC code recommenders. We assess their performance on a corpus of 900 published and publicly available undergraduate, master's, and doctoral theses in English and Slovenian, each of which has been manually classified into UDC by professional librarians. Our evaluation metrics combine string-based measures (Levenshtein and Jaro-Winkler similarity) with an adjusted hierarchical similarity metric that captures the structural relationships inherent in the UDC scheme. We also examine practical considerations such as prompt design for use with particular LLMs.  
The remainder of this paper is structured as follows. Section 2 provides background on the Universal Decimal Classification System. Section 3 reviews related work in automated library classification systems. Section 4 details our experimental methodology, including dataset description, prompt engineering strategies, and evaluation metrics. Sections 5 and 6 present and discuss our results respectively, before conclusions are drawn in Section 7.