The creation of legal documents often requires the generation of text that adheres to a predefined schema, a process that can be significantly enhanced through the use of digital and automated tools. This paper presents JusBuild, a Retrieval-Augmented Generation (RAG)-based document builder architecture designed to assist legal practitioners in drafting new legal documents. JusBuild operates through a multi-layered framework: the Document Segmentation Layer partitions legal documents into functional sections based on a predefined schema; the Storage Layer collects semantically meaningful vector representations of these sections, generated by an embedding model; and the Retrieval and RAG Layers provide real-time suggestions to the practitioner during the drafting process. To evaluate its versatility, JusBuild was tested on two distinct datasets, varying in document template, language, and judicial matter, demonstrating its adaptability and applicability across diverse legal contexts. The results highlight JusBuild's potential to streamline legal document drafting while maintaining user full control over document production, leveraging its “human-in-the-loop” approach.
JusBuild: a RAG-based Architecture for Legal Document Building - Discussion Paper / S. Castano, A.F. (CEUR WORKSHOP PROCEEDINGS). - In: SEBD / [a cura di] I. Bartolini, Gi. Cima, D. Firmani, D. Lembo, D. Martinenghi, M. Mecella,, A. Poggi. - [s.l] : Sun SITE Central Europe (CEUR), 2025. - pp. 594-603 (( 33. Symposium on Advanced Database Systems : June, 16th to 19th Ischia 2025.
JusBuild: a RAG-based Architecture for Legal Document Building - Discussion Paper
S. CastanoPrimo
;A. FerraraSecondo
;S. Montanelli;S. Picascia
Penultimo
;D. RivaUltimo
2025
Abstract
The creation of legal documents often requires the generation of text that adheres to a predefined schema, a process that can be significantly enhanced through the use of digital and automated tools. This paper presents JusBuild, a Retrieval-Augmented Generation (RAG)-based document builder architecture designed to assist legal practitioners in drafting new legal documents. JusBuild operates through a multi-layered framework: the Document Segmentation Layer partitions legal documents into functional sections based on a predefined schema; the Storage Layer collects semantically meaningful vector representations of these sections, generated by an embedding model; and the Retrieval and RAG Layers provide real-time suggestions to the practitioner during the drafting process. To evaluate its versatility, JusBuild was tested on two distinct datasets, varying in document template, language, and judicial matter, demonstrating its adaptability and applicability across diverse legal contexts. The results highlight JusBuild's potential to streamline legal document drafting while maintaining user full control over document production, leveraging its “human-in-the-loop” approach.| File | Dimensione | Formato | |
|---|---|---|---|
|
paper4.pdf
accesso aperto
Tipologia:
Publisher's version/PDF
Licenza:
Creative commons
Dimensione
1.48 MB
Formato
Adobe PDF
|
1.48 MB | Adobe PDF | Visualizza/Apri |
Pubblicazioni consigliate
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.




