mlsanityData to 14 Oct 2026

Fine-Tuning Large Language Models and Evaluating Retrieval Methods for Improved Question Answering on Building Codes

arXiv 2505.04666 ↗First posted 7 May 2025cs.CL cs.IR cs.LGcited by 2

On the map: Retrieval-augmented generation → RAG pipeline design and evaluation

Abstract (arXiv)

Building codes are regulations that establish standards for the design, construction, and safety of buildings to ensure structural integrity, fire protection, and accessibility. They are often extensive, complex, and subject to frequent updates, making manual querying challenging and time-consuming. Key difficulties include navigating large volumes of text, interpreting technical language, and identifying relevant clauses across different sections. A potential solution is to build a Question-Answering (QA) system that answers user queries based on building codes. Among the various methods for building a QA system, Retrieval-Augmented Generation (RAG) stands out in performance. RAG consists of two components: a retriever and a language model. This study focuses on identifying a suitable retriever method for building codes and optimizing the generational capability of the language model using fine-tuning techniques. We conducted a detailed evaluation of various retrieval methods by performing the retrieval on the National Building Code of Canada (NBCC) and explored the impact of domain-specific fine-tuning on several language models using the dataset derived from NBCC. Our analysis included a comparative assessment of different retrievers and the performance of both pre-trained and fine-tuned models to determine the efficacy and domain-specific adaptation of language models using fine-tuning on the NBCC dataset. Experimental results showed that Elasticsearch proved to be the most robust retriever among all. The findings also indicate that fine-tuning language models on an NBCC-specific dataset can enhance their ability to generate contextually relevant responses. When combined with context retrieved by a powerful retriever like Elasticsearch, this improvement in LLM performance can optimize the RAG system, enabling it to better navigate the complexities of the NBCC.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in RAG pipeline design and evaluation, one of 15 directions in Retrieval-augmented generation. Builds on 31 of its 65 references that are in the map. First posted on arXiv 7 May 2025.

Builds on

31 of 65 references.

Closest ancestors · 2

Same direction, newest first

  1. 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb
  2. 2024A Fine-tuning Enhanced RAG System with Quantized Influence Measure as AI Judge26 Feb

Other references · 29

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2023GPT-4 Technical Reportcited by 18,396
  4. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  5. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  6. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  7. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,512
  8. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  9. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
  10. 2023A Survey on Evaluation of Large Language Modelscited by 1,242
  11. 2022AdaptFormer: Adapting Vision Transformers for Scalable Visual Recognitioncited by 719
  12. 2021Retrieval Augmentation Reduces Hallucination in Conversationcited by 692
17 more
  1. 2024Parameter-Efficient Fine-Tuning for Large Models: A Comprehensive Surveycited by 656
  2. 2024Hallucination is Inevitable: An Innate Limitation of Large Language Modelscited by 332
  3. 2023Parameter-Efficient Fine-Tuning Methods for Pretrained Language Models: A Critical Review and Assessmentcited by 230
  4. 2023Scaling Down to Scale Up: A Guide to Parameter-Efficient Fine-Tuningcited by 173
  5. 2023A Survey of Large Language Models for Healthcare: from Data, Technology, and Applications to Accountability and Ethicscited by 163
  6. 2023A Systematic Study and Comprehensive Evaluation of ChatGPT on Benchmark Datasetscited by 123
  7. 2024Datasets for Large Language Models: A Comprehensive Surveycited by 71
  8. 2024In Defense of RAG in the Era of Long-Context Language Modelscited by 53
  9. 2020SparTerm: Learning Term-based Sparse Representation for Fast Text Retrievalcited by 45
  10. 2023Empower Large Language Model to Perform Better on Industrial Domain-Specific Question Answeringcited by 41
  11. 2023Merging Generated and Retrieved Knowledge for Open-Domain QAcited by 36
  12. 2024A Comprehensive Study on Quantization Techniques for Large Language Modelscited by 36
  13. 2023Interpretable Long-Form Legal Question Answering with Retrieval-Augmented Large Language Modelscited by 35
  14. 2023Fully Autonomous Programming with Large Language Modelscited by 31
  15. 2025Using Vision Language Models for Safety Hazard Identification in Constructioncited by 13
  16. 2024ErgoChat: a Visual Query System for the Ergonomic Risk Assessment of Construction Workerscited by 6
  17. 2023Construction contract risk identification based on knowledge-augmented language modelcited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Assessment of RAG and Fine-Tuning for Industrial Question-Answering-Applications
  2. 2025A Comparison of Independent and Joint Fine-tuning Strategies for Retrieval-Augmented Generation
  3. 2025Evaluation of retrieval-based QA on QUEST-LOFT
  4. 2025Table Comprehension in Building Codes using Vision Language Models and Domain-Specific Fine-Tuning
  5. 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systems
  6. 2025Retrieval-Augmented Generation in Industry: An Interview Study on Use Cases, Requirements, Challenges, and Evaluation
  7. 2025A Systematic Review of Key Retrieval-Augmented Generation (RAG) Systems: Progress, Gaps, and Future Directions
  8. 2024Customized Retrieval Augmented Generation and Benchmarking for EDA Tool Documentation QA