Hesham Elmahdy

Why do the instructions I give an AI agent matter so much?

The short answer

Because the agent knows nothing about how your company works except what you tell it. Its instructions, often called the prompt, are its job description. Clear instructions that explain the reasons behind them produce consistent work. Vague ones produce the agent's best guess at what you meant.

The prompt is a job description

The prompt is the text that tells the model what to do. In an agent, part of it stays fixed for every task: who the agent works for, what its job is, what it must never do, and how it should write. The rest changes with each request.

Anthropic’s advice on writing these instructions starts from a useful picture: treat the model as a brilliant new employee who does not yet know your rules and your ways of working. The more precisely you explain what you want, the better the result.

Anthropic also offers a simple test. Show your instructions to a colleague who knows little about the task, and ask them to follow them. If the colleague would be confused, the model will be too.

Explain why, not only what

A bare rule is followed narrowly. A rule with its reason can be applied to cases you did not foresee. Anthropic gives an example. “Never use ellipses” works less well than: “Your response will be read aloud by a text-to-speech engine, so never use ellipses, because the engine will not know how to pronounce them.” With the reason, the model can work out related cases on its own.

The same holds in a company. “Never promise a delivery date” is a rule. “Never promise a delivery date, because only the warehouse knows what is in stock” tells the agent what to do next: ask the warehouse, or say who will confirm the date.

What good instructions contain

Instructions are company policy

Once an agent does real work, its instructions are part of how your company operates. Treat them that way. Keep them written down, give them an owner, and change them deliberately. When the agent makes a mistake, the fix often belongs in the instructions. The question How do I stop my AI agent from repeating the same mistake? covers this, and Can I give my AI agent instructions by voice? covers a faster way to write them.

References

  1. Anthropic, Prompting best practices, Claude Platform documentation

More basics

All the basics