General Recommendations for Developing Prompts

Below are general recommendations that will help you interact with AI better and get the most accurate and useful answers out of it.

Start simple

Often the best approach to developing a prompt is to start with the simplest possible request and gradually make it more complex if needed. That initial simplicity lets you check how well the model understands your task and helps you fix possible mistakes quickly.

If you start simple, you get to see how the model reacts to basic commands and to work out what you need to change or add for a more accurate result. This matters especially at the beginning, when you are still getting to know what the model can do.

Example:

Write a short review of the book '1984' by George Orwell.

This is a simple request that you can complicate later by adding more detail, such as the writing style or the specific aspects you want emphasised.

Instruction

The instruction is the foundation of any prompt. It defines exactly what the model has to do. A well-formulated instruction should be clear, specific and unambiguous. That lets the model understand your task precisely and carry it out as effectively as possible.

When you give the model a clear and specific instruction, the odds of getting the result you want go up considerably. This matters especially when the task is complex or multi-step.

Example:

Put together a list of five key benefits of using neural networks in marketing, with a short explanation of each point.

An instruction like this states clearly what is required of the model and rules out any ambiguous reading of the task.

Specificity

Specificity is one of the most important factors in prompt writing. The more specific your request, the higher the chance the model gives an accurate and useful answer. Specificity helps you avoid the generic, vague replies that may fall short of your expectations.

To achieve a high level of specificity, define the context, the format and the length of the answer clearly. If you want a quality result, be as precise as possible in your requests.

Example:

Put together a detailed training plan for a beginner runner who wants to prepare for their first half marathon in 3 months. The plan should include 4 workouts per week, a gradual increase in distance, and nutrition recommendations. Specify exact distances for every training week and suggest 3 stretching exercises to do after a run.

A request like this helps the model focus on the right topic and delivers exactly the result you need.

Avoid imprecision

Imprecision in prompts can lead to incorrect or incomplete answers. Even small errors in wording can affect the result significantly. To avoid such situations, review your request carefully before you send it.

Pay attention to every word and phrase you use in a prompt. Avoid ambiguous wording and make sure every requirement and parameter you state is clearly spelled out.

Example:

Write a short essay on the impact of technology on education over the last 10 years, with an emphasis on online learning and its effect on the accessibility of education.

This is an example of a clearly formulated prompt that avoids imprecision and gives the model clear directions.

Do or don't?

Avoid negative wording in prompts

When developing prompts, focus on positive instructions that state exactly what has to be done instead of listing prohibitions. This approach helps you build more specific and purposeful requests, which in turn leads to better results from the model.

Look at an example of an ineffective prompt for a GPT-3.5 chatbot that recommends films:

Prompt:

Below is an agent recommending films to a customer. DO NOT ASK ABOUT INTERESTS. DO NOT REQUEST PERSONAL INFORMATION.

Customer: Please recommend a film based on my interests.

Agent: Of course, I can recommend a film based on your interests. What film genre do you prefer? Do you like action, comedy, romance or some other genre?

As you can see, despite the explicit instruction not to ask about interests, the agent does it anyway. That happens because negative instructions are often ignored or misinterpreted by AI models. It is worth noting, though, that the latest AI models, GPT-4 for example, can understand you even when you use negative constructions.

Look at an improved version of the prompt for GPT-3.5:

Prompt:

Below is an agent recommending films to a customer. The agent should recommend a film from the list of the most popular films in the world right now. It must refrain from asking about user preferences and avoid requesting personal information. If the agent has no film to recommend, it should answer: 'Sorry, I could not find a film to recommend today'.

Customer: Please recommend a film based on my interests.

Agent: Sorry, I have no information about your interests. However, here is a list of the most popular films in the world right now: [list of films]. I hope you find something interesting!

In this case the agent follows the instructions, does not request personal information and gives recommendations based on general trends.

Tips for improving prompts:

  • Use positive wording that states what to do rather than what not to do.

  • Be specific in your instructions.

  • Provide alternative actions for situations where the main task cannot be completed.

  • Test your prompts and analyse the results.

  • Improve your prompts iteratively based on the answers you get.

Try it in GPTunneL