MOOSe
Multi-Objective Tuning of Decision Model Questions and Label Definitions for Rubric-Based Judging
Overview
MOOSe tunes the questions and label definitions that a judge uses to score responses. Give it labeled examples and an initial rubric, and it searches for a prompt that better matches your labels across multiple criteria. You can run the same workflow with a coding agent or directly from the command line.
Cite MOOSe
@software{moose2026,
title={MOOSe: Multi-Objective Tuning of Decision Model Questions and Label Definitions for Rubric-Based Judging},
author={Divekar, Abhishek and Darshan, Parth},
year={2026},
url={https://github.com/adivekar-utexas/MOOSe}
}
Installation
Requires Python 3.11–3.13.
python -m pip install prompt-moose # CLI
python -m pip install 'prompt-moose[analysis]' # optional plotting dependencies
python -m pip install 'prompt-moose[dev]' # development and test dependencies
Usage
Both examples use NVIDIA HelpSteer2 to tune a TextGrad judge for five ratings: helpfulness, correctness, coherence, complexity, and verbosity. Set OPENROUTER_API_KEY in your environment before running the example. Training and evaluation make billable model calls.
Agent UX
From your project directory, run moose agents init. It writes AGENTS.md at the project root, .agents/skills/prompt-moose/SKILL.md, and the bundled reference at .agents/skills/prompt-moose/references/COMMANDS.md. The setup itself is offline and does not launch an agent.
moose agents init
claude -p "Read AGENTS.md and the MOOSe skill. Use moose to optimize a judge prompt for nvidia/HelpSteer2 with TextGrad. Predict helpfulness, correctness, coherence, complexity, and verbosity. For each model role use openrouter/deepseek/deepseek-v4.1-flash with api_base null and api_key_name OPENROUTER_API_KEY. Run three training steps, evaluate the saved selection on held-out data, plot per-task MAE, and stop. If blocked, report the error without starting a server or changing permissions."
Give the same prompt to Codex or OpenCode from that directory. The agent can create the YAML files, run moose, and plot results from the saved evaluation data. You can also do those steps yourself below.
CLI usage
Generate the three files offline. Here --path is the output file to create.
moose init dataset --hf --path expt/configs/data/dataset.yaml
moose init prompt --path expt/configs/rubric/prompts.yaml
moose init expt --textgrad --path expt/configs/algo/main.yaml \
--dataset-path ../data/dataset.yaml --initial-prompt-path ../rubric/prompts.yaml
Dataset (expt/configs/data/dataset.yaml). Use the complete HelpSteer2 dataset YAML in place of the generated template. It declares prompt and response as inputs and all five ratings as ordinal integers from 0 to 4. Its source block reads:
# Excerpt from dataset.yaml
dataset:
mode: huggingface
name: HelpSteer2
input_cols: [prompt, response]
setup:
hf_id: nvidia/HelpSteer2
hf_config: default
split_map: {train: train, test: validation}
MOOSe holds out part of the Hub training split for prompt selection. The Hub validation split serves as the separate test set here.
Prompt (expt/configs/rubric/prompts.yaml). Use the complete HelpSteer2 rubric. Each seed contains an instruction and optional label descriptions for every task. Here is the helpfulness entry:
# Excerpt from prompts.yaml
prompt:
input_col_labels: {prompt: User Prompt, response: Assistant Response}
initial_instruction:
0:
helpfulness:
instructions: Rate how well the response helps the user with the prompt.
criteria:
"0": Does not help address the prompt.
"4": Provides excellent help and fully addresses the relevant needs.
Experiment (expt/configs/algo/main.yaml). Replace the generated main file with the example below. The dataset and prompt paths are relative to main.yaml, so other experiments can reuse either file. run.output_dir is relative to where you run moose.
name: textgrad
dataset: data/dataset.yaml
prompt: prompts/prompts.yaml
train:
steps: 3
batch_size: 4
val_size: 16
validation_metric: mae
task_llm: &model
name: openrouter/deepseek/deepseek-v4.1-flash
api_key_name: OPENROUTER_API_KEY
loss_llm: *model
gradient_llm: *model
optimizer_llm: *model
eval: {metrics: [mae], size: 25}
run: {output_dir: outputs/helpsteer2}
moose train expt/configs/algo/main.yaml
moose eval expt/configs/algo/main.yaml --eval.prompts best_macro
moose infer expt/configs/algo/main.yaml --id a5defc --data inputs.parquet
train writes the run summary, prompt library, and step logs. eval measures the selected prompt on labeled test rows. For infer, replace a5defc with the six-character ID in run_summary.json and provide a CSV or Parquet file with prompt and response; no labels are needed.
To reuse the selected TextGrad rubric, set prompt: ../outputs/helpsteer2/best_macro.yaml in a new experiment YAML under expt/configs/algo/. Set a new run.output_dir before training again.
Paper experiments. The experiment settings, dataset definitions, and starting rubrics are already separate. The experiment runners show how to pair them; start with the family runner. Check model IDs and credentials before running those configurations. For flags and artifact details, see the command reference.
Algorithm Catalog
| Algorithm | How it proposes edits | What to evaluate |
|---|---|---|
OPRO (opro) |
Uses a history of prompts and numeric scores to propose candidates. | best_macro: the highest-scoring prompt in the validation-ranked history. |
GPO (gpo) |
Uses a scored prompt history and an edit budget. Textual feedback is optional. | best_macro: the highest-scoring prompt in the validation-ranked history. |
TextGrad (textgrad) |
By default, writes critiques and edit suggestions per task, then updates the rubric jointly. | best_macro: the final accepted prompt. The default validation gate uses MAE. |
EmoPrompt (emoprompt) |
Crosses over and mutates prompts, keeping a population rather than a single winner. | final_front: the saved non-dominated prompts evaluated as an ensemble. |
Each task declares its label column and output type, such as binary, categorical, ordinal integer, ordered string labels, or a bounded numeric score. Tasks can use different output types and loss metrics in the same rubric. For example, pair a binary safety judgment with a 0–4 helpfulness rating.
Design Principles
- Keep the rubric portable. Reuse the same dataset and starting rubric across experiments, or take a saved rubric into another run without an export step.
- Separate selection from reporting. Use validation data to compare prompts; reserve test data for reporting. Pareto group evaluation follows the same separation.
- Keep the evidence. Run artifacts show what the judge predicted, what feedback the optimizer saw, and how the rubric changed.
- Use the same workflow with or without an agent. Agents call the same CLI and produce the same artifacts you get from running it directly.
Contributing
Open an issue with a minimal reproduction, or submit a pull request with tests for the changed behavior. Never include API keys or private data in configs or logs you share.
License
MOOSe is free forever under the MIT License. Hosted model providers may charge for API calls.
If you use MOOSe in your research, please cite it.
Metadata
Release files for prompt-moose 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prompt_moose-0.1.0.tar.gz | 302.4 kB | Without provenance | Details for prompt_moose-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prompt_moose-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for prompt_moose-0.1.0-py3-none-any.whl |
Total release size: 639.2 kB
Release files / prompt_moose-0.1.0.tar.gz
| Download URL | prompt_moose-0.1.0.tar.gz |
|---|---|
| Size | 302.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2914e3c15646eb7ff9191cd52e2f8c6ff9d66316424b0c0b0972d06e047f6bd2
|
|
BLAKE2b-256 checksum How to use checksums |
33cac4f6543d1b32c7c2d2527cd6583b047ccd9b9e7aedf8f17e6589ffb4c012
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / prompt_moose-0.1.0-py3-none-any.whl
| Download URL | prompt_moose-0.1.0-py3-none-any.whl |
|---|---|
| Size | 336.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6c5c76326b7cb50464a6d1a99768bccccf9042b38b094706d4c763105b23ea1
|
|
BLAKE2b-256 checksum How to use checksums |
23a541b0868eae1a5552345c83b5cbcf50cede3f1c1a178b34cd4608c2584e41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for prompt-moose 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.