Skip to content
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

fuzzy match gives the wrong answer in eval #139

Open
cheng-tan opened this issue May 21, 2024 · 1 comment
Open

fuzzy match gives the wrong answer in eval #139

cheng-tan opened this issue May 21, 2024 · 1 comment

Comments

@cheng-tan
Copy link

for task 361:

our agent gave the answer: Order number 170 is Canceled, order number 189 is Pending

the evaluator is using fuzzy match and evaluated our answer as wrong:

        "eval_types": [
            "string_match"
        ],
        "reference_answers": {
            "fuzzy_match": [
                "170: cancelled",
                "189: pending"
            ]
        },
        "reference_url": "",
        "program_html": [],
        "string_note": "",
        "reference_answer_raw_annotation": "170: cancelled, 189: pending"
    },
@minghchen
Copy link

In my opinion, line 165 of 'StringEvaluator' in evaluation_harness.evaluator_router should be revised to:

assert isinstance(value, list)
score *= self.fuzzy_match(
    ref=" ".join(value), pred=pred, intent=intent
)

The original code will compare each individual item in the 'fuzzy_match' list with the prediction, but the prediction should be compared with the whole list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants