created calculate similarities in the inmemory ESM