Skip to main content

ChatGPT and other artificial intelligence tools are familiar to many. But how many of us from

really know how to use them? Using ChatGPT effectively is like having a superpower – one well-worded prompt can create content that would normally take hours to produce. The only problem is that you need to understand how to write your requests properly and efficiently. That’s what we will discuss.

Superman on the computer

IoT query design

There are a number of techniques and tricks to help you get more interesting and useful answers. A set of these techniques is called “query engineering”. It is a process that uses different techniques to help language models better understand queries so that the answers are as accurate, complete and relevant as possible. Below we look at research-based query structure.

Role

Role assignment is a method of assigning a specific role or character to a language model to embody. This method helps the model to empathise with the role and therefore perform better in future tasks.

Choose a role that fits the task at hand, e.g. a business strategist who solves business problems. Use additional context to show how well the AI performs its role.

Task

The task part specifies a clear goal you want the model to achieve. A specific description helps the model to understand the objective and to provide appropriate responses.

Start with a verb (e.g. create, write, analyse) when formulating the task. Be precise and keep your writing short. If necessary, include various clarifications to suit yourself.

Here you can use the chain of ideas principle, i.e. for complex tasks you can ask the model to think step by step. In this way, instead of a single answer, the model will break the task down into smaller, more manageable steps. This AI thinking principle mimics the human thinking process, processing each part in turn and thus reducing the chance of errors.

Restrictions

The constraints allow you to detail the most important instructions on how to perform the above task. Keep the instructions short and clear, without unnecessary details.

To make the query even better, each message should have an introduction, a body and

the end, with an informal tone. Use data and statistics to support your ideas. Also, include an interesting, interactive example in each post to keep things interesting.

The constraints also allow for the use of emotional prompting. This requires adding short phrases or sentences with emotional words to the original query to

strengthen the effectiveness of the model. For example, “This is very important for my business.” Simple phrases like these will encourage DI to think more carefully.

Context

Provide context on the environment in which the model operates and why this task is important. The context also integrates the previous techniques by clearly stating what the IoT is, what it does and why. Emotional prompts can also be used to explain the importance of the role of the IoT for business success and the impact it has on society.

Describe the business, its customers, services or products and values. Explain the system, for example how emails are processed and received. Emphasise the importance of the task to the business and its impact on society.

Examples

Please provide examples to improve the tone, format and length of your reply. The use of the query method helps the model to perform the tasks without guessing, but following good examples. With examples, show the tone, format and type of answer you want.

Notes

The comments section is the last opportunity to remind the language model of the most important aspects of the task and to add any final details that will help to adapt the answer to the desired style.

Comments may include:

  • Instructions on the format of the answer, for example “the answer must be in tabular format.”
  • Commands such as “Don’t do X.”
  • Tone guidelines.
  • A reminder of key tasks.

This list of comments usually starts with a small number of items, but grows after several rounds of testing and refinement. It is a place to add details without changing the whole request.

After a long query, language models (no matter how clever) tend to forget some of the important information, so annotations can be used to remind you of the most important requirements that should be fulfilled.

Formatting the reply

Once we have figured out and described all the components of the query, the prompt can be long, confusing and messy. For this reason, it is important to structure the query properly to ensure clarity. This is where the syntax of plain text formatting comes in handy:

  • Headings (#, ## or ### for H1, H2 and H3),
  • Bold, italics and underlining,
  • Lists,
  • Horizontal lines.

ChatGPT sample request

  • Role: Act as a personal productivity coach.
  • Challenge: Create a daily routine to increase my efficiency while maintaining a balance in my life.
  • Constraints: I work from 8 to 5, so I need time for breaks, exercise and family time.
  • Context: I often find it difficult to concentrate and focus on priority tasks.
  • Examples: 9:00-12:00 – deep work, 12:00-13:00 – break, 13:00-15:00 – meetings, 15:00-17:00 – work, 17:00 – exercise, 18:00 – leisure.
  • Notes: make sure your routine is flexible and can adapt to unforeseen tasks or events.
An example of a daily routine

Find out more about creating effective queries in the Introduction to Artificial Intelligence training.