← Back to AI Legal Lab
Insight
Generative AI for Legal WorkContract ReviewLegal Outsourcing

How to Write a Good Prompt: Role, Context and Output Format

Hello, I'm Noriaki Asato, Representative Attorney at LegalAgent.

Even when people understand that instructions matter when using generative AI, they may be unsure how to write them to obtain the intended response. If instructions for reviewing contracts are written from scratch each time, the quality can vary: a useful response one day and an irrelevant response the next. A practical way to keep the conditions of a request consistent is to build instructions around three standard elements: role, context and output format.

A three-part framework for more consistent responses

When instructions do not adequately specify the assessment criteria or desired format, the response is more likely to diverge from the request. AI generates responses by filling in context, so differences in the level of detail provided for each request can also affect the results.

The three elements are a role that defines the perspective of the respondent, context that explains the background and the company's position, and an output format that specifies how the response should be presented. Giving the same conditions even when a different person handles the task makes it easier to compare responses and identify omissions. Results still vary with the model and input materials; consistent instructions alone do not guarantee accuracy.

OpenAI's official guide also identifies clear instructions, sufficient background information and refining instructions in light of the response as useful practices.

Practical considerations when defining role, context and format

First, specify the perspective from which the AI should respond. Adding a short instruction such as "Respond as an assistant with extensive experience in corporate legal matters" can help set an appropriate tone for business use. When drafting material for colleagues without specialist knowledge, an instruction such as "Explain this in plain language, avoiding technical terms" can also be useful.

Second, provide context about the company's position and the purpose of the task. For contract reviews, state the parties' relationship specifically. Even for a single damages clause, a customer may focus on whether the liability cap is too low, while a service provider may be concerned about excessive liability or the removal of a cap. Without specifying whether the company is the disclosing or receiving party under an NDA, or the buyer or seller under a sales agreement, the response may take the opposite perspective from the company's own.

Third, specify a format that will be easy to use in the next stage of work. Without a format instruction, the AI may produce a lengthy explanation from which the key points must then be extracted. Instructions such as "List five points in order of importance, using bullets of no more than two lines each" or "Present this in a table" make it easier to transfer the output into an internal memo after verifying its content.

Example prompts for different types of contracts

Preparing a basic structure that combines the three elements makes it easier to produce drafts using consistent review conditions, adapted to the contract and the company's position.

Respond as an assistant with extensive experience in corporate legal matters. (Role)

Our company is the service provider, and this is an internal risk assessment memo.
Explain technical terms in parentheses. (Context)

For the following contract, list five points requiring attention in order of
importance, using bullets. Keep each point to no more than two lines. (Output format)

[Insert only the contract text that the company permits you to provide.]

When applying this structure to an NDA review for the receiving party, specify a table as follows.

Respond as an assistant with extensive experience in corporate legal matters. (Role)

Our company is the party receiving confidential information.
This is a memo for internal review. Briefly explain technical terms. (Context)

For the following NDA, identify five clauses that may place a heavy burden
on the receiving party, in order of importance, and present them in a table.
Use the columns "Clause", "Concern" and "Points to check or negotiate". (Output format)

[Insert only the NDA text that the company permits you to provide.]

The same approach can be adapted to reviewing SaaS terms or individual agreements by changing the contractual position and the table columns.

Refining responses through follow-up questions

The initial prompt does not need to produce a finished document in one attempt. A practical approach is to start with a broad response and use further conversation to supply missing elements. For example, if the initial response on a damages clause is too general, narrow the focus in a follow-up message.

(After the first response)
Of the points you just raised, focus on the liability cap.
From the service provider's perspective, suggest three alternatives
that could be proposed if the cap is excessive.
For each, explain why the customer might find it acceptable.

Moving from an overall picture to a specific examination of the clauses of concern makes the issues to verify more concrete without making the initial instructions excessively complex.

Pitfalls and safeguards when managing templates

Include a field in the template for the company's position. Even with a role and format specified, omitting that position leaves the perspective of the analysis unclear. Excessively detailed restrictions on bullet counts or line lengths can also make a response cramped and difficult to read, so keep format requirements proportionate.

Consider the following in day-to-day use.

  • Internal confirmation of the service to use and the information permitted as input
  • A context field specifying whether the company is the customer or the service provider
  • Follow-up questions after verifying the initial response
  • Verification by the responsible person of the response's legal accuracy and appropriateness

Replacing a counterparty's name with a symbol may still leave it identifiable from transaction terms or surrounding information. Before entering information, check the service terms, contractual confidentiality obligations and internal rules, and use only services and information that the company has approved. Where an amount is needed to assess a liability cap, a ratio or its relationship to the contract price may be useful, within the scope of permitted input.

Building an internal playbook and supporting adoption

Sharing prompt structures suited to the company and accumulating them in a playbook can help make work more consistent across legal team members. LegalAgent supports the design of templates suited to the work and their adoption in day-to-day practice.

Related articles

Articles connected to this topic.

Insight / 2026.11.10 What Is a Prompt? The Basics of Giving Instructions to Generative AI Insight / 2026.11.09 Is a Free Plan Enough? Understanding Training Opt-Outs for Business Use of Generative AI Insight / 2026.11.08 What Generative AI Can and Cannot Do in Legal Work

Services connected to this topic

Legal outsourcing Ongoing legal team support for contract review and legal operations. Generative AI legal consulting Terms, privacy, copyright, AI governance, and internal AI use rules.
View AI Legal Lab articles