Skip to main content
Triage reads each new item and answers questions you ask about it. The answers are typed: a probability, one of your options, or a position on your scale. Rules in your code decide what to do with them, and new rules only watch until the numbers show they agree with your team.

Questions

Triage sees the item’s title, its data and the text of its blocks, with sensitive values left out. instructions gives it context. Refer to fields of your data by name in the questions.
  • noul(prompt, criteria?) answers yes or no as a probability between 0 and 1.
  • choice(options, prompt) picks one option. Options are a list, or an object of option to description; describing options helps a lot.
  • score(levels, prompt) rates the item against your levels, lowest first. The answer is a number from 0 (the first level) to the last level’s position, weighted by how sure it is: with ["low", "medium", "high"], 1.7 leans high.
The answers’ types follow your questions, so a.category above is "spam" | "harassment" | "fine". a.confidence is the lowest confidence across the choice and score answers.

Rules

Rules run in your app, top to bottom. The first rule whose when matches decides, and then is one decision or a list:
  • setState(state) moves the item. Moving it to a closed state counts as handled by triage.
  • tag(name) tags it.
  • run(action, input?) runs an action. Only actions that are harmless or marked automatable: true can be run, never ones that need an approval; pult check catches the rest.

Watching, then acting

A rule without live: true only watches. Pult records what it would have done and compares that with what your team actually does with the item: an agreement when they end up in the same place, a disagreement when they don’t. Each rule’s agreement rate shows under Rules in the inbox. Turn a rule live once it has earned it. When a live rule closes an item and someone moves it back, that’s recorded as an override and counts against the rule.

Replay

You can try rules out before shipping them. Change a rule, reload your app, and press Replay under Rules: your app runs its current rules against the stored answers for the last 500 items, and Pult compares the outcome with what people actually did. Nothing is asked again and nothing changes.

In the console

Items show triage’s read at the top: the answers, which rule matched, and whether it acted or only watched. Items triage closed on its own are under Handled by triage in the sidebar, so someone can glance over them.