Downloads · 30 days
10
10% of all-time downloads
Rabbani088888/adaptive-rag-router
adaptive-rag-router is a text classification model from Rabbani088888. Use it when you need a label for a piece of text. It is set up for transformers.
This is a fine-tuned distilbert-base-uncased model trained to classify incoming user queries into one of three information-need categories: - factual: Queries that are simple entity-centric lookups (suited for sparse/…
Downloads · 30 days
10
10% of all-time downloads
All-time downloads
97
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This is a fine-tuned distilbert-base-uncased model trained to classify incoming user queries into one of three information-need categories:
factual: Queries that are simple entity-centric lookups (suited for sparse/BM25 retrieval).abstractive: Queries requiring conceptual or thematic context (suited for dense/FAISS retrieval).multi-hop: Queries requiring synthesizing information across multiple documents (suited for iterative hybrid retrieval).This router is the core decision engine for an Adaptive RAG pipeline. Instead of using a one-size-fits-all retrieval strategy (which hurts latency or accuracy), this lightweight router dynamically dispatches the query to the optimal strategy.
distilbert-base-uncasedThis model is intended to be used as a preprocessing step in a RAG pipeline. It outputs the optimal retrieval strategy, which can be mapped to downstream data stores.
Example Usage:
from transformers import pipeline
router = pipeline("text-classification", model="your-username/adaptive-rag-router")
prediction = router("What is the role of Wingless signaling in Drosophila hematopoiesis?")
print(prediction)
# [{'label': 'abstractive', 'score': 0.98}]
When deploying or evaluating this model, please note the following limitations recorded during our evaluation phase:
factual, abstractive, multi-hop) due to project scope. It does not predict time-sensitive (recency-biased) or no-retrieval-needed (direct LLM answering) classes.multi-hop queries (escalating 47% of eligible non-multi-hop queries as a fallback).scifact and arguana were on Colab GPUs, while others (nfcorpus, hotpotqa) ran locally. Cross-dataset latency comparisons are invalid.