Chapter 6: Exercises

Below are five exercises designed to expand your mastery of prompt engineering concepts discussed in Chapter 6.

Each exercise is intended for the free version of Meta.ai, where you use structured approaches (e.g., RTF, RISEN) and explore the importance of clarity and context in your prompts (naive vs. informed prompts), and the difference between one-shot and few-shot strategies.


Exercise 1: Naive vs. Informed Prompts

Purpose: To see firsthand how adding detail and context (i.e., making your prompt “informed”) changes the AI’s output quality.

Instructions:

  1. Choose a Simple Legal Task: For instance, “Draft a basic demand letter for a client owed $5,000 by a contractor.”
  2. Create a Naive Prompt: For example:
    Write a demand letter to get money owed.
    Observe the AI’s response.
  3. Create an Informed Prompt: Now add relevant details: Draft a demand letter on behalf of Jane Smith, who is owed $5,000 by a home renovation contractor. The letter should reference the contract date (April 1, 2025), specify the amount owed, and mention the possibility of small claims court in California.
  4. Compare Outputs: Note differences in tone, relevance, and completeness.

Reflection: Did the informed prompt produce a more tailored letter? What aspects of the naive prompt might lead to a weaker legal document?


Exercise 2: Single-Shot vs. Few-Shot Prompting

Purpose: To explore how providing one or more examples in the prompt (few-shot) can improve accuracy and structure.

Instructions:

  1. Choose a Scenario: You are preparing a short Q&A for clients about eviction law.
  2. Single-Shot Prompt:
    Explain eviction law for tenants.
    Generate and review the AI’s response.
  3. Few-Shot Prompt:
    • Provide a short example or sample Q&A to model the style you want. For instance:
      Here is how I want your answers to look: Sample Question: What are the main reasons a tenant can be evicted in California? Sample Answer: A tenant may be evicted for failing to pay rent, violating a lease term, or causing damage to the property. Now, explain the process of eviction in plain language, focusing on the rights of tenants during the notice period and the court filing steps.
    • Compare this to the single-shot output.

Reflection: Did the few-shot example produce a more structured or relevant answer? How might you apply this approach in writing other legal materials?


Exercise 3: Applying the Principles of Prompt Engineering

Purpose: To practice using the five core principles (Direction, Format, Examples, Evaluate Quality, Divide Labor) and see how they collectively improve AI outputs.

Instructions:

  1. Select a Legal Topic: For instance, “Summarize the legal standard for granting summary judgment in federal court under Rule 56.”
  2. Draft a Prompt: Incorporate all five principles within the same prompt:
    • Give Direction: “You are a legal research assistant focusing on U.S. civil procedure.”
    • Specify Format: “Provide a concise, bullet-point summary (200 words maximum).”
    • Provide Examples: You can embed a short example: “E.g., ‘A motion for summary judgment may be granted if there is no genuine dispute of material fact…’”
    • Evaluate Quality: Request the AI to critique its own answer: “After you respond, note any potential omissions or ambiguities.”
    • Divide Labor: If the question is complex, consider separating it into sub-questions.
  3. Review the Output:
    • Did the AI follow the bullet-point format?
    • Did it self-critique effectively?

Reflection: Which principle made the biggest difference in clarity or correctness? How did you handle any omissions the AI noted?


Exercise 4: Using the RTF Prompt Framework

Purpose: To apply the RTF (Role–Task–Format) framework in a real-world legal drafting scenario.

Instructions:

  1. Pick a Document to Draft: For example, a “Motion to Dismiss for Lack of Personal Jurisdiction.”
  2. Craft a Prompt Using RTF:
    • Role: “You are a senior litigation attorney specializing in federal civil procedure.”
    • Task: “Draft a concise motion to dismiss for lack of personal jurisdiction in a commercial contract dispute.”
    • Format: “Present the motion in standard legal format (intro, argument, conclusion).”
  3. Consolidated Prompt:
    You are a senior litigation attorney specializing in federal civil procedure. Draft a concise motion to dismiss for lack of personal jurisdiction in a commercial contract dispute. Present the motion in standard legal format (intro, argument, conclusion).

  4. Compare: Now run the same request without using the RTF format, just a generic ask.

Reflection: Did the RTF-structured prompt yield a more organized or complete motion? Which section was the biggest improvement (intro, argument, or conclusion)?


Exercise 5: Using the RISEN Prompt Framework

Purpose: To practice the RISEN (Role–Instructions–Steps–End Goal–Narrowing) framework, especially for a multi-step legal research or drafting task.

Instructions:

  1. Identify a Complex Task: For instance, “Draft a short research plan analyzing how California courts interpret non-compete clauses, focusing on tech start-ups.”
  2. Structure Your Prompt Using RISEN:
    • Role: “You are an experienced employment attorney.”
    • Instructions: “We are researching recent California case law on non-compete clauses.”
    • Steps: “1) Identify main statutory or case law references; 2) Summarize each in bullet points; 3) Suggest how to apply them to a hypothetical tech start-up scenario.”
    • End Goal: “Produce a 1-2 page memo that I can share with senior partners.”
    • Narrowing: “Focus on cases from 2020 to the present, maximum 500 words.”
  3. Consolidated Prompt: You are an experienced employment attorney. We are researching recent California case law on non-compete clauses. 1) Identify main statutory or case law references; 2) Summarize each in bullet points; 3) Suggest how to apply them to a hypothetical tech start-up scenario. Produce a 1-2 page memo that I can share with senior partners. Focus on cases from 2020 to the present, maximum 500 words.
  4. Generate the AI’s Output and see how well it follows the steps.

Reflection: Did the tool systematically follow the Steps you listed? In your practice, how might you adapt RISEN for tasks like multi-jurisdictional research?


Additional Reflection (Optional)

After completing these exercises, reflect on:

By engaging with these exercises, you have gained hands-on experience with key prompt engineering concepts. You have seen how subtle changes in prompt design can significantly affect the AI’s output, whether that’s drafting a complaint or summarizing case law. Carry these insights forward as you integrate AI more deeply into your legal studies and eventual practice.