Skip to content

[Bug]: order of similarity matters, WHY? #648

@dhandhalyabhavik

Description

@dhandhalyabhavik

Current Behavior

Using the default onnx model,
Score function

def get_score(a, b):
    return evaluation.evaluation(
        {
            'question': a
        },
        {
            'question': b
        }
    )

Case 1:

a = 'What is neural network?'
b = 'Explain neural network and its components.'
c = 'What are the key components of neural network?'
print (get_score(a, b))
print (get_score(a, c))
print (get_score(b, c))

0.7585506439208984
0.02885962650179863
0.0909486636519432

Case 2:

a = 'What is neural network?'
b = 'Explain neural network and its components.'
c = 'What are the key components of neural network?'
print (get_score(b, a))
print (get_score(c, a))
print (get_score(c, b))

0.17746654152870178
0.013074617832899094
0.8378676772117615

Just changed x,y to y,x while passing argument to get_score, why drastic changes in scores?

Expected Behavior

No response

Steps To Reproduce

No response

Environment

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions