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:
- Export data: Export data from your existing Prompt Example Library to your local machine.
- Create and import: Create a new RAG Table Library and import the exported file(s).
- Update application configuration: Add the RAG Table Library as a knowledge source in your application.
- 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.
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
- In your application, disable the Prompt Example Library toggle and remove any associated variables from your prompt template.
- 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.
- (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.
| Step | Billing Status |
|---|---|
| Building the knowledge base | Free of charge. |
| Integrating into business applications | When 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 & Operations | Free of charge. |
| Billing Item | Description |
|---|---|
| Specification Fee | Runtime 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 Fees | Fees 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. |
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.