Improve similarity API