Skip to main content

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

Defined in

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

Properties

choiceBatchSize

choiceBatchSize: number

Defined in

packages/llamaindex/src/indices/summary/index.ts:310


choiceSelectPrompt()

choiceSelectPrompt: (__namedParameters) => string

Parameters

__namedParameters

__namedParameters.context: undefined | string = ""

__namedParameters.query: undefined | string = ""

Returns

string

Defined in

packages/llamaindex/src/indices/summary/index.ts:309


formatNodeBatchFn

formatNodeBatchFn: NodeFormatterFunction

Defined in

packages/llamaindex/src/indices/summary/index.ts:311


index

index: SummaryIndex

Defined in

packages/llamaindex/src/indices/summary/index.ts:308


parseChoiceSelectAnswerFn

parseChoiceSelectAnswerFn: ChoiceSelectParserFunction

Defined in

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


serviceContext?

optional serviceContext: ServiceContext

Implementation of

BaseRetriever.serviceContext

Defined in

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

Methods

retrieve()

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

Parameters

__namedParameters: RetrieveParams

Returns

Promise<NodeWithScore<Metadata>[]>

Implementation of

BaseRetriever.retrieve

Defined in

packages/llamaindex/src/indices/summary/index.ts:333