LLMs for the Legal Domain: Instruction Fine-Tuning and Model Adaptation

Applied research project on the adaptation and evaluation of Large Language Models for government and legal contexts involving sensitive data.

ONGOING LEGAL AI INSTRUCTION FINE-TUNING KNOWLEDGE DISTILLATION PRIVACY-PRESERVING AI


Project details

  • Role: Collaborating Researcher
  • Principal Investigator: Ricardo Marcacini
  • Institutions: Universidade de São Paulo (USP) / Procuradoria-Geral da Fazenda Nacional (PGFN), Brazil
  • Period: 2024–2026

Overview

The research covers privacy, teacher–student learning, knowledge distillation, efficient fine-tuning, LoRA, quantization, model evaluation, factuality, and the reduction of errors and hallucinations.

Research outputs

  • Development and evaluation of privacy-preserving strategies for specializing LLMs in sensitive domains.
  • Evaluation of models for the classification and analysis of legal documents.
  • Development of teacher–student strategies combined with distillation, LoRA and quantization.

Open-source repositories

Awards and recognition

  • Best Paper Award at LASDiGov 2025.

Scientific publications

2025

  1. LASDIGOV
    LLM4Gov: A Privacy-Preserving Approach to Teacher-Student Fine-Tuning of Distilled LLMs for the Public Sector
    Ricardo Marcacini, Jorge Valverde-Rebaza, Marcelo Turine, Brucce Santos, Silvio Levcovitz, and Solange Rezende
    In Anais do XII Latin American Symposium on Digital Government (LASDiGov 2025), 2025