Prompt Engineering For Lawyers
Prompt Engineering For Lawyers
Lawyers
Leveraging generative AI in the legal profession
1
Generative AI and the Law
Generative AI has great potential as a copilot to enhance lawyers’ efficacy and efficiency,
thereby enabling lawyers to focus their attention on more complex and higher value legal
work. Generative AI tools are only as effective as the input they receive. This Guide aims
to share good practices for prompt engineering, helping lawyers achieve better results
when using this technology.
Examples of use cases for lawyers using
Early applications of AI in the legal profession centred appropriate AI tools:
around data analytics, making predictions based on
data or searching large volumes of information. AI Legal drafting: creating first drafts of contracts, legal
technology automating tasks such as discovery, due advice and court pleadings.
diligence and contract management has become
widespread but, until now, many AI tools have seen Legal research: researching and summarizing
rudimentary use in the legal profession. information drawn from various sources and
extracting trends and insights.
Generative AI offers an unprecedented opportunity to
advance innovation in the legal profession. By Legal analysis: evaluating contracts to assess risks
automating routine work, generative AI allows lawyers and compliance. Document intelligence tools are
to focus on higher-value work – from offering strategic gaining popularity as AI becomes a standard part of
guidance to building trusted client relationships – due diligence exercises.
where critical thinking, commercial acumen, and a Summarisation: generating synopses, summaries
holistic understanding of the client’s needs come into and fact sheets for large swathes of data.
play. Microsoft lawyers demonstrated that generative
Negotiation support: generating standardised
AI tools made them 32% quicker on tasks and 20%
responses and providing negotiation and compete
better on accuracy1.
intelligence.
Generative AI capabilities are becoming readily
Knowledge management: retrieving information
accessible. For example, legal research and contract
and generating insights from knowledge databases.
drafting tools are incorporating generative AI; and the
Singapore courts are starting with assisting litigants-in- Communications: preparing first drafts of client and
person at the Small Claims Tribunal2. The Singapore other communications in a customised voice.
Academy of Law is also augmenting its research
Meetings: scheduling of meetings, translation
databases with the technology.
features for more inclusive meetings, transcribing
Some lawyers have access to generative AI solutions and summarising meetings and extracting insights.
designed for legal tasks, such as legal research, contract
Practice management: generating insights into
analysis and document review, while most can access
performance metrics and financial optimisation.
general purpose generative AI tools.
Billing: automating billing processes, estimating
• showcase
This guidecapabilities
providesandfundamental
achievements. prompt
time to complete tasks based on past instances.
engineering techniques that are helpful across
various chat-based generative AI tools. Marketing: creating marketing content for firms and
teams to showcase capabilities and achievements.
1
Microsoft, Beyond Anecdotal Success: Copilot Delivers Value for Microsoft’s CELA 2
Channel NewsAsia, Generative AI being tested for use in Singapore Courts,
Organization (23 May 2024) starting with small claims tribunal (27 September 2023)
2
Prompt Engineering Guide
Knowing the basics of prompt engineering – the practice of formulating instructions to
achieve specific outcomes from a generative AI tool – will enable lawyers to generate
more accurate and pertinent results. This Guide provides concepts and guidance that
lawyers can apply to most prompt-based generative AI tools.
Basic Concepts
With prompt-based generative AI models, the user interacts with the model by entering a text prompt, to which the
model responds with a text completion or output. While these AI models are powerful, their behaviour is very
sensitive to the prompt. This makes prompt engineering an important skill to develop.
In practice, the prompts guide the AI model to complete the desired task. It is more of an art than a science, often
requiring experience and intuition to craft a successful prompt. The goal of this section is to help get you started
with this learning process. It attempts to capture general concepts and patterns that apply, although each model
may behave differently.
What do you want from Why do you need it and How should the AI What reference material
the AI system? who is involved? system best respond? should the system use?
3
Breaking It Down
Goal. We start with clear instructions to the generative AI model by laying out our goal. The sequence that
information appears in the prompt matters due to the way most AI models are built. Telling the model the task you
want it to do at the beginning of the prompt, before sharing additional contextual information or examples, can
help produce higher quality outputs. Provide clear objectives, whether for legal research, document drafting or case
analysis. Be as specific as you can and use action verbs such as “Draft”, or “Summarise” for better results. If your
goals are complex, break them down and prioritise them.
Context. Including the relevant background information, constraints around the instruction, and parties involved
helps the model better understand the overall contours of what it should aim to achieve. It is useful to include the
“Persona” of the individual drafting the prompt and the intended audience of the output. The user can also include
a few examples for the model to learn from and accordingly emulate – this is an approach called few-shot learning,
which results in an output that is more tailored towards the examples provided. Include all necessary background,
such as the legal issue being explored, jurisdiction, applicable laws, case details, key stakeholders or parties involved
and intended audience for the output.
Expectations. Setting expectations as to how the output should be framed will help create an appropriate voice or
format that suits your needs. This could include the level of depth, detail, tone of voice (e.g. friendly, authoritative
or firm), format (e.g. the output should be in the form of a bulleted list, a table, or a concise summary), and intent
of the output (e.g. inclusion in a memorandum, client brief or contract). You can also set an expectation for a word
limit or request for brevity (e.g. give me the answer in a single sentence without any explanation”), if required. Try
specifying that the output should be in accordance with Singapore law and see if the result is different. For more
complex tasks, including the phrase “think through this step-by-step” can improve the output from the model. If
there is a particular thinking process you would like to guide the model with, this is where you can break down the
step-by-step thinking process. This is also known as Chain-of-Thought prompting.
4
Source. Lawyers using general-purpose prompt-based generative AI tools are strongly encouraged to include a
reference source, which could either be an internal document or external website for better results. You may include
relevant sources (e.g. specific clauses or paragraphs) as part of your prompt. Some generative AI tools allow
uploading of documents, references to folders or external webpages via URLs. When including reference materials,
the more precise you are, the better. You should explicitly filter content and include specific paragraphs, clauses or
sections instead of uploading the entire document or referencing an entire folder or website. This narrows the focus
of the model, which typically relies on its broad-based training data. This would allow the model to provide more
targeted output suited to your needs. When analysing and summarising multiple documents, consider requesting
that references to sources be provided in the output. NB. Always ensure that the data being shared with the
language model complies with your organisation’s data privacy and security policies.
Be Creative
There are various ways in which properly crafted prompts can be a boon to productivity and boost your creativity
as a lawyer. You should master prompt engineering and use generative AI responsibly. Here are some ways in
which generative AI can help with your work.
5
Good Practices for Lawyers
Generative AI can greatly enhance your efficiency as a lawyer. However, its use must align
with your professional and ethical responsibilities.
Professionalism. You are responsible for your work product, even when you are using generative AI. Generative AI
will not be fully accurate. Remember what you learned in the first year of law school: do not rely on an authority
that you have not read. Review and verify generated output before incorporating them into your work product.
Copilot, not autopilot. Generative AI works best when you provide substantive content and context. A lawyer’s
craft is in advocacy and drafting, and you should not be overly reliant on generative AI. It is helpful for fluency and
generating permutations but should not be a substitute for developing subject matter expertise.
Disclosure. There may be situations where your firm’s policy, codes of professional conduct or practice directions
require disclosure of the use of generative AI to clients or the courts.
Confidentiality. Be aware of the terms of the generative AI service that you are using to prevent inadvertent
disclosure of client information or personal data. Free-to-use generative AI services may use prompt content for
continuous learning, content moderation or other purposes. On the other hand, generative AI services tailored for
enterprises are likely to have robust confidentiality and personal data protection safeguards. Understand these
terms and conditions well and anonymise your prompts accordingly.
DO DON’T
✓ Use generative AI to generate comparisons, Ask the generative AI system to do too
summaries, key issues and brainstorm ideas many things at one go.
based on trusted sources.
Expect perfect output on a single try.
✓ Start a new chat for each task and provide
Assume that all output would be fully
clear context for prompts.
accurate and fit for purpose.
✓ Submit related prompts in a chain and run a
Use output as work product without
prompt repeatedly to verify results.
verification.
✓ Experiment and iterate to get the results
you need.
6
Legal Use Cases
The following use cases show how prompts can aid different aspects of a lawyer’s work.
Use these examples to inspire your learning journey. Adapt and experiment to achieve
optimal results. When you identify prompts that suit your needs, be sure to save them.
Adopt the good practice of providing the goal, context, expectations and source to the generative AI system. In
some examples, you may be providing sample documents to the generative AI service. Please ensure that the service
you are using has adequate confidentiality and data protection safeguards before doing so. You should also
minimise information in the samples that you are providing to only relevant paragraphs, clauses or sections. It is
also advisable to redact client information from the samples that you are providing.
Quick Tip: Many prompts for your legal use will require reference to documents either pasted into the prompt
window or attached via functionality provided by the language model. In the case of Copilot, this is done by clicking
the paperclip icon within the prompt window, as shown below.
Prompt: Please detail how an employee who is under the following ESOP [insert ESOP document] will receive equity
benefits over a 5-year period. Assume that the employee has already been with the company for 5 years and is
classified as a senior management staff. Provide output in formal legal language. Cite specific sections of the ESOP
that apply.
Prompt: Draft an IP indemnity clause in favour of the licensor. I am a lawyer acting for a licensor in a negotiation
on a software IP licensing agreement. Ensure that the clauses are in formal legal language using the active voice
and concise. Base your drafts on these samples: [sample 1] and [sample 2].
Prompt: Draft a clause that outlines representations and warranties for a software IP licensing agreement. I am a
lawyer acting for the licensor. The clause should strongly favour the licensor, ensuring that the licensor's ownership
of the IP is clearly affirmed, there are no existing infringement claims, and the software meets defined standards.
The language must be formal and legally robust, appropriate for inclusion in a legal contract. Based on the clause
in [sample A] and [sample B], ensuring that the licensor's interests are thoroughly protected.
7
Prompt: I am an in-house lawyer, and I am trying to create a playbook for reviewing commercial agreements with
customers. The main concerns I have are legal, but I want to ensure that any obligations or rights necessary under
the terms of the agreement are maximised for the company. I have reviewed the attached agreements. Please
identify the topics that I have reviewed and the comments that I have made and use them to create a list of areas
to look out for and the positions that we should adopt. Organise this list according to topics. This will be included
in the playbook. In addition to these issues, please also list other areas that should be included in the playbook. It
would also be helpful to delineate what is or is not considered a commercial issue, e.g. pricing, payment periods
and invoicing considerations, and to create specific headers for the same.
Dispute Resolution
Manage a dispute resolution process effectively.
Prompt: Analyse the plaintiff's affidavit against the statement of claim to identify areas of inconsistencies. I am a
lawyer acting for the defendant in suit. The analysis should be presented in a table format, with each row describing
a specific inconsistency, referencing the relevant sections or paragraphs in both documents. The table should be
clear, precise and professional, suitable for legal strategy discussions. Use the attached affidavit and statement of
claim, ensuring that all relevant sections are thoroughly cross-referenced.
Prompt: Analyse the plaintiff's affidavit against the statement of claim in a civil dispute case to identify
inconsistencies and discrepancies. We need a comprehensive comparison of the two documents to highlight any
contradictions, omissions, or areas where the affidavit provides additional information that is not present in the
statement of claim. This analysis will help us challenge the plaintiff's credibility and strengthen our client's position.
Present your findings in a clear, well-structured table format with the following columns:
• Item Number
• Statement of Claim Reference (paragraph/section)
• Affidavit Reference (paragraph/section)
• Description of Inconsistency/Discrepancy
• Potential Impact on Case
Prioritise significant inconsistencies that could materially affect the case. Include both factual discrepancies and
differences in the characterisation of events or intentions. Be objective in your analysis, focusing on factual
comparisons rather than making legal arguments. If you encounter any ambiguities or areas where additional
context might be needed, please indicate this in your analysis.
For this analysis, use only the two documents provided [insert reference files], and do not reference any external
sources or make assumptions beyond the contents of these two documents:
• The plaintiff's statement of claim
• The plaintiff's affidavit
Prompt: Analyse the affidavit of the witness and the transcript of his oral testimony during the trial to identify
inconsistencies and discrepancies. I am preparing written submission after trial. The inconsistencies and
discrepancies will be used to attack the witness’s credibility. Think through this step-by-step, focusing on
inconsistencies that could materially affect his credibility. Include discrepancies in facts, timelines, event
interpretations, and characterisations of key interactions or documents.
8
Present your findings in a clear, well-structured table format with the following columns:
• Item Number
• Affidavit (Para/Section)
• Transcript (Page/Line Number)
• Description of inconsistency
• Impact on Credibility
Use only the following documents that we will provide: the witness’ affidavit and extract of transcript. In the
transcript, the witness is labelled “DW3”. Do not reference any external sources or make assumptions beyond the
content of these documents.
Litigation Support
Provide assistance in preparing for litigation, including document review.
Prompt: Generate a list of documents that I have to provide to the defendant for a case. I represent the plaintiff in
this case. Emails from clients need to be included in this list. Create a list of emails from the email archive [insert
reference file]. Produce the list in the format of a table with the following columns:
• Item number
• Date of email
• Name of sender
• Short summary of the email subject heading
• Reference link to the source email
Restrict your reference to the attached email archive and do not include any emails outside this set of files.
Prompt: Construct a chronology of events to help me with my investigation of a case. I am conducting an internal
investigation after my company discovered that a former employee has been stealing company’s confidential
information. I am the in-house counsel. Generate a chronology of communications between the former employee
and all external parties relating to Project X from the email archives of the former employee provided [insert
reference]. Set out the chronology in a table, organised according to:
• Date of email
• Email recipient
• Short summary of the email content in no more than 20 words
• Whether the email contains any attachments that are larger than 100 KB
• Reference link to the source email
Restrict your reference to the attached email archive and do not include any emails outside this set of files.
Prompt: Analyse the attached contract in the context of the acquisition deal to identify any red flags or unfavourable
contract terms that could impact the value or viability of the transaction. I am a corporate lawyer who specialises in
mergers and acquisitions. I am representing the acquirer. Focus on issues such as liabilities, indemnities, restrictive
covenants, change of control provisions, intellectual property rights, and other clauses that might be unfavourable
to my client. Produce a table that lists the issues, a summary of the relevant clauses, references to relevant actual
9
clauses, the implications for my client, and proposed remediations. Restrict your analysis to the contract attached
and do not analyse any reference material outside of this attachment.
Prompt: Analyse the provided third party IP licensing contracts in the context of the merger of two companies. I
am a corporate lawyer representing the merged entity. I want to identify IP licensed from third parties and analyse
the potential impact if these licences are terminated. Analyse the contracts provided and identify all relevant IP
licensing clauses and analyse the potential impact if these licences are terminated. Generate a table with information
organised according to:
• Name of third-party licensor
• Summary of the licensing clauses
• Permitted use and scope of licensed IP
• Whether licence is exclusive or non-exclusive
• Whether licence is perpetual or renewable
• Whether licence is revocable
• Whether licence is world-wide or if not, the regions or countries it covers
• Whether regular licence fees have to be paid
• Is there a right to sub-license
• Reference link to the source contract
Restrict your analysis to the contracts attached and do not include any analysis of contracts beyond the attached
set.
Regulatory Compliance
Obtain an explanation of how a scenario fits in with a policy or law.
Prompt: List out the Rules of Court of Singapore and Supreme Court Practice Directions that would apply to
personal service on a defendant. I am a lawyer acting for the plaintiff in a litigation in the Singapore High Court.
Generate the list in the formal legal language used in these courts. Use the SG Courts <https://epd2021-
supremecourt.judiciary.gov.sg/> and Singapore Statutes Online <https://sso.agc.gov.sg/SL/SCJA1969-S914-
2021?DocDate=20240610> websites as primary sources and provide detailed citations.
Prompt: Analyse the references provided to assess if we can stop collecting NRIC numbers of our customers. My
company provides massage and spa services in Singapore. Before starting the session, customers are asked to fill
up a questionnaire so that our therapists can provide more personalised treatment. I am the data protection officer
for the company, and I have been asked whether we can stop collecting NRIC numbers of customers. Ensuring
compliance with the Singapore Law, provide your assessment objectively with a clear justification. Analyse the
following:
• Personal Data Protection Act <https://sso.agc.gov.sg/Act/PDPA2012>
• Personal Data Protection Regulations <https://sso.agc.gov.sg/SL/PDPA2012-S63-2021?DocDate=20210930>
• Advisory Guidelines on Key Concepts <https://www.pdpc.gov.sg/-/media/files/pdpc/pdf-files/advisory-
guidelines/ag-on-key-concepts/advisory-guidelines-on-key-concepts-in-the-pdpa-17-may-2022.pdf>
• Selected Topics <https://www.pdpc.gov.sg/-/media/files/pdpc/pdf-files/advisory-guidelines/ag-on-selected-
topics/advisory-guidelines-on-the-pdpa-for-selected-topics-(revised-may-2024).pdf>
• NRIC Guidelines <https://www.pdpc.gov.sg/-/media/files/pdpc/pdf-files/advisory-guidelines/advisory-
guidelines-for-nric-numbers---310818.pdf>
10
Think through this step-by-step. Restrict the analysis to the references above and please cite applicable sections of
the legislative or regulatory provisions.
Prompt: Generate a list of obligations for an employer during a retrenchment exercise. My company is closing a
department. I am the in-house counsel, and I need a list of obligations that I can refer to. Produce a checklist that
includes references and arranged according to the areas that the Human Resource, Finance, Corporate
Communications and Legal departments must be briefed on.
Additionally, identify the conditions for proper termination and any additional considerations. Limit your analysis
to the Singapore Employment Act, Tripartite Guidelines on Fair Employment Practices, and Ministry of Manpower
guidelines and advisories.
Prompt: Summarise the key points from the attached meeting minutes [attach file] and draft a follow-up email to
the client, ensuring that it includes the following:
• Date, time and location of the meeting, with a list of persons in attendance
• A list of the topics discussed during the meeting
• Key decisions and actions, with a summary of the main points agreed upon
• A detailed action plan with responsibilities assigned to specific team members with deadlines for each action
item
Please use plain language and be concise. Restrict your summary to materials within the attached meeting minutes.
Prompt: Compose descriptions of the work I have done based on my emailed advice to Client A. Take reference
from the following categories of emails only:
• The emails I have sent to and received from all @clientA.com addresses from 1 January to 31 March 2024,
paying particular attention to emails where I have included attachments
• The emails I have sent to and received from all [team members working on file for Client A] and emails which
include [file reference number]
Do not include any emails outside these categories. Place the descriptions in a table with the following columns:
date; email; subject; client email address; and description of work done.
Prompt: Generate a consolidated bill narrative for the monthly client invoice, based on the time entries extracted
from the firm's billing system in [insert reference file]. Create a consolidated narrative that:
• Organises activities chronologically or by workstream or task category, whichever is more logical for this case
• Eliminates redundant descriptions by consolidating similar activities
• Attributes each activity to the correct fee earner(s)
• Provides sufficient detail to justify the time billed in a firm but polite tone
Follow the firm’s standard billing language and format in [insert reference file]. Include a summary at the beginning
that provides a description of each workstream or task category, and outlines the total hours billed by each fee
earner during the billing period. Match these against the attached document [attach email or file] where we had
previously set out our fee estimate to the client. Ensure your narrative is based on information found in [insert
reference file] only and do not include any activities or information not found in this file.
11
Copilot Prompt Examples
We have set out some sample prompts that can be used in Microsoft’s Copilot tools, which incorporates generative
AI capabilities into Microsoft apps that are commonly used by lawyers, such as Word, Outlook and Teams. These
demonstrate how prompts can be used to support day-to-day work for lawyers.
Microsoft Word
• Please analyse the following contracts [reference contracts in OneDrive] and extract all IP-related
clauses in the contracts into a table. Please create a column that comments on the nature of the
clauses and whether they are in favour of the licensor or licensee.
• Use [reference affidavits and other material in a OneDrive folder] as the primary source. Please
create a chronology of events, citing sources and the key witnesses involved in each event.
Microsoft Teams
• Please recap this meeting and create a table of the options discussed with pros and cons.
• Please convert the transcript of this meeting into a concise set of notes, identifying key action
items and who is responsible for each of them.
• Can you draft an email to [w] summarizing action items from the call, and that I’m looking forward
to following up on them during our discussion this Wednesday?
Microsoft PowerPoint
• I am a lawyer advising a client on the key issues in a potential dispute. Create a presentation based
on [insert reference file]. Please include separate slides for each key issue. Add one slide with a
summary of obligations for a designated critical information infrastructure under Singapore’s
Cybersecurity Act.
Microsoft Outlook
• Summarise this thread of emails and let me know if there are action items that I need to attend
to.
• I have been away on leave for 2 weeks. Please summarise all emails that require my attention,
prioritising [insert type of matters].
• Please write an email of no longer than 50 words in a formal tone to congratulate the team on the
deal closing.
Microsoft Edge
12
Glossary of Key Terms
• Artificial intelligence. Artificial intelligence or “AI” is a ‘a machine-based system that, for explicit or
implicit objectives, infers, from the input it receives, how to generate outputs such as predictions,
content, recommendations, or decisions that can influence physical or virtual environments. Different
AI systems vary in their levels of autonomy and adaptiveness after deployment’.3
• Context. Context is the information surrounding a prompt that helps the AI understand what is being
asked.
• Generative AI. Generative AI is a type of AI system that is trained on data and can generate novel
content, such as text, images, music, and code. These systems can learn and refine its outputs based
on training data.
• Model. A model is a program that has been trained to understand and generate text and other input.
It is akin to the brain of the AI system.
• Output. An output is the response given by the AI system after processing a prompt. It's the answer
you get after asking a question.
• Prompt. A prompt is a question or statement given to an AI system to get a response. It's asking a
question to get an answer.
• Training data. Training data is the information used to teach the AI model, similar to books and
lessons a person study.
• Token. A token is a piece of a word or a whole word that the AI uses to understand and generate text.
It's like a puzzle piece in a big picture.
3
Grobelnik, M., Perset, K., & Russell, S. (2024, March 6). What is AI? Can you make a clear distinction between AI and non-AI systems? OCED.AI. Retrieved September 2,
2024, from https://oecd.ai/en/wonk/definition
13
Acknowledgments
We would like to thank the following individuals, in alphabetical order, who provided valuable input for
the development of this guide:
14
© 2024 Microsoft Corporation and Singapore Academy of Law. All rights reserved.
Microsoft and Singapore Academy of Law make no warranties, express or implied in this publication. Information and views
expressed in this document, including URLs and other Internet website references, may change without notice. This
document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy
and use this document for your internal reference purposes.
15