Skip to content

Enhance String Intersection Function for More Accurate Answer Evaluation in qa_evaluate.py #13

Description

@yarikama

Thank you for your excellent work!

In the current implementation of qa_evaluate, the has_intersection function used for comparing predicted answers with gold standard answers splits strings on whitespace and checks for exact matches between words.

This can lead to false negatives when comparing strings with minor differences in punctuation.

The current method may incorrectly evaluate answers as different when they are semantically the same but differ in punctuation. For example, "Yes," and "Yes" are currently treated as different answers.

I suggest implementing an improved has_intersection function with removing punctuation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions