← Latest papers
💬 NLP

LegalMidm: Use-Case-Driven Legal Domain Specialization for Korean Large Language Model

This paper introduces LegalMidm, a Korean legal-domain large language model developed through a systematic, use-case-driven training framework that prioritizes collaboration with legal professionals and rigorous data curation to enhance precision and practical utility in real-world legal applications.

Original authors: Youngjoon Jang, Chanhee Park, Hyeonseok Moon, Young-kyoung Ham, Jiwon Moon, Jinhyeon Kim, JuKyung Jung, Heuiseok Lim

Published 2026-04-29
📖 5 min read🧠 Deep dive

Original authors: Youngjoon Jang, Chanhee Park, Hyeonseok Moon, Young-kyoung Ham, Jiwon Moon, Jinhyeon Kim, JuKyung Jung, Heuiseok Lim

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a brilliant, all-knowing librarian named "Mi:dm." This librarian has read almost every book in the world and can answer questions about anything from cooking recipes to quantum physics. However, if you ask this librarian to draft a legal complaint for a court case in South Korea, they might stumble. They know the words, but they don't quite understand the rules of the game or the specific style required by Korean judges.

This paper introduces LEGALMIDM, a project designed to turn that general librarian into a specialized Korean Legal Expert. The researchers didn't just give the librarian a stack of law books; they built a custom training program based on what lawyers actually need to do every day.

Here is how they did it, broken down into simple steps:

1. Listening to the Real Players (The "Use-Case" Approach)

Before teaching the AI, the researchers went out and asked: "What do real lawyers actually need help with?"
They looked at legal tech companies in the US and Korea and talked to practicing attorneys. They found that lawyers mostly need help with four things:

  • Summarizing long documents.
  • Answering questions based on specific documents.
  • Drafting complaints (the document that starts a lawsuit).
  • Drafting petitions (formal requests to the court).

Instead of just teaching the AI random legal facts, they focused the training specifically on these high-demand tasks.

2. Building the "Textbook" (Data Curation)

To teach the AI, they needed high-quality examples. They didn't just scrape random text off the internet.

  • Human Experts: They hired law students, legal professionals, and actual attorneys to curate the data. Think of this as having a team of master chefs taste-test the ingredients before cooking.
  • Automatic Generation: They also used a powerful AI to generate practice questions and answers based on real Korean laws. To make sure the AI didn't "hallucinate" (make things up), they created a strict rule: every answer had to point to the exact paragraph of the law it came from. If the AI couldn't find the source text, the answer was thrown out.

3. The Training Recipe (The "Pipeline")

The researchers tested different ways to train the AI to see what worked best. They treated this like a science experiment with three main ingredients:

  • Ingredient A: The "General Knowledge" Mix.

    • The Question: If we only feed the AI legal books, will it forget how to speak normally or answer simple questions?
    • The Discovery: Yes, it would. The best results came from mixing legal data with general conversation data (like everyday questions people ask chatbots). This kept the AI smart and polite while making it a legal expert. They did this during two stages: "Continual Pre-Training" (reading the books) and "Instruction Tuning" (learning how to follow orders).
  • Ingredient B: How to Present the Law.

    • The Question: Should the AI be given the law text before it answers, or should it be asked to write out the law as part of the answer?
    • The Discovery: It's a trade-off. Asking the AI to write out the law in its answer worked great for drafting documents (like complaints), but it confused the AI when answering multiple-choice questions. The team decided to put the law text in the input (give it to the AI to read) rather than asking it to generate the law text itself. This made the AI more stable across different tasks.
  • Ingredient C: The "Persona" (System Prompts).

    • The Question: Should we tell the AI, "You are a legal assistant named Mi:dm" during training, or just tell it that when we talk to it?
    • The Discovery: Surprisingly, telling the AI its identity during training made it worse at legal tasks. The best strategy was to train it without a specific persona, and then only tell it who it is when a human starts talking to it. This allowed the AI to learn the legal skills deeply without getting confused by its own "character."

4. The Results

The final model, LEGALMIDM, was tested against other massive, famous AI models (some of which are much bigger).

  • Legal Tasks: LEGALMIDM beat the larger models at drafting complaints, petitions, and summarizing cases. It was like a specialized surgeon outperforming a general practitioner in a specific surgery.
  • General Tasks: Despite being smaller and specialized, it didn't lose its ability to answer general questions. It didn't suffer from "catastrophic forgetting" (forgetting everything else it knew).

The Bottom Line

The paper argues that to build a truly useful AI for a specific field like law, you can't just dump a bunch of data on a general model. You have to:

  1. Ask the experts what they actually need.
  2. Mix specialized data with general data so the AI doesn't lose its common sense.
  3. Test different formats to see how the information is presented.
  4. Save the "personality" instructions for the moment of conversation, not the training phase.

By following this recipe, they created a Korean legal AI that is not just a "dumb" database, but a practical tool that understands the nuances of the Korean legal system.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →