LearnAI
Новинки AI · AI-агенты · Lesson 2/10
← To the catalog
Task

How to assign a task to an agent

Formulate one task for the agent according to all the rules. Return JSON {"goal":"...","result":"...","constraints":"...","doneWhen":"..."}: goal - a measurable goal, result - in what form the answer is needed, constraints - restrictions and what is not allowed, doneWhen - a verifiable sign of “ready”.

Unlock access to submit solutions for instant AI review.
Assign tasks to the agent
💡 A piece of theory

The agent does exactly what you described and does not hint at anything himself. Therefore, a good problem consists of four parts. Goal: what we are essentially trying to achieve. Result: in what form is the response needed (table, list of five points, letter, file). Restrictions: what not to do, how many steps, what sources to use. “Done” sign: how we will understand that the task has been completed. The mechanics are simple: the more precise the framework, the less the agent speculates and the closer the result is to your expectation. Insider trick: always add a “definition of ready” - one line like “ready when the table has three columns and no empty cells.” This dramatically reduces the number of reworks. The second technique: set the format of the result with an example - show how one line of the answer should look. A typical mistake is to set a goal with the words “improve sales” or “deal with mail”: this is not a task, but a wish. The agent will start guessing and, most likely, will do the wrong thing. Narrow it down to a measurable result and the agent becomes predictable.

How is it assessed · passing 70

  • 1Valid JSON without text around it20%
  • 2The required fields are there25%
  • 3The task is measurable and complete55%
Your promptClaude ⌄
🔒

Unlock access to submit solutions for instant AI review.