Add CJE integration for calibrated evaluation#2370
Open
elandesberg wants to merge 12 commits intoexpectedparrot:mainfrom
Open
Add CJE integration for calibrated evaluation#2370elandesberg wants to merge 12 commits intoexpectedparrot:mainfrom
elandesberg wants to merge 12 commits intoexpectedparrot:mainfrom
Conversation
Adds integration with CJE (Causal Judge Evaluation) to enable calibrated
evaluation of AI survey responses against human ground truth.
Features:
- New `edsl/cje_integration/` package with calibrator, data adapters, result types
- `Results.calibrate()` convenience method for one-line calibration
- Calibrate with 5-10% human labels to get valid estimates for full dataset
- Proper uncertainty quantification with confidence intervals
- Statistical comparison between models/policies
Usage:
results = survey.by(models).run()
results = results.add_column("human_rating", human_labels)
cal = results.calibrate("sentiment_score", "human_rating")
print(cal.estimates) # {'gpt-4o': 0.72, 'claude': 0.68}
cal.compare("gpt-4o", "claude") # Statistical comparison
Install: pip install edsl[cje]
Includes:
- Demo notebook: docs/notebooks/cje_calibration_demo.ipynb
- 11 passing tests
Author
|
Any feedback is appreciated! Just a first pass - hope it makes sense. |
Author
|
Actually, I just ran into a bug in the notebook, so please hold off on review. |
EDSL Results doesn't have add_column(), so changed the API to accept oracle labels directly as a list parameter instead of a column name. Changes: - data_adapters.py: oracle_column -> oracle_labels (list) - calibrator.py: Updated CJECalibrator and calibrate() signatures - results.py: Updated Results.calibrate() method - notebook: Updated demo to pass human_labels list directly
Author
|
Ok, this is ready for a review. No rush. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds integration with CJE (Causal Judge Evaluation) to enable calibrated evaluation of AI survey responses against human ground truth.
Key benefits:
Usage
Install:
pip install edsl[cje]Changes
edsl/cje_integration/package (calibrator, data adapters, result types)Results.calibrate()convenience methodcje-evalas optional dependency with[cje]extradocs/notebooks/cje_calibration_demo.ipynbTest plan
pytest tests/cje_integration/ -v)