DH 2026

Daejeon, July 27–31

Workshop

Build a Working RAG in Half a Day: UN Policy Reports with LangChain

Kunha KIM
Sogang University(South Korea), Korea, Republic of (South Korea) · littlekg87@gmail.com
Hyejin Byun
Sogang University(South Korea), Korea, Republic of (South Korea) · jini82431@naver.com
Juehee Kim
Sogang University(South Korea), Korea, Republic of (South Korea) · juehee0110@gmail.com
Jiwoo Park
Sogang University(South Korea), Korea, Republic of (South Korea) · wldnfkrhakfgo424@gmail.com
Junhan Kim
Sogang University(South Korea), Korea, Republic of (South Korea) · osinlim21@gmail.com
Yongho Jung
Sogang University(South Korea), Korea, Republic of (South Korea) · atom6928@naver.com
Sua Chung
Sogang University(South Korea), Korea, Republic of (South Korea) · sua9932@daum.net

1. Introduction

Recent advances in large language models (LLMs) have opened new possibilities for Digital Humanities research, particularly in the exploration, interpretation, and reuse of large-scale textual corpora. Within this context, Retrieval-Augmented Generation (RAG) has emerged as a promising approach that combines information retrieval with generative language models, enabling systems to produce answers grounded in source documents. For humanities scholars, however, the significance of RAG does not lie simply in generating fluent responses. Its methodological value depends on whether answers can be traced back to documentary evidence, assessed for faithfulness, and incorporated into transparent and reproducible scholarly workflows.

Despite its growing visibility, the practical adoption of RAG within the Digital Humanities community remains uneven. Many existing tutorials focus on short or well-curated text collections and emphasize the surface plausibility of generated answers, while giving considerably less attention to provenance, citation, and evaluation. These limitations become more pronounced when working with long-form documents such as policy reports, institutional records, historical archives, and digital editions. This workshop addresses these challenges by introducing a provenance-first RAG workflow designed for long-form documents.

2. RAG, Provenance, and Digital Humanities

This workshop positions RAG as a form of responsible AI practice within Digital Humanities. Rather than treating RAG as a simple question-answering pipeline, the workshop emphasizes evidence tracing, source criticism, and answerability. Participants will learn how design decisions at each stage of the pipeline — document ingestion, chunking, metadata design, embedding, retrieval, prompting, and response formatting — shape the reliability and interpretability of generated answers.

The shared corpus for the workshop consists of publicly accessible UN policy reports. These documents are used not merely as technical sample data, but as representative examples of long-form, evidence-rich, and structurally complex textual materials. Although the workshop uses policy reports as its common dataset, the workflow is intended to be transferable to a broad range of Digital Humanities materials, including historical documents, archival collections, annotated corpora, institutional records, and digital editions. In this sense, the workshop treats RAG as a methodological framework for responsible AI-assisted inquiry rather than simply as a software implementation.

3. Workshop Design and Hands-on Workflow

This workshop is designed as a half-day, intensive, hands-on tutorial combining guided demonstrations, scaffolded exercises, and checklist-based evaluation. The goal is for participants to build a minimal but working RAG system that retrieves relevant passages, generates answers grounded in retrieved evidence, and displays citations and source metadata alongside each response.

The hands-on workflow follows the major stages of a RAG pipeline. Participants first examine the structure of UN policy reports and define a minimal metadata schema at both the document and chunk level. They then perform PDF ingestion and layout-aware chunking, with attention to section structures, page references, chunk identifiers, and the preservation of contextual information. After constructing a chunked dataset, participants build an embedding and vector-based retrieval workflow using LangChain in a Python environment. They then generate citation-aware answers that connect synthesized responses to retrieved evidence.

The core exercises will be conducted through pre-tested Google Colab notebooks in order to reduce setup barriers and ensure that participants can complete the workflow in a browser-based environment. Local Jupyter execution is also supported as an optional path for advanced users. The primary instructional focus remains on the transparent construction and evaluation of the RAG workflow itself.

4. Evaluation and Iteration

A central component of the workshop is evaluation. After constructing an initial RAG pipeline, participants assess its outputs using a lightweight checklist focused on three criteria: faithfulness, attribution, and answerability. Faithfulness refers to whether the generated answer is supported by the retrieved evidence. Attribution concerns whether the answer clearly identifies the relevant source passages, document metadata, or citation information. Answerability asks whether the question can in fact be answered from the available corpus, rather than through unsupported inference.

Participants then complete at least one improvement iteration by modifying a selected component of the pipeline. Possible interventions include adjusting the chunking strategy, changing metadata fields, modifying retrieval parameters, refining query templates, or revising the answer prompt. This iterative structure reinforces the view that trustworthy RAG systems are not produced through one-pass implementation, but through diagnosis, evaluation, and refinement.

5. Expected Outcomes and Reusability

By the end of the workshop, participants will have produced a minimal working RAG notebook, a basic metadata schema, a chunked dataset, reusable query templates, a provenance-first answer format, and an evaluation checklist. These outputs are intended to function not only as workshop exercises, but as reusable templates for future research and teaching.

The workshop is designed for Digital Humanities researchers, humanities and social science scholars, librarians, archivists, graduate students, and practitioners working with text-based research workflows. No prior experience with RAG systems is required, though basic Python proficiency is assumed. The pedagogical design emphasizes accessibility, reproducibility, and critical engagement with AI-assisted methods.

The workshop contributes to Digital Humanities by demonstrating how RAG can support evidence-based inquiry, source criticism, and reproducible knowledge discovery. The central question is not whether LLMs can produce plausible answers, but whether AI-assisted systems can make their evidentiary basis visible, inspectable, and open to scholarly evaluation. By foregrounding provenance, citation, and evaluation, the workshop provides a practical framework for building responsible RAG systems for long-form humanities and policy-oriented documents.

References
  1. Crane, Gregory (2006): “What Do You Do with a Million Books?”, in: D-Lib Magazine 12, 3.
  2. Johnson, Jeff / Douze, Matthijs / Jégou, Hervé (2019): “Billion-Scale Similarity Search with GPUs”, in: IEEE Transactions on Big Data 7, 3: 535–547.
  3. Jockers, Matthew L. (2013): Macroanalysis: Digital Methods and Literary History. Urbana: University of Illinois Press.
  4. Karpukhin, Vladimir / Peskov, Denis / Zhiyuan, Ma / et al. (2020): “Dense Passage Retrieval for Open-Domain Question Answering”, in: Association for Computational Linguistics (ed.): Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP): 6769–6781.
  5. Lewis, Patrick / Perez, Ethan / Piktus, Aleksandra / et al. (2020): “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks”, in: Advances in Neural Information Processing Systems 33.
  6. Lyu, Xin / Wang, Zhen / Qin, Yanjun / Dong, Yuxiao / Tang, Jie / Zhang, Rui (2023): “When Does RAG Fail? A Study on Chunking Strategies for Long Documents”, arXiv preprint.
  7. Maynez, Joshua / Narayan, Shashi / Bohnet, Bernd / McDonald, Ryan (2020): “On Faithfulness and Factuality in Abstractive Summarization”, in: Association for Computational Linguistics (ed.): Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL): 1906–1919.
  8. Moretti, Franco (2013): Distant Reading. London: Verso.
  9. Reimers, Nils / Gurevych, Iryna (2019): “Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks”, in: Association for Computational Linguistics (ed.): Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing (EMNLP).
  10. Schreibman, Susan / Siemens, Ray / Unsworth, John (eds.) (2004): A Companion to Digital Humanities. Oxford: Blackwell.
  11. Smith, David A. (2012): “Computational Methods for Literary History”, in: Literary and Linguistic Computing 27, 2: 129–147.
  12. TEI Consortium: “TEI Guidelines for Electronic Text Encoding and Interchange (P5)”.
  13. Underwood, Ted (2019): Distant Horizons: Digital Evidence and Literary Change. Chicago: University of Chicago Press.
  14. Wu, Shangyu / Xiong, Ying / Cui, Yufei / Wu, Haolun / Chen, Can / Yuan, Ye / Huang, Lianming / Huang, Junzhou (2024): “Retrieval-Augmented Generation for Natural Language Processing: A Survey”, arXiv preprint.