lloyal-agents API Reference
    Preparing search index...

    Interface Reranker

    Embedding-based reranker for scoring corpus chunks against a query

    Implementations tokenize chunks up front via tokenizeChunks, then stream progressive results from score. Used by SearchTool to rank knowledge-base passages.

    interface Reranker {
        dispose(): void;
        score(query: string, chunks: Chunk[]): AsyncIterable<ScoredResult>;
        tokenizeChunks(chunks: Chunk[]): Promise<void>;
    }
    Index

    Methods

    • Pre-tokenize chunks for subsequent scoring calls

      Parameters

      Returns Promise<void>