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
Name | Type | Default value |
---|---|---|
index | SummaryIndex | undefined |
choiceSelectPrompt? | (__namedParameters : { context : undefined | string = ""; query : undefined | string = "" }) => string | undefined |
choiceBatchSize | number | 10 |
formatNodeBatchFn? | NodeFormatterFunction | undefined |
parseChoiceSelectAnswerFn? | ChoiceSelectParserFunction | undefined |
serviceContext? | ServiceContext | undefined |
Returns
Defined in
packages/core/src/indices/summary/index.ts:336
Properties
choiceBatchSize
• choiceBatchSize: number
Defined in
packages/core/src/indices/summary/index.ts:330
choiceSelectPrompt
• choiceSelectPrompt: (__namedParameters
: { context
: undefined
| string
= ""; query
: undefined
| string
= "" }) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› context | undefined | string | "" |
› query | undefined | string | "" |
Returns
string
Defined in
packages/core/src/indices/summary/index.ts:329
formatNodeBatchFn
• formatNodeBatchFn: NodeFormatterFunction
Defined in
packages/core/src/indices/summary/index.ts:331
index
• index: SummaryIndex
Defined in
packages/core/src/indices/summary/index.ts:328
parseChoiceSelectAnswerFn
• parseChoiceSelectAnswerFn: ChoiceSelectParserFunction
Defined in
packages/core/src/indices/summary/index.ts:332
serviceContext
• Optional
serviceContext: ServiceContext
Defined in
packages/core/src/indices/summary/index.ts:333
Methods
getServiceContext
▸ getServiceContext(): undefined
| ServiceContext
Returns
undefined
| ServiceContext
Implementation of
BaseRetriever.getServiceContext
Defined in
packages/core/src/indices/summary/index.ts:411
retrieve
▸ retrieve(«destructured»
): Promise
<NodeWithScore
<Metadata
>[]>
Parameters
Name | Type |
---|---|
«destructured» | RetrieveParams |
Returns
Promise
<NodeWithScore
<Metadata
>[]>