Skip to content

Added a new MetricBasedNer that allows calculating entity similary using any Unitxt metric. #1860

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 10 commits into from
Jul 16, 2025

Conversation

yoavkatz
Copy link
Member

@yoavkatz yoavkatz commented Jul 10, 2025

It is an extension of CustomF1Fuzzy metric.

Example:

MetricBasedNer(metric="metrics.llm_as_judge.direct.watsonx.llama3_3_70b[criteria=metrics.llm_as_judge.direct.criteria.correctness_based_on_ground_truth,context_fields=ground_truth]")
metric.set_confidence_interval_calculation(False)

or

metrics.metric_based_ner[metric=metrics.llm_as_judge.direct.watsonx.llama3_3_70b[criteria=metrics.llm_as_judge.direct.criteria.correctness_based_on_ground_truth,context_fields=ground_truth]

yoavkatz added 2 commits July 10, 2025 11:23
…ing any Unitxt metric. It is an. extension of CustomF1Fuzzy metric.

Signed-off-by: Yoav Katz <[email protected]>
@yoavkatz yoavkatz requested a review from elronbandel July 10, 2025 13:39
yoavkatz and others added 2 commits July 10, 2025 17:35
Added example of using llm judge for NER tasks.

Signed-off-by: Yoav Katz <[email protected]>
@elronbandel
Copy link
Member

Catalog prep 2 error still seem related

@yoavkatz yoavkatz merged commit b9333a2 into main Jul 16, 2025
16 of 19 checks passed
@yoavkatz yoavkatz deleted the metric_based_ner branch July 16, 2025 16:07
oktie pushed a commit that referenced this pull request Jul 16, 2025
…ing any Unitxt metric. (#1860)

* Added a new MetricBasedNer that allows calculating entity similary using any Unitxt metric.  It is an. extension of CustomF1Fuzzy metric.

Signed-off-by: Yoav Katz <[email protected]>

* Updated test to check for partial matches

Signed-off-by: Yoav Katz <[email protected]>

* Added metric_based_ner to catalog.

Added example of using llm judge for NER tasks.

Signed-off-by: Yoav Katz <[email protected]>

* Corrected test

Signed-off-by: Yoav Katz <[email protected]>

* Made FuzzyNer baackward compatible with past implementation.

Signed-off-by: Yoav Katz <[email protected]>

---------

Signed-off-by: Yoav Katz <[email protected]>
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