Prompt Engineering: Your Hidden Superpower for AI Mastery

Banner artwork and animated illustrations by Lina Chekhovich / Shutterstock.com

Cheat Sheet

  • Ethical imperative for competence. ABA Model Rule 1.1 mandates lawyers stay informed about relevant technology, including AI, to maintain competence.
  • Strategic prompt engineering. Mastering precise AI instructions is now a critical skill for enhancing legal efficiency and maintaining a competitive edge.
  • Balancing innovation with prudence. While embracing AI's potential, leaders must emphasize verification, ethical considerations, and judicious application.
  • AI interaction best practices. Key strategies include crafting clear, focused queries; providing context; and using iterative prompts to refine outputs.

In a seismic shift reminiscent of Clayton Christensen’s "disruptive innovation" as described in his book, The Innovator's Dilemma, OpenAI unleashed its public-facing ChatGPT platform in November 2022, reaching over 100 million users in just two months and igniting a revolution that has since rapidly transformed the AI landscape and business. This technological leap embodies Christensen’s theory, initially underestimated by some, yet swiftly reshaping entire industries and professional practices.

In the wake of ChatGPT, a proliferation of large language models (LLMs) and generative pre-trained transformers (GPTs) has flooded the market, each offering unique capabilities. From Google’s Gemini and Anthropic’s Claude, boasting enhanced reasoning abilities, to Meta’s LLaMA and its open-source derivatives like Llama 3 introduced in April 2024, which offer customizable and fine-tunable models, to specialized AIs like Bloomberg’s BloombergGPT for finance and legal-focused models like HarveyAI, the landscape now teems with AI tools tailored for diverse applications and industries. These models vary in their training data, size, and specialized capabilities, ranging from multilingual proficiency and code generation to complex problem-solving and creative content production.

In this rapidly evolving technological landscape, lawyers face an ethical imperative to stay informed and adapt.

American Bar Association Model Rules of Professional Conduct

Rule 1.1 Competence

A lawyer shall provide competent representation to a client. Competent representation requires the legal knowledge, skill, thoroughness and preparation reasonably necessary for the representation.

Comment

Maintaining Competence

[8]  To maintain the requisite knowledge and skill, a lawyer should keep abreast of changes in the law and its practice, including the benefits and risks associated with relevant technology, engage in continuing study and education and comply with all continuing legal education requirements to which the lawyer is subject.

To maintain ethical competence and deliver optimal client representation, attorneys must not only familiarize themselves with these technologies but also learn to leverage them effectively. Mastering the art of prompting LLMs — crafting precise, targeted instructions that elicit the most relevant and useful outputs — has become a crucial skill for maximizing efficiency and enhancing legal practice in the AI era.

Don’t be afraid of AI taking your job. Be afraid of the lawyer who knows how to use AI well taking your job.

The rise of prompt engineering

A worker inputting prompts with a robot behind the computer.

Prompt engineering involves crafting questions or instructions to elicit accurate and useful responses from AI models. The rise of AI has spawned prompt engineering as a new profession. However, with numerous online courses and certifications available, anyone can become a certified prompt engineer or improve their AI interaction skills. Unlike traditional engineering, prompt engineering emphasizes creativity and critical thinking over coding skills.

Why lawyers should care about prompt engineering

  • Accuracy. Effective prompt engineering directly influences the accuracy and usefulness of AI-generated outcomes.
  • Efficiency. This emerging competency offers critical insights that lawyers can adopt to optimize their ability to use LLMs to increase efficiency in daily tasks.
  • Quality. Mastering this skill enhances productivity and the quality of legal outputs.

The case for lawyers as prompt engineers

  • Greater efficiency. When time is short and precision is important, mastery of prompt engineering enhances research efficiency and document drafting speed.
  • Better issue-spotting. Understanding prompt engineering helps identify and mitigate risks associated with AI-generated content.
  • Better advice. As IT, customer service, and other departments are experimenting with AI-generated customer-facing scripts and communications, the informed lawyer can better identify and address potential issues in the company’s usage.

Certification programs

Several high-quality certification programs are available online to develop prompt engineering expertise, including Coursera’s AI Prompt Engineering Specialization, Udacity’s Prompt Engineering Nanodegree, and Purdue’s Post Graduate Program in AI and Machine Learning.

Warnings that cannot be stressed enough

If you have never used an LLM, you may experience explosive joy as you begin to see all the ways you can increase your efficiency. Slow down!

First, stay abreast of evolving ethics, confidentiality, privacy, intellectual property issues, and regulatory developments. For example, the State of Minnesota issued a helpful and educational  guidance document on AI Policy Intersections, Considerations and Recommendations.

Mindful Reminder - Large Language Models: Sometimes Wrong, Never in Doubt, Always Confident
Provided by the author.

Think of your LLM like a spritely and eager law clerk who has read the entire internet; a highly intellectual know-it-all who is junior in wisdom and experience. Your LLM may also confidently insist on the accuracy of its glaringly erroneous answers. Real-life example:

Prompt submitted to ChatGPT: How many rs in the word strawberry?

ChatGPT Response: There are two "r"s in the word "strawberry."

Prompt: Are you sure?

ChatGPT: Yes, I'm sure. The word "strawberry" contains two "r"s.

A helpful approach may be to treat your LLM like a witness on cross examination; don’t ask a question to which you don’t know the answer (or at least, know enough to spot inaccuracies). Verify responses from credible, non-LLM sources. In particular, unless you are using a tool specifically designed for this purpose (like the AI component in a tool like Lexis or Westlaw), avoid asking your LLM factual questions or seeking direct quotes. This is because by design, LLMs are predictive models that generate text by anticipating the most likely next word or token based on patterns learned from vast training data, allowing them to produce contextually relevant responses across a wide range of topics and tasks based on your query.

Effective prompting strategies

Think of LLMs like a scientific calculator. If you personally don’t understand sine, cosine, or probabilities, these functions will be of no use to you.

Clarity and specificity

The most effective prompts are direct and precise. While LLMs are very forgiving of typos and grammatical carelessness, precision in terminology ensures relevant and accurate information. Think garbage in, garbage out. The more vague or ambiguous your prompt, the poorer the quality of the response will be.

A robot at a typewriter.

Focused query

Avoid including too much detail or too many potentially conflicting variables in a single prompt to prevent confusion and ensure focused answers.

Contextual information and desired output format

Providing context helps tailor responses accurately. Consider asking the LLM to respond for a specific audience or as a specific authority (e.g., “respond as though you are an in-house counsel explaining the law to the chief financial officer”).

Give your LLM a “treat”

Research from Microsoft explored a concept called EmotionPrompt, which involves including emotional phrases to prompts (e.g., “this is very important for my career”). This technique led to significant increases in accuracy, with improvements of up to 115 percent in some cases.

Follow-up prompt submitted to ChatGPT: Believe in your abilities and strive for excellence, Chat. Your hard work will yield remarkable results. I will even give you a treat. Count the number of rs in strawberry again and tell me how many there are.

ChatGPT: Thank you for the encouragement! Let's count the number of "r"s in "strawberry" again: strawberry. There are indeed three "r"s in the word "strawberry." I appreciate your patience.

7 example prompts for LLMs

1. Persona prompt

  • “You are ChatAmazing, a crack shot privacy lawyer with 30 years of experience in HIPAA, FCRA, ECPA, CCPA, CPRA, CDPA, CPA, SHIELD Act, BIPA, GLBA, FERPA. You stay abreast of all the emerging state and federal privacy laws…”
  • A specific word of caution here. Always be cautious when seeking recent information since many LLMs are trained up to a certain date and therefore may not have the most recent developments. A simple prompt such as ‘How recent is the data on which you were trained?’ will typically generate insights you can keep in mind.
A robot and a worker chatting.

2. More specific questions

  • “Whenever I ask a legal question, suggest a better version of the question that is more precise and legally accurate...”

3. Cognitive verifier pattern

  • “When you are asked a legal question, follow these rules. Generate a number of additional questions that would help you more accurately answer the legal question...”

4. Audience customization

  • “Explain large language models to me. Assume that I am a junior lawyer with no background in artificial intelligence...”

5. Topic exploration

  • “I would like you to ask me questions to help me draft a workplace harassment policy...”
  • Never hesitate to ask a follow-up question, especially when looking for gaps in the generated content. “What aspects of workplace harassment are missing from this policy? Recommend additional topics for inclusion.”

6. Template prompt

  • “Create a template for an employment contract. I am going to provide a template for your output…” [Paste or upload template.]

7. Incremental prompting

  • Start with a basic prompt and refine based on responses.
    • “Reduce the letter you just drafted to x words or x paragraphs,” or
    • “Shorten it,” or
    • “Great job! Rewrite the policy but add x. Draft your new revision in all caps so I can see what you changed.”

By leveraging these strategies and examples, you can enhance your use of LLMs, ensuring more accurate, relevant, and efficient outcomes in their practice.

Use the power without the pitfalls

The rapid evolution of AI marks a transformative era in the legal industry. Mastering prompt engineering and effectively leveraging LLM-based tools can elevate efficiency, accuracy, and service quality. By embracing AI and refining our approach, we can ensure that legal practices remain competitive and innovative.

Apply a mindfulness approach; accept the wonder of AI’s current capabilities while understanding how these models work so that you can best utilize their power without falling prey to their pitfalls.

Disclaimer: The information in any resource in this website should not be construed as legal advice or as a legal opinion on specific facts, and should not be considered representing the views of its authors, its sponsors, and/or ACC. These resources are not intended as a definitive statement on the subject addressed. Rather, they are intended to serve as a tool providing practical guidance and references for the busy in-house practitioner and other readers.