This topic describes how to use LangStudio to build an "information query service (IQS) web search-based chatbot" application flow. The application flow integrates the real-time search feature of Alibaba Cloud IQS to provide models with additional web search capabilities. This allows the models to deliver more accurate answers to user questions. Developers can perform flexible extension and secondary development by using the application flow template to meet specific scenario requirements.
Background information
In the era of information explosion, it is crucial to obtain real-time and accurate information for many application scenarios. The "IQS web search-based chatbot" application flow combines the real-time search technology with natural language processing capabilities to provide an efficient and intelligent solution. By integrating the real-time search feature of Alibaba Cloud IQS, the application flow can instantly retrieve the latest information from the web when users ask questions. This way, the model can generate more accurate and timely answers. This combination not only improves the accuracy of answers but also enhances the ability to access the latest information. Developers can flexibly extend and customize the application flow template provided by LangStudio for more professional applications in fields such as finance, education, and news that require real-time information updates.
Prerequisites
You have activated Alibaba Cloud IQS by contacting your account manager.
The "IQS web search-based chatbot" application flow requires the standard search feature of Alibaba Cloud IQS to retrieve information based on specific query statements.
(Optional) You have created a RAM role and attached the following policies to it for data security requirements. This role is required when you start the runtime and deploy an application flow.
AliyunIQSFullAccess
AliyunOSSFullAccess
AliyunPAIFullAccess
In addition, you have modified the trusted entity of this role to Platform for AI (PAI) and Elastic Algorithm Service (EAS). The following sample code provides an example of a trust policy:
{ "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "pai.aliyuncs.com" } }, { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "eas.pai.aliyuncs.com" } } ], "Version": "1" }
1. (Optional) Deploy an LLM
The "IQS web search-based chatbot" application flow requires large language model (LLM) services. If you already have model services that meet the requirements and support the OpenAI API, skip this step and use your existing services directly. In this topic, the DeepSeek-R1 model is used. You can choose QuickStart > Model Gallery to deploy the model. For more information about deployment, see One-click deployment of DeepSeek-V3 and DeepSeek-R1 and Deploy and train models.

2. Create an LLM service connection
In this topic, the EAS model service deployed by using the LLM in QuickStart > Model Gallery is used to create a connection. For information about other types of connections and details, see Create a connection.
Go to LangStudio, select a workspace, and then click Enter LangStudio. Then, click the Connection tab. On the Model Service tab of the Connection tab, click New Connection.

The following table describes the key parameters.
Parameter | Description |
Model Name | If you deploy a model in Model Gallery, click the model to enter the model details page and then view the method for obtaining the model name. For more information, see Create a connection. |
Service Provider |
|
3. Create and run an application flow
Go to LangStudio, select a workspace, and then click Enter LangStudio. On the Application Flow tab, click Create Application Flow to create an "IQS web search-based chatbot" application flow.

On the application flow details page, click Create Runtime in the upper-right corner. In the Create Runtime panel, configure the parameters. Note: To parse Python nodes or view more tools, you must ensure that the runtime is started.

Take note of the following parameter:
Instance RAM Role: If you have data security requirements, select Custom Roles for the Instance RAM Role parameter and select the RAM role that you created in Prerequisites for the RAM Role parameter. If you do not have security requirements, keep the default configurations.
Develop the application flow.

The following section describes the configurations of key nodes. Keep the default configurations for other nodes or configure the nodes based on your business requirements.
Alibaba Cloud IQS Search: Use Alibaba Cloud IQS to retrieve information based on specific query statements.
Time Range: Select the time range to query data.
(Optional) IQS Connection: If you have data security requirements, you can leave this parameter empty. If you do not have security requirements, you can select a configured IQS connection. For information about how to configure an IQS connection, see Custom connection. Configure the key and value as
api_keyand the corresponding value. For information about how to obtain the corresponding value, see IQS credential management.
LLM: Call an LLM to answer questions or process natural languages.
Model Configuration: Select the connection that you created in 2. Create an LLM service connection.
Chat History: Whether to enable the chat history feature to use the chat history information as input variables.
For more information about each node, see Appendix: Description of built-in components.
Click Run in the upper-right corner to execute the application flow. For information about common issues related to the application flow runtime, see FAQ.

Click View Logs in the generated answer section to view trace details or the topology.

4. Deploy the application flow
On the application flow details page, click Deploy in the upper-right corner to deploy the application flow as an EAS service. The following section describes the key parameters. Keep the default configurations for the remaining deployment parameters or configure them based on your business requirements.
Resource Information > Instances: Configure the number of service instances. The deployment in this topic is for the testing purpose only, so the number of instances is set to 1. In a production environment, we recommend that you configure multiple service instances to reduce the risk of a single point of failure.
VPC > VPC (VPC): The web search feature depends on Alibaba Cloud IQS that is deployed only in the China (Zhangjiakou), China (Beijing), and China (Shanghai) regions. If your application flow is not deployed in these regions, you must configure a VPC that supports access over the Internet as EAS services cannot be accessed over the Internet by default. For more information, see Configure Internet access.
Roles and Permissions > Instance RAM Role: If you have data security requirements, select Custom Roles and select the RAM role that you created in Prerequisites for the RAM Role parameter. If you do not have security requirements, keep the default configurations.
For more information, see Deploy an application flow.
5. Call the service
After successful deployment, the Overview tab of the EAS service details page appears. Then, click the Online Debugging tab to configure and send a request. The Key value in the request body must be the same as the value of the Chat Input parameter in the Start Node of the application flow. In this topic, the default field question is used.

For more information about the calling methods (such as API calling) and detailed instructions, see Call a service.