Zastosowanie sztucznej inteligencji i analizy Big Data do wspomagania procesu legislacyjnego: generowanie uzasadnień ustaw z wykorzystaniem NLP
Zastosowanie sztucznej inteligencji i analizy Big Data do wspomagania procesu legislacyjnego: generowanie uzasadnień ustaw z wykorzystaniem NLP
Abstrakt (PL)
Praca dotyczy możliwości wykorzystania dużych modeli językowych do analizy dokumentacji procesu legislacyjnego oraz generowania uzasadnień odpowiadających ostatecznej treści ustawy. Punktem wyjścia jest problem zmian wprowadzanych do projektu w toku prac parlamentarnych, które mogą powodować, że pierwotne uzasadnienie nie odpowiada w pełni regulacji w brzmieniu uchwalonym. W części teoretycznej przedstawiono znaczenie uzasadnienia projektu ustawy w polskim procesie legislacyjnym oraz podstawy działania dużych modeli językowych. Omówiono również promptowanie, pracę na długim kontekście i wykorzystanie zewnętrznych zbiorów dokumentów. Część empiryczna obejmuje trzy studia przypadku. Dla każdego z nich przygotowano zamknięty korpus oficjalnej dokumentacji legislacyjnej. Model kolejno rekonstruował zmiany wprowadzone w toku procesu legislacyjnego, oceniał adekwatność pierwotnego uzasadnienia, proponował jego aktualizację oraz generował uzasadnienie odpowiadające ustawie ogłoszonej. Wyniki porównano z autorskim punktem odniesienia. Model prawidłowo zidentyfikował łącznie 16 z 17 istotnych zmian uwzględnionych w punktach odniesienia. Zagregowany recall wyniósł 0,94, a precision 1,00. Najważniejszym ograniczeniem okazało się niepełne odnajdywanie informacji o motywach zmian w rozbudowanym korpusie dokumentów. Błędy te mogły następnie wpływać na kolejne etapy analizy i generowania tekstu. Wyniki wskazują, że duże modele językowe mogą skutecznie wspomagać analizę dokumentacji legislacyjnej i aktualizację uzasadnień, jednak ich zastosowanie wymaga kontroli kompletności i poprawności wykorzystanych źródeł.
Abstrakt (EN)
This thesis examines the potential use of large language models to analyse legislative process documentation and generate explanatory memoranda corresponding to the final wording of statutes. It addresses the problem of amendments introduced during parliamentary proceedings, which may cause the original explanatory memorandum to no longer fully reflect the legislation as enacted. The theoretical part discusses the role of explanatory memoranda to bills in the Polish legislative process and the foundations of large language models. It also covers prompt engineering, long-context processing and the use of external document collections.
The empirical part comprises three case studies. For each case, a closed corpus of official legislative documents was compiled. The model sequentially reconstructed the amendments introduced during the legislative process, assessed the adequacy of the original explanatory memorandum, proposed updates and generated a memorandum corresponding to the promulgated statute. The results were compared with author-developed reference standards.
The model correctly identified 16 of the 17 material changes included in the reference standards. The aggregate recall was 0.94 and precision was 1.00. The principal limitation was the incomplete retrieval of information concerning the reasons for amendments within an extensive document corpus. These errors could subsequently affect later stages of the analysis and text generation. The results indicate that large language models can effectively support the analysis of legislative documentation and the updating of explanatory memoranda. However, their use requires verification of the completeness and accuracy of the sources relied upon.
Application of artificial intelligence and Big Data analysis to support the legislative process: generating justifications for Polish Parliament’s acts using NLP