codebrain_consensus_generate
Generate multiple candidates for a prompt and have Qwen select the best one. Useful for high-variance tasks where single outputs may drift.
Instructions
Generate N candidates, let Qwen pick the best, return the winner.
Runs prompt N times (serial — Ollama serialises on single GPU anyway),
then does one additional call where Qwen is shown all candidates and
asked to return the best one verbatim. Useful for high-variance tasks
where a single shot drifts but majority-vote style sampling tightens
quality at the cost of N+1 inference calls.
Args:
prompt: The task description or content request.
system: Optional system message to steer tone / format / constraints.
n: Number of candidates to generate (default 3, clamped to [2, 5]).
use_brain: If true, prepend .brain/context.md to the system prompt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| system | No | ||
| n | No | ||
| use_brain | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |