How do I check an output against several rules in one call?
6 min read · Updated
A rule set lets an agent check an output against several rules with one call. The rules are judged in parallel, and the call costs the same as checking a single rule. Say a support email must meet your tone, promises, and brand rules. One rule at a time that is three calls per attempt. As a rule set it is one.
1. Find the rules
Ask your agent to list your rules with the tag email. It returns the active ones with their versions.
2. Create the rule set
Say “put tone, promises, and brand together.” The agent shows you which rules and which versions it plans to pin, and saves the set with create_rulesetafter you agree. A pin with no version uses the rule’s active version, and the result says which version it used. The set is saved as a draft.
If you prefer the portal, open Rule sets, filter the rules by tag, and select them. Saving turns the selection into a fixed list of pins. Rules you tag later are not added.
3. Test the set, then set it to active
You can pin your own rules while they are in draft or test, so you can test the set with them, but a set cannot become active while it pins a draft rule. Run the set on outputs you know the answer to, then set it to active.
4. Run it
The agent calls validatewith the rule set’s ID. The set passes only if every rule in it passes. The result names the rules that failed and shows every rule that was judged with its own result, so the agent knows which passages to fix. If any rule gets no answer after retries, the whole call fails and you are not charged. You never get a partial result. See how to read a result.
Keeping the set current
A rule set pins versions on purpose. When a rule gets a new active version, the set does not change. list_rulesetsshows “newer version available” for that pin. Update the pin, test the new rule set version, and set it to active. Agents that send no version get the new one, and agents that name an earlier version keep it. The rule sets reference has the details, including how to archive a set.
Give every agent the same rules.
Write a rule, connect your agent, and run a critique in a few minutes. A new account includes 100 free critique credits.
Related guides
Pick one concern, write it the way you would brief a careful reviewer, and save it as a draft rule. Your agent can draft the Markdown and upload it for you.
Split the guidelines by concern, save one rule for each, group them in a rule set, and update the set when the guidelines change.
Use the test status, run one output that should pass and one that should fail, then set the rule to active.
