Skip to content

documentation on cosine similarity range is wrongΒ #923

@JunhaoWang

Description

@JunhaoWang

In doc,

The concept of Answer Semantic Similarity pertains to the assessment of the semantic resemblance between the generated answer and the ground truth. This evaluation is based on the ground truth and the answer, with values falling within the range of 0 to 1.

This is wrong since cosine similarity can take on negative values

a = [1.0]
b = [-1.0]
cosine_sim_a_b = a dot_product b / (a_norm x b_norm) = -1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions