Interface QueryRouter

All Superinterfaces:
Function<Query,List<DocumentRetriever>>
All Known Implementing Classes:
AllRetrieversQueryRouter

public interface QueryRouter extends Function<Query,List<DocumentRetriever>>
A component for routing a query to one or more document retrievers. It provides a decision-making mechanism to support various scenarios and making the Retrieval Augmented Generation flow more flexible and extensible. It can be used to implement routing strategies using metadata, large language models, tools (the foundation of Agentic RAG), and other techniques.

When retrieving documents from multiple sources, you'll need to join the results before concluding the retrieval stage. For this purpose, you can use the DocumentJoiner.

Since:
1.0.0
Author:
Thomas Vitale