deflect: whether the answer is good enough to show. The answer is not streamed.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The question or ticket description |
subject | string | No | The ticket subject |
deflector_id | string | No | A saved form deflector. Its settings apply (see below) |
thread_id | string | No | Continue an earlier deflection |
fields | {label, value}[] | No | Other form fields, used as context. Max 12, the rest are dropped |
group_ids | string[] | No | Answer only from these source groups |
end_user_id | string | No | An anonymous id for the reader, so one person counts once |
end_user_email | string | No | The email typed into the form. Stored on the conversation. See user tracking |
deflector_id, the deflector’s confidence threshold, allowed domains, source groups, minimum question length and voice apply. Its source groups replace any group_ids you send. A disabled deflector, or a page origin outside its allowed domains, returns 403. An unknown id returns 404.
Response
| Field | Description |
|---|---|
answer | The answer, with [n] citation markers |
citations | The sources the answer cites. Same fields as chat citations |
confidence | 0 to 1. See How confidence works |
deflect | true when confidence is at or above the threshold. The default threshold is 0.55 |
conversation_id | Send it as thread_id to chat or form-deflect for a follow-up |
message_id | Only when deflect is true. Use it to rate the answer |
deflection_id | Use it to report the outcome |
skip_reason | Only when deflect is false: too_short, low_confidence or no_answer |
handoff_link | Only when the deflector has hand-off turned on and deflect is true. A dashboard link to this conversation, for your agents |
message shorter than 25 characters (or the deflector’s own minimum) is not answered. You get deflect: false and skip_reason: "too_short".
Report the outcome
When the user submits the ticket anyway, tell Kelu:{"success": true}. "submitted" is the only value. A user who reads the answer and leaves sends nothing, so the deflection rate is (answered − submitted) / answered.
How confidence works
Confidence is how well your content answers this question.0.5 is the line between answerable and not. It is lowered in three cases:
- The answer says it does not know. Confidence is at most
0.2. - Your knowledge base does not cover the question. Confidence is
0. - The answer makes claims its sources do not support. Confidence is
0.
What to do with the result
deflect: true: show the answer, with a way to say it helped and a way to continue to the form.deflect: false, or any error: let the form submit normally. Never block the user.- Rate the answer with
message_id. The deflection rate only says a ticket was avoided, not that the answer was right.
402 when the workspace used its monthly question allowance, 429 or 503 when the AI provider is busy.