Alkafi-llama3: fine-tuning LLMs for precise legal understanding in Palestine
Abstract Large Language Models (LLMs) have demonstrated remarkable potential in diverse domains, yet their application in the legal sector, particularly in low-resource contexts, remains limited. This study addresses the challenges of adapting LLMs to the Palestinian legal domain, where political in...
Saved in:
| Main Authors: | , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
Springer
2025-06-01
|
| Series: | Discover Artificial Intelligence |
| Online Access: | https://doi.org/10.1007/s44163-025-00313-w |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1850111805741858816 |
|---|---|
| author | Rabee Al-Qaesm Mohannad Hendi Banan Tantour |
| author_facet | Rabee Al-Qaesm Mohannad Hendi Banan Tantour |
| author_sort | Rabee Al-Qaesm |
| collection | DOAJ |
| description | Abstract Large Language Models (LLMs) have demonstrated remarkable potential in diverse domains, yet their application in the legal sector, particularly in low-resource contexts, remains limited. This study addresses the challenges of adapting LLMs to the Palestinian legal domain, where political instability, fragmented legal frameworks, and limited AI resources hinder effective machine-learning applications. We present a fine-tuned model based on a quantized version of Llama-3.2-1B-Instruct, trained on a synthetic data set derived from Palestinian legal texts. Using smaller-scale models and strategically generated question-answer pairs, we achieve a cost-effective, locally sustainable solution that provides accurate and contextually relevant legal guidance. Our experiments demonstrate promising performance on various query types, ranging from yes / no questions and narrative explanations to complex legal differentiations, while highlighting areas for improvement, such as handling calculation-based inquiries and structured list formatting. This work provides a pathway for the deployment of AI-driven legal assistance tools tailored to the needs of resource-constrained environments. |
| format | Article |
| id | doaj-art-a885fcb4a6e94a6b87c2e10bdd2f8713 |
| institution | OA Journals |
| issn | 2731-0809 |
| language | English |
| publishDate | 2025-06-01 |
| publisher | Springer |
| record_format | Article |
| series | Discover Artificial Intelligence |
| spelling | doaj-art-a885fcb4a6e94a6b87c2e10bdd2f87132025-08-20T02:37:33ZengSpringerDiscover Artificial Intelligence2731-08092025-06-015111610.1007/s44163-025-00313-wAlkafi-llama3: fine-tuning LLMs for precise legal understanding in PalestineRabee Al-Qaesm0Mohannad Hendi1Banan Tantour2GgatewayIndependent researcherCooperative Work AgencyAbstract Large Language Models (LLMs) have demonstrated remarkable potential in diverse domains, yet their application in the legal sector, particularly in low-resource contexts, remains limited. This study addresses the challenges of adapting LLMs to the Palestinian legal domain, where political instability, fragmented legal frameworks, and limited AI resources hinder effective machine-learning applications. We present a fine-tuned model based on a quantized version of Llama-3.2-1B-Instruct, trained on a synthetic data set derived from Palestinian legal texts. Using smaller-scale models and strategically generated question-answer pairs, we achieve a cost-effective, locally sustainable solution that provides accurate and contextually relevant legal guidance. Our experiments demonstrate promising performance on various query types, ranging from yes / no questions and narrative explanations to complex legal differentiations, while highlighting areas for improvement, such as handling calculation-based inquiries and structured list formatting. This work provides a pathway for the deployment of AI-driven legal assistance tools tailored to the needs of resource-constrained environments.https://doi.org/10.1007/s44163-025-00313-w |
| spellingShingle | Rabee Al-Qaesm Mohannad Hendi Banan Tantour Alkafi-llama3: fine-tuning LLMs for precise legal understanding in Palestine Discover Artificial Intelligence |
| title | Alkafi-llama3: fine-tuning LLMs for precise legal understanding in Palestine |
| title_full | Alkafi-llama3: fine-tuning LLMs for precise legal understanding in Palestine |
| title_fullStr | Alkafi-llama3: fine-tuning LLMs for precise legal understanding in Palestine |
| title_full_unstemmed | Alkafi-llama3: fine-tuning LLMs for precise legal understanding in Palestine |
| title_short | Alkafi-llama3: fine-tuning LLMs for precise legal understanding in Palestine |
| title_sort | alkafi llama3 fine tuning llms for precise legal understanding in palestine |
| url | https://doi.org/10.1007/s44163-025-00313-w |
| work_keys_str_mv | AT rabeealqaesm alkafillama3finetuningllmsforpreciselegalunderstandinginpalestine AT mohannadhendi alkafillama3finetuningllmsforpreciselegalunderstandinginpalestine AT banantantour alkafillama3finetuningllmsforpreciselegalunderstandinginpalestine |