Message composition
Composing and checking the reply
Message composition is the last stage of a turn: the model writes the reply, and Parlant decides whether the customer may see it. Canned responses are approved example messages that set your tone and wording. Message review is an optional check that reads the draft against your rules and sends it back for another try if it fails.
- How canned responses shape the agent's tone and wording
- What message review checks, and what makes it reject a draft
- What happens when a draft fails review
- What Parlant does after the reply is delivered
When the model is ready to write, two things have to hold at once.
- The reply has to say the right thing: follow your policies and not make up facts.
- It has to say it the right way: in your tone and wording, not just the model's defaults.
Most importantly, it needs to do so consistently, even in complex, tricky, or high-stakes situations.
Parlant helps with both. Canned responses let you shape your tone and wording, while message review checks the reply for correctness and voice before the customer sees a word.
Shaping the wording with canned responses
Canned responses are approved example messages that you write once and that the model imitates. When writing, the model has the most relevant handful of them in view (ten by default). Those attached to matched rules come first, ranked by relevance to the customer's latest message.
Note that canned responses are examples to match in form and function, not necessarily text to paste word for word. The customer always receives words the model actually wrote for them in context.
Reviewing the reply before the customer sees it
Just as with tool calls, you can ask for a reply to be checked before it is delivered. This is message review.
When it is requested, Parlant holds back the draft message and a separate model pass audits it as a whole, against your instructions. The question it answers is whether the message, as written, breaches any governing policy or style requirement, or states anything inaccurate.
That covers more than tone. A draft is rejected when it:
- states something your policies forbid, or leaves out something they require;
- claims an action happened when no tool result backs it up (a built-in rule that is always on);
- asserts facts the turn has no source for;
- does not fit the current state of the conversation, such as answering a question that was already resolved;
- breaks the required tone or format.
For the last of these, the reviewer uses the canned responses most similar to the draft (five by default) as its yardstick. So the check for "sounds like us" is as concrete as the check for "follows the rules".
Note that the reviewer is told not to reject harmless phrasing choices or reasonable ambiguity. A message that is a feasible, compliant way to continue passes.
A rejected draft is never delivered. Instead, the reviewer writes corrected reasoning, the step restarts, and the model tries again from that.
Retries are not unlimited. Each turn has a budget of them, shared with tool review and moderation. When it is spent, Parlant gives up rather than deliver output that kept failing review. Handling semantic failures covers the budget, giving up, and how to take over what happens then.
Delivering and finalizing
The reply then streams to the customer, or arrives whole, and the turn ends with a ready status.
Parlant uses the time while the customer reads to tidy up. It compacts a long history into a summary, prunes the working set if it has grown past a certain number of discovered rules, records usage telemetry, and warms the provider's prompt cache for the next turn.
Shaping tone and wording covers canned responses, and Message reviews covers the review pass.