Guidelines for writing instructions

Important points to adhere to when writing instructions:

  1. Conciseness and Simplicity.

  2. Accuracy and Completeness.

  3. Clarity.

Conciseness and Simplicity

On one hand, LLM models appreciate when tasks are described precisely, but on the other hand, it’s important to avoid excessive descriptions where they can be omitted.

For example:

Look at this client information, check if they have money, who in their 
team is responsible for purchases, whether they even need our solution, 
and when they can make a decision. Also, if you can, try to assess whether 
they like our product and what they think about our brand.

Another version of the same instruction:

Look at this client information, check if they have money, who in their 
team is responsible for purchases, whether they need our solution at all, 
and when they can make a decision. Also, if you can, try to assess whether 
they like our product and what they think about our brand.

Accuracy and Completeness

It’s important to describe precise formulations in the instruction. Any generalization will reduce the quality of responses. For instance, if you need to sequentially find out certain information from a client (Full Name, phone, passport details):

Request the client's Full Name, phone, passport data.

If you do not use a step-by-step construction, the bot will issue a list of questions in one message.

Another example, when you need the bot to greet the client:

Always greet the client.

If we leave the poor version, it may turn out that the bot will greet repeatedly with every response, as it understands your instruction literally.

Clarity

A common mistake is duplicating or contradicting the same instruction in different parts.

For example, you described how the cost is calculated, checked that everything works. But then suddenly after some time you added another piece of instruction that is not related in meaning to the first but contains some element about the cost.

An example of the situation is shown below:

#BIKE RENTAL COST CALCULATION:
- Check the availability of models in stock.
- To calculate the cost of requested models, 
call the cost_calculation function in the format: 
Model list (e.g., nmax, pcx, scoopy), number of days.

Because of this point, the bot will first start checking availability when requesting the cost, since the cost calculation point was duplicated and is located below:

Hence, it is important to avoid duplicating information and ambiguous formulations. The more precise, concise, and unequivocal the request is written, the more stable and predictable the model’s responses will be.

Using Affirmative Forms Instead of Negative

If you need the bot not to do or say something, it's better to avoid negative forms and find similar affirmative forms in meaning.

For example:

Do not tell the client information about our bank details.

Prompts

Below are prompts that will be useful in specific situations:

"Step by step, only after interlocutor’s response" – allows questions to be asked in turn, following the client’s response

"... if not already known from the dialogue context" – allows eliminating repetitive questions from the bot if the client has previously answered them in their inquiry or our dialogue

"Always" – allows increasing focus of the model, when it is important to consider some point

"If the client wrote …" – allows creating conditions for triggering a particular response

Last updated