Skripsi
PENGEMBANGAN RAG DOMAIN-ADAPTIVE HUKUM INDONESIA MELALUI FINE TUNING LLM BERBASIS REGULASI NASIONAL
This study develops NusantaraLaw, a Domain-Adaptive Retrieval-Augmented Generation (RAG) system for Indonesian law via QLoRA fine-tuning of the Qwen 3.5 9B model on a national legal corpus. A dataset of 6,502 instruction-response pairs was curated from eight official legal sources and validated by two legal experts via Stratified Random Sampling (250 samples, margin of error 6.96 percent). Four experiments (EXP-01 to EXP-04) ran at 4-bit NF4, rank r=64, alpha α=64; EXP-03 was the production model (ROUGE-L 23.7565, METEOR 23.6126, BERTScore 73.3071). System quality was assessed via a Three-Tier Evaluation covering nine metrics across Sequential, Semantic, and Latent Space layers. Without RAG, all fine-tuned variants surpassed the Vanilla Base on eight of nine metrics, with SacreBLEU rising 1,681.4 percent. RAG integration produced a grounding trade-off: NLI Entailment rose up to 12.48 points in fine-tuned models while n-gram scores fell, confirming a shift toward law-grounded synthesis; the Vanilla Base showed the inverse, proving that legal-context integration is exclusive to domain-adapted models. On 50 unseen UU PDP samples, EXP-02 (Balanced, temperature 0.15, repeat penalty 1.55) achieved the best NLaw-Score (70.81) and lowest L2 Latent Distance (0.7433), winning seven of nine metrics. Latency averaged 43.90–58.70 seconds per query on local hardware; migration to GPU accelerators or cloud-native platforms (AWS Bedrock, Google Vertex AI) is identified as the primary path to sub-10-second response. This study provides the first empirical evidence that domain-adaptive QLoRA fine-tuning with Milvus based RAG yields a deterministic, hallucination-free Indonesian legal assistant, and contributes a reproducible Three-Tier Evaluation framework for Legal AI research.
No other version available