> For the complete documentation index, see [llms.txt](https://docs.aisuru.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aisuru.com/en/generative-ai/ai-instructions/how-to-write-effective-instructions.md).

# How to write effective instructions

Instructions are like a "behavioral guide" for your Agent: you explain who it is, what it should do, and how it should interact with users. **Writing good instructions is essential** to having an Agent that responds accurately and relevantly.

### What to teach your Agent

When writing instructions, think of it as onboarding a new employee — you need to cover these aspects:

* **Who it is**: what's its role? Is it a customer support agent, a marketing expert, a tutor?
* **Who it talks to**: who are its users? What are they trying to accomplish?
* **What it knows**: what are its areas of expertise? What topics can it discuss?
* **How to communicate**: should it be formal or informal? Technical or simple?
* **What it shouldn't do**: are there topics to avoid or information not to share?

{% hint style="danger" %} <mark style="color:red;">**WARNING**</mark><mark style="color:red;">: never include confidential information in the AI instructions. Instead, put that information inside specific contents</mark> [assigned to a role](/en/agent-training/advanced/content-customization/assigning-contents-to-roles.md) <mark style="color:red;">or with a</mark> [required context](/en/agent-training/advanced/content-customization/context-topics-and-labels.md#required-topics)<mark style="color:red;">.</mark>
{% endhint %}

### How to write effective instructions

**Structure your instructions logically**

* Create clear, well-defined sections (e.g. role, expertise, limits);
* Use a clear information hierarchy;
* Include concrete examples for key concepts;
* Keep formatting consistent.

**Provide context**

* Clearly specify the Agent's operational scope and boundaries;
* Define the background needed to understand requests;
* Indicate when and how to use specific information;
* Include rules for filtering inappropriate content;
* Specify how to handle ambiguous or out-of-scope requests.

#### Questions and answers

* Define the expected format of user requests → brief questions, article excerpts, or other;
* Specify the desired structure of responses;
* Indicate how to handle incomplete or unclear inputs;
* Set rules for formatting responses.

**Clarity and conciseness**

* Use direct, precise language;
* Avoid unnecessary or ambiguous information;
* Focus on the essentials;
* Use specific terms rather than generic ones;
* Clearly define any technical terms.

**Instructions work best when written in English**. If your Agent isn't following instructions precisely, try translating them!

#### Support

If you need help writing instructions, you can always ask[ Manuela](https://www.aisuru.com/it/memoridev/Manuela/54ac7607-6905-4a0d-9f50-5ec178e846a3): tell her your idea and let the Agent guide you.

### How to optimize and maintain instructions

#### Monitoring and analysis

* Regularly check adherence to instructions;
* Identify patterns of suboptimal responses;
* Analyze escalation or error cases;
* Collect performance metrics.

#### **Optimization and updates**

* Update instructions based on feedback;
* Improve handling of edge cases you've identified;
* Document the changes you make.
