Skip to content

Added the function to compute similarity score given two string.

Hongtao Yang requested to merge similarity-score into main

Add a function to compare two strings and return a value indicating how similar the two strings are.

We need this function to compare the code suggestion models responses against the expected output.

The function first uses an embedding model to create embeddings for both strings, then compute the cosine similarity scores.

ref: https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/prompt-library/-/issues/5

Edited by Hongtao Yang

Merge request reports