Skip to main content

Class: RetrieverQueryEngine

A query engine that uses a retriever to query an index and then synthesizes the response.

Extends

Implements

Constructors

new RetrieverQueryEngine()

new RetrieverQueryEngine(retriever, responseSynthesizer?, preFilters?, nodePostprocessors?): RetrieverQueryEngine

Parameters

retriever: BaseRetriever

responseSynthesizer?: BaseSynthesizer

preFilters?: unknown

nodePostprocessors?: BaseNodePostprocessor[]

Returns

RetrieverQueryEngine

Overrides

PromptMixin.constructor

Defined in

packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:23

Properties

nodePostprocessors

nodePostprocessors: BaseNodePostprocessor[]

Defined in

packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:20


preFilters?

optional preFilters: unknown

Defined in

packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:21


responseSynthesizer

responseSynthesizer: BaseSynthesizer

Defined in

packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:19


retriever

retriever: BaseRetriever

Defined in

packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:18

Methods

_getPromptModules()

_getPromptModules(): object

Returns

object

responseSynthesizer

responseSynthesizer: BaseSynthesizer

Overrides

PromptMixin._getPromptModules

Defined in

packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:41


_getPrompts()

protected _getPrompts(): PromptsDict

Returns

PromptsDict

Inherited from

PromptMixin._getPrompts

Defined in

packages/llamaindex/src/prompts/Mixin.ts:79


_updatePrompts()

protected _updatePrompts(promptsDict): void

Parameters

promptsDict: PromptsDict

Returns

void

Inherited from

PromptMixin._updatePrompts

Defined in

packages/llamaindex/src/prompts/Mixin.ts:87


getPrompts()

getPrompts(): PromptsDict

Returns all prompts from the mixin and its modules

Returns

PromptsDict

Inherited from

PromptMixin.getPrompts

Defined in

packages/llamaindex/src/prompts/Mixin.ts:27


query()

query(params)

query(params): Promise<AsyncIterable<EngineResponse>>

Query the query engine and get a response.

Parameters

params: QueryEngineParamsStreaming

Returns

Promise<AsyncIterable<EngineResponse>>

Implementation of

QueryEngine.query

Defined in

packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:69

query(params)

query(params): Promise<EngineResponse>

Query the query engine and get a response.

Parameters

params: QueryEngineParamsNonStreaming

Returns

Promise<EngineResponse>

Implementation of

QueryEngine.query

Defined in

packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:72


updatePrompts()

updatePrompts(promptsDict): void

Updates the prompts in the mixin and its modules

Parameters

promptsDict: PromptsDict

Returns

void

Inherited from

PromptMixin.updatePrompts

Defined in

packages/llamaindex/src/prompts/Mixin.ts:48


validatePrompts()

validatePrompts(promptsDict, moduleDict): void

Validates the prompt keys and module keys

Parameters

promptsDict: PromptsDict

moduleDict: ModuleDict

Returns

void

Inherited from

PromptMixin.validatePrompts

Defined in

packages/llamaindex/src/prompts/Mixin.ts:10