Skip to main content

KnowledgeChunk

@retinue/monorepo


@retinue/monorepo / backend/src / KnowledgeChunk

Type Alias: KnowledgeChunk

KnowledgeChunk = object

Defined in: backend/src/persistence/index.ts:1370

Properties​

authSubject​

readonly authSubject: string

Defined in: backend/src/persistence/index.ts:1385

Who may see this chunk, as an opaque subject the authorization engine understands.

A conversation id for an attachment, a workspace id for shared knowledge. Opaque here on purpose: this port must not know the permission model, only that a search is scoped to a set of subjects.


chunkIndex​

readonly chunkIndex: number

Defined in: backend/src/persistence/index.ts:1376

Position within the source, so neighbouring chunks can be fetched to widen context.


content​

readonly content: string

Defined in: backend/src/persistence/index.ts:1377


createdAt​

readonly createdAt: string

Defined in: backend/src/persistence/index.ts:1389


embeddingModel​

readonly embeddingModel: EmbeddingModelRef

Defined in: backend/src/persistence/index.ts:1386


id​

readonly id: string

Defined in: backend/src/persistence/index.ts:1371


locator?​

readonly optional locator?: string

Defined in: backend/src/persistence/index.ts:1388

Where in the source this came from, for a citation that resolves.


sourceId​

readonly sourceId: string

Defined in: backend/src/persistence/index.ts:1374

The file, artifact or message this came from.


sourceType​

readonly sourceType: KnowledgeSourceType

Defined in: backend/src/persistence/index.ts:1372


tokenCount​

readonly tokenCount: number

Defined in: backend/src/persistence/index.ts:1378