Skip to Main Content

Generative AI for Legal Research

Writing a Good Prompt

The 5Ps is a method for developing prompts using five categories. The following explanation of the 5Ps includes examples applicable to legal research.
This method is recommended by Lexis in use of Lexis+ AI. See Lexis' Prompting Best Practices tip sheet.

Note: not all systems are responsive to all 5Ps. For example, some are designed for very specific outputs (e.g. case summaries) and will not respond well to instructions that ask for other types of products. Often the only way to discover what works best for prompting a specific genAI tool is to work with it repeatedly and often. 

Prepare the system for the task by providing context such as jurisdiction, facts, and a time frame.

Some genAI systems need more context than others. For instance, a general purpose system like ChatGPT will not automatically apply a sense of jurisdiction to a prompt, while a system trained specifically for legal use may require the user to pre-select a jurisdiction before prompting.

Examples:

You are researching employment law in Ontario...

The client was the victim of a hit and run last month... 

The transaction occurred in 2014…

Explain what role the system should take on as it addresses your question. This can include instructions regarding personality, tone, and style.

Examples:

You are opposing counsel in the matter...

From the perspective of the appellant... 

In a formal and firm tone...

Write a clear and specific sequence of instructions.

Examples:

Summarize the Supreme Court decision in R v Brown, 2022 SCC 18...

Provide citations to cases and relevant legislation on the topic of...

First, compare the relevant legislation in Alberta and Ontario on this topic, then…

Explain what type of written output you want the system to produce (e.g. length, format).

Examples:

...a 200 word summary...

...a list of the 5 biggest differences between...

...an email to the client…

After generating an initial response, refine your results by providing feedback (e.g. what additional information you need, where to shift the focus of the response, how to adjust the tone or perspective). 

Examples:

Your answer only provides case law on this topic. Is there any applicable legislation...

Add a comparison of...

Make the tone more formal…

Lederman Law Library. (2025). Creating prompts for legal genAI. Canadian legal research manual. Queen’s University. https://guides.library.queensu.ca/legal-research-manual/prompt-engineering-legal-research

Source:
Lederman Law Library. (2025). Creating prompts for legal genAI. Canadian legal research manual. Queen’s University. https://guides.library.queensu.ca/legal-research-manual/prompt-engineering-legal-research