Skip to main content

How to write good instructions for my Agent?

Updated this week

Crafting effective instructions is key to making your Agent perform as desired. Here are some fundamental tips to help you get started in guiding your Agent.

Tips for writing effective agent instructions

Be specific and clear

Clearly define the Agent's role, purpose, and the specific tasks you want it to accomplish. Avoid vague or ambiguous language.

The more precise your instructions, the better the Agent will understand its designated function.

Provide examples

If you want the Agent to produce output in a particular format or style, include examples in your instructions.

πŸ’‘ For a summarizing Agent for instance, show an example of a good summary. For something more technical like outputting JSON data, provide a sample JSON structure.

Test and refine (Iterate)

After providing initial instructions, test your Agent by interacting with it in the preview panel. Observe its responses. If they aren't what you expect, refine your instructions and test again.

πŸ”‘ Be patient and iterative in this process. It often takes several attempts and adjustments to achieve the desired results.

πŸ“Œ Remember to also leverage the Agent's dedicated settings:

  • Adjust Tone and Personality: Use the specific fields in the Agent configuration to further guide its conversational style.

  • Implement Guardrails: Use guardrails to limit the Agent's responses to certain topics, prevent undesired behaviors, or enforce a particular style.

Further Reading

Mastering the art of instruction writing (prompt engineering) can significantly enhance your Agent's capabilities.

πŸ”Ž For more in-depth information and advanced techniques, please see our comprehensive Guide on Prompting Capabilities.

Did this answer your question?