Configure a chatbot
Configuring a chatbot involves defining its basic settings, knowledge base, and rules for transferring to a human agent. This process enables the chatbot to provide accurate answers.
Basic settings

Basic settings include the chatbot's persona and opening message.
Persona: The persona defines the chatbot's personality. You can configure six modules: Name, Responsibilities & scenarios, Background knowledge, Skills & workflows, Language style, and Constraints & limitations. You can also add other requirements.
Name: Give your chatbot a name, such as Lingque Assistant.
Responsibilities & scenarios: Define the chatbot's function and use cases, such as a Lingque consulting assistant for product inquiries and after-sales support.
Background knowledge: Set the chatbot's area of expertise or worldview.
Skills & workflows: Define the chatbot's core abilities and operational steps.
Language style: Determine the communication tone and style (for example, ensure responses are precise, professional, and strictly adhere to source content).
Constraints & limitations: Define behavioral boundaries and data permissions (for example, provide concise answers and politely decline to answer questions outside its knowledge scope).
Opening message:
Fixed opening message: This is the first message the chatbot sends to a user. The default message is: "The intelligent conversational chatbot is at your service. How can I help you?";

Dynamic opening message: You can reference VendorParam parameters in the opening message. These parameters can be sourced in two ways.
Pass in via chat API: You can pass the parameters directly in the VendorParam of the Streaming Conversation API.
Returned by pre-conversation webhook: Configure a session-start webhook to have the chatbot automatically call an API plugin. The system injects the returned fields into the VendorParam. To reference a parameter, type "/" to select the corresponding output parameter. The opening message uses the ${VendorParam.variableName} syntax to reference parameters.
API plugin: Select the API to be called.
Call timeout (ms): Set the timeout for the API call.
Input parameters: Configure the input parameters for the API plugin. Two value types are supported:
Value type
Parameter value
Constant
Manually enter a fixed parameter value.
Reference
References system parameters or pass-through parameters (passed via the chat API VendorParam).


Knowledge base
Settings
Knowledge Q&A settings
Reranking model: This model refines the results after initial knowledge retrieval. You can choose from the Lingque reranking model, a general text reranking model, or the qwen3-rerank model.
Direct answer strategy for FAQ: When enabled, if the relevance score between the user's question and an FAQ exceeds the direct-answer threshold, the chatbot replies directly with the answer from that FAQ. You can customize this threshold.
Match FAQs with LLM: When enabled, the chatbot prioritizes using an LLM to match the user's query with an FAQ title. If a match is found, the chatbot provides the corresponding answer directly. If disabled, the chatbot generates a response based only on retrieved FAQ.
Reply format: Two formats are supported: Default and Markdown.
Default mode (Rich Text + Markdown): This is the system's default output format. The response combines rich text styles with Markdown syntax for optimal display.
Pure Markdown mode: If you select this mode, all responses are strictly formatted in standard Markdown without additional rich text tags.
Knowledge Q&A: Knowledge snippets (including documents, FAQ, and web pages) with a score above the specified threshold are used to answer questions. You can customize the retrieval threshold.
Abnormal retrieval settings: These settings define the chatbot's reply strategy for scenarios where knowledge retrieval fails. There are two such scenarios:
ImportantThe chatbot's fallback reply for unanswered questions is configured under "Anomaly prompt". To avoid conflicting settings that could affect the final reply, remove any similar prompts from the persona configuration, leaving only the configuration in "Anomaly prompt".

No knowledge found: When the chatbot finds no relevant knowledge, you can choose between an intelligent reply or a configured fallback reply.
Retrieved knowledge is irrelevant: When the retrieved knowledge is not highly relevant to the user's question, you can choose between an intelligent reply or a configured fallback reply.
Images: This setting applies to image retrieval from Image management. Images with a retrieval score above the threshold are retrieved. For configuration steps, see Image management.
Rejection guidance: This feature is only active in flow management scenarios. If a user enters a flow but their question does not match any of the user intents within that flow, the system automatically asks clarifying questions. If the intent remains unmatched after a set number of follow-up questions, the system either transfers the conversation to a human agent or ends it.
Additionally, if "Direct answer strategy for FAQ" or "Match FAQs with LLM" is enabled and the user's question matches an FAQ, the system prioritizes providing the FAQ answer directly. The rejection guidance is triggered only when Retrieval-Augmented Generation (RAG) finds no matching answer.
For detailed instructions, see Transfer to a human agent after flow deviation failure.

Knowledge base binding
Document knowledge: This is knowledge stored in documents, such as PDF, DOC/DOCX, and TXT files. The chatbot answers user questions based on the content of these documents. For more information, see Document knowledge management.
Website knowledge: Configure a website to crawl text from specific web pages. The chatbot then answers user questions based on this content. For more information, see Website knowledge.
FAQ: Refers to frequently asked questions and their corresponding answers. For more information, see FAQ.
Image knowledge: Refers to knowledge maintained in the knowledge base in the form of images. For more information, see Image management.
Data Q&A: Converts a user's natural language question into a SQL query to search tabular data. The chatbot then replies based on the query results. For more information, see Table management.
Flow: A flow manages continuous, contextual conversations designed to accomplish a specific task. For more information, see Flow management.

Tools
API plugin
You can call APIs independently within the chatbot's process. You can also centrally configure and manage APIs used in flow nodes on the API plugin page. For instructions on how to add an API, see API plugin.
MCP service
You can integrate third-party MCP services to use for the chatbot's knowledge-based Q&A.

Add MCP service
Click + to open the Add MCP Service window.

Click Create MCP to open the creation page. Fill in the MCP Server Name, MCP Server Description, and URL.
MCP Server Name: The name of the MCP server.
MCP Server Description: A description of the MCP server.
URL: The base URL of the MCP.
Type: Two types are supported: Streamable Http and SSE.
Authentication method: Two methods are supported. The default is no authentication. Bearer authentication is also supported.
NoteObtaining the URL, service type, and Bearer authentication token:
After activating the MCP service, you can view the service type and URL under External calls:

Authentication token: This is the API key, which you can add in Key management.

The configuration appears as shown in the following figure:

Click OK to create the service.

Click + Bind to add the service to the Tools section.


After a successful binding, you can test it in the test window.

Agent transfer settings
The strategy for transferring to a human agent includes the conditions that trigger the transfer and the chatbot's response actions.

Configuration details:
Conditions for transferring to a human agent: Enable the conditions based on your business needs.
Repetitive user questions: Supported only for voice chatbots. The system triggers a transfer if the user asks the same question five consecutive times.
Transfer by keyword: Enter keywords or keyword groups. Keyword groups can be added using an LGF expression. For details, see LGF expression syntax. A transfer is triggered if the user's question matches a keyword group.
Transfer by sensitive word: The system triggers a transfer if the user's question matches a configured sensitive word. To learn how to configure sensitive words, see Global sensitive words.
Transfer by emotion: A transfer is triggered when the chatbot detects that the user's emotion meets the transfer conditions. Supported emotions include public opinion risk, problem escalation, complaint, questioning service, abuse, anger, frustration, agitation, and praise.
Transfer on no answer: A transfer is triggered if the chatbot fails to answer a user's questions multiple consecutive times in the same session.

Chatbot response after transfer: You can configure three types of agent transfer actions: transfer directly to a skill group, transfer by calling an API plugin, and execute a transfer sub-flow.
Action
Description
Example
Transfer directly to a skill group
Configure the Reply to User message, the target skill group, and any Custom parameters. The skill group ID is the ID of a skill group already created in Alibaba Cloud Contact Center. Custom parameters contain information to pass to the human agent.

Transfer by calling an API plugin
Create and bind an API plugin in advance. Configure the Reply to User message, select the plugin under Transfer-to-Agent API Call, and set the API input parameters. When triggered, this action calls the plugin and sends the transfer message. If the plugin call fails, returns an exception, or times out, the chatbot sends the fallback reply for system exceptions.
For API configuration instructions, see API plugin. The value type can be set to constant or reference:
If you select constant, you can enter a fixed parameter value.
If you select reference, you can select system parameters or pass-through parameters, and then choose the specific parameter.
Value type is constant:

Value type is reference:

Execute a transfer sub-flow
Select a sub-flow that executes when the condition is met. The sub-flow can provide a response, call an API plugin, or perform other actions. To transfer to a human agent, configure the transfer command within a flow node.
ImportantTo learn how to create a sub-flow, see Sub-flow node.
A sub-flow must be published before it can be selected.
If the sub-flow call fails and does not provide a valid reply, the system reverts to the "Transfer directly to a skill group" strategy.
If the parameters for direct transfer are configured, the conversation is transferred to the corresponding agent console (for example, to Alibaba Cloud Contact Center if you have purchased the product).
If not configured, the system uses a fallback strategy and only provides a transfer reply.
NoteWhen using a third-party agent console:
The developer configures the specific transfer behavior in the chatbot console.
Transfer to a specified skill group: Use the skill group ID configured in your agent system.
Transfer with custom parameters: Use parameters defined by the developer.
When a transfer is triggered, the chatbot passes these parameters back to the developer.
The chatbot only configures these two settings; it does not parse them.
When a transfer is triggered, the chatbot passes this configuration back to the developer via the
Commandsfield in the chat API output.
The developer must parse and execute the corresponding commands.
The developer is responsible for implementing this parsing and execution logic.
If you use Alibaba Cloud Contact Center, you can transfer from a chatbot to a specific agent skill group without any additional development.
If you use a different agent console, you must implement the agent skill group invocation yourself.
More settings
Parameter | Function |
Model |
|
Recommended questions | When enabled, the chatbot suggests related questions after providing an answer. |
General knowledge | When enabled, the chatbot can use the LLM's general knowledge base to answer questions. |
Reply language | The chatbot's reply language can be set to one of three modes:
|
Security |
|
General Security Engine / AI Security Guard |
Note Enabling AI Security Guard:
The following figure shows the result of a message being intercepted by AI Security Guard:
|
System exception | This is the fallback reply provided by the chatbot in case of a system exception or service timeout. |


















