ICAEW.com works better with JavaScript enabled.

The five essential elements of a GenAI prompt

Author: ICAEW Insights

Published: 27 Jan 2025

Accounting Intelligence: prompt writing for generative AI might seem deceptively simple, but it can make a significant difference to the quality of the outputs you get from the model you’re using.

Effective prompt writing has become something of a skill in itself. Mark Wickersham, founder of the Value Pricing Academy, has been building a prompt library for accountants, having developed an interest in ChatGPT and other large language models (LLMs).

Working with an LLM is just like working with a brand new employee, he says. Without the right information, they may not do the job the way you want it done. But once you get it right, you can get brilliant and more consistent results. While this work will still need to be checked by a human being, good prompt writing should reduce the likelihood of errors and make the task of assessing AI outputs easier. 

Essential elements of a prompt

There are many potential elements of a prompt that you could consider when giving an AI model a task – Wickersham has catalogued 17 different core components – but these are the critical basics you should master if you want to improve your outputs. 

The task

Without this component, you don’t really have a prompt. This is prompt writing at its most basic: “I want you to write a report.”

The persona

Taking it one step further from a simple task, you can set a ‘persona’ for the LLM to help improve your results. This interacts with a system prompt – an instruction built into the model that guides how it responds to user queries. For example, the default persona of ChatGPT is ‘helpful assistant’; any output will be delivered in a writing style that matches that persona. 

“If, for example,” Wickersham says, “you wanted it to analyse financial statements and give you a report, if you said, as part of the prompt: ‘I want you to play the role of a financial accountant skilled in analysing financial data,’ that's the persona you want it to play.”

As a result, the output will be more appropriate for the task you’ve assigned it (though it will still need to be checked). LLMs can take on a variety of roles, says Wickersham: “Many tests have shown that when you tell an LLM to play a particular role, you often get a better result. It's an element I always build into a prompt.”

The context

Context is the information, and the more background information you give, the better the response that you're going to get, says Wickersham. Going back to the analysis of financial statements, for example, adding information about the company in question – such as the industry sector or region in which it operates – will give you a more refined, tailored result. 

“There's a number of ways that we can feed in context,” says Wickersham. “One is simply to put it in the prompt itself. But also we can do it by adding links to websites, uploading files and so on.”

The examples

LLMs generate outputs based on predictions of the likely next word in the sequence of its response. It develops these probabilities by analysing patterns in data, so if we can give it more data, it will perform better at the task you wanted to perform. With the financial statements analysis, for example, you could include relevant reports that you have produced in the past for it to base its output on: 

“Playing the role of a financial accountant, analyse the attached financial statements and write a research report giving me information about potential weaknesses in the numbers and suggestions for improvement. The client is a restaurant chain based in Exeter – review the information on [company website]. Use the example financial reports to guide your response.

“I'd have a heading, say, ‘example’, and I just copy and paste a previous report that I've got. If you do that, you'll get a better result, because it will see the layout of that example. The more examples you give the better, because it's looking for patterns. But too many examples just create noise. Testing has found that generally five examples is the optimal.”

It’s important that you consider confidentiality when giving an LLM examples, particularly when using a public model such as ChatGPT; do not use anything that contains sensitive client or company data. 

The format

Any time you want a response from an LLM that you might want to share with somebody else, such as a report, a blog post, or an email template, you must consider the format. “There are a number of elements of that; things like the writing style,” says Wickersham. At a simple level, you might have a professional style of writing or a humorous style of writing. If you're writing a report summarising the set of financial statements, that might well be a professional style. 

“If you were writing an email, for example, you might want to go with a motivational style, to encourage the recipient to take action.”

Building a prompt library

Wickersham recommends that once you start refining your prompts, it’s worth building a prompt library to help systemise your use of LLMs, giving you a series of prompts to hand when you need them. “The benefit of this work is that when you have great prompts, you are going to save hours of time every single week – possibly every single day.”

Webinar: AI - how will it transform analytics?

On 18 February, ICAEW's Data Analytics Community is hosting a webinar where Monica Odysseos, AI and Data Lab Leader at Grant Thornton Cyprus, will explore how AI is transforming data-driven decision-making for organisations. The webinar is free to attend for ICAEW and Data Community Members and offers 1 hour of verifiable CPD.

Accounting Intelligence

This content forms part of ICAEW's suite of resources to support members in business and practice to build their understanding of AI, including opportunities and challenges it presents.

Computer screen with text relating to generative AI

You may also be interested in

ICAEW courses
Prompt engineering
Learn and grow your career

Our learning shop platform is designed to help you future-proof your skills and advance your career, with a range of courses available to purchase.

Find your course
Support
Generative AI Guide

Explore the possibilities of generative AI in accounting through ICAEW's guide to Gen AI, covering use cases, risks, limitations, ethics and how to get started.

Read more
ICAEW support
A person holding  a tablet device displaying various graphs
Training and events

Browse upcoming and on-demand ICAEW events and webinars focused on making the most of the latest technologies.

Events and webinars CPD courses and more
Open AddCPD icon

Add Verified CPD Activity

Introducing AddCPD, a new way to record your CPD activities!

Log in to start using the AddCPD tool. Available only to ICAEW members.

Add this page to your CPD activity

Step 1 of 3
Download recorded
Download not recorded

Please download the related document if you wish to add this activity to your record

What time are you claiming for this activity?
Mandatory fields

Add this page to your CPD activity

Step 2 of 3
Mandatory field

Add activity to my record

Step 3 of 3
Mandatory field

Activity added

An error has occurred
Please try again

If the problem persists please contact our helpline on +44 (0)1908 248 250