-
Notifications
You must be signed in to change notification settings - Fork 436
feat(evaluators): add JSON Multi-Field Match evaluator for entity extraction validation #3331
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
Changes from all commits
2520a19
fb13c91
70f1cb6
7c32857
64f5c14
4a3065e
d47fc55
0df3ddc
04c087c
020a7e4
325d571
e0c2564
cc255ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -332,6 +332,7 @@ | |
| "name": "JSON Field Match", | ||
| "key": "field_match_test", | ||
| "direct_use": False, | ||
| "archived": True, # Deprecated - use json_multi_field_match instead | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. old json evaluators will continue working + they will still be editable in the UI but no user can create new ones.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jp-agenta let's not remove the old evaluators by mistake, a lot of users rely on them, deprecating them completely is more pain than just keeping them indefinitely imo |
||
| "settings_template": { | ||
| "json_field": { | ||
| "label": "JSON Field", | ||
|
|
@@ -355,6 +356,33 @@ | |
| "oss": True, | ||
| "tags": ["classifiers"], | ||
| }, | ||
| { | ||
| "name": "JSON Multi-Field Match", | ||
| "key": "json_multi_field_match", | ||
| "direct_use": False, | ||
| "settings_template": { | ||
| "fields": { | ||
| "label": "Fields to Compare", | ||
| "type": "fields_tags_editor", # Custom type - tag-based add/remove editor | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this tells the UI how to show the playground |
||
| "required": True, | ||
| "description": "Add fields to compare using dot notation for nested paths (e.g., user.name)", | ||
| }, | ||
| "correct_answer_key": { | ||
| "label": "Expected Answer Column", | ||
| "default": "correct_answer", | ||
| "type": "string", | ||
| "required": True, | ||
| "description": "Column name containing the expected JSON object", | ||
| "ground_truth_key": True, | ||
| "advanced": True, # Hidden in advanced section | ||
| }, | ||
| }, | ||
| "description": "Compares configured fields in expected JSON against LLM output. Each field becomes a separate metric (0 or 1), with an aggregate_score showing the percentage of matching fields. Useful for entity extraction validation.", | ||
| "requires_testcase": "always", | ||
| "requires_trace": "always", | ||
| "oss": True, | ||
| "tags": ["classifiers"], | ||
| }, | ||
| { | ||
| "name": "JSON Diff Match", | ||
| "key": "auto_json_diff", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was forgotten