{"id":{"repo_id":"alberta","oai_identifier":"oai:ualberta.scholaris.ca:123456789/104309"},"canonical_url":"https://search.ndltd.org/etd/alberta/oai:ualberta.scholaris.ca:123456789/104309","repository":{"repo_id":"alberta","name":"University of Alberta","base_url":"https://era.library.ualberta.ca/oai"},"display":{"title":"Development of a Question Answering System Over Building Codes using Retrieval Augmented Generation","abstract":"Building codes establish standards for the design, construction, and safety of buildings, ensuring structural integrity, fire protection, and accessibility. However, they are extensive, complex, and frequently updated, making manual querying time-consuming. A promising solution is a Question Answering (QA) system built on Retrieval Augmented Generation (RAG) or its extension, Multi-modal RAG (MRAG). RAG integrates a retriever with a Large Language Model (LLM), while MRAG employs Vision Language Models (VLMs) capable of processing both text and images. This study first evaluated retrieval methods for the National Building Code of Canada (NBCC), comparing pre-trained and fine-tuned LLMs. Results showed Elasticsearch to be the most effective retriever, while fine-tuning LLMs on NBCC data significantly improved domain-specific response generation. Since RAG struggles with tabular data, MRAG was explored as a means to incorporate tabular information. Different input formats, LaTeX and images of tables, were tested, with image-based inputs performing better, though still limited. To address this, Low Rank Adaptation (LoRA) was applied for fine-tuning VLMs on tabular NBCC datasets. Fine-tuned VLMs, particularly Qwen2.5-VL-3B, showed marked improvements, recording a relative 105 percent performance gain. Finally, fine-tuned VLMs were integrated into MRAG and evaluated on a manually prepared NBCC QA dataset that included both text and tables. In addition to these, MRAG framework based on commercial VLMs were also tested on the same dataset, resulting in multiple MRAG frameworks built with either open-source fine-tuned or commercial VLMs. The effectiveness of each end-to-end MRAG framework was then assessed using a combined metric that considered accuracy, ROUGE score, BERT score, and time. Among open-source models, the fine-tuned Qwen2.5 series achieved the best performance, benefiting from their strong reasoning and visual question answering capabilities. Among commercial models, Gemini-2-Flash and Gemini-2.5-Pro delivered the highest overall scores, 0.69 and 0.67 respectively.","abstract_html":"Building codes establish standards for the design, construction, and safety of buildings, ensuring structural integrity, fire protection, and accessibility. However, they are extensive, complex, and frequently updated, making manual querying time-consuming. A promising solution is a Question Answering (QA) system built on Retrieval Augmented Generation (RAG) or its extension, Multi-modal RAG (MRAG). RAG integrates a retriever with a Large Language Model (LLM), while MRAG employs Vision Language Models (VLMs) capable of processing both text and images. This study first evaluated retrieval methods for the National Building Code of Canada (NBCC), comparing pre-trained and fine-tuned LLMs. Results showed Elasticsearch to be the most effective retriever, while fine-tuning LLMs on NBCC data significantly improved domain-specific response generation. Since RAG struggles with tabular data, MRAG was explored as a means to incorporate tabular information. Different input formats, LaTeX and images of tables, were tested, with image-based inputs performing better, though still limited. To address this, Low Rank Adaptation (LoRA) was applied for fine-tuning VLMs on tabular NBCC datasets. Fine-tuned VLMs, particularly Qwen2.5-VL-3B, showed marked improvements, recording a relative 105 percent performance gain. Finally, fine-tuned VLMs were integrated into MRAG and evaluated on a manually prepared NBCC QA dataset that included both text and tables. In addition to these, MRAG framework based on commercial VLMs were also tested on the same dataset, resulting in multiple MRAG frameworks built with either open-source fine-tuned or commercial VLMs. The effectiveness of each end-to-end MRAG framework was then assessed using a combined metric that considered accuracy, ROUGE score, BERT score, and time. Among open-source models, the fine-tuned Qwen2.5 series achieved the best performance, benefiting from their strong reasoning and visual question answering capabilities. Among commercial models, Gemini-2-Flash and Gemini-2.5-Pro delivered the highest overall scores, 0.69 and 0.67 respectively.","abstract_has_math":false,"creators":["Aqib, Mohammad"],"institution":"University of Alberta","degree_name":"Master of Science","degree_level":"Master's","degree_discipline":"Civil (Cross-disciplinary)","degree_department":null,"school":null,"contributors":[],"advisors":["Mei, Qipei (Department of Civil and Environmental Engineering)"],"committee_chairs":[],"committee_members":[],"year":2025,"date_issued":"2025-11","date_published":"2025-11","updated_at":"2026-11-26T21:19:20Z","subjects":["Question Answering System","Natural Language Processing (NLP)","National Building Code of Canada (NBCC)","Large Language Models (LLMs)","Vision Language Models (VLMs)","Retrieval Augmented Generation (RAG)","Parameter Efficient Fine Tuning (PEFT)","Low-Rank Adaptation (LoRa)"],"languages":["en"],"rights":["This thesis is made available by the University of Alberta Library with permission of the copyright owner solely for non-commercial purposes. This thesis, or any portion thereof, may not otherwise be copied or reproduced without the written consent of the copyright owner, except to the extent permitted by Canadian copyright law."],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.7939/83017","outbound_label":"DOI","outbound_source":"dc:identifier.doi","record_url":"https://doi.org/10.7939/83017","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier.doi","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aalberta%3Aoai%3Aualberta.scholaris.ca%3A123456789%2F104309","prefix":"oai_dc"},"source_record":{"url":"https://era.library.ualberta.ca/oai?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Aualberta.scholaris.ca%3A123456789%2F104309","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Mei, Qipei (Department of Civil and Environmental Engineering)"]},{"key":"dc:creator","label":"Author","values":["Aqib, Mohammad"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-11-17T16:21:03Z"]},{"key":"dc:date.issued","label":"Date","values":["2025-11"]},{"key":"dc:type","label":"Dc Type","values":["Thesis"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Civil (Cross-disciplinary)"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Master's"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of Alberta"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Question Answering System","Natural Language Processing (NLP)","National Building Code of Canada (NBCC)","Large Language Models (LLMs)","Vision Language Models (VLMs)","Retrieval Augmented Generation (RAG)","Parameter Efficient Fine Tuning (PEFT)","Low-Rank Adaptation (LoRa)"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["This thesis is made available by the University of Alberta Library with permission of the copyright owner solely for non-commercial purposes. This thesis, or any portion thereof, may not otherwise be copied or reproduced without the written consent of the copyright owner, except to the extent permitted by Canadian copyright law."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.doi","label":"DOI","values":["https://doi.org/10.7939/83017"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Building codes establish standards for the design, construction, and safety of buildings, ensuring structural integrity, fire protection, and accessibility. However, they are extensive, complex, and frequently updated, making manual querying time-consuming. A promising solution is a Question Answering (QA) system built on Retrieval Augmented Generation (RAG) or its extension, Multi-modal RAG (MRAG). RAG integrates a retriever with a Large Language Model (LLM), while MRAG employs Vision Language Models (VLMs) capable of processing both text and images. This study first evaluated retrieval methods for the National Building Code of Canada (NBCC), comparing pre-trained and fine-tuned LLMs. Results showed Elasticsearch to be the most effective retriever, while fine-tuning LLMs on NBCC data significantly improved domain-specific response generation. Since RAG struggles with tabular data, MRAG was explored as a means to incorporate tabular information. Different input formats, LaTeX and images of tables, were tested, with image-based inputs performing better, though still limited. To address this, Low Rank Adaptation (LoRA) was applied for fine-tuning VLMs on tabular NBCC datasets. Fine-tuned VLMs, particularly Qwen2.5-VL-3B, showed marked improvements, recording a relative 105 percent performance gain. Finally, fine-tuned VLMs were integrated into MRAG and evaluated on a manually prepared NBCC QA dataset that included both text and tables. In addition to these, MRAG framework based on commercial VLMs were also tested on the same dataset, resulting in multiple MRAG frameworks built with either open-source fine-tuned or commercial VLMs. The effectiveness of each end-to-end MRAG framework was then assessed using a combined metric that considered accuracy, ROUGE score, BERT score, and time. Among open-source models, the fine-tuned Qwen2.5 series achieved the best performance, benefiting from their strong reasoning and visual question answering capabilities. Among commercial models, Gemini-2-Flash and Gemini-2.5-Pro delivered the highest overall scores, 0.69 and 0.67 respectively."]},{"key":"dc:title","label":"Title","values":["Development of a Question Answering System Over Building Codes using Retrieval Augmented Generation"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Mei, Qipei (Department of Civil and Environmental Engineering)"],"dc:creator":["Aqib, Mohammad"],"dc:date.accessioned":["2025-11-17T16:21:03Z"],"dc:date.issued":["2025-11"],"dc:description.abstract":["Building codes establish standards for the design, construction, and safety of buildings, ensuring structural integrity, fire protection, and accessibility. However, they are extensive, complex, and frequently updated, making manual querying time-consuming. A promising solution is a Question Answering (QA) system built on Retrieval Augmented Generation (RAG) or its extension, Multi-modal RAG (MRAG). RAG integrates a retriever with a Large Language Model (LLM), while MRAG employs Vision Language Models (VLMs) capable of processing both text and images. This study first evaluated retrieval methods for the National Building Code of Canada (NBCC), comparing pre-trained and fine-tuned LLMs. Results showed Elasticsearch to be the most effective retriever, while fine-tuning LLMs on NBCC data significantly improved domain-specific response generation. Since RAG struggles with tabular data, MRAG was explored as a means to incorporate tabular information. Different input formats, LaTeX and images of tables, were tested, with image-based inputs performing better, though still limited. To address this, Low Rank Adaptation (LoRA) was applied for fine-tuning VLMs on tabular NBCC datasets. Fine-tuned VLMs, particularly Qwen2.5-VL-3B, showed marked improvements, recording a relative 105 percent performance gain. Finally, fine-tuned VLMs were integrated into MRAG and evaluated on a manually prepared NBCC QA dataset that included both text and tables. In addition to these, MRAG framework based on commercial VLMs were also tested on the same dataset, resulting in multiple MRAG frameworks built with either open-source fine-tuned or commercial VLMs. The effectiveness of each end-to-end MRAG framework was then assessed using a combined metric that considered accuracy, ROUGE score, BERT score, and time. Among open-source models, the fine-tuned Qwen2.5 series achieved the best performance, benefiting from their strong reasoning and visual question answering capabilities. Among commercial models, Gemini-2-Flash and Gemini-2.5-Pro delivered the highest overall scores, 0.69 and 0.67 respectively."],"dc:identifier.doi":["https://doi.org/10.7939/83017"],"dc:language.iso":["en"],"dc:rights":["This thesis is made available by the University of Alberta Library with permission of the copyright owner solely for non-commercial purposes. This thesis, or any portion thereof, may not otherwise be copied or reproduced without the written consent of the copyright owner, except to the extent permitted by Canadian copyright law."],"dc:subject":["Question Answering System","Natural Language Processing (NLP)","National Building Code of Canada (NBCC)","Large Language Models (LLMs)","Vision Language Models (VLMs)","Retrieval Augmented Generation (RAG)","Parameter Efficient Fine Tuning (PEFT)","Low-Rank Adaptation (LoRa)"],"dc:title":["Development of a Question Answering System Over Building Codes using Retrieval Augmented Generation"],"dc:type":["Thesis"],"others:access_status":["open.access"],"thesis:degree_discipline":["Civil (Cross-disciplinary)"],"thesis:degree_level":["Master's"],"thesis:degree_name":["Master of Science"],"thesis:institution_name":["University of Alberta"]},"updated_at":"2026-11-26T21:19:20Z"}