Reply confidence gate
Decide whether a drafted reply ships on its own (≥ 0.85), goes to a review queue (0.4–0.85) or to a person (< 0.4), with the Reply Confidence Gate template.
Goal: auto-send the replies that are clearly fine, review the borderline ones and hand the rest to a person — with thresholds you can see and change.
Create the decision
Templates → Reply confidence gate → Create decision:
| Part | Content |
|---|---|
| State | customer_message, draft_reply (strings, required) |
ready_to_send | probability — can the draft go out without a human checking it? |
answers_question | probability — does it answer what the customer asked? |
promises_something | probability — does it promise a refund, discount, deadline or exception? |
| Policies | ready_to_send < 0.4 → escalate; promises_something ≥ 0.7 and ready_to_send < 0.95 → escalate; confidence of ready_to_send < 0.5 → escalate |
| Destinations | auto_send — sendReply at ≥ 0.85; review_queue — queueForReview from 0.4 to 0.85; hand_to_human — assignToHuman on escalate |
Call it
curl -X POST https://api.dcision.io/v1/decisions/reply-confidence-gate \
-H "Authorization: Bearer $DCISION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": {
"customer_message": "How do I change the email on my account?",
"draft_reply": "Go to Settings → Account, click Edit next to your email, confirm the code we send to the new address and you're done."
}
}'{
"schema": "reply-confidence-gate",
"result": { "ready_to_send": 0.93, "answers_question": 0.96, "promises_something": 0.03 },
"action": "continue",
"destinations": [{ "key": "auto_send", "type": "function", "function": "sendReply", "params": { "reply": "Go to Settings → Account, …" } }]
}Act on it
const handlers = { sendReply, queueForReview, assignToHuman };
for (const d of decision.destinations ?? []) if (d.type === "function") await handlers[d.function](d.params);Tune it
- Move the thresholds (0.85 and 0.4) in the destinations and the first rule; the Overview suggests calibrations from your history.
- Swap the functions for a webhook or workflow to drop the review queue straight into n8n, Make or Zapier.
- Add your policies to
contextsopromises_somethingknows what your team may promise.
Tool-call gating
Before an agent runs a tool, decide whether to run it, ask the user to confirm or refuse — with more confidence required for risky actions — with the Tool-call Gating template.
Response grading
Grade an LLM response against your rubric — accuracy, completeness and tone — into a 0–1 grade, and send low grades to review, with the Response Grading template.