In Italy's civil appeal proceedings, judges rely on legal repositories, case management databases, and case filings for decision-making. Generative AI offers promising support for these cognitive tasks but struggles to account for their specificity, limiting effectiveness. In this paper, we present early results on an effort to improve solutions based on generative AI to support second-instance civil proceedings by proposing a Legal Document Query Language (LDQL) for Civil Appeal Proceedings. Inspired by structured query languages, LDQL specifies recurring operations and primitives for such operations. It can be viewed as a conceptual layer to guide the selection of prompts optimized for specific cognitive tasks, the completion of these prompts with textual elements specific to the user request, and the specification of constraints on features that responses should satisfy. As a first contribution, the language helps better clarify the variety of the underlying operations. We discuss a use case where LDQL is employed to interact with specialized prompts with an LLM or an LLM-based system and report about the quality (e.g. accuracy, efficiency, usefulness) of the response in relation to the overall task. Preliminary results suggest that a language like LDQL can support a better orchestration of LLM-based linguistic services thus making it worth proceeding with its implementation using a multi-agent architecture.

Agazzi, R., Batini, C., Palmonari, M., Vitali, M. (2025). Legal Document Query Language: Conceptualizing Linguistic Commands for AI Assistants in Civil Appeal Proceedings. In Proceedings of the 33nd Symposium on Advanced Database Systems (pp.346-359). CEUR-WS.

Legal Document Query Language: Conceptualizing Linguistic Commands for AI Assistants in Civil Appeal Proceedings

Agazzi R.;Palmonari M.;
2025

Abstract

In Italy's civil appeal proceedings, judges rely on legal repositories, case management databases, and case filings for decision-making. Generative AI offers promising support for these cognitive tasks but struggles to account for their specificity, limiting effectiveness. In this paper, we present early results on an effort to improve solutions based on generative AI to support second-instance civil proceedings by proposing a Legal Document Query Language (LDQL) for Civil Appeal Proceedings. Inspired by structured query languages, LDQL specifies recurring operations and primitives for such operations. It can be viewed as a conceptual layer to guide the selection of prompts optimized for specific cognitive tasks, the completion of these prompts with textual elements specific to the user request, and the specification of constraints on features that responses should satisfy. As a first contribution, the language helps better clarify the variety of the underlying operations. We discuss a use case where LDQL is employed to interact with specialized prompts with an LLM or an LLM-based system and report about the quality (e.g. accuracy, efficiency, usefulness) of the response in relation to the overall task. Preliminary results suggest that a language like LDQL can support a better orchestration of LLM-based linguistic services thus making it worth proceeding with its implementation using a multi-agent architecture.
paper
AI assistants; Document management; Legal documents; Query languages;
English
33rd Italian Symposium on Advanced Database Systems, SEBD 2025 - June 16th to 19th, 2025
2025
Bartolini, I; Cima, G; Firmani, D; Lembo, D; Martinenghi, D; Mecella, M; Poggi, A
Proceedings of the 33nd Symposium on Advanced Database Systems
2025
4182
346
359
https://ceur-ws.org/Vol-4182/
open
Agazzi, R., Batini, C., Palmonari, M., Vitali, M. (2025). Legal Document Query Language: Conceptualizing Linguistic Commands for AI Assistants in Civil Appeal Proceedings. In Proceedings of the 33nd Symposium on Advanced Database Systems (pp.346-359). CEUR-WS.
File in questo prodotto:
File Dimensione Formato  
paper35.pdf

accesso aperto

Tipologia di allegato: Publisher’s Version (Version of Record, VoR)
Licenza: Creative Commons
Dimensione 2.26 MB
Formato Adobe PDF
2.26 MB Adobe PDF Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10281/627623
Citazioni
  • Scopus 0
  • ???jsp.display-item.citation.isi??? ND
Social impact