Interface QueryRouter

All Known Implementing Classes:
DefaultQueryRouter, LanguageModelQueryRouter

public interface QueryRouter
Routes the given Query to one or multiple ContentRetrievers.
The goal is to ensure that Content is retrieved only from relevant data sources.
Some potential approaches include:
 - Using an LLM (see LanguageModelQueryRouter)
 - Using an EmbeddingModel (aka "semantic routing", see EmbeddingModelTextClassifier in the langchain4j module)
 - Using keyword-based routing
 - Route depending on the user (query.metadata().chatMemoryId()) and/or permissions
 
See Also: