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

Agent sorting mail

Design a mail parsing system for an agent. Return JSON {"goal":"...","categories":["..."],"rules":"...","doNotTouch":"..."}: goal - the purpose of parsing, categories - a list of meaningful categories, rules - what action the agent does for each category (including escalation of the controversial), doNotTouch are exceptions that the agent does not touch.

Unlock access to submit solutions for instant AI review.
Automatic mail parsing
💡 A piece of theory

Parsing mail is an ideal task for an agent because it is repeatable and follows rules. Mechanics: The agent reads the letter, assigns it to a category, and performs a predefined action for that category. This means that your job is not to parse the letters yourself, but to describe the system once: a list of categories, a rule for each, and what to do in controversial cases. Insider trick: create a category “for escalation” - everything that does not fit the rules or affects money/client goes here, and the agent passes it on to you, rather than deciding it himself. This way you are protected from amateur activity. The second technique is a “do not touch” list: important senders or topics that the agent never archives or automatically responds to. A typical mistake is to set only the “important/unimportant” categories without rules and without actions: the agent will arrange the letters as he understands, and this rarely coincides with your meaning. A good system is clear categories plus a specific action for each plus obvious exceptions. Then the routine goes away, and you retain control over the important things.

How is it assessed · passing 70

  • 1Valid JSON without text around it20%
  • 2The required fields are there25%
  • 3Categories with actions and escalations55%
Your promptClaude ⌄
🔒

Unlock access to submit solutions for instant AI review.