Skip to content

IndexProps

Properties for defining a Index.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-bailian-index

Initializer

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkbailian"
&alicloudroscdkbailian.IndexProps {
    Name: interface{},
    SourceType: interface{},
    StructureType: interface{},
    WorkspaceId: interface{},
    CategoryIds: interface{},
    ChunkMode: interface{},
    ChunkSize: interface{},
    ConnectId: interface{},
    Database: interface{},
    DenseSimilarityTopK: interface{},
    Description: interface{},
    DocumentIds: interface{},
    EmbeddingModelName: interface{},
    EnableHeaders: interface{},
    EnableRewrite: interface{},
    KnowledgeScene: interface{},
    KnowledgeType: interface{},
    MetaExtractColumns: interface{},
    OverlapSize: interface{},
    PipelineCommercialCu: interface{},
    PipelineCommercialType: interface{},
    PipelineRetrieveRateLimitStrategy: interface{},
    RerankInstruct: interface{},
    RerankMinScore: interface{},
    RerankMode: interface{},
    RerankModelName: interface{},
    Separator: interface{},
    SinkInstanceId: interface{},
    SinkRegion: interface{},
    SinkType: interface{},
    SparseSimilarityTopK: interface{},
    Table: interface{},
    TableIds: interface{},
}

Properties

Name Type Description
Name interface{} Property name: Knowledge base name.
SourceType interface{} Property sourceType: Data source type.
StructureType interface{} Property structureType: Knowledge base type.
WorkspaceId interface{} Property workspaceId: Workspace ID.
CategoryIds interface{} Property categoryIds: Category IDs to import when creating the knowledge base.
ChunkMode interface{} Property chunkMode: Chunk strategy.
ChunkSize interface{} Property chunkSize: Chunk size, the maximum number of characters per text slice.
ConnectId interface{} Property connectId: Connection ID.
Database interface{} Property database: Database name for structured knowledge base.
DenseSimilarityTopK interface{} Property denseSimilarityTopK: Vector retrieval Top K.
Description interface{} Property description: Knowledge base description.
DocumentIds interface{} Property documentIds: Document IDs to import when creating the knowledge base.
EmbeddingModelName interface{} Property embeddingModelName: Embedding model used by the knowledge base.
EnableHeaders interface{} Property enableHeaders: Whether to enable headers for document parsing.
EnableRewrite interface{} Property enableRewrite: Whether to enable multi-turn dialogue rewriting.
KnowledgeScene interface{} Property knowledgeScene: Knowledge base scene.
KnowledgeType interface{} Property knowledgeType: Knowledge base type classification.
MetaExtractColumns interface{} Property metaExtractColumns: Metadata extraction configuration.
OverlapSize interface{} Property overlapSize: Overlap size, the number of overlapping characters between adjacent text slices.
PipelineCommercialCu interface{} Property pipelineCommercialCu: RCU count for enterprise edition.
PipelineCommercialType interface{} Property pipelineCommercialType: Knowledge base specification type.
PipelineRetrieveRateLimitStrategy interface{} Property pipelineRetrieveRateLimitStrategy: Retrieval rate limit strategy for enterprise edition.
RerankInstruct interface{} Property rerankInstruct: Custom rerank instruction.
RerankMinScore interface{} Property rerankMinScore: Similarity threshold.
RerankMode interface{} Property rerankMode: Rerank mode.
RerankModelName interface{} Property rerankModelName: Rerank model used by the knowledge base.
Separator interface{} Property separator: Separator for chunking.
SinkInstanceId interface{} Property sinkInstanceId: Vector storage instance ID.
SinkRegion interface{} Property sinkRegion: Region of the vector storage instance.
SinkType interface{} Property sinkType: Vector storage type.
SparseSimilarityTopK interface{} Property sparseSimilarityTopK: Keyword retrieval Top K.
Table interface{} Property table: Table name for structured knowledge base.
TableIds interface{} Property tableIds: Table IDs to import when creating the knowledge base.

NameRequired

Name interface{}
  • Type: interface{}

Property name: Knowledge base name.

1-20 characters. Supports Chinese, English, numbers, underscores (_), hyphens (-), periods (.) and colons (:).


SourceTypeRequired

SourceType interface{}
  • Type: interface{}

Property sourceType: Data source type.

DATA_CENTER_CATEGORY: import files from specified categories. DATA_CENTER_FILE: import specified files.


StructureTypeRequired

StructureType interface{}
  • Type: interface{}

Property structureType: Knowledge base type.

unstructured: document search or audio/video knowledge base. structured: data query or image Q&A knowledge base.


WorkspaceIdRequired

WorkspaceId interface{}
  • Type: interface{}

Property workspaceId: Workspace ID.

The knowledge base will be created in this workspace.


CategoryIdsOptional

CategoryIds interface{}
  • Type: interface{}

Property categoryIds: Category IDs to import when creating the knowledge base.

Required when SourceType is DATA_CENTER_CATEGORY.


ChunkModeOptional

ChunkMode interface{}
  • Type: interface{}

Property chunkMode: Chunk strategy.

If not specified, smart chunking is used. When set to regex, Separator must also be provided.


ChunkSizeOptional

ChunkSize interface{}
  • Type: interface{}

Property chunkSize: Chunk size, the maximum number of characters per text slice.

Range [1-6000]. Defaults to 500. If ChunkSize is less than 100, OverlapSize must also be set.


ConnectIdOptional

ConnectId interface{}
  • Type: interface{}

Property connectId: Connection ID.

Replaces the deprecated datasourceCode parameter.


DatabaseOptional

Database interface{}
  • Type: interface{}

Property database: Database name for structured knowledge base.


DenseSimilarityTopKOptional

DenseSimilarityTopK interface{}
  • Type: interface{}

Property denseSimilarityTopK: Vector retrieval Top K.

Retrieves the K most similar text slices by vector similarity. Range [0-100]. Defaults to 100. DenseSimilarityTopK + SparseSimilarityTopK must be <= 200. Only supported in UpdateIndex, not in CreateIndex.


DescriptionOptional

Description interface{}
  • Type: interface{}

Property description: Knowledge base description.

0-1000 characters.


DocumentIdsOptional

DocumentIds interface{}
  • Type: interface{}

Property documentIds: Document IDs to import when creating the knowledge base.

Required when SourceType is DATA_CENTER_FILE.


EmbeddingModelNameOptional

EmbeddingModelName interface{}
  • Type: interface{}

Property embeddingModelName: Embedding model used by the knowledge base.

Defaults to text-embedding-v3.


EnableHeadersOptional

EnableHeaders interface{}
  • Type: interface{}

Property enableHeaders: Whether to enable headers for document parsing.

Defaults to false.


EnableRewriteOptional

EnableRewrite interface{}
  • Type: interface{}

Property enableRewrite: Whether to enable multi-turn dialogue rewriting.

Defaults to true.


KnowledgeSceneOptional

KnowledgeScene interface{}
  • Type: interface{}

Property knowledgeScene: Knowledge base scene.

Must be provided together with KnowledgeType. The valid values depend on KnowledgeType.


KnowledgeTypeOptional

KnowledgeType interface{}
  • Type: interface{}

Property knowledgeType: Knowledge base type classification.

Must be provided together with KnowledgeScene. If both are omitted, the system uses default based on StructureType.


MetaExtractColumnsOptional

MetaExtractColumns interface{}
  • Type: interface{}

Property metaExtractColumns: Metadata extraction configuration.


OverlapSizeOptional

OverlapSize interface{}
  • Type: interface{}

Property overlapSize: Overlap size, the number of overlapping characters between adjacent text slices.

Range [0-1024]. Defaults to 100. Must be less than ChunkSize.


PipelineCommercialCuOptional

PipelineCommercialCu interface{}
  • Type: interface{}

Property pipelineCommercialCu: RCU count for enterprise edition.

Only required when PipelineCommercialType is enterprise. Range [1-200].


PipelineCommercialTypeOptional

PipelineCommercialType interface{}
  • Type: interface{}

Property pipelineCommercialType: Knowledge base specification type.

standard: Standard edition. enterprise: Enterprise edition. Defaults to standard.


PipelineRetrieveRateLimitStrategyOptional

PipelineRetrieveRateLimitStrategy interface{}
  • Type: interface{}

Property pipelineRetrieveRateLimitStrategy: Retrieval rate limit strategy for enterprise edition.

Defaults to downgrade.


RerankInstructOptional

RerankInstruct interface{}
  • Type: interface{}

Property rerankInstruct: Custom rerank instruction.

Required when RerankMode is custom.


RerankMinScoreOptional

RerankMinScore interface{}
  • Type: interface{}

Property rerankMinScore: Similarity threshold.

Only text slices with similarity score exceeding this value will be recalled. Range [0.01-1.00]. Defaults to 0.01.


RerankModeOptional

RerankMode interface{}
  • Type: interface{}

Property rerankMode: Rerank mode.

qa: Q&A scenario (default). similar: similarity scenario. custom: custom rerank instruction, requires RerankInstruct.


RerankModelNameOptional

RerankModelName interface{}
  • Type: interface{}

Property rerankModelName: Rerank model used by the knowledge base.

Defaults to qwen3-rerank when not specified.


SeparatorOptional

Separator interface{}
  • Type: interface{}

Property separator: Separator for chunking.

Only effective when ChunkMode is regex.


SinkInstanceIdOptional

SinkInstanceId interface{}
  • Type: interface{}

Property sinkInstanceId: Vector storage instance ID.

Required when SinkType is ADB.


SinkRegionOptional

SinkRegion interface{}
  • Type: interface{}

Property sinkRegion: Region of the vector storage instance.

Required when SinkType is ADB.


SinkTypeOptional

SinkType interface{}
  • Type: interface{}

Property sinkType: Vector storage type.

BUILT_IN: managed by Bailian platform. ADB: AnalyticDB for PostgreSQL. Defaults to BUILT_IN. When set to ADB, SinkInstanceId and SinkRegion are required.


SparseSimilarityTopKOptional

SparseSimilarityTopK interface{}
  • Type: interface{}

Property sparseSimilarityTopK: Keyword retrieval Top K.

Retrieves text slices by exact keyword matching. Range [0-100]. Defaults to 100. DenseSimilarityTopK + SparseSimilarityTopK must be <= 200. Only supported in UpdateIndex, not in CreateIndex.


TableOptional

Table interface{}
  • Type: interface{}

Property table: Table name for structured knowledge base.


TableIdsOptional

TableIds interface{}
  • Type: interface{}

Property tableIds: Table IDs to import when creating the knowledge base.