All Products
Search
Document Center

EventBridge:KnowledgeBaseDocument

Last Updated:Sep 15, 2026

Parameter

Type

Description

Example

object

The information about a single document entry in a knowledge base, including the document ID, file name, processing status, file size, chunk count, custom metadata, chunking configuration snapshot, and source information.

ChunkConfiguration

object

The snapshot of the document-level chunking policy actually used for this document. This field is returned only if ChunkConfiguration was explicitly specified during upload (BeginUpload) or update (UpdateDocument). If not specified, the document is chunked based on the knowledge base-level default configurations, and this field is not returned. The knowledge base-level configuration is not echoed back to avoid misleading users about the actual chunking basis for this document when the knowledge base-level configuration is subsequently changed.

HeadingLevel

integer

The heading level (1 to 6) used for splitting in the BY_HEADING strategy. Headings at or above this level serve as split boundaries. Deeper-level headings are retained in the chunk body.

2

MaxChunkSize

integer

The maximum character length of a single chunk. Starting from revision 22, this value is character-based. Valid values: 1 to 6000.

600

OverlapSize

integer

The overlap character length between adjacent chunks. This parameter takes effect only for the BY_LENGTH strategy. If the value is greater than 0, the beginning of the next chunk repeats the content from the end of the previous chunk within this window. The overlap does not cause a chunk to exceed MaxChunkSize. A value of 0 indicates no overlap.

40

PreprocessRules

object

The snapshot of preprocessing rules.

RemoveUrlsAndEmails

boolean

Specifies whether to remove URLs and email addresses during parsing.

false

ReplaceConsecutiveWhitespace

boolean

Specifies whether to replace consecutive whitespace characters (spaces, line breaks, and tab characters) with a single space.

true

Separator

string

The separator used in the BY_SEPARATOR strategy. The separator is matched as a literal string (not a regular expression). The maximum length is 32 characters.

\\n\\n

Strategy

string

The chunking strategy. Valid values:

  • AUTO: intelligent splitting (heading-aware + paragraph packing).

  • BY_LENGTH: sliding window splitting by length. You can specify OverlapSize.

  • BY_SEPARATOR: splitting by separator. You must specify Separator.

  • BY_HEADING: splitting by heading level. You must specify HeadingLevel.

BY_SEPARATOR

ChunkCount

integer

The number of chunks generated after processing is complete.

120

CreatedAt

string

The time when the document was created.

2026-08-24T10:00:00Z

DocumentId

string

The unique identifier of the document.

doc-bp1xxxxxxxxxxxx

ErrorCode

string

The stable error code returned when processing fails.

FILE_CORRUPTED

ErrorMessage

string

The desensitized error message returned when processing fails.

parse pdf failed

FileName

string

The file name of the document.

manual.pdf

FileSize

integer

The file size of the document, in bytes.

1048576

Metadata

array

The document-level metadata key-value pairs, including constant field values and system variable values. This field is not returned if no metadata is specified.

[{"Key":"department","Value":"R&D"}]

object

The metadata key-value pair.

Key

string

The metadata field name.

department

Value

string

The metadata field value.

R&D

SourceModifiedTime

integer

The last modification time in the upstream source system, in epoch milliseconds. This field is empty if no source information is available.

1788000000000

SourceType

string

The delivery channel through which the document entered the knowledge base. This value is written by the system and cannot be specified by users. Valid values:

  • UPLOAD: manually uploaded through the console or API.

  • OSS: imported through an OSS event stream.

New values may be added when new channels are supported. The values are not restricted to a fixed enumeration.

UPLOAD

SourceUri

string

The original source address of the document, such as oss://bucket/path/file.md. This field may be empty for manually uploaded documents.

oss://my-bucket/docs/handbook.pdf

Status

string

The processing status of the document. Valid values:

  • UPLOADING: uploading in progress.

  • PENDING: upload complete and queued for processing. This is typically a transitional state that lasts for seconds.

  • PROCESSING: parsing and processing in progress.

  • COMPLETED: processing complete and searchable.

  • FAILED: processing failed.

  • DELETING: deletion in progress.

COMPLETED

UpdatedAt

string

The time when the document was last updated.

2026-08-24T10:00:00Z