<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Adapting a Large Language Model to the Legal Domain: A Case Study in Italian</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Flavio</forename><surname>Valerio</surname></persName>
							<email>f.valerio6@studenti.uniba.it</email>
							<affiliation key="aff0">
								<orgName type="department">Department of Computer Science</orgName>
								<orgName type="institution">University of Bari Aldo Moro</orgName>
								<address>
									<settlement>Bari (</settlement>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Pierpaolo</forename><surname>Basile</surname></persName>
							<email>pierpaolo.basile@uniba.it</email>
							<affiliation key="aff0">
								<orgName type="department">Department of Computer Science</orgName>
								<orgName type="institution">University of Bari Aldo Moro</orgName>
								<address>
									<settlement>Bari (</settlement>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
							<affiliation key="aff1">
								<orgName type="department" key="dep1">AI2B srl</orgName>
								<orgName type="department" key="dep2">Spin-Off</orgName>
								<orgName type="institution">University of Bari Aldo Moro</orgName>
								<address>
									<addrLine>Via E. Orabona</addrLine>
									<settlement>Bari</settlement>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Marco</forename><surname>De Gemmis</surname></persName>
							<email>marco.degemmis@uniba.it</email>
							<affiliation key="aff0">
								<orgName type="department">Department of Computer Science</orgName>
								<orgName type="institution">University of Bari Aldo Moro</orgName>
								<address>
									<settlement>Bari (</settlement>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
							<affiliation key="aff1">
								<orgName type="department" key="dep1">AI2B srl</orgName>
								<orgName type="department" key="dep2">Spin-Off</orgName>
								<orgName type="institution">University of Bari Aldo Moro</orgName>
								<address>
									<addrLine>Via E. Orabona</addrLine>
									<settlement>Bari</settlement>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Adapting a Large Language Model to the Legal Domain: A Case Study in Italian</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">0EC8C58CDDEC459B17E9D6F0E2E7D9AA</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2025-04-23T16:38+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Large Language Models</term>
					<term>Legal</term>
					<term>Artificial Intelligence</term>
					<term>Public Administration (M. d. Gemmis) 0000-0002-0545-1105 (P. Basile); 0000-0002-2007-9559 (M. d. Gemmis)</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>This work presents a methodology for adapting an open Large Language Model (LLM) to the Italian legal domain. We construct a legal document corpus from the Normattiva website and develop a custom scraper to ensure high-quality text extraction. The resulting corpus is used to adapt the Llama-3.1-8b model through continuous pre-training and Low-Rank Adaptation (LoRA). The adapted model's performance is evaluated by assessing its ability to complete sentences coherently within the new domain. Results demonstrate that the adapted model surpasses the original model across all metrics, considering various prompt lengths and different sizes of the training corpus.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Large Language Models have proven effective in understanding and generating text in several domains. However, language in some domains is characterized by specific structure or word usage. For example, the legal domain relies on precise language, nuanced interpretation of laws, and a vast body of evolving jurisprudence. Typical LLMs are trained on an extensive collection of documents from several domains, which can affect the capability of understanding and generating text in a specific context, such as the legal domain. Moreover, some languages are less represented than others, and the legal domain of a particular language probably needs to be added. This is a critical issue since the legal language is strongly dependent on the legislation of the specific country. Finally, using a closed LLM can be critical in a public administration domain, and then an adaptation of an open LLM can be the only alternative.</p><p>Recent works have investigated the usage of LLMs in legal domains. In <ref type="bibr" target="#b1">[2]</ref>, authors propose a few-shot entity relation extraction method in the legal domain based on large language models without training the model on domain-dependent data. In <ref type="bibr" target="#b2">[3]</ref>, several LLMs are tested on a specific dataset related to numerical estimation in the legal domain. Similarly, <ref type="bibr" target="#b3">[4]</ref> evaluate chatGPT performance in semantic annotation of legal texts, finding that also, in zero-shot, the model can provide promising results. Following the same idea, authors in <ref type="bibr" target="#b4">[5]</ref> evaluate the performance of chatGPT in the context of legal argument mining and underline the importance of formulating the correct prompt and how it impacts the overall performance. However, all previous works investigate close LLMs and do not consider fine-tuning or adapting existing open LLMs to the legal domain. Less recent works considered the training of the BERT-like language models specific to the legal domain or fine-tuning BERT-like models to specific legal takes <ref type="bibr" target="#b5">[6]</ref>. Also for the Italian, a BERT model trained on Italian documents has been proposed <ref type="bibr" target="#b6">[7]</ref>. However, these works are outside the scope of this paper since we want to focus on large language models.</p><p>To overcome these limitations, this work proposes adapting an open LLM (Meta Llama-3.1) to the Italian legal domain. To pursue this goal, we have created a corpus of documents by collecting legal texts written in Italian. Then, using an adaptation strategy, we continue training the LLM on the corpus of collected documents. To evaluate the effectiveness of the proposed approach, we measure the quality and coherence of the generated text before and after the training.</p><p>The paper is structured as follows: Section 2 describes the construction process of the legal corpus, while Section 3 provides methodological details about the adaptation of the LLM to the legal domain. Section 4 describes the evaluation and discusses the results and Section 5 closes the paper with final remarks and proposes future research directions.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Corpus creation</head><p>A suitable corpus of documents is necessary to improve the capabilities of an existing LLM in understanding and producing the language used in the Italian legal domain. However, we create a new one due to the absence of a publicly available dataset. To this end, we develop a web crawler for the Normattiva<ref type="foot" target="#foot_0">1</ref> website. This Italian website is an essential resource for the consultation of current legislation, offering access to national laws, decrees, and regulations. In addition, advanced search capabilities and multivigency consultation of acts are provided.</p><p>A crawler is a software designed to browse web pages and gather information systematically. Its applications range from search engine indexing to data analysis to content updating. Designing an effective crawler requires a customized approach tailored to the site of interest. In our case, crawler development began with an in-depth study of the structure of the Normattiva site to understand how to structure the data collection process.</p><p>The Normattiva site has two pages relevant to our purpose: pages that serve as "containers of useful links" and pages containing legislative texts of interest. The crawling requires three steps:</p><p>1. Collection of links: The first step is to identify a "main page" containing relevant links, such as articles of the Italian Constitution or legal acts. Once this page is identified, links are collected.</p><p>To optimize the process, it is necessary to examine the page through inspection tools to identify sections (e.g., divs) containing links of interest. This approach avoided irrelevant sections of the page, thus reducing the time required for scraping and post-processing the data. Without such preliminary analysis, a crawler would have had to take a more "raw" approach, analyzing the entire page and producing a less refined output, which would have required further post-processing. 2. Text Capture: Pages containing legislative texts on Normattiva feature a sidebar on the left side that allows users to navigate between articles or legal acts via calls to a JavaScript function. This function dynamically modifies the displayed content. This feature affects the choice of libraries and approaches taken in designing the crawler. Once again, the inspection tool is used to locate the specific div containing the relevant text. We do not download the entire page, as this would have captured a great deal of irrelevant information, requiring post-processing, a step that was preferred to avoid.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Saving information:</head><p>The information extracted by the crawler is saved in a JSON lines format.</p><p>Each line in the file contains a JSON object with the following fields: text, url, timestamp and source.</p><p>The main libraries used to implement the crawler are Selenium 2 and Beautiful Soup 3 . Selenium is an advanced browser automation tool widely used in academia and industry to perform automated testing and manage complex web operations. Because of its versatility, Selenium supports a wide range of platforms, browsers, and programming languages, enabling the precise simulation of a real user's actions, such as selecting links, entering text, and interacting with dynamic elements through mouse clicks. An essential feature of Selenium is its ability to interact with JavaScript, a crucial aspect of managing dynamic Web sites. In developing the Normattiva crawler, Selenium is crucial for automating navigation and interaction with dynamic content, thus ensuring accurate and efficient capture of legislative data. For example, it allows clicking on links to move from one article to another, waiting for page elements to load properly before performing further actions. Beautiful soap is a library for parsing and extracting data from HTML and XML documents. It is praised for its ease of use and the intuitive interface for navigating and manipulating the structure of HTML documents. Beautiful Soup makes it possible to identify and extract structured data from web pages accurately. In our work, Beautiful Soup is used together with Selenium: Selenium handles the loading and interaction with dynamic page elements, while Beautiful Soup parses HTML source code to extract relevant textual content.</p><p>The Normattiva crawler <ref type="foot" target="#foot_3">4</ref> enables the systematic and targeted collection of legislative documents from the website, providing a suitable corpus for fine-tuning and adapting an existing LLM to the legal domain. The tailoring approach adopted, based on a preliminary analysis of web page structure, ensured greater efficiency than more generic methods, reducing the workload required for cleaning and processing the collected data. The final corpus <ref type="foot" target="#foot_4">5</ref> contains 396,592 text passages extracted from the Normattiva website for a total of about 108 million occurrences <ref type="foot" target="#foot_5">6</ref> .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Large Language Model Adaptation</head><p>LLMs have demonstrated remarkable capabilities across various natural language processing tasks and languages. However, their performance is often limited when applied to specialized domains with distinct terminology, unique stylistic features, or specific contextual knowledge not appropriately covered in the training data. To bridge this gap, it is essential to adapt an LLM to new domains by exposing them to domain-specific data. A prominent approach to this adaptation is continuous pretraining using domain-specific corpora, enhanced by parameter-efficient techniques such as Low-Rank Adaptation (LoRA) <ref type="bibr" target="#b7">[8]</ref>. We have already successfully investigated this approach in adapting BLOOM <ref type="bibr" target="#b8">[9]</ref> and LLaMA-2 <ref type="bibr" target="#b9">[10]</ref> and LLaMA-3 <ref type="bibr" target="#b10">[11]</ref> models to the Italian language <ref type="bibr" target="#b11">[12,</ref><ref type="bibr" target="#b12">13,</ref><ref type="bibr" target="#b13">14]</ref>.</p><p>LoRA is designed to fine-tune pre-trained LLMs with minimal additional computational and memory overhead. The main idea behind LoRA is to introduce low-rank matrices into the architecture of the LLM during fine-tuning. These matrices capture task-specific or domain-specific adaptations while keeping most original model parameters frozen. This method is particularly advantageous when computational resources are limited or when there is a need to preserve the general knowledge embedded in the original LLM while introducing domain-specific knowledge. These characteristics are critical in our approach since we can introduce new knowledge related to the new domain (legal) with a low computational cost.</p><p>Our methodology is based on continuous pre-training. This process involves sequentially fine-tuning the LLM on a corpus of documents relevant to the target domain. The corpus is carefully curated to reflect the domain's linguistic patterns, terminologies, and contextual nuances. This process can be iterative, allowing the model to gradually adapt to the new domain while retaining its ability to perform well on general tasks. Moreover, we can update the model with new knowledge when, for example, new laws are added or removed. Moreover, LoRA is a Parameter-Efficient Fine-Tuning (PEFT) <ref type="bibr" target="#b14">[15]</ref> technique and then works on a subset of the original parameters during the training. This allows the release of only the weights modified during the training, reducing the space needed to store the model. This approach makes it possible to adapt the original model on several domains by performing different LoRA training steps and producing an adapter for each. The adapter stores only the weights modified in each training step. Each adapter is interchangeable and can be loaded upon the original model.</p><p>In this work, we start from the LLaMA-3 8 billion model. We selected this model to adapt a state-ofthe-art model using reasonable computing resources. In detail, all the training process is performed on a single GPU <ref type="foot" target="#foot_6">7</ref> . To reduce the computation cost we use the unsloth<ref type="foot" target="#foot_7">8</ref> library. We fine-tune the model using LoRA with 𝑟𝑎𝑛𝑘 = 16 and 𝑎𝑙𝑝ℎ𝑎 = 32, considering all the linear layers with a max sequence of 2,048 tokens. The corpus built according to Section 2 is used to feed the training with text samples with a batch size of 16 and an accumulation step of 2. The model is trained for one epoch due to the large number of examples. The output of the training process is an adapter that can be loaded upon the LLaMA-3.1 model. Finally, we evaluate the quality of the training process according to the experimental setting described in Section 4.  Results show that fine-tuned models always overcome the base model for all metrics. We observe a slight decrease in BLUE when the training corpus size increases. However, the differences between Llama3.1-NA-100k and Llama3.1-NA are minimal. Also, the perplexity has the same behaviour. This is an interesting outcome since we can adapt the model using a moderate number of documents. Moreover, we observe that the increase in performance is more evident when the prompt length is equal to 20. This behaviour is obvious since the text generated with a prompt length of 40 has more tokens in common with the original text. Nevertheless, the results prove that the tuned models can also increase the generation performance with a short prompt.</p><p>It is essential to highlight that we only measure the coherence of the generated text against the reference text in the test set. We do not check if the generated text is correct and contains accurate information. This is out of the scope of our work. To use the model in a real scenario, it is necessary to instruct the model on specific tasks through instruction tuning. The scope of our work is to provide a language model that can generate text more coherently with a new domain. All the results prove the effectiveness of our methodology.</p><p>Table <ref type="table" target="#tab_1">2</ref> reports the results of each model on a set of standard benchmarks used to evaluate the ability of LLMs to solve several tasks. We consider the same set of benchmarks adopted by the Open Italian LLM leaderboard 11 . The involved benchmarks are:</p><p>• HellaSWAG is a dataset for studying grounded commonsense inference. It consists of 70k multiple-choice questions about grounded situations. Each question has four answer choices. • The AI2's Reasoning Challenge (ARC) dataset is a multiple-choice question-answering dataset containing questions from science exams from grade 3 to grade 9. • MMLU (Massive Multitask Language Understanding) is a benchmark designed to measure knowledge acquired during pretraining by evaluating models exclusively in zero-shot and fewshot settings. The benchmark covers 57 subjects across STEM, the humanities, the social sciences, and more.</p><p>The Italian benchmark relies on a machine-translated version of the dataset above. The column Δ reports the difference in performance with respect to the original model Llama3.1. We observed a performance decrease as expected since we finetuned the model on new data and a different domain. However, if we consider both results in Table <ref type="table" target="#tab_0">1</ref> and 2, we can conclude that the best choice is to fine-tune the model on 100k documents since the generation performance on the test set is good and the difference with the original model is about -8.5%. We plan to test the model on specific tasks related to the legal domain to understand better if the fine-tuning can improve both the generation and abilities of the model to solve domain-specific problems. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusions and Future Work</head><p>This work proposes a methodology for adapting an open LLM to the Italian legal domain. To achieve this goal, we build a corpus of legal documents extracted from the Normattiva website. We also create an ad hoc scraper to ensure high-quality extracted text. Then, the corpus is exploited to adapt the Llama-3.1-8b model using continuous pre-training and LoRA. We also investigate different training corpus sizes. We measure the adapted models' ability to complete sentences coherently according to the new domain to evaluate the effectiveness. Results prove that adapted models overcome the original model in all metrics, considering different prompt lengths. In future work, we plan to extend the analysis to other open LLMs and test fine-tuned adapted models on specific legal tasks.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head></head><label></label><figDesc>.1-NA-100k Llama3.1-NA Llama3.1 Llama3.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1</head><label>1</label><figDesc>Evaluation results considering different prompts length and training corpus size.</figDesc><table><row><cell>1-NA-100k Llama3.1-NA</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>Table 2</head><label>2</label><figDesc>Performance of each model according to the Open Italian LLM leaderboard.</figDesc><table><row><cell>Model</cell><cell cols="3">hellaswag_it arc_it mmlu_it avg</cell><cell>Δ (%)</cell></row><row><cell>Llama3.1</cell><cell>0.6256</cell><cell>0.4559 0.5593</cell><cell cols="2">0.5469 -</cell></row><row><cell cols="2">Llama3.1-NA-100k 0.5919</cell><cell>0.4166 0.4924</cell><cell cols="2">0.5003 8.53</cell></row><row><cell>Llama3.1-NA</cell><cell>0.5505</cell><cell>0.3807 0.4549</cell><cell cols="2">0.4620 15.52</cell></row></table></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">https://www.normattiva.it/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1">https://www.selenium.dev/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2">https://pypi.org/project/beautifulsoup4/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_3">The crawler is available on GitHub: https://github.com/FValerio96/NormattivaCrawling/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_4">The corpus is available on Hugging Face: https://huggingface.co/datasets/swap-uniba/normattiva-dump.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="6" xml:id="foot_5">Words are counted considering sequences of alphanumeric characters. The exact number of tokens depends on the specific LLM tokenizer.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="7" xml:id="foot_6">NVIDIA RTX A6000 with 48GB of VRAM</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="8" xml:id="foot_7">https://unsloth.ai/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="9" xml:id="foot_8">The model adapter is available on Hugging Face: https://huggingface.co/swap-uniba/llama3-it-pa-100k-adapter.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="10" xml:id="foot_9">The model adapter is available on Hugging Face: https://huggingface.co/swap-uniba/llama3-it-pa-300k-adapter.</note>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgments</head><p>We acknowledge the support of the PNRR project FAIR -Future AI Research (PE00000013), Spoke 6 -Symbiotic AI (CUP H97G22000210007) under the NRRP MUR program funded by the NextGenerationEU.</p></div>
			</div>

			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Evaluation</head><p>In this section, a comparative evaluation is conducted between the Llama-3.1 model and its fine-tuned version Llama-3.1-NA. The experiment examines the models' generative capabilities using a partial prompt approach. Sentences from the test dataset are partially used as input (prompts) for the models, which subsequently generated the full text from this initial portion. The results are stored in JSON files containing three distinct fields:</p><p>1. text: the original full sentence; 2. prompt: the initial portion of the text provided to the model; 3. generated: the complete output generated by the model from the prompt.</p><p>We build two fine-tuned models by training the model on two different portions of the corpus. The model Llama-3.1-NA-100k 9 is trained on 100,000 text passages randomly selected from the corpus, while the model Llama-3.1-NA 10 exploits the whole corpus.</p><p>We randomly select 1,000 other sentences for the evaluation. For the evaluation, each testing sentence is tokenized using the model tokenizer, and we retain only the first 𝑘 tokens for each sentence as the prompt. In our case, the sentence is removed if it exceeds the maximum input length, 2,048 tokens.</p><p>Finally, all models were used to complete the generated texts. We refer to the base model using the label Llama3.1.</p><p>For the evaluation, the generated text is compared against the original text by using three metrics:</p><p>1. BLEU (Bilingual Evaluation Understudy) is a metric that quantifies the similarity between the text generated by a model and a reference text, using the geometric mean of the n-grams shared between the two texts. 2. ROUGE (Recall-Oriented Understudy for Gisting Evaluation) is a set of metrics that assess the quality of generated texts, particularly summaries, by comparing them with reference texts. Common variants include ROUGE-N, which measures the correspondence of n-grams, ROUGE-L, which considers the longest common sub-sequences, and ROUGE-W, which takes into account the weight of correspondences. 3. BERTScore relies on pre-trained language models to assess the semantic similarity between the generated and reference texts, going beyond mere superficial word matching. 4. Perplexity is one of the most common metrics for evaluating language models. It is defined as the exponentiated average negative log-likelihood of a sequence, in our case, the sequence of generated tokens. The perplexity measures the model's ability to predict uniformly among the set of specified tokens in a corpus. A low perplexity indicates a good model. The final perplexity is obtained by averaging the perplexity of each generated text in the test set and we do not consider tokens occurring in the prompt during the computation.</p><p>The metrics are calculated for each model: Llama3.1, Llama3.1-NA-100k and llama3-NA. Results of the evaluation are reported in Table <ref type="table">1</ref>.</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Preface to the Eighth Workshop on Natural Language for Artificial Intelligence (NL4AI)</title>
		<author>
			<persName><forename type="first">G</forename><surname>Bonetta</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">D</forename><surname>Hromei</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Siciliani</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">A</forename><surname>Stranisci</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the Eighth Workshop on Natural Language for Artificial Intelligence (NL4AI 2024) co-located with 23th International Conference of the Italian Association for Artificial Intelligence (AI*IA 2024)</title>
				<meeting>the Eighth Workshop on Natural Language for Artificial Intelligence (NL4AI 2024) co-located with 23th International Conference of the Italian Association for Artificial Intelligence (AI*IA 2024)</meeting>
		<imprint>
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">A few-shot entity relation extraction method in the legal domain based on large language models</title>
		<author>
			<persName><forename type="first">S</forename><surname>Li</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Yi</surname></persName>
		</author>
		<idno type="DOI">10.1145/3675417.3675513</idno>
		<idno>doi:10.1145/3675417.3675513</idno>
		<ptr target="https://doi.org/10.1145/3675417.3675513" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 2024 Guangdong-Hong Kong-Macao Greater Bay Area International Conference on Digital Economy and Artificial Intelligence, DEAI &apos;24</title>
				<meeting>the 2024 Guangdong-Hong Kong-Macao Greater Bay Area International Conference on Digital Economy and Artificial Intelligence, DEAI &apos;24<address><addrLine>New York, NY, USA</addrLine></address></meeting>
		<imprint>
			<publisher>Association for Computing Machinery</publisher>
			<date type="published" when="2024">2024</date>
			<biblScope unit="page" from="580" to="586" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<monogr>
		<title level="m" type="main">Optimizing numerical estimation and operational efficiency in the legal domain through large language models</title>
		<author>
			<persName><forename type="first">J.-H</forename><surname>Huang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C.-C</forename><surname>Yang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Shen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">M</forename><surname>Pacces</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Kanoulas</surname></persName>
		</author>
		<ptr target="https://arxiv.org/abs/2407.19041.arXiv:2407.19041" />
		<imprint>
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Unlocking practical applications in legal domain: Evaluation of gpt for zero-shot semantic annotation of legal texts</title>
		<author>
			<persName><forename type="first">J</forename><surname>Savelka</surname></persName>
		</author>
		<idno type="DOI">10.1145/3594536.3595161</idno>
		<idno>doi:10.1145/3594536. 3595161</idno>
		<ptr target="https://doi.org/10.1145/3594536.3595161" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the Nineteenth International Conference on Artificial Intelligence and Law, ICAIL &apos;23</title>
				<meeting>the Nineteenth International Conference on Artificial Intelligence and Law, ICAIL &apos;23<address><addrLine>New York, NY, USA</addrLine></address></meeting>
		<imprint>
			<publisher>Association for Computing Machinery</publisher>
			<date type="published" when="2023">2023</date>
			<biblScope unit="page" from="447" to="451" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Performance analysis of large language models in the domain of legal argument mining</title>
		<author>
			<persName><forename type="first">A</forename><surname>Al Zubaer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Granitzer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Mitrović</surname></persName>
		</author>
		<idno type="DOI">10.3389/frai.2023.1278796</idno>
		<ptr target="https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2023.1278796.doi:10.3389/frai.2023.1278796" />
	</analytic>
	<monogr>
		<title level="j">Frontiers in Artificial Intelligence</title>
		<imprint>
			<biblScope unit="volume">6</biblScope>
			<date type="published" when="2023">2023</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<monogr>
		<title level="m" type="main">Legal-bert: The muppets straight out of law school</title>
		<author>
			<persName><forename type="first">I</forename><surname>Chalkidis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Fergadiotis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Malakasiotis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Aletras</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Androutsopoulos</surname></persName>
		</author>
		<ptr target="https://arxiv.org/abs/2010.02559.arXiv:2010.02559" />
		<imprint>
			<date type="published" when="2020">2020</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Italian-legal-bert: A pre-trained transformer language model for italian law</title>
		<author>
			<persName><forename type="first">D</forename><surname>Licari</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Comandè</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">EKAW (Companion)</title>
				<imprint>
			<date type="published" when="2022">2022</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<monogr>
		<author>
			<persName><forename type="first">E</forename><forename type="middle">J</forename><surname>Hu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Shen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Wallis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Z</forename><surname>Allen-Zhu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Li</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Chen</surname></persName>
		</author>
		<idno type="arXiv">arXiv:2106.09685</idno>
		<title level="m">Lora: Low-rank adaptation of large language models</title>
				<imprint>
			<date type="published" when="2021">2021</date>
		</imprint>
	</monogr>
	<note type="report_type">arXiv preprint</note>
</biblStruct>

<biblStruct xml:id="b8">
	<monogr>
		<author>
			<persName><forename type="first">T</forename><forename type="middle">Le</forename><surname>Scao</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Fan</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Akiki</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Pavlick</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Ilić</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Hesslow</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Castagné</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">S</forename><surname>Luccioni</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Yvon</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Gallé</surname></persName>
		</author>
		<idno>hal-03850124f</idno>
		<title level="m">Bloom: A 176b-parameter open-access multilingual language model</title>
				<imprint>
			<date type="published" when="2023">2023</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<monogr>
		<author>
			<persName><forename type="first">H</forename><surname>Touvron</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Martin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Stone</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Albert</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Almahairi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Babaei</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Bashlykov</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Batra</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Bhargava</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Bhosale</surname></persName>
		</author>
		<idno type="arXiv">arXiv:2307.09288</idno>
		<title level="m">Llama 2: Open foundation and fine-tuned chat models</title>
				<imprint>
			<date type="published" when="2023">2023</date>
		</imprint>
	</monogr>
	<note type="report_type">arXiv preprint</note>
</biblStruct>

<biblStruct xml:id="b10">
	<monogr>
		<title level="m" type="main">The llama 3 herd of models</title>
		<author>
			<persName><forename type="first">A</forename><surname>Dubey</surname></persName>
		</author>
		<ptr target="https://arxiv.org/abs/2407.21783.arXiv:2407.21783" />
		<imprint>
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<monogr>
		<author>
			<persName><forename type="first">P</forename><surname>Basile</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Musacchio</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Polignano</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Siciliani</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Fiameni</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Semeraro</surname></persName>
		</author>
		<idno type="arXiv">arXiv:2312.09993</idno>
		<title level="m">Llamantino: Llama 2 models for effective text generation in italian language</title>
				<imprint>
			<date type="published" when="2023">2023</date>
		</imprint>
	</monogr>
	<note type="report_type">arXiv preprint</note>
</biblStruct>

<biblStruct xml:id="b12">
	<monogr>
		<author>
			<persName><forename type="first">M</forename><surname>Polignano</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Basile</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Semeraro</surname></persName>
		</author>
		<idno type="arXiv">arXiv:2405.07101</idno>
		<title level="m">Advanced natural-based interaction for the italian language: Llamantino-3-anita</title>
				<imprint>
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
	<note type="report_type">arXiv preprint</note>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">Adapting bloom to a new language: A case study for the italian, IJCoL</title>
		<author>
			<persName><forename type="first">P</forename><surname>Basile</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Siciliani</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Musacchio</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Polignano</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Semeraro</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Italian Journal of Computational Linguistics</title>
		<imprint>
			<biblScope unit="volume">10</biblScope>
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<monogr>
		<author>
			<persName><forename type="first">Z</forename><surname>Hu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Lan</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Xu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E.-P</forename><surname>Lim</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">K</forename><surname>.-W. Lee</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Bing</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Poria</surname></persName>
		</author>
		<idno type="arXiv">arXiv:2304.01933</idno>
		<title level="m">Llm-adapters: An adapter family for parameter-efficient fine-tuning of large language models</title>
				<imprint>
			<date type="published" when="2023">2023</date>
		</imprint>
	</monogr>
	<note type="report_type">arXiv preprint</note>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
