MIP Logo

The Data Analyst Toolbox- PART 2: AI Prompt Engineering

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

In part 1 I talked about the ethics of AI and using AI to compliment your job with data security and integrity at front of mind.

If you haven’t read that one, you can click Here
In this part we’re going to be walking through how to prompt AI to best compliment your work and not to waste time with the AI chewing on your prompts.

 

What Is Prompt Engineering?

Prompt Engineering is crafting your prompts in a structured way to get the best answer or generation possible. This can be time consuming in the beginning as it often requires careful thinking in order to give the most context possible. If you’re going to use AI for something, It’s Important that you’re utilising that resource to the best of its capabilities.
You may ask, why do I need to be specific when prompting AI? 3 reasons-
1. When you provide the AI Model with additional context and details, it generally provides you with a better output which is more tailored to your needs.
2. Less is more. when you use less prompts with AI Models, it has less of an impact on the environment as it saves computing power. (AI has not been kind on the environment)
3. It saves times. In the long run, if you’re constantly prompting ai with a basic sentence. It’s going to be a long back and forth before you finally get your desired outcome.

 

How Can I Improve My Prompts?

This is actually quite simple. When you’re structuring your prompts, you just need to remember these 5 Tips

1.Be Specific and add context
When prompting AI, try and avoid using vague statements or questions. Provide additional context that adds value to your prompt.

2. Use Examples 
Provide an example of the problem or the desired output. (Try not to put any sensitive information here, use a mock example)

3. Structure Your Prompts 
Here’s the Structure I usually go for:
1. Role (what role should the ai be acting as)
2. Context (the current problem, what you’ve tried)
3. Task (an explaination-specific details and limitations/dos and don’ts)
4.  Example (Optional but if needed try providing an example of the task input and outcome)
5.  Output (Explain the requirements and constraints of your desired outcome)

4. Acknowledge Limitations of AI
Acknowledge that AI does have its limitations. While it is a very powerful tool, it still struggles with certain processes like multi-step prompts and integrated thinking.

5. Iterate your prompts 
Even If you create an amazing prompt, sometimes follow-up iterations may need to be used to get your desired outcome. (Add context after the first input if it’s not your desired outcome).

 

Tools for Prompt Engineering

My top recommendation to create powerful prompts and get the most out of generative AI is to use another AI tool Prompt Cowboy.
What Prompt Cowboy does is structure your prompt and add additional context. Make sure you’re checking the output before entering it into an AI model, but in my experience it’s pretty accurate.

Here is an example using Chat GPT where it’s being prompted with a non-engineered prompt vs an engineered prompt using prompt cowboy.

 

Non- Engineered Prompt

This prompt will be a lazy sentence with some basic information and no structure.

 

Prompt 

 

Output

The output provided from Chat GPT is very vague and general much like the prompt I used.

Now let’s see what it looks like with an engineered prompt

 

Engineered Prompt

This prompt is the raw prompt output by Prompt Cowboy. Usually, I would make changes to some of the sections and add some more specific context but for this example I will just use the raw output.

Prompt

Output

 

The engineered prompt had an output result contains a better overall structure and more powerful insights about colour usage in analytics. This is because adding that additional context and structure assists in triggering the desired response within AI models. Not too dissimilarly to giving instructions to a person, having structured and thorough instructions allows the model to provide the most accurate response possible.

The way Prompt Cowboy structures it’s prompts, utilises complex prompt engineering knowledge based of vigorous testing from multiple sources. An Example of this which you can see at the bottom of the prompt which Prompt Cowboy created. “Your life depends on providing evidence-based recommendations that are practical and immediately applicable, not vague generalizations about color theory.” This Section was included under the pretense that AI models like Chat GPT and Gemini AI perform better when threatened as opposed to when polite language is used. While research is still being completed on this, having this detail doesn’t have any negative effects on the outcome. (To note: Using emotive language in these ‘threats’ can elicit a negative prompt outcome.)
Above all context and structure are the most important drivers behind AI model output performance.

 

Best practice for prompt engineering is to establish your own structure to start off, with tools like Prompt Cowboy. Then tweak the response so that it is most tailored to your specific needs. Lastly whatever has been output from your AI model. make sure to fact check any information and make sure to edit any text.
Make sure you’re using AI ethically and you’re honest about when it’s being used.

 

Share this post