Retriever router
RetrieverRouterQueryEngine #
Bases: BaseQueryEngine
Retriever-based router query engine.
NOTE: this is deprecated, please use our new ToolRetrieverRouterQueryEngine
Use a retriever to select a set of Nodes. Each node will be converted into a ToolMetadata object, and also used to retrieve a query engine, to form a QueryEngineTool.
NOTE: this is a beta feature. We are figuring out the right interface between the retriever and query engine.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
selector
|
BaseSelector
|
A selector that chooses one out of many options based on each candidate's metadata and query. |
required |
query_engine_tools
|
Sequence[QueryEngineTool]
|
A sequence of candidate query engines. They must be wrapped as tools to expose metadata to the selector. |
required |
callback_manager
|
Optional[CallbackManager]
|
A callback manager. |
None
|
Source code in llama-index-core/llama_index/core/query_engine/router_query_engine.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
|