Prompt Engineering
A practical guide to designing, structuring, and optimising prompts that generate high-quality regulatory content in your firm’s writing style.
1. Designing Reliable, Reusable Prompts
A modular approach to prompt design improves instruction-following and lets you reuse common elements across your workspaces.
Recommended prompt elements:
Instruction (role, task, audience, objective)
Sometimes
Style Guide
Yes
Output Structure
Sometimes
Context Delimiter
Yes
Before deploying a prompt, check that you have removed any contradictory or vague instructions. See Section 5 for prompt optimisation tools.
1.1 Instruction
Begin the prompt by describing the AI model’s role, task, audience, and objective.
Your task is to summarise the regulatory updates from the context below. The summary should contain any key details a general counsel of a business would need to know.1.2 Format the Prompt with Tags
Separate the Style Guide from the Output Structure with clear tags and instruct the AI model to follow both.
In writing the summary, it is of utmost importance that you follow a strict format. You must follow both the Style Guide and Output Structure exactly.
<STYLE_GUIDE>
[Insert your firm's writing style requirements here]
</STYLE_GUIDE>
<OUTPUT_STRUCTURE>
[Insert response structure for your use case here]
</OUTPUT_STRUCTURE>1.3 Style Guide
The Style Guide is boilerplate that can be reused across prompts. The purpose of it is to describe the writing style requirements of your firm. Example you can adapt:
1.4 Output Structure
The Output Structure instructs the AI model on how to produce the response for your use case. If prescriptive text formatting is required, it helps to describe the requirements step-by-step using a numbered list. Example you can adapt:
1.5 Context Delimiter
Graceview appends the original source text to your prompt. Please end your prompt with a clear delimiter:
2. Markdown Formatting in Graceview
2.1 Graceview Editor
The Graceview editor uses markdown to interpret text formatting received from AI models. To generate content with specific formatting requirements, instruct the AI model to use markdown where needed and include the exact markdown symbols in your prompt.
For example, if you would like to generate a Heading 1 level title, include this in your prompt:
Titles, Lists, and Block Quotes
Please note that a space is required after the markdown symbols for titles, lists and block quotes.
Correct Heading 1:
`# `Incorrect Heading 1:
`#`
2.2 Markdown Reference
Heading 1
#
# SEC Announces Agenda and Panelists for Roundtable on Trade-Through Prohibitions
Heading 2
##
## Background Facts
Heading 3
###
### Agenda Highlights
Bold
**
**7 May 2025**
Italics
*
*proposed rule*
Underline
_
_Key Dates_
Strikethrough
~~
~~Retired 2014 guidance~~
Block Quote
>
> Panelists will address market transparency and investor outcomes
Bullet List
*
* Panel topics include market data and order routing
Numbered List
1.
1. Review release
Hyperlink
[Label](link)
[Press Release](https://www.sec.gov/newsroom/press-releases/2025-109-sec-announces-agenda-panelists-roundtable-trade-through-prohibitions)
2.3 Colour Styling
If you require colour, instruct the AI model to emit inline CSS by inserting the following into your prompt:
If, for example, you wanted to have a specific green paragraph of text, you might prompt the AI model like this:
Or, if you wanted all titles to be red, you might add the following into your prompt:
Graceview Colour Codes
Black
No colour
Grey
rgb(113, 113, 122);
Orange
rgb(229, 129, 12);
Yellow
rgb(229, 187, 12);
Green
rgb(0, 169, 71);
Blue
rgb(42, 89, 243);
Purple
rgb(118, 61, 255);
Red
rgb(221, 30, 55);
3. Prompt Variables
You may specify variables to allow tweaks to be made by users from within the Graceview editor. You can do this by surrounding a variable name with braces: {VariableName}. Ensure you have set up the variable name in the prompt editor with labels for each preset value.
Example Variable: Length
This is an example of a variable to set the length of the summary. This would allow users to select between a Short, Medium and Long sized summary when generating a response.
Length
Short
50 words
Medium
100 words
Long
200 words
Usage Within Prompt
4. Example Prompt
Below is an example prompt putting all of the above concepts into practice.
5. Useful Resources
Both Anthropic and OpenAI provide easy-to-use prompt optimisers, as part of each model provider's prompt builder. Each optimiser requires sign-in to access, however Anthropic's optimiser also requires purchasing credits prior to use.
These optimisers are particularly useful for rooting out any contradictory statements which are present in your prompt. Contradictions greatly decrease the quality of content output.
OpenAI's Prompt Optimizer.
Anthropic's Prompt Improver.
Last updated

