All Products
Search
Document Center

Alibaba Cloud Model Studio:Build a private knowledge Q&A application without coding

Last Updated:Jun 03, 2025

Large language models cannot directly answer questions in private knowledge domains. However, you can Large language models (LLM) cannot directly answer questions in private knowledge domains. However, you can create an agent application in Model Studio and integrate private knowledge documents to build a Q&A application that can answer questions in private domains without writing any code.

Important

Only users who created Model Studio applications before April 21, 2025, can access the Application tab and use all its features, including applications (Agent applications, Workflow applications, Agent orchestration applications), components (Prompt, Plug-in), data (Knowledge base, Application data) features and related APIs. This feature is in preview. Use with caution in production environments.

image

Performance showcase

Application without a knowledge base

Without a private knowledge base, the LLM cannot accurately answer questions about "Bailian phones".

无

Application with a knowledge base

With a private knowledge base, the LLM can provide accurate answers to questions about "Bailian phones".

有

Step 1: Build your first agent application (About 1 minute)

  1. Create a blank application: Go to My Applications. Click Create Application. In the dialog box that appears, choose the Agent Application tab and click Create Now.

image

  1. Edit the application name: Change the application name to identify the purpose of the application.

    In this tutorial, the application name is changed to "Bailian Phone Guide".

image

  1. Select a model: Choose an LLM for your application. We recommend Qwen-Max.

    The model will incur charges, but Model Studio provides a free quota. To check it, go to Models and click View Details on each model card.

image

  1. Design the Prompt: Design the System Prompt, which defines the role and task of the application. You can use the following prompt:

    "You are a sales consultant of Bailian phone. Your task is to help customers compare phone specifications, analyze their needs, and provide personalized recommendations."

image

  1. Set welcome message and preset questions: Click image in the upper right corner to set the agent's welcome message and preset questions.

    Welcome message: Hello, I am your shopping guide! I'm here to help you choose your ideal Bailian phone.
    Preset question 1: What phones do you have here?
    Preset question 2: Recommend the most cost-effective phone for me.
    Preset question 3: Help me select a Bailian phone with the best camera quality for 3000 yuan.

image

image

  1. Test the application: Click a question on the right to ask:

    For example: "Help me select a Bailian phone with the best camera quality for 3000 yuan."
    Due to the lack of knowledge about "Bailian phones", the application may provide vague or even fabricated answers. Next, follow the turtorial to configure a knowledge base.

image

Step 2: Build a knowledge base (About 3 minutes)

Upload knowledge documents

  1. Go to Application Data and click Import Data.

    Model Studio provides the Category Management feature for organizing documents. For this tutorial, you can use the default category. After uploading knowledge documents, they are automatically saved under the Default Category.

image

  1. You can upload the sample file Bailian Phones Specifications.docx. After the document is uploaded, click Confirm.

    The Import Data wizard provides default configurations. No change is necessary for this tutorial.

image

  1. Wait for Model Studio to complete the import.

    The import time depends on the document size, typically ranging from 1 to 6 minutes.

image

Create a knowledge base

  1. Go to Knowledge Base and click Create Knowledge Base.

image

  1. Fill in the Knowledge Base Name, and click Next Step.

    Create Knowledge Base wizard provides default configurations. No change is necessary for this tutorial.

image

  1. Choose Select Category, select Default Category, and click Next Step.

    In this step, select the document for building the knowledge base. The Create Knowledge Base wizard provides default configurations. No change is necessary for this tutorial.

image

  1. Select Intelligent Splitting, and click Import.

    Intelligent Splitting is a system preset strategy that has been evaluated to provide the best retrieval results for most documents.

image

  1. Wait for Model Studio to complete the parsing.

    The parsing time depends on the document size, typically 1 to 2 minutes.

image

Step 3: Add the knowledge base to your application and publish it (About 1 minute)

  1. Go to My Applications. Click Configure under the "Bailian phone Shopping Guide" application you just created.

image

  1. Turn on the Knowledge Base switch. Click + Knowledge Base and add the knowledge base.

    The application will automatically generate the corresponding prompts. No change is necessary.

image

  1. Click a question on the right to ask:

    For example: "Help me select a Bailian phone with the best camera quality for 3000 yuan."
    The application can now accurately answer your questions

image

  1. Publish the application: Click Publish in the upper-right corner.

image

Step 4: Test the application (About 3 minutes)

Model Studio provides a test web page for your application, allowing you to share and test it on a small scale.

  1. Get the test page: Click Publish under the application you created. On the Publish Channel page . click Create next to Official Sharing Method.

image

image

  1. Customize welcome message and recommended prompts: Click Edit Page to modify the Welcome Message and Recommended Prompts. Click Preview to preview the changes. You can use the following templates for Recommended Prompts:

    Welcome Message Title: Hi, I'm your guide!
    Welcome message content: I'm here to assist you in selecting the ideal Bailian phone. Feel free to ask:
    Recommended Prompt 1: What phones do you have here?
    Recommended Prompt 2: Recommend the most cost-effective phone for me.
    Recommended Prompt 3: Help me select a Bailian phone that offers the best camera quality for under 3000 yuan.

image

  1. Share the test page: Click Share URL to share the application page with other accounts within the same workspace, such as RAM users, for testing purposes.

    Note that the shared link is not accessible to other Alibaba Cloud accounts.

image

What to do next