Create and Configure Hooks
Create a Hook from a standard template, adjust parameters (keyword blocklists, judgment models, block messages, etc.), and link it to an AI assistant.
This page explains how to create a Hook from a standard template, adjust its parameters, and attach it to an AI assistant to start operating.
1. Create a Hook
1. Go to the Hook List
Navigate to AI Features → Hook from the left menu. The list displays all Hooks in your organization, including name, type, interception point, action, enabled status, and last updated time.
2. Choose a Template
Click + New Hook in the upper right corner. In the popup window, select a standard template. Each template card indicates its interception point and action, making it easy to quickly identify its purpose.
2. Adjust Parameters
Different templates have different parameters. After creation, go to the Hook settings page to make adjustments. Common parameters include:
PII Masking
PII types to mask
Select which types to detect (Email / Phone / ID Number / Credit Card)
Sensitive Keyword Blocking
Keyword blocklist, minimum word length
One prohibited word per line; minimum word length filters out overly short words to avoid false positives
Prompt Injection Protection
Judgment model, additional rules
Select an LLM to determine whether it's an attack; add custom rules
Invalid Message Filtering
Greeting word list, consecutive repeat limit, judgment model
Rules filter first, then an LLM determines whether the message is invalid
Response Reliability Review
Rewrite model, review criteria
Select an LLM to judge whether the response is reliable and rewrite it
Judgment Model (LLM-based Templates)
Templates that require "semantic judgment" — such as Prompt Injection Protection, Invalid Message Filtering, and Response Reliability Review — have a judgment model field. The dropdown lists the models currently available to your organization. Since this judgment runs on every message, it's recommended to choose a fast, cost-effective model (such as Haiku, GPT-5 mini, Gemini Flash, or similar). Leave it empty to use the platform default model.
3. Link to AI Assistant
A Hook must be attached to an AI assistant to take effect. There are two ways:
Attach during creation: In the "Apply to AI Assistant" tab when creating a Hook, directly select the assistants to apply it to.
Attach from assistant settings: Go to an AI assistant's settings page, switch to the Hook tab, and select the Hooks to apply.
One assistant can have multiple Hooks. The system executes them in order — for example, first "Invalid Message Filtering" blocks spam, then "PII Masking" masks personal data, then "Prompt Injection Protection" blocks attacks — combining them into a custom protection pipeline.
Enable Hook
After confirming parameters and linked assistants, set the Hook to Enabled. Once enabled, whenever users chat with that assistant, the Hook will automatically operate at the corresponding interception points.
4. Next Steps
After setup is complete, you can check Hook Execution Logs to view logs for each interception or modification and confirm that the Hook is working correctly.
Last updated
Was this helpful?
