QueryRoutingRetriever<T>
Models & Types ยท AiDotNet.RetrievalAugmentedGeneration.Retrievers
Routes each query to the single most appropriate underlying retriever (data source). With a real text generator the routing is an LLM classification over the source descriptions; without one it falls back to description/query token overlap. Mirrors the LangChain/LlamaIndex router retriever.
Inheritance: RetrieverBase<T> โ QueryRoutingRetriever<T>
Constructors
| Constructor | Summary |
|---|---|
QueryRoutingRetriever(IReadOnlyList<Route<T>> routes, ITextGenerator generator, int defaultTopK) |
Methods
| Method | Summary |
|---|---|
Route<T> ChooseRoute(string query) |
Exposed for testing/inspection: which route a query resolves to. |