Engineering Good Prompts using GenAI

Generative AI outputs are only as good as the prompts used to generate them. Creating effective prompts for generative AI involves understanding and clearly defining the role that you want the AI to play, the task you expect it to perform, the constraints it should respect, and the data it can utilise. Below is a short guide on creating good prompts using the Role, Goal, Constraints, Data (RGCD) approach. While this approach may be excessive for simple tasks, it can help generate improved responses for more significant requests.

1. Role - define the role of the AI. What do you expect the AI to be in the context of your prompt? Is it a creative assistant, a data analyst, an educator, or something else? Clearly defining the role helps in setting the right expectations and tailoring the prompt to elicit the best response from the AI.

2. Goal - specify the task you want the AI to accomplish. This involves detailing what you expect the AI to produce as a result of your prompt. It could be writing a poem, generating an image, summarising a document, etc. The task should be clearly defined so that the AI understands the goal and can provide a focused response.

3. Constraints - outline any constraints or guidelines the AI should follow. This could include limitations on length, style, tone, specific do's and don'ts, ethical considerations, or any other boundaries you want to set. Constraints help in narrowing down the scope and ensuring the output meets your requirements or limitations. For instance, you might specify that the language should be professional, the content must be suitable for all ages, or certain topics should be avoided.

4. Data (optional) - define the data context or the input information the AI has at its disposal to execute the task. This could include providing background information or supplying specific data points that should be considered or integrated into the output. The more relevant and precise the data you provide, the better the AI can tailor its response to your needs. For example, if you want the AI to write an article about renewable energy trends, providing the latest statistics or mentioning key regions of interest would be helpful.

As an example:

Act as a creative writer (Role), your task is to compose a compelling short story (Goal). The story should be set in a futuristic city, be no longer than 500 words, maintain a suspenseful tone, and avoid any explicit content (Constraints). Incorporate the folllowing elements: a protagonist who discovers a mysterious device, a secret society, and a dilemma involving a choice between personal gain and public good (Data).

 
Last modified: Wednesday, 11 February 2026, 5:02 PM