Class: RetrieverQueryEngine
A query engine that uses a retriever to query an index and then synthesizes the response.
Extends
Constructors
new RetrieverQueryEngine()
new RetrieverQueryEngine(
retriever
,responseSynthesizer
?,preFilters
?,nodePostprocessors
?):RetrieverQueryEngine
Parameters
• retriever: BaseRetriever
• responseSynthesizer?: BaseSynthesizer
• preFilters?: unknown
• nodePostprocessors?: BaseNodePostprocessor
[]
Returns
Overrides
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:19
Properties
_query
protected
readonly
_query:QueryFn
Inherited from
Defined in
packages/core/query-engine/dist/query-engine/index.d.ts:27
nodePostprocessors
nodePostprocessors:
BaseNodePostprocessor
[]
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:16
preFilters?
optional
preFilters:unknown
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:17
responseSynthesizer
responseSynthesizer:
BaseSynthesizer
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:15
retriever
retriever:
BaseRetriever
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:14
Methods
_getPromptModules()
_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
responseSynthesizer
responseSynthesizer:
BaseSynthesizer
Overrides
BaseQueryEngine
._getPromptModules
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:65
_getPrompts()
protected
_getPrompts():object
Returns
object
Overrides
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:59
_updatePrompts()
protected
_updatePrompts():void
Returns
void
Overrides
BaseQueryEngine
._updatePrompts
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:63
getPrompts()
getPrompts():
PromptsRecord
Returns
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:58
query()
query(params)
query(
params
):Promise
<AsyncIterable
<EngineResponse
,any
,any
>>
Parameters
• params: StreamingQueryParams
Returns
Promise
<AsyncIterable
<EngineResponse
, any
, any
>>
Inherited from
Defined in
packages/core/query-engine/dist/query-engine/index.d.ts:30
query(params)
query(
params
):Promise
<EngineResponse
>
Parameters
• params: NonStreamingQueryParams
Returns
Promise
<EngineResponse
>
Inherited from
Defined in
packages/core/query-engine/dist/query-engine/index.d.ts:31
retrieve()
retrieve(
query
):Promise
<NodeWithScore
<Metadata
>[]>
Parameters
• query: QueryType
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Overrides
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:87
updatePrompts()
updatePrompts(
prompts
):void
Parameters
• prompts: PromptsRecord
Returns
void
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:59
validatePrompts()
validatePrompts(
promptsDict
,moduleDict
):void
Parameters
• promptsDict: PromptsRecord
• moduleDict: ModuleRecord
Returns
void
Inherited from
BaseQueryEngine
.validatePrompts
Defined in
packages/core/prompts/dist/prompts/index.d.ts:57