Zum Hauptinhalt springen

Class: SummaryIndexLLMRetriever

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

Implements

Constructors

constructor

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

Parameters

NameTypeDefault value
indexSummaryIndexundefined
choiceSelectPrompt?(__namedParameters: { context: undefined | string = ""; query: undefined | string = "" }) => stringundefined
choiceBatchSizenumber10
formatNodeBatchFn?NodeFormatterFunctionundefined
parseChoiceSelectAnswerFn?ChoiceSelectParserFunctionundefined
serviceContext?ServiceContextundefined

Returns

SummaryIndexLLMRetriever

Defined in

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

Properties

choiceBatchSize

choiceBatchSize: number

Defined in

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


choiceSelectPrompt

choiceSelectPrompt: (__namedParameters: { context: undefined | string = ""; query: undefined | string = "" }) => string

Type declaration

▸ («destructured»): string

Parameters
NameTypeDefault value
«destructured»Objectundefined
› contextundefined | string""
› queryundefined | string""
Returns

string

Defined in

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


formatNodeBatchFn

formatNodeBatchFn: NodeFormatterFunction

Defined in

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


index

index: SummaryIndex

Defined in

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


parseChoiceSelectAnswerFn

parseChoiceSelectAnswerFn: ChoiceSelectParserFunction

Defined in

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


serviceContext

Optional serviceContext: ServiceContext

Implementation of

BaseRetriever.serviceContext

Defined in

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

Methods

retrieve

retrieve(«destructured»): Promise<NodeWithScore<Metadata>[]>

Parameters

NameType
«destructured»RetrieveParams

Returns

Promise<NodeWithScore<Metadata>[]>

Implementation of

BaseRetriever.retrieve

Defined in

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