Cosine similarity

hi everyone,
I have a database with 600 nodes, they are all long texts, and I have to calculate the similarity to find duplicates with the cosine similarity function. how can i write the query?

thank you very much

Hi Lorenzo, what have you tried so far and where did you get stuck?