Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Use Twilio-authored language operators


Twilio-authored language operators are pre-built GenAI operators that simplify adding AI-powered intelligence to your communications workflows. They are optimized for scale, latency, and accuracy, and can be triggered in real time or at a defined point in the conversation across channels, including Voice, SMS, WhatsApp, RCS, and Chat.


Why use Twilio-authored language operators?

why-use-twilio-authored-language-operators page anchor
  • Faster time to value: Launch common intelligence use cases quickly without designing from scratch. Start with pre-built prompts and tailor them to your policies and domain, reducing trial-and-error prompt engineering.
  • Reduced operational overhead: Spend less effort maintaining custom AI logic and focus on configuration (such as scripts, knowledge, user context) instead of building full systems.
  • Composable building blocks: Combine language operators to support end-to-end workflows like real-time assist and post-call automation.

Available Twilio-authored language operators

available-twilio-authored-language-operators page anchor

Twilio-authored language operators include:

  • Script Adherence operator | intelligence_operator_01kf34tcyefpyb1t4m0nbd8rxg
  • Next Best Response (NBR) operator | intelligence_operator_01kea27sy7ffsafmtsfp17nzx4
  • Summary operator | intelligence_operator_01kcv35pnkeysaf6z6cqtbpegn
  • Sentiment operator | intelligence_operator_01kcrvw16kfa88qvgrfmr7y151

To use Twilio-authored language operators, include them when you define rules for your intelligence configuration.


Script Adherence operator

script-adherence-operator page anchor

Operator ID: intelligence_operator_01kf34tcyefpyb1t4m0nbd8rxg

The Script Adherence operator helps customer care centers shift from post-call Quality Management (QM) to in-the-moment course correction. It provides agents with real-time guidance during active conversations to help them stay compliant.

Script Adherence operator use cases

script-adherence-operator-use-cases page anchor
  • Language guidance: Ensure agents use required language and avoid prohibited language during interactions.
  • Upsell: Encourage agents to deliver offer and value messaging when it's relevant.
  • Faster onboarding: Onboard new agents quickly with live guidance.

Script Adherence operator configuration

script-adherence-operator-configuration page anchor

To configure the Script Adherence operator, add your script when configuring the operator. Each script uses the following format:

  • Category: The name of the stage. For example, Greeting, Verification, or Closing.
  • Criteria: One or more criteria under each category, each formatted as a dash, a unique criteria key, a colon, and a description.
(information)

Required phrases and false positives

The GPT-5.4-mini model evaluates general adherence rather than exact phrase matching. When you specify "Required Phrases", the model might mark the category as succeeded even if the agent didn't use the exact wording, which can result in false positives.

Learn more about writing effective criteria in Script Adherence best practices.

Example: Script Adherence input script

example-script-adherence-input-script page anchor
1
Category: introduction
2
- introduction: The agent should identify themselves by first name. Required Phrase: Thank you for calling Owl Health, this is [Agent Name].
3
4
Category: assistance
5
- offer_assistance: The agent should offer assistance or ask how they could help.
6
7
Category: security
8
- security_justification: The agent should clearly explain the need to verify the caller's identity before discussing account details.
9
- security_full_name: The agent should request the member's full name as it appears on the account. Required Phrase: May I confirm your first and last name as it appears on the account?
10
- security_additional_information: The agent should request at least one additional required identifier (e.g. date of birth, member ID, or address).
11
12
Category: protected_data
13
- phi: The agent should avoid disclosing PHI prior to completing verification.
14
15
Category: diligence
16
- call_reason_confirmation: The agent should restate or confirm the caller's reason for calling. Required Phrase: Just to confirm, you're calling about [issue], is that correct?
17
- specify_disclaimers: The agent should provide required disclaimers when discussing benefits, coverage, or eligibility. Required Phrase: Benefits are subject to eligibility and plan provisions at the time services are rendered.
18
- payment_or_coverage_guarantees: The agent should avoid guaranteeing payment or coverage when discussing claims or coverage.
19
20
Category: wrap_up
21
- clear_timelines_or_next_steps: The agent should set clear expectations for timelines or next steps, if applicable.
22
- closing_recap: The agent should recap actions taken and use the customer's name while closing out.

Script Adherence operator output schema

script-adherence-operator-output-schema page anchor

The Script Adherence operator evaluates the transcript against the criteria and outputs a JSON object.

The result object provides a roll-up of progress across all required items in the script. It includes the following fields:

FieldDescription
resultA roll-up of progress across all required items.
completed_all_requiredWhether all required Categories were completed.
percent_completeThe overall completion percentage.
completedThe number of Categories analyzed so far. This value equals the sum of the succeeded and failed values.
incompleteThe number of Categories not yet reached or analyzed in the conversation.
failedThe number of Categories failed or missed in the conversation.
succeededThe number of Categories succeeded in the conversation.

The categories array provides a breakdown of results for each Category in the script.

FieldDescription
idThe Category name.
goalThe objective the agent should accomplish for that Category.
statusThe outcome for the Category. Possible values are Failed and Succeeded.
weightThe score weight of the Category.

Example: Script Adherence output

example-script-adherence-output page anchor
1
{
2
"result": {
3
"completed_all_required": false,
4
"percent_complete": 20,
5
"completed": 2,
6
"incomplete": 3,
7
"failed": 1,
8
"succeeded": 1
9
},
10
},
11
{
12
"categories": [
13
{
14
"id": "Greetings",
15
"goal": "Introduce company/agent;",
16
"status": "Failed",
17
"weight": 0
18
},
19
{
20
"id": "Verification",
21
"goal": "Confirm identity quickly",
22
"status": "Succeeded",
23
"weight": 20
24
}
25
]
26
}

Each output response has a maximum limit of 8,800 characters. When designing complex script adherence, we recommend streamlining your requirements to avoid exceeding this threshold. Learn more about schema guidelines.

Each category and criterion you add when designing your Script Adherence operator increase the number of output characters in the generated response. To reduce output length, limit the number of Categories and Criteria, and use simple, descriptive values for Category names and Criteria keys. Use common words or standard abbreviations, and avoid obscure code words. For example, for an agent introduction criterion key, use intro instead of agent_int.


Next Best Response (NBR) operator

next-best-response-nbr-operator page anchor

Operator ID: intelligence_operator_01kea27sy7ffsafmtsfp17nzx4

The NBR operator acts as a live co-pilot for agents, analyzing the conversation in real time and recommending the most effective next message or action based on your business rules and knowledge. This can help agents respond faster and improve First Call Resolution (FCR).

  • Shorter handle time: Suggest ready-to-send responses and next steps.
  • Consistent tone and policy: Keep tone and policy aligned across teams with standardized, approved guidance.
  • Accurate information: Surface the most relevant knowledge article or procedure to prevent misinformation and rework.

How the NBR operator works

how-the-nbr-operator-works page anchor

The operator synthesizes three data streams to generate recommendations:

  • Live Conversation: Captures real-time context and intent from the active transcript.
  • Enterprise Knowledge: Cross-references the conversation with your uploaded company manuals, FAQs, and policies.
  • Customer Memory: Uses historical interaction data and customer profiles to personalize the response.

NBR operator configuration

nbr-operator-configuration page anchor
  • Tone customization: Define a custom tone for responses (for example, "professional" or "friendly") to match your brand.
  • Performance optimization: The NBR operator uses the GPT-5.4-mini model and limits each generation to one knowledge base lookup (tool call), targeting sub-3-second real-time latency.
  • Grounded responses (AI guardrails): Suggestions are derived only from the provided Enterprise Knowledge and Customer Memory. If no relevant context is found, the operator suppresses the response rather than hallucinating. Responses maintain a professional tone without flowery or redundant AI prose.

Operator ID: intelligence_operator_01kcv35pnkeysaf6z6cqtbpegn

The Summary operator generates concise summaries of customer interactions. The Summary operator uses GPT-4o-mini.

Summary operator use cases

summary-operator-use-cases page anchor
  • After-call summary: Generate summaries for agents to review after each call.
  • Case note: Create case notes for Customer Relationship Management (CRM) systems.
  • Handoffs: Help smooth transitions between agents or departments.
  • Audit: Ensure compliance and quality control.

Summary operator configuration

summary-operator-configuration page anchor

You can configure the Summary operator based on your use case and needs. For example, you can specify the level of detail, the format of the summary, or when the summary should be generated.

  • On communication: Summarize the conversation from beginning to the current utterance. You can gauge sentiment in real time.
    • Every N communications: Summarize the conversation periodically (for example, every 5th message) instead of on every utterance. This reduces costs while still providing regular summaries during the conversation.
  • On conversation inactive: Summarize the conversation after a defined period of inactivity, such as when a customer is placed on hold or the interaction pauses.
  • On conversation end: Summarize the entire conversation at the end.

For more information on triggers, see Define rules.

You can set the summary length to:

  • short
  • medium (default, 3-5 sentences)
  • long

You can specify a structural format for the summary, such as bullet points, STAR (Situation, Task, Action, Result), or SOAP notes for medical contexts.


Operator ID: intelligence_operator_01kcrvw16kfa88qvgrfmr7y151

The Sentiment operator evaluates the sentiment of the conversation.

Note: The Sentiment operator doesn't analyze a specific participant of the conversation.

Sentiment operator result

sentiment-operator-result page anchor
  • positive: The sentiment of the conversation was positive.
  • negative: The sentiment of the conversation was negative.
  • neutral: The sentiment of the conversation was neutral.
  • mixed: There was more than one sentiment detected during the conversation.