Skip to content

ruler docs #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2025
Merged

ruler docs #221

merged 2 commits into from
Jul 11, 2025

Conversation

corbt
Copy link
Contributor

@corbt corbt commented Jul 10, 2025

adding to the docs

@corbt corbt requested a review from arcticfly July 10, 2025 21:24
@corbt corbt force-pushed the ruler-docs branch 3 times, most recently from a06259f to e4b23fc Compare July 11, 2025 01:58
# Use RULER to score them
judged_group = await ruler_score_group(
group,
{"model": "openai/o3"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why nest model in a dictionary, instead of making it a top-level parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets us customize other litellm params, which is useful for eg. using a local model with a specific api endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that said, model is frequently going to be the only thing you need to customize. I'll make that its own explicit argument and have a separate one for additional litellm params.

if judged_group: # Check if judging succeeded
for traj in judged_group.trajectories:
print(f"Reward: {traj.reward}")
print(f"RULER explanation: {traj.metrics['ruler_score']}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't metrics usually composed of numerical values, as opposed to string explanations? Did you mean to reference a field in metadata?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah good catch, fixed.

adding to the docs
Copy link
Contributor

@arcticfly arcticfly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

…litellm_params

- Changed ruler() and ruler_score_group() to accept separate judge_model (str) and extra_litellm_params (dict) parameters
- Updated all call sites to use the new signature
- Updated documentation with new parameter structure and examples
- Removed backward compatibility as this is a new feature

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@corbt corbt merged commit 2d62efc into main Jul 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants