

In this chapter, we explore the integration of knowledge graphs into large language models (LLMs) to enhance computational literary studies, a key sub-field of computational humanities. Computational humanities have evolved significantly over the past decades, driven by the increasing digitization of cultural heritage data, advancements in computing power, and the development of advanced analytical methods. This digitization progress has particularly enabled the creation of knowledge graphs that capture the semantic relationships embedded in humanities data, including texts. These graphs represent structured knowledge that can enrich LLMs, enabling them to generate semantically rich representations even in domains with limited computational resources. We explore how integrating knowledge graphs can enhance natural language processing (NLP) applications, specifically for the analysis of literary texts. To benefit the humanities and support the integration of KGs with LLMs for computational humanities, we discuss the specific content new KGs should ideally encompass. This necessitates a broader conceptualization of knowledge graphs, and supplies novel challenges for the field of knowledge graph creation, including for example diachronic concept alignment. Alongside this new perspective, we also propose the automatic creation of knowledge graphs from literary texts, such as graph-based plot representation, to allow for graph-based text analyses but also, again, create literary-informed LLMs through the integration of such graphs. By demonstrating these techniques through the lens of computational literary studies, we illustrate the significant impact that knowledge graphs can have on enriching LLMs and advancing the humanities.