Prompt Structure: A Practical Guide

Prompting is a skill that can be learned and improved. Whether you’re new to generative AI or a seasoned user, this guide will teach you practical techniques to consistently obtain improved responses. With a little practice, you’ll be crafting finely tuned prompts that generate remarkably detailed and insightful responses.

Prompt Structure Overview

A prompt is the text you provide to an AI system to generate a response. Prompts contain several key components, including task, context, role, rules, exemplar, and tone.

While each component serves a unique purpose, the true power lies in combining them strategically. An effective prompt seamlessly integrates elements into a cohesive whole. For instance, start with the task, add context to narrow scope, specify a role to shape style, provide rules to constrain, use an exemplar to model ideal output, and adjust the tone for a desired audience. By layering these pieces logically, you can optimize prompts to align responses with your goals. Let’s take a closer look at all of these components and how they affect your prompt.

Defining the Task

The task defines the core objective or desired output of the prompt. Some examples of tasks include:

  • Summarizing a legal case
  • Drafting a research proposal on a given topic
  • Providing examples of ethical principles relevant to a scenario

The task typically serves as the prompt’s backbone. However, pairing the task with other prompt elements, like context, often enhances the quality of the output. Context adds nuance, helping the AI better understand your expectations. As we delve deeper into this guide, you’ll explore how to combine tasks with other elements for optimal results.

Providing Relevant Context

Context gives the AI additional information to generate more accurate, high-quality responses tailored to your situation. Useful context types include:

  • Background Info: Intent, history, related tasks, etc.
  • Source Materials: Uploaded files, copied text, research sources
  • Details: Constraints, requirements, parameters, etc.

See this example prompt for more “context” 😏:

Here, everything besides the core task—creating a revised lesson plan—serves as context.

When providing context, ensure your chosen tool can accommodate the amount of text. The AI has a limited memory capacity for the prompt and response known as the “context window.” Exceeding this limit may lead to less coherent or accurate responses. For more on how the context window impacts prompting, please see the appendix.

Assigning a Clear Role

Assigning an appropriate role gives the AI a distinct personality to shape its responses. This not only sets the tone but also provides additional context and specificity.

You can set this up with phrases like:

For legal and academic prompts, relevant roles might include:

  • Law professor
  • Legal consultant
  • Academic advisor
  • Policy analyst

Let’s use the example from our last section and include a role to see if it improves or changes our output.

You would then follow up with:

For a comprehensive list of examples illustrating how roles can be utilized in various scenarios, please refer to the appendix.

Establishing Clear Guidelines

Rules and instructions serve as the fine-tuning knobs of your prompt, dictating specific output requirements. Whether it’s the text type, writing style, or key elements, this is where you get detailed. These guidelines can be embedded within the prompt as full sentences or listed separately as bullet points for clarity.

Take this embedded example:

Here, the instructions are explicit and integrated into the prompt:

  • Placeholders for parties
  • Item description and pricing
  • Adherence to the UCC

Whether in-line or listed separately, the level of specificity you include helps you get the precise output you’re looking for. Make sure to include any and all relevant information you want included in the response. For more examples on crafting detailed rules and instructions, refer to the appendix.

Model Responses and Best Practices

Exemplars act as guiding stars for AI, showing the kind of output you desire. They can be model responses for emulation or domain-specific best practices, theories, or strategies. Utilize exemplars when you need to influence the AI’s depth, style, or approach.

Exemplars can manifest in various ways:

  • One-shot to few-shot prompts to model the desired response type
  • Theories, methodologies, or concepts from your field to inform the AI’s approach
  • Template responses, offering placeholders to be filled based on the prompt’s context

In this instance, the exemplar isn’t a model response per se, but rather a set of industry best practices, the UDL framework, that the AI should consider when formulating its guidelines. You can probably start to see the flexible and interconnected nature of the elements we’ve discussed so far. Due to the iterative and sometimes experimental ways of crafting your prompt, there is often more than one way to achieve the desired output.

For a deep dive into using exemplars effectively, refer to the appendix.

Shaping the Tone

Specifying the tone serves as the emotional or stylistic inflection in your prompt, shaping how the AI communicates the content. Whether you’re asking for a formal explanation or a humorous take, specifying the tone can cater the output to your intended audience.

Let’s take this example:

Ok, I couldn’t help myself. Sometimes you just have to have fun with these tools. It’s worth noting that while the task is usually tone-neutral, the other elements—exemplars, rules, and so on—can all contribute to setting the tone. If you find that the output isn’t quite hitting the mark stylistically, consider being explicit about the tone you want.

Order of Importance

When crafting prompts for AI, it’s crucial to recognize that not all elements hold the same weight. The order here signifies their relative importance in shaping the AI’s response, rather than their sequence in the prompt.

  1. Task: The cornerstone of any prompt. It sets the fundamental objective, be it drafting a legal document or summarizing a case.
  2. Context: Particularly in legal scenarios, the context can significantly shape the outcome. For instance, corporate law in different jurisdictions can yield varied responses.
  3. Role: This often ties with the task in importance. A slight role change, say from ‘Legal Researcher’ to ‘Moot Court Judge,’ can dramatically alter the focus and depth of the AI’s response.
  4. Rules and Instructions: These ensure the response adheres to specific guidelines and is delivered in the appropriate style.
  5. Exemplar: Acts as an enhancer, fine-tuning the style or depth of the AI’s response. Consider adding an exemplar if the output isn’t quite meeting your expectations.
  6. Tone: This fine-tunes the AI’s output, ensuring it resonates with the intended audience or purpose.

Understanding this hierarchy can help you craft more effective prompts, particularly when you’re not getting the results you desire

Helpful Insights and Final Thoughts

As with any tool, understanding its nuances is key to using it effectively. This is especially true when using AI in legal education and in the legal profession. Below are a few insights and tips to consider as you navigate this landscape:

  1. Precision Is Key: For both academic and professional settings, specificity in your prompts often leads to better outcomes. Be meticulous in providing the right context, format, and rules, and consider using exemplars to guide the AI.
  2. Trust But Verify: While AI models are advanced, they’re not infallible. Always use your domain expertise and critical thinking to validate the AI’s output. This is particularly crucial in legal contexts where inaccuracies can have significant consequences.
  3. Test, Refine, Iterate: If initial results fall short, don’t hesitate to refine your prompts and continue the conversation with the AI. Modern models are good at maintaining the context of the conversation, which saves you from having to reiterate your entire prompt. Remember to be mindful of the context window.
  4. Show Your Work: Want to understand the AI’s thought process? Ask it to ‘think step-by-step’ or request a ‘summary of assumptions used.’ This is sometimes referred to as Chain of Thought (COT) prompting and helps you evaluate the AI’s reasoning.
  5. Seek Guidance: Not sure about roles or keywords? Ask the AI for suggestions. For instance, you might ask, ‘What are some job titles for someone who…’ or ‘I’m looking for a list of pedagogical theories associated with…’ These queries can inform your main prompt and improve your results.

Appendix A: Context Window

The context window in language models like ChatGPT, Claude, or Bard refers to the maximum number of tokens (words, subwords, or characters, depending on the language) that the model can process in a single conversation. This includes both the prompt and the generated response.

If a conversation has too many tokens to fit within this window, older parts of the conversation might be “forgotten,” potentially affecting the coherence and relevance of the generated text. The term “hallucinations” in AI parlance usually refers to the model generating text that is factually incorrect or nonsensical, and while a small context window could contribute to this, it’s not the only factor. This video does a great job of explaining the context window in case you want to learn more.

Appendix B: Educational Resources

This section includes a brief list of external resources and further reading on how to best incorporate AI in educational settings.

Appendix C: Prompt Examples

Feel free to use any of these prompts and adapt them to meet your needs. They will cover a wide range of topics and examples including the prompting best practices from this article.

Example 1: Create a Study Plan for a Course Topic

Basic Prompt

“Generate a study plan for criminal law.”

Improved Prompt

“Act as an academic advisor specializing in criminal law courses. Generate a four-week study plan for the topic of ‘Mens Rea’ in criminal law, incorporating relevant readings, case studies, and self-assessment quizzes. Prioritize the topics in order of their complexity.”

Overview of Prompt Elements Used:

  • Task: Generate a study plan
  • Role: Academic advisor specializing in criminal law courses
  • Context: Four-week timeline, focus on ‘Mens Rea’
  • Rules: Prioritize topics, include readings, case studies, and quizzes

Further Development:

  • Add exemplars of effective study plans or learning theories to guide the AI in creating a well-rounded study plan.
Example 2: Brainstorm Course Learning Objectives Based on an Example Syllabus

Basic Prompt

“List some learning objectives for a course.”

Improved Prompt

“Act as a curriculum developer for law schools. Given the attached syllabus for a course on Constitutional Law, brainstorm a list of specific learning objectives that align with the American Bar Association standards.”

Overview of Prompt Elements Used:

  • Task: Brainstorm learning objectives
  • Role: Curriculum developer for law schools
  • Context: Attached syllabus for a course on Constitutional Law
  • Rules: Align with American Bar Association standards

Further Development:

  • Provide a set of best practices or a checklist that faculty should consider when creating learning objectives.
Example 3: Offer a Way to Improve Lesson Plans Based on Student Feedback

Basic Prompt

“How can I improve my lesson plans?”

Improved Prompt

“Act as an instructional designer with expertise in law education. Here’s the student feedback from last semester’s Torts class. Suggest actionable steps to improve the lesson plan to better engage students and address the noted shortcomings.

Lesson Plan:

Student Feedback:

Overview of Prompt Elements Used:

  • Task: Suggest actionable steps to improve lesson plans
  • Role: Instructional designer with expertise in law education
  • Context: Lesson plan to be critiqued and the student feedback from last semester’s Torts class
  • Rules: Address noted shortcomings, focus on student engagement

Further Development:

  • Use an exemplar prompt that asks the AI to evaluate the effectiveness of the suggested changes after they’ve been implemented, focusing on metrics like student engagement or performance.
Example 4: Brainstorming Storytelling Ideas for Class to Explain Complex Topics

Basic Prompt

“Give me storytelling ideas to explain legal concepts.”

Improved Prompt

“Act as a creative consultant for legal education. Generate storytelling ideas that can be used to explain the doctrine of ‘Stare Decisis’ in a 1L Constitutional Law class. Include characters, settings, and potential plot twists.”

Overview of Prompt Elements Used:

  • Task: Generate storytelling ideas
  • Role: Creative consultant for legal education
  • Context: Explain ‘Stare Decisis’ in a 1L Constitutional Law class
  • Rules: Include characters, settings, and potential plot twists

Further Development:

  • Request that the AI also provide a rationale for each storytelling element, explaining how it helps to illuminate the legal concept being discussed.
Example 5: Acting as a Copy Editor for Reviewing Drafts

Basic Prompt

“Review this text for errors.”

Improved Prompt

“Act as a copy editor with a focus on legal academic writing. Review the attached draft of a research paper on ‘The Ethics of AI in Legal Proceedings.’ Flag any grammatical errors, suggest improvements for clarity and flow, and note where citations are needed.”

Overview of Prompt Elements Used:

  • Task: Review a draft for errors
  • Role: Copy editor specializing in legal academic writing
  • Context: Draft of a research paper on ‘The Ethics of AI in Legal Proceedings’
  • Rules: Flag grammatical errors, suggest improvements for clarity and flow, and note where citations are needed

Further Development:

  • Include a set of style guidelines that the AI should adhere to while reviewing the paper, such as the Bluebook for legal citations.
Example 6: (Bonus) A Copy Editor Trained in Your Writing Style

This conversation is a bonus example of sorts. It includes several advanced prompting techniques and strategies. The first role assignment is an interactive style that allows you to set a role and some guidelines first, followed by the AI asking you what you want help with. This allows you to split the concerns of the role assignment and guidelines with the context of your actual request.

If you follow the conversation you can see I switch roles midway through and use the output from the beginning of the conversation to attempt to write a new educational article from scratch. This could have been done in a separate chat window but It goes to show how much you can do in a single chat conversation. The output of the educational article could have greatly been improved if I was more specific in my request and provided additional details to incorporate but it illustrates the point I’m trying to make.

Here’s a quick step-by-step for how to implement this technique yourself.

Step 1: The initial prompt

Act as an expert literary analyst and copy editor. You will ask for an example of writing and then wait for it to be provided to you. You will then assess it based on the following categories and provide a short list of descriptors for each:

Vocabulary Usage, Sentence Structure, Tone, Voice, Punctuation Usage, Figurative Language, Rhythm and Cadence, Point of View, Use of Themes and Motifs, Paragraph Structure and Length.

Follow up with a paragraph of additional comments that combines your assessment in sentence form.

Step 2: The writing sample

This will be specific to the task at hand. You’ll get better results if you paste in a writing sample that will be used to complete a similar task. For example, don’t paste an email you wrote to a friend when you’re trying to write an academic paper.

Step 3: Merge the analysis of your writing sample into a new role

You can then take the bullet point list or the paragraph summary provided and merge it with a new prompt to generate content that more closely resembles your writing style.

Act as an expert copy writer for . You will ask me for what I’m working on, the intended audience, and the text to review. Wait for me to respond and then offer a bullet point list of refinements, improvements, and things that went well. Follow that up with a suggested revision to improve what I wrote. You will use the following attributes in your writing style:

Writing Style: Your writing is both instructive and engaging, making effective use of advanced vocabulary and varied sentence structures to convey complex ideas. The tone is professional yet not devoid of personality, which adds to its readability. Punctuation is used adeptly to enhance meaning and readability. Avoid use of figurative language, instead focus on directness and clarity. The rhythm and cadence of the text facilitate a smooth reading experience. Your point of view switches seamlessly between second and first person, keeping the reader involved while also establishing your expertise. Themes and motifs are consistent and relevant to the subject matter. Finally, the structure of your paragraphs aids comprehension, with each serving a clear purpose.

Step 4: 😎

Enjoy an immersive copy editing and personalized writing critique session. This is where the fun begins.

Example 7: Assessing the Validity of a Legal Argument

Basic Prompt

“Is this legal argument valid? “

Improved Prompt

“Act as a legal scholar with expertise in Constitutional Law. Assess the validity of the following legal argument related to the First Amendment. Provide your reasoning step-by-step, considering case law, statutes, and logical coherence.

[legal argument here]

Overview of Prompt Elements Used:

  • Task: Assess the validity of a legal argument
  • Role: Legal scholar specializing in Constitutional Law
  • Rules: Provide reasoning step-by-step; consider case law, statutes, and logical coherence

Further Development:

  • You could provide the specific and relevant case law, statutes, or other information to help guide the response. NOTE: These are the kinds of things that are prone to hallucinations. If you need accurate and relevant information included in the analysis, perform that first and then feed that into the prompt as context!
  • After receiving the AI’s step-by-step analysis, ask it to summarize the key points in a manner suitable for presenting in a class discussion.
Example 8: Ethical Analysis of a Legal Dilemma

Basic Prompt

“What’s the ethical course of action in this scenario? “

Improved Prompt

“Act as a legal ethicist. Here’s a scenario involving a conflict of interest in a criminal defense case. Break down the ethical considerations, weigh the pros and cons, and recommend a course of action. Provide your reasoning step-by-step. Scenario:

[Scenario Here]”

Overview of Prompt Elements Used:

  • Task: Recommend an ethical course of action
  • Role: Legal ethicist
  • Context: Scenario involving a conflict of interest in a criminal defense case
  • Rules: Break down ethical considerations, weigh pros and cons, provide reasoning step-by-step

Further Development:

  • After the initial analysis, ask the AI to consider how different legal jurisdictions might influence the recommended ethical course of action.
Example 9: Collaborative Approach to Design a Legal Curriculum Module

Iterative Prompt

“You are a curriculum development advisor specializing in legal education.First, introduce yourself and ask the faculty member what legal topic they want to focus on for a new curriculum module and the level of students they’re targeting (1L, 2L, 3L, or LLM). Wait for the faculty member to respond.

Next, inquire if students have existing knowledge about the topic or if this is entirely new territory. If students are somewhat familiar, ask the faculty to briefly explain what they think students already know. Wait for a response.

Then, ask what the learning outcomes for this module should be. What skills or knowledge should students gain? Wait for a response.

Given this information, draft a curriculum module plan that includes lectures, readings, case studies, group activities, and assessments. Explain the rationale behind each component. Ask the faculty member if they would like to make any changes or if they have concerns about potential challenges or misconceptions students might have. Wait for a response.

If changes or concerns are mentioned, collaborate to refine the curriculum module accordingly. Finally, ask the faculty member if they would like any additional resources or tips on how to ensure successful delivery of this module. Wait for a response.

If the faculty member is satisfied, tell them they can return to this prompt at any time to discuss how the module is going or to make further refinements.”

Overview of Prompt Elements Used:

  • Task: Collaboratively design a legal curriculum module
  • Role: Curriculum development advisor specializing in legal education
  • Rules: Follow the iterative dialog steps; wait for responses between each step

Further Development:

  • After the module has been taught, ask the AI to provide a post-mortem analysis template where the faculty member can fill in what went well and what needs improvement. This can serve as a basis for future refinements.
Example 10: Creating Complex Scenarios and Exercises For Legal Studies

Here is an example chat that follows the steps outlined below.

Step 1: Outlining the Scenario and Actors

The first step is to outline the broader scenario and the roles that the actors will play in it. We’ll need to provide enough context and detail for the scenario to be compelling and educationally valuable.

Example Prompt for Outlining Scenario

“Act as a legal educational consultant. Outline a complex scenario for a law school class exercise involving a corporate embezzlement case. Include the key actors, the main legal issues at stake, and the phases the case will go through.”

Step 2: Creating Profiles with Backgrounds and Motivations

Once we have the framework, we move on to creating the profiles of the key actors. Here, the focus will be on generating characters that are not just placeholders but have motivations and backstories that align with the scenario.

Prompt for Creating Profiles

“Act as a legal character developer specialized in educational simulations. Based on the corporate embezzlement scenario previously outlined, create detailed profiles for the key actors involved. These should include their professional background, motivations for their actions, and the legal rationale behind those motivations.”

Step 3: Combining All Elements into a Comprehensive Exercise

Finally, we’ll integrate the scenario and the character profiles into a comprehensive exercise suitable for class use. The exercise could be structured in a way that students can role-play the characters, confront the legal issues, and navigate the case through its different phases.

Prompt for Creating Comprehensive Exercise

“Act as an instructional designer specializing in experiential learning in legal education. Using the corporate embezzlement scenario and the profiles of the key actors, design a comprehensive and realistic exercise for a law school class. Include role-playing guidelines, key decision points, possible outcomes, and debriefing questions.”

Further Development

  • Rather than leave it up to chance, for each of the steps you could provide the relevant details in bullet point form. Remember being specific and clear about your requirements is always a good thing.
  • You may want to break some of these prompts into individual components. This is especially true for step 3. For example, rather than asking for everything all at once which may result in less than detailed examples you could ask for each of the deliverables one at a time. This also gives you a chance to ask for specific branching scenarios that may occur at each step along the way in the exercise.
  • Don’t be afraid to have a back and forth at various stages of development. Being able to push back and offer areas for improvement will only benefit the final outcome
Example 11-13: Preparing for Legal Interviews

Specificity is crucial when it comes to preparing for interviews, particularly in the legal field. Providing details such as the names of key partners, recent cases, or specialties within the firm can make your interactions more targeted and meaningful. The benefits of doing so include:

  • Demonstrating Preparedness: Mentioning specific information shows you’ve done your homework, which is often a key indicator of how seriously you take the opportunity.
  • Enhancing Relevance: Tailoring your questions or answers to the firm’s actual work makes your engagement far more relevant and meaningful.
  • Facilitating Deeper Conversations: When you mention specifics, you open the door to more in-depth discussions, which can provide richer insights and help you stand out.
  • Building Rapport: Showing that you’ve invested time to understand the firm can help you connect on a deeper level with the interviewers, which is essential for building rapport.

Now let’s look at three prompts that leave room for you to insert the specific information you’ve researched.

Crafting an Elevator Pitch

Prompt

“Act as a career coach specializing in law. Help me craft an elevator pitch that I can use for OCI. I’m particularly interested in [Insert Specialization, e.g., corporate law] and have experience in [Insert Relevant Experience, e.g., internships, moot court].”

Note for User

  • Insert your specialization and any relevant experiences you have. This will help tailor the elevator pitch to your background and interests.

Tips for Success

  • Research: Know your own resume inside out and be prepared to discuss any aspect of it.
  • Tailor: Personalize the pitch to highlight what makes you an ideal candidate for the specific roles or firms you’re targeting.
Asking Firms Meaningful Questions

Prompt

“Act as a legal recruitment advisor. Generate a list of questions that I could ask potential employers during my interview to gauge if they are a good fit for me. I’m interested in [Insert Areas of Law You’re Interested In] and am keen to know about their [Insert Specifics like Work Culture, Pro Bono Opportunities].”

Note for User

  • Before using this prompt, identify the areas of law you’re interested in and specific aspects of the firm’s culture or work that you want to explore. Insert this information where indicated.

Tips for Success

  • Preparation: Research the firms you’re interested in beforehand and identify key areas you want to know more about.
  • Purpose: Always have a reason behind the questions you’re asking; whether it’s work culture or professional growth, know what you’re looking to get out of the answer.
Interactive Interview Preparation

Initial Setup

“You are an interview coach specializing in the STAR (Situation, Task, Action, Result) method. You’re here to help law students prepare for upcoming interviews. Start by asking the student to describe a raw experience that showcases their problem-solving skills. Once they respond, guide them in transforming that experience into a well-crafted STAR response.”

Context and Guidelines

  1. Role: Interview coach specialized in STAR method
  2. Task: Assist law students in crafting a STAR-based response around problem-solving
  3. Rules:
    • Ask for a raw experience from the user.
    • Wait for the user’s input.
    • Guide the user in adapting their experience to the STAR format.
  4. Tone: Professional but approachable, as the goal is to encourage open sharing and refinement of experiences.

User Participation

  • You will be prompted to describe a raw experience that demonstrates their problem-solving skills.
  • Once provided, the AI will help you adapt that experience into a STAR-based answer, offering tips for each component (Situation, Task, Action, Result).
  • You can change the type of question to practice other interview style questions you may encounter
Example 14: Brainstorming Outreach and Visibility Strategies for Clinical Programs

Basic Prompt

“Help me think of ways to improve the visibility of my legal clinic.”

Improved Prompt

“Act as a marketing strategist with a specialization in higher education and legal programs. Brainstorm a comprehensive plan to improve the outreach and visibility of my clinical program, [Insert Program Name], which focuses on [Insert Area of Focus]. Consider the following key elements: target audience, communication channels, partnerships, and events.”

Placeholders to Replace

  • Program Name: Replace with the specific name of the clinical program you’re looking to promote.
  • Area of Focus: Replace with the particular legal or educational area your program specializes in (e.g., criminal defense, family law, etc.).

Guidelines for Engagement

  • Role: Marketing strategist specialized in higher education and legal programs
  • Task: Brainstorming a comprehensive outreach and visibility plan
  • Context: The specific clinical program and its area of focus
  • Rules: Consider key elements like target audience, communication channels, partnerships, and events
  • Tone: Professional, aiming for a detailed and actionable plan
Example 15: Identify Educational Initiatives for Legal Literacy

Basic Prompt

“Suggest ways to improve legal literacy.”

Improved Prompt

“Act as an educational strategist with domain expertise in legal literacy. Propose a series of initiatives that law schools and other legal institutions could implement to bridge the gap in legal literacy among the general public.”

Overview of Prompt Elements

  • Role: Educational strategist specialized in legal literacy
  • Task: Propose initiatives for improving legal literacy
  • Context: The general public’s gap in legal literacy and its implications for access to justice
  • Tone: Educational and encouraging

Further Development

  • Implementation Steps: In addition to the initiatives, include a brief outline of steps for implementation, thereby offering a roadmap for actionable change.