[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-509723-105":59,"doc-detail-509723-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","lore-coherent-encounter-generation-for-dungeons-and-dragons-llm-fine-tuning-and-benchmark","Lore Coherent Encounter Generation for Dungeons and Dragons - LLM Fine-tuning and Benchmark","","Instruction tuning is crucial when large language models underperform in specialized domains. For Dungeons & Dragons, generating encounters that remain coherent with the game’s fantasy lore is time-consuming because existing tools do not support selecting lore-consistent monsters. This work instruction-tunes a Mistral-based LLM using instructions derived from public D&D datasets and applies prompt-engineering experiments to output coherent monster lists from candidate inputs. Results show 66.0% lore, theme, and environment coherency across 241 tested monsters.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/lore-coherent-encounter-generation-for-dungeons-and-dragons-llm-fine-tuning-and-benchmark/509723/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/lore-coherent-encounter-generation-for-dungeons-and-dragons-llm-fine-tuning-and-benchmark/509723.png","ImageObject",300,407,{"name":92,"@type":93},"CatatanPagi","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-17","2026-10-05",true,{"@type":102,"interactionType":103,"userInteractionCount":44},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"Why is instruction tuning important for this D&D encounter generation task?","Question",{"text":112,"@type":113},"Large language models can be strong in zero-shot settings, but performance may not be desirable for niche or specialized domains. Instruction fine-tuning helps adapt the model to the task and domain requirements.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What problem does the paper target in Dungeons & Dragons encounter design?",{"text":117,"@type":113},"Selecting monsters that are consistent with the written lore is difficult and time-consuming, and existing tools help with mathematical difficulty (e.g., Challenge Rating) but do not support lore-consistent generation.",{"name":119,"@type":110,"acceptedAnswer":120},"How is the trained LLM used to generate encounter outputs?",{"text":121,"@type":113},"The model is prompt-engineered so that, given a candidate monster in the input, it outputs a list of coherent monsters. The generated results are then evaluated for coherency of lore, theme, and environment.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},509723,1791377550,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":44,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145,"preview_page_count":19,"preview_urls":146},962090894170,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Lore Coherent Encounter Generation for Dungeons and Dragons: LLM Fine-tuning and Benchmark  \nAravinth Sivaganeshan, Nisansa de Silva, Akila Peiris  \nDepartment of Computer Science & Engineering, University of Moratuwa, Sri Lanka {sivaganeshan.22, NisansaDdS, [akila.21}@cse.mrt.ac.lk](akila.21}@cse.mrt.ac.lk)  \nAbstract  \nSwathes of tasks that were erstwhile handled by other deep learning models are being taken over by Large Language Models (LLMs) . While they may demonstrate reasonable results in the zero-shot configuration for most domains, in the contexts of more niche or esoteric domains, instruction tuning them on the domain at hand has shown to be effective and sometimes necessary. Dungeons & Dragons (D&D) is the most commercially successful Tabletop Role Playing Game (TTRPG) with its own unique lore mostly set in the fantasy domain. The players are confronted with fantastical monsters in mathematically balanced encounters overcoming which, contribute to the calculation of player progress. Even with the plethora of information available for D&D (or perhaps rather due to its abundance), the generation of an encounter that is coherent with the lore is a time-consuming and difficult process as there are no support tools available for the selection of coherent monsters. Recognizing this gap, we instruction-tuned a Mistral-based LLM that can function as an assistant on this matter, using instructions generated from publicly available D&D datasets. Next, we conducted a number of prompt engineering experiments on the trained LLM, such that the output from the LLM would be a list of coherent monsters when a candidate monster is given in the input.  \nThe generated outputs were examined for the coherency of lore, theme, and environment. It was observed that the outputs were partially or fully coherent with the lore in about 66.0% of the 241 candidate monsters tested.  \n1 Introduction  \nLanguage models trained on very large datasets are shown to have high capabilities (Brown et al., 2020 ; Chowdhery et al., 2022) . However, these models are trained on datasets generated by humans with various goals (Rafailov et al., 2023) . Therefore, the performance of LLMs might not be desirable  \nfor specific downstream tasks or specific domains. While pre-training LLMs entirely on a specific domain data is costly and resource intensive (Cottier et al., 2024), techniques such as instruction finetuning are quite useful in this regard.  \nDungeons and Dragons (D&D) is a very popular open-ended, Table-Top, Role-Playing Game (TTRPG) . It is commercially available since 1974 (Gygax and Arneson, 1974) and it is currently in its 5th edition (Crawford et al., 2014b) . D&D has a set of predefined rules and there are several settings in D&D (Peiris and de Silva, 2022, 2023 ; Squire, 2007 ; Weerasundara and de Silva, 2024) . Each setting has lore that describes the historical and current status of the game world 1.  \nIn a D&D game, combat encounter is one of the most important component, through which players attain progress (Crawford et al., 2014a) . In a combat encounter, players are pitted against domain specific entities called monsters. These monsters may be considered as either bosses or minions and are partially defined by their numerical statistics as shown in Figure 1 comparing two boss monsters (Mind Flayer2 and Red Dragon3 ) and two minions (Intellect Devourer4 and Kobold5 ) .  \nThe generated encounters need to align with the lore to preserve immersion and verisimilitude (Stern, 2002) . As a generic example, a party going through a forest being attacked by a lion is an encounter that aligns with the lore. On the  \n1The word World is used as an encompassing term that may mean anything from a small region of land (Perkins et al., 2015) to a planet (Crawford et al., 2019) to a universe (Lee et al., 2019) or a multiverse (Arman et al., 2023) depending on the specific lore.  \n2 [https://www.dndbeyond.com/monsters/](https://www.dndbeyond.com/monsters/)[","cbCaifKQESao995k","https://ap.wps.com/l/cbCaifKQESao995k","pdf",348582,13,"English","# 1 Introduction\n## Language models and instruction fine-tuning\n## Dungeons & Dragons combat encounters\n## Lore coherence and the DM’s challenge","[{\"question\":\"Why is instruction tuning important for this D\\u0026D encounter generation task?\",\"answer\":\"Large language models can be strong in zero-shot settings, but performance may not be desirable for niche or specialized domains. Instruction fine-tuning helps adapt the model to the task and domain requirements.\"},{\"question\":\"What problem does the paper target in Dungeons \\u0026 Dragons encounter design?\",\"answer\":\"Selecting monsters that are consistent with the written lore is difficult and time-consuming, and existing tools help with mathematical difficulty (e.g., Challenge Rating) but do not support lore-consistent generation.\"},{\"question\":\"How is the trained LLM used to generate encounter outputs?\",\"answer\":\"The model is prompt-engineered so that, given a candidate monster in the input, it outputs a list of coherent monsters. The generated results are then evaluated for coherency of lore, theme, and environment.\"}]","Lore Coherent Encounter Generation for Dungeons and Dragons - LLM Fine-tuning and Benchmark | PDF",1791237073,33,[147,151,155,159],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/2fc5c6eafd263f4d518d43c1425b7e5d.webp",983,1390,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/bf8109eac7b0d88ec89deb2ceb7f1c22.webp",982,1388,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/1ca516dfb83d3aa09035d0e0b2829cc1.webp",981,1387,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e6111623d766b60a4f17c21bb6193f67.webp",980,1385]