Add and Configure Hooks
Create a Hook from a standard template, configure its parameters (prohibited terms, evaluation model, detection service, block message, and more), and associate it with an AI assistant.
This page explains how to create a Hook from a standard template, configure its parameters, and attach it to an AI assistant so it can start working.
1. Add a Hook
1. Open the Hook List
From the left menu, go to AI Features → Hook. The list displays all Hooks in the current organization, including their name, description, type, interception point, action, associated AI assistants, enabled status, creator, and update time.

2. Select a Template
Click Add Hook in the upper-right corner, then select a standard template in the pop-up window. Each template card shows its interception point and action, making it easy to quickly identify its purpose.

2. Configure Parameters
Each template has different parameters. You can configure them on the Hook settings page after creation. Common parameters include:
Personal Data Masking
PII types to mask
Select the types to detect (Email/mobile phone number/ID number/credit card)
Semantic Personal Data Masking
Personal data detection model and detection types, minimum confidence, masking style
Select a detection service, then choose the personal data types to mask (name, address, phone number, and more); increasing the confidence value can reduce false positives
Sensitive Keyword Blocking
Prohibited terms, minimum term length
Enter one prohibited term per line; the minimum term length filters out terms that are too short and helps prevent false positives
Prompt Injection Protection
Evaluation model, additional evaluation rules
Select an LLM to determine whether content is an attack; you can also add custom rules
Content Safety Classification Blocking
Content safety model and blocked categories, additional score threshold, behavior when the detection service is unavailable
Select a detection service, then choose the categories to block; if none are selected, any category violation will be blocked
Invalid Message Filtering
Greeting list, consecutive repetition limit, evaluation model
Rules filter messages first, then an LLM determines whether a message is invalid
Response Reliability Check
Rewrite model, verification criteria
Select an LLM to determine whether a response is reliable and rewrite it

Evaluation Model (LLM-Based Templates)
Templates that require semantic evaluation—Prompt Injection Protection, Invalid Message Filtering, and Response Reliability Check—include an evaluation model field. The drop-down menu lists the models currently available to your organization. This evaluation runs for every message, so we recommend selecting a fast, lower-cost model (such as Haiku, GPT-5 mini, or Gemini Flash). Leave the field blank to use the platform's default model.

Detection Service (Safety Model-Based Templates)
Content Safety Classification Blocking and Semantic Personal Data Masking do not use a general-purpose LLM for evaluation. Instead, they send content to a dedicated safety model. This model returns structured classifications and scores that support thresholds and auditing, with lower latency and cost than an LLM judge. Both templates use a two-step configuration: first select a detection service, then choose the items to process.
Content Safety Classification Blocking
Under Content Safety Model and Blocked Categories, select a detection service from the first drop-down menu (OpenAI Moderation is currently available).
In the second drop-down menu, select the categories to block, such as harassment, hate, illegal activity, self-harm, sexual content, and violence. Selecting no categories means that any category violation will be blocked (the strictest option and the recommended starting setting).
The default Additional Score Threshold is 0, meaning the model's determination is used directly. If you set a value between 0 and 1, a score must also meet that threshold to be blocked. Raising the threshold can reduce false positives.
When the Detection Service Is Unavailable determines what happens when the service times out or no key is configured:
passallows the message through (availability first; default), whileblockalways blocks it (compliance first; recommended for regulated industries).


Semantic Personal Data Masking
Under Personal Data Detection Model and Detection Types, select a detection service from the first drop-down menu (Google Cloud DLP is currently available).
In the second drop-down menu, select the personal data types to mask. “Standard types” include names, addresses, phone numbers, email addresses, Taiwan ID numbers, and Taiwan passport numbers, while “provider-specific types” include credit card numbers, IBANs, and other detailed types. Selecting more types increases the cost of each call, so we recommend selecting only those that your business actually needs to mask.
The default Minimum Confidence is 0.5. Detection results below this value are ignored. Raising the value can reduce false positives (such as mistaking a company name for a person's name), at the cost of potentially missing some data.
Masking Style:
type_tokenreplaces content with placeholders such as[NAME]and[ADDRESS], so the AI still knows what type of data was originally present (recommended);asteriskreplaces it with an equal number of asterisks, completely concealing the type.


Content will be sent to an external detection service. These two templates send the text to be checked to a detection service (OpenAI or Google Cloud) for evaluation. Organizations with data residency requirements or policies that prohibit external data transfers should confirm compliance before enabling them. When you switch detection services, selected items are automatically cleared to prevent incompatible types from causing a save failure.
3. Associate AI Assistants
A Hook only takes effect after it is attached to an AI assistant. There are two ways to do this:
Attach during creation: On the Apply to AI Assistants tab when creating a Hook, select the assistants to which it should apply.
Attach from assistant settings: Open an AI assistant's settings page, switch to the Hook tab, and select the Hook to apply.

An assistant can have multiple Hooks attached. The system executes them in sequence. For example, it can first use Invalid Message Filtering to block spam, then use Personal Data Masking to mask personal data, and finally use Prompt Injection Protection to block attacks—creating a tailored protection workflow.
Enable the Hook
After confirming the parameters and associated assistants, set the Hook to Enabled. Once enabled, the Hook runs automatically at the corresponding point whenever a user interacts with that assistant.
4. Next Steps
After completing the setup, you can view each interception or modification in Hook Execution Logs to confirm that the Hook is working correctly.
Last updated
Was this helpful?