メインコンテンツまでスキップ

Class: SummaryIndexLLMRetriever

LLM retriever for SummaryIndex which lets you select the most relevant chunks.

Implements

Constructors

new SummaryIndexLLMRetriever()

new SummaryIndexLLMRetriever(index, choiceSelectPrompt?, choiceBatchSize?, formatNodeBatchFn?, parseChoiceSelectAnswerFn?, serviceContext?): SummaryIndexLLMRetriever

Parameters

index: SummaryIndex

choiceSelectPrompt?

choiceBatchSize?: number= 10

formatNodeBatchFn?: NodeFormatterFunction

parseChoiceSelectAnswerFn?: ChoiceSelectParserFunction

serviceContext?: ServiceContext

Returns

SummaryIndexLLMRetriever

Source

packages/core/src/indices/summary/index.ts:320

Properties

choiceBatchSize

choiceBatchSize: number

Source

packages/core/src/indices/summary/index.ts:314


choiceSelectPrompt()

choiceSelectPrompt: (__namedParameters) => string

Parameters

__namedParameters

__namedParameters.context: undefined | string= ""

__namedParameters.query: undefined | string= ""

Returns

string

Source

packages/core/src/indices/summary/index.ts:313


formatNodeBatchFn

formatNodeBatchFn: NodeFormatterFunction

Source

packages/core/src/indices/summary/index.ts:315


index

index: SummaryIndex

Source

packages/core/src/indices/summary/index.ts:312


parseChoiceSelectAnswerFn

parseChoiceSelectAnswerFn: ChoiceSelectParserFunction

Source

packages/core/src/indices/summary/index.ts:316


serviceContext?

optional serviceContext: ServiceContext

Implementation of

BaseRetriever . serviceContext

Source

packages/core/src/indices/summary/index.ts:317

Methods

retrieve()

retrieve(__namedParameters): Promise <NodeWithScore <Metadata>[]>

Parameters

__namedParameters: RetrieveParams

Returns

Promise <NodeWithScore <Metadata>[]>

Implementation of

BaseRetriever . retrieve

Source

packages/core/src/indices/summary/index.ts:337