AI / LlamaIndex Interview Questions
What is a RouterQueryEngine and when would you use it?
A RouterQueryEngine picks which of several query engine tools should handle a given query, using an LLM-based selector that reads each tool's description and decides the best fit, rather than sending every query to every tool.
You'd use it when you have distinct data sources or index types serving different purposes, for example a VectorStoreIndex over product documentation and a SummaryIndex over release notes, and you want incoming questions automatically directed to whichever is more appropriate instead of always querying both.
This keeps latency and cost down compared to querying everything, and it also lets you combine index types that behave very differently, like precise vector search versus full-corpus summarization, behind a single entry point.
More Related questions...