def route_query(prompt: str) -> str:
“””Route to 1.5B for factual recall, 7B for complex reasoning.”””
# Short, direct questions → 1.5B
if len(prompt.split()) < 15:
return "zbot-small"
# Keywords suggesting deeper reasoning → 7B
complex_signals = ["how", "why", "compare", "explain", "describe", "elaborate"]
if any(prompt.lower().startswith(w) for w in complex_signals):
return "zbot-large"
return "zbot-small" # default to fast model
Leave a Reply