Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

intro to doWhen creating a customized agent, you must provide clear instructions for the agent to follow, including the specific tasks it should perform and the expected output among other things.

This page offers tips on how to effectively write instructions for your agents.

Table of Contents
minLevel1
maxLevel6
outlinefalse
styledefault
typelist
printabletrue

Best practices

1. Write clear and detailed

...

instructions

  • Specify the agent’s role and tasks/goals

  • Be clear

outcome, length, format, style

...

  • Begin by specifying the agent's role, tasks, and objectives.

  • Ensure your instructions are clear and detailed.

2. Specify the desired output

If you expect a specific result from your agent, include it in the instructions.

Consider the following:

  • What kind of output do you expect? Is it text, a list, a file, a code block, etc.?

  • What tone should the agent use when responding to users - formal, informal, friendly, conversational, etc.?

  • How long should the answer be? Short, long, a specific length (for example: “less than 300 words”)?

  • In what format should the output be presented to the user? For example, if your agent is designed to write to a file, you might want to instruct your agent to provide a snippet of the content written in the file or a link to download the file.

If necessary, you can include examples of the expected output in the instructions.

3. Fine-tune your instructions by testing

Test your instructions by reading them as if you’re the one from the perspective of someone completing the task. Are they clear and easy to follow? If not, refine revise them until they are.

What you do not need to add to your instructions

Some information can be excluded You can also test your agent with the initial version of the instructions and refine the instructions until you achieve satisfactory results.

Panel
panelIconId1f4a1
panelIcon:bulb:
panelIconText💡
bgColor#DEEBFF

If you have trouble coming up with your own instructions, you can ask the Prompt expert agent to generate a prompt tailored to your use case and then refine it to achieve the desired results.

What can be excluded from your instructions

Certain information can be omitted from your instructions, as it is already taken into account automatically considered.

As such, you do not need to include the following elements in your agent’s instructions:

  • The name of the agent;

  • The current date;

  • Reference to the tools and their parameters;

  • The language in which the agent should answer in - , as the response language is determined by the previous messages.;

  • The need requirement to cite the sources used to answer and how to cite the sourcesin responses and the method for citing them.