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?
)
Parameters
Name | Type | Default value |
---|---|---|
index | SummaryIndex | undefined |
choiceSelectPrompt? | (__namedParameters : Object ) => string | undefined |
choiceBatchSize | number | 10 |
formatNodeBatchFn? | NodeFormatterFunction | undefined |
parseChoiceSelectAnswerFn? | ChoiceSelectParserFunction | undefined |
serviceContext? | ServiceContext | undefined |
Defined in
packages/core/src/indices/summary/SummaryIndexRetriever.ts:65
Properties
choiceBatchSize
• choiceBatchSize: number
Defined in
packages/core/src/indices/summary/SummaryIndexRetriever.ts:59
choiceSelectPrompt
• choiceSelectPrompt: (__namedParameters
: Object
) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type |
---|---|
«destructured» | Object |
Returns
string
Defined in
packages/core/src/indices/summary/SummaryIndexRetriever.ts:58
formatNodeBatchFn
• formatNodeBatchFn: NodeFormatterFunction
Defined in
packages/core/src/indices/summary/SummaryIndexRetriever.ts:60
index
• index: SummaryIndex
Defined in
packages/core/src/indices/summary/SummaryIndexRetriever.ts:57
parseChoiceSelectAnswerFn
• parseChoiceSelectAnswerFn: ChoiceSelectParserFunction
Defined in
packages/core/src/indices/summary/SummaryIndexRetriever.ts:61
serviceContext
• serviceContext: ServiceContext
Defined in
packages/core/src/indices/summary/SummaryIndexRetriever.ts:62
Methods
getServiceContext
▸ getServiceContext(): ServiceContext
Returns
Implementation of
BaseRetriever.getServiceContext
Defined in
packages/core/src/indices/summary/SummaryIndexRetriever.ts:130
retrieve
▸ retrieve(query
, parentEvent?
): Promise
<NodeWithScore
<Metadata
>[]>
Parameters
Name | Type |
---|---|
query | string |
parentEvent? | Event |
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Implementation of
Defined in
packages/core/src/indices/summary/SummaryIndexRetriever.ts:82