Skip to main content

Class: ListIndexLLMRetriever

LLM retriever for ListIndex.

Implements

Constructors

constructor

new ListIndexLLMRetriever(index, choiceSelectPrompt?, choiceBatchSize?, formatNodeBatchFn?, parseChoiceSelectAnswerFn?, serviceContext?)

Parameters

NameTypeDefault value
indexListIndexundefined
choiceSelectPrompt?SimplePromptundefined
choiceBatchSizenumber10
formatNodeBatchFn?NodeFormatterFunctionundefined
parseChoiceSelectAnswerFn?ChoiceSelectParserFunctionundefined
serviceContext?ServiceContextundefined

Defined in

indices/list/ListIndexRetriever.ts:64

Properties

choiceBatchSize

choiceBatchSize: number

Defined in

indices/list/ListIndexRetriever.ts:59


choiceSelectPrompt

choiceSelectPrompt: SimplePrompt

Defined in

indices/list/ListIndexRetriever.ts:58


formatNodeBatchFn

formatNodeBatchFn: NodeFormatterFunction

Defined in

indices/list/ListIndexRetriever.ts:60


index

index: ListIndex

Defined in

indices/list/ListIndexRetriever.ts:57


parseChoiceSelectAnswerFn

parseChoiceSelectAnswerFn: ChoiceSelectParserFunction

Defined in

indices/list/ListIndexRetriever.ts:61


serviceContext

serviceContext: ServiceContext

Defined in

indices/list/ListIndexRetriever.ts:62

Methods

getServiceContext

getServiceContext(): ServiceContext

Returns

ServiceContext

Implementation of

BaseRetriever.getServiceContext

Defined in

indices/list/ListIndexRetriever.ts:127


retrieve

retrieve(query, parentEvent?): Promise<NodeWithScore[]>

Parameters

NameType
querystring
parentEvent?Event

Returns

Promise<NodeWithScore[]>

Implementation of

BaseRetriever.retrieve

Defined in

indices/list/ListIndexRetriever.ts:81