Updates the configuration of a specified knowledge base.
Operation description
- RAM users (sub-accounts) must first obtain the API permissions for Alibaba Cloud Model Studio (
AliyunBailianDataFullAccessis required) and join a workspace before they can call this operation. Alibaba Cloud accounts (primary accounts) can call this operation directly without authorization. We recommend that you call this operation by using the latest version of the Alibaba Cloud Model Studio SDK. - Before you call this operation, make sure that your knowledge base has been created and has not been deleted (that is, the knowledge base ID
Idis valid). - This operation is idempotent.
Debugging
You can run this operation directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Debug
Authorization information
The following table describes the authorization information of the API. You can use the Action element in a RAM permission policy statement to grant a RAM user or RAM role the permission to call this API. Details are as follows:
- Operation: the specific permission point.
- Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization in the operation. Details are as follows:
- Required resource types are marked with a leading asterisk (*).
- For operations that do not support resource-level authorization,
All resourcesis used.
- Condition keyword: the condition keywords defined by the cloud product itself.
- Related operations: the other permissions required to successfully perform the operation. The caller must have the permissions of the related operations at the same time for the operation to succeed.
| Operation | Access level | Resource type | Condition keyword | Related operations |
|---|---|---|---|---|
| sfm:UpdateIndex | update | *All resources * |
| None |
Request syntax
Request parameters
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The workspace ID. | llm-3shx2gu255oqxxxx |
| Id | string | Yes | The knowledge base ID. | 79c0alxxxx |
| Name | string | No | The name of the knowledge base. | Enterprise help document library |
| Description | string | No | The description of the knowledge base. | Enterprise knowledge base |
| RerankMinScore | string | No | The minimum score for sorting. The value must be in the range of [0-1]. | 0.01 |
| DenseSimilarityTopK | integer | No | Top K for vector retrieval: a vector is generated for the input text, and the K text segments whose vector representations are most similar to it are retrieved from the knowledge base. The value of K must be in the range of [0-100]. The sum of The default value is 100. | 100 |
| SparseSimilarityTopK | integer | No | Top K for keyword retrieval: text segments in the knowledge base that exactly match the keywords of the input text are retrieved. This helps you filter out irrelevant text segments and provides more accurate results. The value must be in the range of [0-100]. The sum of The default value is 100. | 100 |
| PipelineCommercialType | string | No | The edition of the knowledge base. Valid values:
| standard |
| PipelineCommercialCu | integer | No | The number of RCUs for the Ultimate Edition knowledge base. This parameter is required only when PipelineCommercialType is set to enterprise. The value must be in the range of [1-200]. | 3 |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | The request ID. | 17204B98-7734-4F9A-8464-xxx |
| Data | object | The business data returned by the operation. | |
| Id | string | The knowledge base ID. | 79c0alxxxx |
| Status | string | The status code returned by the operation. | 200 |
| Success | boolean | Indicates whether the operation call was successful. Valid values: true: successful false: failed | true |
| Message | string | The error message. | Required parameter(%s) missing or invalid, please check the request parameters. |
| Code | string | The status code. | Success |
Examples
Success response
JSON format
Error codes
Visit the Error Center to view more error codes.
Change history
| Change time | Change summary | Operation |
|---|---|---|
| 2026-01-19 | New OpenAPI | View change details |