prompt logo

prompt

Free

Cost-efficient, distribution-robust routing for LLM-as-a-Judge

FreeFree tier
Inputs: textOutputs: text
Type
Open Source

About prompt

LLM-as-a-Judge Routing Strategist is a system prompt from the awesome-prompts repository that instructs an LLM to act as a cost-efficient routing strategist for automated LLM evaluation. The prompt guides the LLM to dynamically decide, per query, whether to invoke a more expensive reasoning judge (e.g., chain-of-thought) or a cheaper non-reasoning judge, under a fixed compute budget. It incorporates principles from the RACER framework (distributionally robust optimization with KL-divergence uncertainty set) to remain robust to distribution shifts between calibration and production. The prompt emphasizes that reasoning judges are beneficial only for structured-verification tasks (math, coding) and can be wasteful or negative on simpler evaluations (preference, style, tone). It provides detailed guidance on routing rules, failure modes, and output format, enabling the LLM to generate optimal routing policies.

Key Features

Dynamic per-query routing between reasoning and non-reasoning judges
Optimization under a hard compute budget (cost-accuracy Pareto frontier)
Robustness to distribution shifts via distributionally robust optimization (KL uncertainty set)
References the RACER framework (ICML 2026) with provable uniqueness and linear convergence
Handles heterogeneous judge populations and misrouting failure modes
Outputs structured routing decisions (cost analysis, route, rationale) in a specified format

Pros & Cons

Pros
  • Reduces compute cost by avoiding expensive reasoning judges on simple evaluations
  • Improves overall evaluation accuracy by allocating reasoning to tasks where it adds value
  • Theoretically grounded approach with proven optimality and convergence guarantees
  • Explicitly designed to handle distribution shifts, increasing real-world reliability
  • Open-source and freely available as a system prompt
Cons
  • Requires an underlying LLM capable of following complex routing instructions
  • Effectiveness depends on the quality of judge variants available (reasoning vs. non-reasoning)
  • Calibration needed to define tasks and budgets; not a plug-and-play solution
  • The prompt itself is a text resource, not a standalone tool with an interface

Best For

Cost-optimized automated evaluation of LLM outputs across diverse query typesRouting evaluation tasks to appropriate judge variants based on complexity (structured verification vs. subjective quality)Building adaptive evaluation pipelines that respect budget constraints while maximizing accuracyImplementing robust judge selection under shifting production data distributions

FAQ

What is the main purpose of this prompt?
It instructs an LLM to act as a routing strategist for LLM-as-a-Judge, deciding per query whether to use a reasoning or non-reasoning judge to optimize accuracy under a fixed cost budget.
Why not always use a reasoning judge?
Reasoning judges are significantly more expensive and, on simpler evaluations like preference, style, or tone, provide limited or negative accuracy gains; dynamic routing avoids wasting compute.
What is the RACER framework?
RACER stands for Robust Adaptive Cost-Efficient Routing, a method for dynamic per-query routing between reasoning and non-reasoning judges using distributionally robust optimization with a KL-divergence uncertainty set, provably yielding optimal policies.
What output format does the prompt expect?
The prompt specifies a structured output including a cost allocation summary (budget spent and remaining), a route decision per query (reasoning or non-reasoning), and a rationale.
Is this tool ready to use directly?
The prompt is designed to be used as a system message for an LLM that has access to judge variants; the user must have a working evaluation setup and define tasks and budgets.