Repository navigation
context-graph-eval: judge preference questions on a preference rubric - #406
Merged
Merged
Conversation
A preference question's expected output describes a good personalized answer
("would prefer Sony-compatible accessories"), not facts, so the Coverage
rubric's every-fact check scored recommendations that did exactly that at
0.2-0.6: 0/6.
- A Preference GEval rubric, following LongMemEval's own judge for this type:
the answer must recall and use the user's personal information; it need not
reflect every point; a generic answer or "not in memory" fails.
- scoring.rubric_for routes each golden to answer, abstention or preference;
the runner judges each rubric in its own pass. Contextual Recall stays
beside Preference as the reported retrieval signal.
Re-judging saved answers: six "not in memory" answers score 0.00; the
personalized recommendations from the #398 runs score 0.8-0.9.
Closes #404
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.
Part of #390. Closes #404.
Why
Preference questions ("Can you suggest a hotel for my trip to Miami?") have an expected output that describes a good personalized answer, e.g. "The user would prefer suggestions of Sony-compatible accessories or high-quality photography gear … may not prefer other brands." The Coverage rubric checks that every fact in the expected output is present, so recommendations that did exactly what the description asks scored 0.2–0.6: 0/6. Abstention had the same mismatch before it got its own rubric.
What changes
PreferenceGEval rubric forsingle-session-preferencequestions. It follows LongMemEval's own judge for this type ("The model does not need to reflect all the points in the rubric. The response is correct as long as it recalls and utilizes the user's personal information correctly."), so scores stay comparable with published numbers. A generic answer, one that ignores the user's preferences, or "not in memory" fails.scoring.rubric_forroutes each golden toanswer,abstentionorpreference;build_metrics(judge, rubric=...)replaces theabstentionflag, and the runner judges each rubric in its own pass.Evidence
Re-judged the six preference answers saved from three runs with the new rubric (Sonnet 4.5, minimal effort), without re-running retrieval:
The rubric isn't lenient: it fails refusals and generic answers, and passes recommendations that use what the user said. The drop from the first to the second run is a prompt conflict in #405 (its false-premise rule also caught recommendation questions); it's fixed there.
Tests
context-graph/eval: 256 passed, 5 skipped against a real Memgraph; ruff and ty clean. New: routing to the right rubric, the preference metric's makeup, one judge pass per rubric.