lloyal-agents API Reference
    Preparing search index...

    Interface Chunk

    A scored passage within a Resource, used for reranking and retrieval

    Chunks are produced by chunkResources (section-based for Markdown) or chunkFetchedPages (paragraph-based for web content). The tokens array is populated lazily by Reranker.tokenizeChunks before scoring.

    interface Chunk {
        endLine: number;
        heading: string;
        resource: string;
        startLine: number;
        text: string;
        tokens: number[];
    }
    Index

    Properties

    endLine: number

    Last line number (1-based) in the source resource

    heading: string

    Section heading or auto-generated preview used as a label

    resource: string

    Resource identifier (file name or URL) this chunk belongs to

    startLine: number

    First line number (1-based) in the source resource

    text: string

    Raw text content of the chunk

    tokens: number[]

    Pre-tokenized representation for the reranker — empty until Reranker.tokenizeChunks runs