Core · about 30 minutes In development — ships with the MRGD stage
Tune generation quality with MRGD
Reward-guided decoding turns "hope the model gets it right" into "generate five candidates and keep the best one, every sentence." This guide shows you how to enable it, what the knobs mean, and how to read the inspector.
The idea in thirty seconds
MRGD (from the ICCV 2025 paper Mañas et al.) samples k candidate continuations at each step, scores each with a weighted mix of reward models, appends the winner, and repeats until the response is done:
s(candidate) = w · r_hal + (1 − w) · r_rec
r_hal — a learned scorer that penalizes content not grounded in the input
r_rec — a programmatic scorer that rewards covering what's actually there
w — your precision ⇄ recall dial, changeable at run time
In the paper's benchmarks this cut hallucinated objects by ~70% versus greedy decoding, and sentence-level guidance with k=5 beat best-of-30 whole-response sampling. Maestro generalizes the recipe: any number of scorers, any weights.
1. Register scorers
Open Rewards and add one or more scorers. Maestro supports four kinds:
- Reward endpoint — an HTTP endpoint wrapping a learned reward model (image + text in, score 0–1 out).
- Object-recall scorer — programmatic: an open-vocabulary detector finds what's in the image, embeddings match it against what the text mentions. No training required.
- LLM-as-judge — any registered text or vision model plus a rubric prompt. The fastest way to start: judge with a strong model you already have.
- Script scorer — your own command; candidate JSON on stdin,
{"score": 0.87}on stdout. Runs under the sandbox policy.
2. Enable MRGD on a node
- Select any generation node (Agent or Model Call) — or drop a dedicated MRGD Decode node into the graph.
- In the inspector, switch decoding to MRGD and set:
- k — candidates per round. Default 5. The paper's sweet spot: more helps, but k=5 already beats best-of-30.
- T — evaluation period in sentences. Default 1. Setting "whole response" turns MRGD into plain best-of-k.
- Scorers & weights — pick your scorers and drag the weights; they normalize to sum to 1.
- Temperature — leave on "model default" unless you know better; candidate diversity is model-specific.
- Note the cost estimate that appears: roughly k× base generation plus scorer calls. MRGD never surprises you on price.
3. Run, and read the inspector
- Run the workflow and open the node's MRGD inspector tab.
- Each round shows all k candidates with per-scorer bars and the combined score. Watch for candidates that win recall but lose on grounding — that's the trade-off w controls.
- If every candidate scores similarly, your scorers aren't discriminating — sharpen the judge rubric or raise temperature for more diverse candidates.
4. Save presets and A/B them
- Save your configuration as a preset. Maestro ships three: Precision (w=1.0), Balanced (w=0.5), Recall (w=0.0).
- The best w is content-dependent — the paper found ~0.25 optimal on object-dense images but 1.0 on sparse ones. Don't guess: use A/B comparison to run the same node under two presets and compare outputs and scores side by side.
Where to go next
- The routing matrix — the
reward-scoringrow decides which model judges. - Your first real workflow — add an MRGD node after the writer and measure the difference.