Wednesday, May 22, 2024

Prompt engineering tips for generative AI

Innovate or die. I held out long enough, but it's time for me to learn how to use ChatGPT and incorporate it into my legal practice. That was one of my biggest takeaways from the Mackrell International Annual General Meeting earlier this month.

What does one do when one wants to learn how to effectively use ChatGPT? Ask ChatGPT! Here's the prompt I used: "I'm a lawyer conducting research on employment law. Can you give me the top 6 prompt engineering tips to optimize my results on ChatGPT?"

Here's what ChatGPT recommends:

1. Be Specific and Detailed: Instead of asking general questions, provide specific details about the issue or case you are researching. For example, "What are the implications of the latest amendments to the Family and Medical Leave Act (FMLA) on small businesses?" This helps the model provide more targeted and relevant information.

2. Use Multi-Part Questions: Break down complex queries into multiple parts. For instance, "Can you summarize the key points of the NLRA preemption doctrine? Also, how has it been applied in recent court cases?" This ensures that each aspect of your query is addressed comprehensively.

3. Request for Examples and Case Studies: Ask for examples or case studies to understand the application of legal principles better. For example, "Can you provide examples of landmark cases involving wrongful termination due to discrimination?" This helps in getting practical insights and real-world applications.

4. Clarify Jurisdiction and Scope: Specify the jurisdiction (e.g., federal, state, or international) and scope of your research. For example, "What are the latest developments in federal employment law regarding employee misclassification?" This ensures the information is relevant to the specific legal context you are interested in.

5. Follow-Up for Depth: Use follow-up questions to delve deeper into the initial response. For example, after receiving a summary, you might ask, "Can you provide more details on the Supreme Court's reasoning in this case?" This iterative approach helps in exploring the topic thoroughly.

6. Ask for Sources and References: Request the sources or references for the information provided. For instance, "Can you list the key sources or cases that support this information?" This helps in verifying the accuracy and credibility of the information.

ChatGPT isn't perfect … yet. There's still AI drift (where the quality of the AI's responses degrades over time) and AI hallucinations (where the AI generates misleading or incorrect information that appears to be factual). We need to keep in mind, however, that while we ChatGPT is in release 4, it is still very much an alpha product. The AI models will get significantly better over time, and quickly. We all need to learn how to use it and integrate it into how we do our jobs, because otherwise we may not have jobs to do in the not-too-distant future.