Chapter 2: Exercises

Below are five exercises designed to help you engage hands-on with these technical principles introduced in Chapter 2.

You will interact with a ChatGPT to see how changes in your prompts and context affect the output. By experimenting, you will gain firsthand insights into the model’s capabilities, limitations, and reasoning style.


Exercise 1: Explaining Neural Networks in Your Own Words

Purpose: To ensure you understand what neural networks are and how they learn patterns.

Instructions:

  1. Initial Prompt to the AI:
    Explain what a neural network is and how it processes language, using a simple analogy suited for a first-year law student.
  2. Refinement:
    If the explanation seems too technical, try:
    Please simplify the explanation further and use an example drawn from analyzing legal documents.

Reflection:
In your notes, summarize the AI’s explanation. Did the model’s analogy help you grasp the concept better? How does this understanding align with what you learned in the chapter?


Exercise 2: Comparing Language Models

Purpose: To understand the differences between common language models (e.g., GPT vs. BERT) and how they relate to legal tasks.

Instructions:

  1. Initial Prompt to the AI:
    Compare GPT and BERT models. Explain how each one could be used in a legal context and their respective strengths and weaknesses.
  2. Adjusting Context:
    If the answer is too generic, refine:
    Focus your comparison on drafting legal documents (for GPT) versus analyzing large sets of case law for key concepts (for BERT).

Reflection:
Note how the model differentiates these architectures. Does the explanation clarify why Transformers are useful in handling the complexity of legal texts?


Exercise 3: The Power of the Transformer Architecture

Purpose: To see how focusing on different parts of a text (the “attention” mechanism) can influence the model’s interpretation.

Instructions:

  1. Create Context:
    Provide the AI with a short paragraph of text that references a legal concept. For example:
    In a negligence claim, establishing a duty of care is essential. If a party breaches this duty and causes harm, they may be liable for damages. Courts often look at precedent to determine the scope of the duty owed.
  2. Initial Prompt to the AI:
    Summarize the paragraph above, focusing only on how courts determine the scope of the duty owed.
  3. Shift the Focus (Demonstrate Attention):
    Ask the model to summarize the same paragraph but now focus on the concept of breach and resulting harm:
    Now summarize the same paragraph but focus specifically on the concept of breach of duty and the consequences.

Reflection:
Compare the two summaries. How did the model’s “attention” shift based on your instructions? Does this help you understand how Transformers process and re-contextualize information?


Exercise 4: Pre-Training vs. Fine-Tuning

Purpose: To understand the difference between a generally trained model and one fine-tuned for legal work.

Instructions:

  1. Initial Prompt to the AI:
    Explain the difference between pre-training and fine-tuning a language model. Use a legal education analogy: think of pre-training as a liberal arts degree and fine-tuning as law school.
  2. Deepening Understanding:
    If the analogy is unclear, refine it:
    Re-explain this concept using a case study: How would a pre-trained language model differ from one fine-tuned on a specialized database of contract law?

Reflection:
How does the model’s analogy help you understand the importance of fine-tuning in making AI outputs more legally accurate?


Purpose: To connect technical foundations to creative, practical uses in the legal field.

Instructions:

  1. Prompt to the AI:
    Suggest three innovative ways generative AI could be used in legal services, focusing on tasks currently done manually. For each suggestion, note one technical requirement (e.g., large training dataset) and one potential ethical or regulatory concern.
  2. Iteration:
    If suggestions are too generic, refine the prompt:
    Now refine these three ideas to be more specific. For instance, name a particular type of legal proceeding or type of contract. Also consider data privacy in your ethical concern.

Reflection:
Write down which ideas seem most promising and why. How could understanding neural networks and Transformers help you assess the feasibility and risks of these ideas?


Additional Reflection (Optional)

After completing these exercises, write a brief paragraph reflecting on what you learned. How did understanding the technical details—neural networks, Transformers, pre-training, and fine-tuning—enhance your perspective on using AI in legal practice? Did seeing the AI respond to technical questions and shifting prompts give you more confidence in your ability to direct these tools effectively?