{"id":{"repo_id":"vilnius","oai_identifier":"oai:vu.lt:elaba:308337289"},"canonical_url":"https://search.ndltd.org/etd/vilnius/oai:vu.lt:elaba:308337289","repository":{"repo_id":"vilnius","name":"Vilnius University","base_url":"https://epublications.vu.lt/oai"},"display":{"title":"Konteksto triukšmo įtaka atsakymų kokybei teisinių dokumentų RAG sistemose /","abstract":"Retrieval-Augmented Generation (RAG) enables large language models to generate responses grounded in external document sources, however, the performance of such systems strongly depends on the quality of the provided context. One of the main challenges in RAG systems is context noise - irrelevant or semantically misleading document fragments that may negatively affect response quality. This issue is particularly important in the legal domain, where semantically similar fragments may carry substantially different legal meanings. The aim of this thesis is to investigate the impact of context noise quantity and type on answer quality in legal-document RAG systems. To achieve this, a controlled experimental RAG environment was developed in which automatic document retrieval was intentionally omitted in order to isolate the effect of context noise from retrieval errors. The experiments were conducted using the CUAD dataset and three types of noise were constructed: random, topical, and adversarial noise. Context quality was controlled by varying the Signal-to-Noise Ratio (SNR). Responses were generated using the gpt-4o-mini model and evaluated with the RAGAS evaluation framework. The experimental results demonstrated that decreasing the SNR reduces both response quality and context precision, while adversarial noise produced the strongest negative impact in most scenarios. The study also revealed that different types of legal questions exhibit varying sensitivity to context noise: short and specific questions were more sensitive to semantically similar fragments than broader provisions requiring wider contextual understanding. The results indicate that the effectiveness of RAG systems depends not only on the quantity of retrieved information, but also on its semantic characteristics. These findings may contribute to the development of more reliable RAG systems for legal document analysis and more effective context construction strategies.","abstract_html":"Retrieval-Augmented Generation (RAG) enables large language models to generate responses grounded in external document sources, however, the performance of such systems strongly depends on the quality of the provided context. One of the main challenges in RAG systems is context noise - irrelevant or semantically misleading document fragments that may negatively affect response quality. This issue is particularly important in the legal domain, where semantically similar fragments may carry substantially different legal meanings. The aim of this thesis is to investigate the impact of context noise quantity and type on answer quality in legal-document RAG systems. To achieve this, a controlled experimental RAG environment was developed in which automatic document retrieval was intentionally omitted in order to isolate the effect of context noise from retrieval errors. The experiments were conducted using the CUAD dataset and three types of noise were constructed: random, topical, and adversarial noise. Context quality was controlled by varying the Signal-to-Noise Ratio (SNR). Responses were generated using the gpt-4o-mini model and evaluated with the RAGAS evaluation framework. The experimental results demonstrated that decreasing the SNR reduces both response quality and context precision, while adversarial noise produced the strongest negative impact in most scenarios. The study also revealed that different types of legal questions exhibit varying sensitivity to context noise: short and specific questions were more sensitive to semantically similar fragments than broader provisions requiring wider contextual understanding. The results indicate that the effectiveness of RAG systems depends not only on the quantity of retrieved information, but also on its semantic characteristics. These findings may contribute to the development of more reliable RAG systems for legal document analysis and more effective context construction strategies.","abstract_has_math":false,"creators":["Katinaitė, Patricija,"],"institution":"Institutional Repository of Vilnius University","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026","date_published":"2026","updated_at":"2026-11-19T10:12:59Z","subjects":[],"languages":["lit"],"rights":["info:eu-repo/semantics/openAccess"],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://repository.vu.lt/VU:ELABAETD308337289&prefLang=en_US","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://repository.vu.lt/VU:ELABAETD308337289&prefLang=en_US","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","download_url":null,"download_label":null,"download_source":null,"access_status":"open","embargo_until":null,"access_note":null},"source_record":{"url":"https://epublications.vu.lt/oai?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Avu.lt%3Aelaba%3A308337289","prefix":"oai_dc"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:creator","label":"Author","values":["Katinaitė, Patricija,"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2026"]},{"key":"dc:publisher","label":"Institution","values":["Institutional Repository of Vilnius University"]},{"key":"dc:relation","label":"Dc Relation","values":["https://epublications.vu.lt/object/elaba:308337289/308337289.pdf"]},{"key":"dc:type","label":"Dc Type","values":["info:eu-repo/semantics/bachelorThesis"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["lit"]},{"key":"dc:rights","label":"Dc Rights","values":["info:eu-repo/semantics/openAccess"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://repository.vu.lt/VU:ELABAETD308337289&prefLang=en_US"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Retrieval-Augmented Generation (RAG) enables large language models to generate responses grounded in external document sources, however, the performance of such systems strongly depends on the quality of the provided context. One of the main challenges in RAG systems is context noise - irrelevant or semantically misleading document fragments that may negatively affect response quality. This issue is particularly important in the legal domain, where semantically similar fragments may carry substantially different legal meanings. The aim of this thesis is to investigate the impact of context noise quantity and type on answer quality in legal-document RAG systems. To achieve this, a controlled experimental RAG environment was developed in which automatic document retrieval was intentionally omitted in order to isolate the effect of context noise from retrieval errors. The experiments were conducted using the CUAD dataset and three types of noise were constructed: random, topical, and adversarial noise. Context quality was controlled by varying the Signal-to-Noise Ratio (SNR). Responses were generated using the gpt-4o-mini model and evaluated with the RAGAS evaluation framework. The experimental results demonstrated that decreasing the SNR reduces both response quality and context precision, while adversarial noise produced the strongest negative impact in most scenarios. The study also revealed that different types of legal questions exhibit varying sensitivity to context noise: short and specific questions were more sensitive to semantically similar fragments than broader provisions requiring wider contextual understanding. The results indicate that the effectiveness of RAG systems depends not only on the quantity of retrieved information, but also on its semantic characteristics. These findings may contribute to the development of more reliable RAG systems for legal document analysis and more effective context construction strategies."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Konteksto triukšmo įtaka atsakymų kokybei teisinių dokumentų RAG sistemose /","The impact of context noise on answer quality in legal rag systems."]}]}],"canonical_facts":{"dc:creator":["Katinaitė, Patricija,"],"dc:date":["2026"],"dc:description":["Retrieval-Augmented Generation (RAG) enables large language models to generate responses grounded in external document sources, however, the performance of such systems strongly depends on the quality of the provided context. One of the main challenges in RAG systems is context noise - irrelevant or semantically misleading document fragments that may negatively affect response quality. This issue is particularly important in the legal domain, where semantically similar fragments may carry substantially different legal meanings. The aim of this thesis is to investigate the impact of context noise quantity and type on answer quality in legal-document RAG systems. To achieve this, a controlled experimental RAG environment was developed in which automatic document retrieval was intentionally omitted in order to isolate the effect of context noise from retrieval errors. The experiments were conducted using the CUAD dataset and three types of noise were constructed: random, topical, and adversarial noise. Context quality was controlled by varying the Signal-to-Noise Ratio (SNR). Responses were generated using the gpt-4o-mini model and evaluated with the RAGAS evaluation framework. The experimental results demonstrated that decreasing the SNR reduces both response quality and context precision, while adversarial noise produced the strongest negative impact in most scenarios. The study also revealed that different types of legal questions exhibit varying sensitivity to context noise: short and specific questions were more sensitive to semantically similar fragments than broader provisions requiring wider contextual understanding. The results indicate that the effectiveness of RAG systems depends not only on the quantity of retrieved information, but also on its semantic characteristics. These findings may contribute to the development of more reliable RAG systems for legal document analysis and more effective context construction strategies."],"dc:format":["application/pdf"],"dc:identifier":["https://repository.vu.lt/VU:ELABAETD308337289&prefLang=en_US"],"dc:language":["lit"],"dc:publisher":["Institutional Repository of Vilnius University"],"dc:relation":["https://epublications.vu.lt/object/elaba:308337289/308337289.pdf"],"dc:rights":["info:eu-repo/semantics/openAccess"],"dc:title":["Konteksto triukšmo įtaka atsakymų kokybei teisinių dokumentų RAG sistemose /","The impact of context noise on answer quality in legal rag systems."],"dc:type":["info:eu-repo/semantics/bachelorThesis"]},"updated_at":"2026-11-19T10:12:59Z"}