Find answers from the community

Updated last year

Hi Logan M would it be possible to get a

Hi @Logan M , would it be possible to get a simple overview explanation of pros and cons of each query engine type?
For example, when to use Router Query Engine instead of Retriever Query engine instead of Sub question query engine.
I would really appreciate having an overview and use cases when to use each query engine.
Thank you!
L
1 comment
Retriever query engine is kind of the base/default. It retrieves nodes from the index, applies any node postprocessor you provided, and then sends the nodes to the response synthesis module

The router query engine takes a query and a bunch of indexes, and decides which index to send the query to using the LLM, and then aggregates the results

The sub question query engine takes a query and a bunch of indexes, and decides on a question to ask each index using the LLM, and then aggregates the results

There is also a router retriever, which is similar to the router query engine, but only retrieves nodes. It could be used in a retriever query engine.
Add a reply
Sign up and join the conversation on Discord