Skip to main content
Prompt样例库

Migrating Prompt Example Libraries to RAG Table Libraries

To deliver more powerful and flexible knowledge augmentation capabilities, the Prompt Example Library will be replaced by the more comprehensive RAG Table Library. This document guides you through the entire migration process from the Prompt Example Library to the RAG Table Library.

Workflow

The migration process consists of four main steps:
  1. Export data: Export data from your existing Prompt Example Library to your local machine.
  2. Create and import: Create a new RAG Table Library and import the exported file(s).
  3. Update application configuration: Add the RAG Table Library as a knowledge source in your application.
  4. Validate and publish: Debug and test question-answering behavior, then publish the updated application.

How to Use

Step 1: Export Prompt Example Library Data

Navigate to the Prompt Example Library page, select the library you wish to migrate, and click Export. The dataset will be downloaded to your local machine.

Step 2: Create an RAG Table Library and Import Data

Related documentation: See the RAG Table Library documentation.
Fill in basic information Go to the Knowledge Base page and create a Data Query type knowledge base: Enter a name in the Knowledge Base Name field, select Data Query as the Knowledge Base Type, then click Next. Import data Upload the dataset exported in Step 1, and fill in the name information. Switch to the Upload Data Table tab, enter Knowledge Content Table as the Data Table Name, and after uploading the file, click Next. Index configuration To replicate the retrieval behavior of the legacy Prompt Example Library (i.e., matching solely on the question column), disable indexing for the answer field. After confirming all settings are correct, click Submit. By default, multi-turn conversation rewriting is enabled, the vector model is set to Official Vector v4 (New), the reranking model is set to Official Rerank, similarity threshold is set to 0.20, and maximum recall count is set to 5.

Step 3: Update Agent Configuration

  1. In your application, disable the Prompt Example Library toggle and remove any associated variables from your prompt template.
  2. Click the + icon next to Knowledge Sources, then select the RAG Table Library created in Step 2. In the Knowledge Configuration Panel, under the Tables section, click + Add Table-Based Knowledge Base (e.g., “Technical Knowledge Content”) to configure parameters such as similarity threshold and weight.
  3. (Optional) Optimize retrieval strategy. Click Edit Retrieval Strategy, adjust the recall pipeline per business needs, and use the right-side input box to test with sample questions.
    • If latency is critical, uncheck Enable Multi-turn Rewriting, and disable Reranking, and adjust the Recall Count.
    • In the Assembly Strategy section, select By Recall Count, and adjust the Number of Retrieved Snippets and Maximum Assembly Length (tokens) sliders.

Step 4: Test and Publish

In the right-side debugging panel, enter a query related to your RAG Table Library to verify that the model successfully retrieves and answers using content from the library. Once testing passes, publish the application to apply the changes live.

API Invocation

When invoking your application, set the request parameter has_thoughts to true. The response’s thoughts field will include detailed retrieval process information—ideal for debugging and validation. For invocation examples, see Application Invocation – Retrieving from Knowledge Bases.

Billing Information

Billing may apply during certain operations.
StepBilling Status
Building the knowledge baseFree of charge.
Integrating into business applicationsWhen calling Alibaba Cloud Bailian applications, text chunks retrieved from the knowledge base increase the LLM’s input token count—potentially increasing inference (API call) costs. For details on inference pricing, see Billing Items and Pricing.

Note: If you only perform retrieval (e.g., via the Retrieve API) without going through Bailian for generation, no fees apply.
Management & OperationsFree of charge.
RAG Table Libraries use pay-as-you-go (postpaid) billing. Usage of the following billing items is measured hourly and automatically deducted from your Alibaba Cloud account. Ensure sufficient account balance (top up via Cost & Billing) to avoid service interruption due to overdue payments.
Billing ItemDescription
Specification FeeRuntime cost for Standard or Ultimate edition knowledge bases. Pricing details available on the Pricing page. Configuration changes trigger prorated billing starting at the time of change.
Vector & Reranking Model Invocation FeesFees incurred when creating, updating, or retrieving from the knowledge base—specifically for embedding (vectorization) and reranking model calls. Charged per input token; pricing shown on the Pricing page.
Bill Inquiry: Billing Details

Frequently Asked Questions

Why migrate to the RAG Table Library?

  • Capacity & Format: RAG Table Libraries have no row limit—unlike the Prompt Example Library’s hard cap of 300 Q&A pairs.
  • Retrieval & Recall: The Prompt Example Library does not support configurable recall strategies. RAG Table Libraries retain all original functionality and add full control over retrieval logic—enabling richer, more adaptable use cases.

Will model response quality remain the same after migration?

Typically, it improves. RAG Table Libraries leverage advanced retrieval algorithms and offer extensive configuration options. You can fine-tune retrieval settings (e.g., similarity thresholds, reranking models, assembly strategies) through iterative debugging to achieve optimal performance.