DataDesigner plugin that integrates Rubrify rubric-based evaluation as a column generator
Project description
data-designer-rubrify
A DataDesigner plugin that adds a rubrify-judge column type. It evaluates generated text against a compiled rubrify RubricBundle, producing a normalized score, per-criterion judgment details, and a pass/fail decision for every row in a DataDesigner pipeline. The plugin bridges rubrify's Judge engine to DataDesigner's model provider system so that no separate LLM configuration is required beyond what DataDesigner already manages.
Installation
pip install data-designer-rubrify
The package registers itself via the data_designer.plugins entry point. No manual registration is needed -- DataDesigner discovers it automatically on import.
Creating a rubric bundle
The plugin requires a compiled (locked) rubric bundle serialized as JSON. Use rubrify's compiler to produce one:
from rubrify import Rubric, compile_rubric
rubric = Rubric.from_yaml("my_rubric.yaml")
result = compile_rubric(rubric)
if not result.ok:
print("Audit issues:", result.issues)
# Serialize the locked bundle to JSON
bundle_json = result.bundle.model_dump_json(indent=2)
with open("my_rubric_bundle.json", "w") as f:
f.write(bundle_json)
The resulting my_rubric_bundle.json file is what you pass to rubric_path in the column config.
YAML config example
columns:
# ... upstream columns that produce 'prompt' and 'response' ...
quality_score:
column_type: rubrify-judge
target_column: response
context_column: prompt
model_alias: judge_model
rubric_path: ./my_rubric_bundle.json
judge_temperature: 0.0
judge_max_tokens: 2048
parallel_criteria: false
model_alias must match an alias defined in the DataDesignerConfigBuilder model provider setup. The plugin reads the provider's endpoint, model ID, and API key from DataDesigner's model registry and constructs the rubrify Judge internally.
Config fields
All fields on RubrifyColumnConfig:
| Field | Type | Default | Description |
|---|---|---|---|
column_type |
Literal["rubrify-judge"] |
"rubrify-judge" |
Discriminator. Must be "rubrify-judge". |
target_column |
str |
required | Name of the column whose cell values are evaluated against the rubric. |
model_alias |
str |
required | Alias of the model configuration to use as the judge LLM. Must match an alias in the DataDesigner model registry. |
rubric_path |
str | None |
None |
File-system path to a compiled rubric bundle JSON file. Relative paths are resolved against cwd. Mutually exclusive with rubric_json. |
rubric_json |
str | None |
None |
Inline compiled rubric bundle as a JSON string. Mutually exclusive with rubric_path. |
context_column |
str | None |
None |
Optional column supplying additional context for the judge (e.g. the original prompt). |
genre |
str | None |
None |
Optional genre tag to filter applicable criteria within the rubric. |
judge_temperature |
float |
0.0 |
Sampling temperature for the judge model. |
judge_max_tokens |
int |
2048 |
Maximum tokens the judge model may generate per evaluation. |
parallel_criteria |
bool |
False |
If True, evaluate criteria concurrently rather than sequentially. |
Exactly one of rubric_path or rubric_json must be provided. Supplying both or neither raises a ValueError.
Output columns
For a column named quality_score, the generator produces:
| Column | Type | Content |
|---|---|---|
quality_score |
float | None |
Normalized aggregate score from the rubric evaluation. |
quality_score__judgments |
str | None |
JSON-serialized list of per-criterion judgment dicts. |
quality_score__decision |
str | None |
Overall pass/fail decision string. |
All three columns are set to None when the target cell is empty/null or when evaluation raises an exception.
How the judge model is resolved
The plugin does not accept raw API keys or model IDs directly. Instead, it reads model configuration from DataDesigner's model registry using the model_alias field:
model_aliasis looked up in DataDesigner'sModelRegistryto obtain the provider name, model ID, endpoint URL, and API key.- The plugin tries to find the model in
harn_ai's built-in catalog viaharn_ai.models.get_model(provider, model_id). - If the model is not in the catalog (e.g. a custom or private endpoint), a minimal
harn_ai.types.Modelis constructed using a provider-to-API-format mapping that covers OpenAI, Anthropic, Google, Mistral, DeepSeek, Groq, Cerebras, xAI, OpenRouter, Fireworks, and Together. - For the API key, the plugin first checks the DataDesigner provider config; if no key is set there, it falls back to environment-based discovery via
harn_ai.env_api_keys.get_env_api_key. - A rubrify
Judgeis constructed with the resolved model, API key, and thejudge_temperature/judge_max_tokens/parallel_criteriasettings from the column config.
Requirements
- Python >= 3.12
rubrify >= 0.1.4data-designer-configdata-designer-engine
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file data_designer_rubrify-0.1.0.tar.gz.
File metadata
- Download URL: data_designer_rubrify-0.1.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6e9ee827dddef7e5bc106d8b7719367ec0a2cd1f197c164a43319e3a855abc6
|
|
| MD5 |
3afc80967f92f9be6896cbdaa5ca8776
|
|
| BLAKE2b-256 |
ae6aa373463172bfc71d6218e62f1ed1f705cd9f282d0b3883f83dec9228a677
|
File details
Details for the file data_designer_rubrify-0.1.0-py3-none-any.whl.
File metadata
- Download URL: data_designer_rubrify-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d84a98b98cc8234675dc3fb7570f71534010768274cf0414c1600bc44e2de78
|
|
| MD5 |
ed1f56998f3985e1582eb41797ad8b59
|
|
| BLAKE2b-256 |
989521484418d1e4dcb7582e9a5713fb241d3cb39588ca6a772a384e53710c07
|