Class: KeywordTableSimpleRetriever
Extends
BaseKeywordTableRetriever
Constructors
new KeywordTableSimpleRetriever()
new KeywordTableSimpleRetriever(
__namedParameters
):KeywordTableSimpleRetriever
Parameters
• __namedParameters
• __namedParameters.index: KeywordTableIndex
• __namedParameters.keywordExtractTemplate?: KeywordExtractPrompt
• __namedParameters.maxKeywordsPerQuery: number
= 10
• __namedParameters.numChunksPerQuery: number
= 10
• __namedParameters.queryKeywordExtractTemplate?: QueryKeywordExtractPrompt
Returns
Inherited from
BaseKeywordTableRetriever.constructor
Defined in
packages/llamaindex/src/indices/keyword/index.ts:65
Properties
docstore
protected
docstore:BaseDocumentStore
Inherited from
BaseKeywordTableRetriever.docstore
Defined in
packages/llamaindex/src/indices/keyword/index.ts:57
index
protected
index:KeywordTableIndex
Inherited from
BaseKeywordTableRetriever.index
Defined in
packages/llamaindex/src/indices/keyword/index.ts:55
indexStruct
protected
indexStruct:KeywordTable
Inherited from
BaseKeywordTableRetriever.indexStruct
Defined in
packages/llamaindex/src/indices/keyword/index.ts:56
keywordExtractTemplate
protected
keywordExtractTemplate:KeywordExtractPrompt
Inherited from
BaseKeywordTableRetriever.keywordExtractTemplate
Defined in
packages/llamaindex/src/indices/keyword/index.ts:62
llm
protected
llm:LLM
<object
,object
>
Inherited from
BaseKeywordTableRetriever.llm
Defined in
packages/llamaindex/src/indices/keyword/index.ts:58
maxKeywordsPerQuery
protected
maxKeywordsPerQuery:number
Inherited from
BaseKeywordTableRetriever.maxKeywordsPerQuery
Defined in
packages/llamaindex/src/indices/keyword/index.ts:60
numChunksPerQuery
protected
numChunksPerQuery:number
Inherited from
BaseKeywordTableRetriever.numChunksPerQuery
Defined in
packages/llamaindex/src/indices/keyword/index.ts:61
objectMap
objectMap:
Map
<string
,unknown
>
Inherited from
BaseKeywordTableRetriever.objectMap
Defined in
packages/core/retriever/dist/index.d.ts:20
queryKeywordExtractTemplate
protected
queryKeywordExtractTemplate:QueryKeywordExtractPrompt
Inherited from
BaseKeywordTableRetriever.queryKeywordExtractTemplate
Defined in
packages/llamaindex/src/indices/keyword/index.ts:63
Methods
_getPromptModules()
protected
_getPromptModules():object
Return a dictionary of sub-modules within the current module that also implement PromptMixin (so that their prompts can also be get/set).
Can be blank if no sub-modules.
Returns
object
Inherited from
BaseKeywordTableRetriever._getPromptModules
Defined in
packages/core/retriever/dist/index.d.ts:23
_getPrompts()
protected
_getPrompts():object
Returns
object
Inherited from
BaseKeywordTableRetriever._getPrompts
Defined in
packages/core/retriever/dist/index.d.ts:22
_handleRecursiveRetrieval()
_handleRecursiveRetrieval(
params
,nodes
):Promise
<NodeWithScore
<Metadata
>[]>
Parameters
• params: QueryBundle
• nodes: NodeWithScore
<Metadata
>[]
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Inherited from
BaseKeywordTableRetriever._handleRecursiveRetrieval
Defined in
packages/core/retriever/dist/index.d.ts:27
_retrieve()
_retrieve(
query
):Promise
<NodeWithScore
<Metadata
>[]>
Parameters
• query: QueryBundle
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Inherited from
BaseKeywordTableRetriever._retrieve
Defined in
packages/llamaindex/src/indices/keyword/index.ts:94
_retrieveFromObject()
_retrieveFromObject(
object
,queryBundle
,score
):NodeWithScore
<Metadata
>[]
Parameters
• object: unknown
• queryBundle: QueryBundle
• score: number
Returns
Inherited from
BaseKeywordTableRetriever._retrieveFromObject
Defined in
packages/core/retriever/dist/index.d.ts:28
_updatePrompts()
protected
_updatePrompts():void
Returns
void
Inherited from
BaseKeywordTableRetriever._updatePrompts
Defined in
packages/core/retriever/dist/index.d.ts:21
getKeywords()
getKeywords(
query
):Promise
<string
[]>
Parameters
• query: string
Returns
Promise
<string
[]>
Overrides
BaseKeywordTableRetriever.getKeywords
Defined in
packages/llamaindex/src/indices/keyword/index.ts:133