Skip to main content

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

RetrieverQueryEngine

Overrides

BaseQueryEngine.constructor

Defined in

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

Properties

_query

protected readonly _query: QueryFn

Inherited from

BaseQueryEngine._query

Defined in

packages/core/dist/query-engine/index.d.ts:18


nodePostprocessors

nodePostprocessors: BaseNodePostprocessor[]

Defined in

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


preFilters?

optional preFilters: unknown

Defined in

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


responseSynthesizer

responseSynthesizer: BaseSynthesizer

Defined in

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


retriever

retriever: BaseRetriever

Defined in

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

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:64


_getPrompts()

protected _getPrompts(): object

Returns

object

Overrides

BaseQueryEngine._getPrompts

Defined in

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


_updatePrompts()

protected _updatePrompts(): void

Returns

void

Overrides

BaseQueryEngine._updatePrompts

Defined in

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


getPrompts()

getPrompts(): PromptsRecord

Returns

PromptsRecord

Inherited from

BaseQueryEngine.getPrompts

Defined in

packages/core/dist/prompts/index.d.ts:58


query()

query(strOrQueryBundle, stream)

query(strOrQueryBundle, stream): Promise<AsyncIterable<EngineResponse, any, any>>

Parameters

strOrQueryBundle: QueryType

stream: true

Returns

Promise<AsyncIterable<EngineResponse, any, any>>

Inherited from

BaseQueryEngine.query

Defined in

packages/core/dist/query-engine/index.d.ts:20

query(strOrQueryBundle, stream)

query(strOrQueryBundle, stream?): Promise<EngineResponse>

Parameters

strOrQueryBundle: QueryType

stream?: false

Returns

Promise<EngineResponse>

Inherited from

BaseQueryEngine.query

Defined in

packages/core/dist/query-engine/index.d.ts:21


updatePrompts()

updatePrompts(prompts): void

Parameters

prompts: PromptsRecord

Returns

void

Inherited from

BaseQueryEngine.updatePrompts

Defined in

packages/core/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/dist/prompts/index.d.ts:57