UpdateIndex

更新时间:
复制 MD 格式

Updates the configuration of a specified knowledge base.

Operation description

Before a RAM user can call this operation, the RAM user must have the AliyunBailianDataFullAccess permission for Alibaba Cloud Model Studio. For more information, see Grant permissions. The RAM user must also be added to a workspace. For more information, see Add a member to a workspace. An Alibaba Cloud account can call this operation without authorization. Use the latest version of the Alibaba Cloud Model Studio SDK to call this operation. For more information, see Alibaba Cloud Model Studio SDK. Before you call this operation, ensure that the knowledge base is created and has not been deleted. The knowledge base ID (Id) must be valid. This operation is idempotent.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /{WorkspaceId}/index/update HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

Yes

The workspace ID.

llm-3shx2gu255oqxxxx

Request parameters

Parameter

Type

Required

Description

Example

Id

string

Yes

The knowledge base ID.

79c0alxxxx

Name

string

No

The name of the knowledge base.

企业帮助文档库

Description

string

No

The description of the knowledge base.

企业知识库

RerankMinScore

string

No

The minimum score for sorting. The value must be between 0 and 1.

0.01

DenseSimilarityTopK

integer

No

The number of most similar text segments to retrieve using vector search. A vector is generated for the input text, and the K most similar text segments are retrieved from the knowledge base. The value of K must be in the range of 0 to 100. The sum of DenseSimilarityTopK and SparseSimilarityTopK cannot exceed 200.

Default value: 100.

100

SparseSimilarityTopK

integer

No

The number of text segments to retrieve using an exact keyword match. This helps filter out irrelevant text segments and provides more accurate results. The value must be in the range of 0 to 100. The sum of DenseSimilarityTopK and SparseSimilarityTopK cannot exceed 200.

Default value: 100.

100

PipelineCommercialType

string

No

The edition of the knowledge base. Valid values:

  • standard: Standard Edition

  • enterprise: Ultimate Edition

standard

PipelineCommercialCu

integer

No

The number of Retrieval Compute Units (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 to 200.

3

Note: Specify at least one of the following parameters: Name, Description, or RerankMinScore.

Response elements

Element

Type

Description

Example

object

The schema of the response.

RequestId

string

The request ID.

17204B98-7734-4F9A-8464-xxx

Data

object

The data returned.

Id

string

The knowledge base ID.

79c0alxxxx

Status

string

The status code returned by the API.

200

Success

boolean

Indicates whether the request was successful. Valid values:

true: The request was successful.

false: The request 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

{
  "RequestId": "17204B98-7734-4F9A-8464-xxx",
  "Data": {
    "Id": "79c0alxxxx"
  },
  "Status": "200",
  "Success": true,
  "Message": "Required parameter(%s) missing or invalid, please check the request parameters.",
  "Code": "Success"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.